001package org.hl7.fhir.r4.model.codesystems; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r4 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 054 055 056import org.hl7.fhir.exceptions.FHIRException; 057 058public enum TestscriptOperationCodes { 059 060 /** 061 * Read the current state of the resource. 062 */ 063 READ, 064 /** 065 * Read the state of a specific version of the resource. 066 */ 067 VREAD, 068 /** 069 * Update an existing resource by its id. 070 */ 071 UPDATE, 072 /** 073 * Update an existing resource by its id (or create it if it is new). 074 */ 075 UPDATECREATE, 076 /** 077 * Patch an existing resource by its id. 078 */ 079 PATCH, 080 /** 081 * Delete a resource. 082 */ 083 DELETE, 084 /** 085 * Conditionally delete a single resource based on search parameters. 086 */ 087 DELETECONDSINGLE, 088 /** 089 * Conditionally delete one or more resources based on search parameters. 090 */ 091 DELETECONDMULTIPLE, 092 /** 093 * Retrieve the change history for a particular resource or resource type. 094 */ 095 HISTORY, 096 /** 097 * Create a new resource with a server assigned id. 098 */ 099 CREATE, 100 /** 101 * Search based on some filter criteria. 102 */ 103 SEARCH, 104 /** 105 * Update, create or delete a set of resources as independent actions. 106 */ 107 BATCH, 108 /** 109 * Update, create or delete a set of resources as a single transaction. 110 */ 111 TRANSACTION, 112 /** 113 * Get a capability statement for the system. 114 */ 115 CAPABILITIES, 116 /** 117 * Realizes an ActivityDefinition in a specific context 118 */ 119 APPLY, 120 /** 121 * Closure Table Maintenance 122 */ 123 CLOSURE, 124 /** 125 * Finding Codes based on supplied properties 126 */ 127 FINDMATCHES, 128 /** 129 * Compare two systems CapabilityStatements 130 */ 131 CONFORMS, 132 /** 133 * Aggregates and returns the parameters and data requirements for a resource and all its dependencies as a single module definition 134 */ 135 DATAREQUIREMENTS, 136 /** 137 * Generate a Document 138 */ 139 DOCUMENT, 140 /** 141 * Request clinical decision support guidance based on a specific decision support module 142 */ 143 EVALUATE, 144 /** 145 * Invoke an eMeasure and obtain the results 146 */ 147 EVALUATEMEASURE, 148 /** 149 * Return all the related information as described in the Encounter or Patient 150 */ 151 EVERYTHING, 152 /** 153 * Value Set Expansion 154 */ 155 EXPAND, 156 /** 157 * Find a functional list 158 */ 159 FIND, 160 /** 161 * Invoke a GraphQL query 162 */ 163 GRAPHQL, 164 /** 165 * Test if a server implements a client's required operations 166 */ 167 IMPLEMENTS, 168 /** 169 * Last N Observations Query 170 */ 171 LASTN, 172 /** 173 * Concept Look Up and Decomposition 174 */ 175 LOOKUP, 176 /** 177 * Find patient matches using MPI based logic 178 */ 179 MATCH, 180 /** 181 * Access a list of profiles, tags, and security labels 182 */ 183 META, 184 /** 185 * Add profiles, tags, and security labels to a resource 186 */ 187 METAADD, 188 /** 189 * Delete profiles, tags, and security labels for a resource 190 */ 191 METADELETE, 192 /** 193 * Populate Questionnaire 194 */ 195 POPULATE, 196 /** 197 * Generate HTML for Questionnaire 198 */ 199 POPULATEHTML, 200 /** 201 * Generate a link to a Questionnaire completion webpage 202 */ 203 POPULATELINK, 204 /** 205 * Process a message according to the defined event 206 */ 207 PROCESSMESSAGE, 208 /** 209 * Build Questionnaire 210 */ 211 QUESTIONNAIRE, 212 /** 213 * Observation Statistics 214 */ 215 STATS, 216 /** 217 * Fetch a subset of the CapabilityStatement resource 218 */ 219 SUBSET, 220 /** 221 * CodeSystem Subsumption Testing 222 */ 223 SUBSUMES, 224 /** 225 * Model Instance Transformation 226 */ 227 TRANSFORM, 228 /** 229 * Concept Translation 230 */ 231 TRANSLATE, 232 /** 233 * Validate a resource 234 */ 235 VALIDATE, 236 /** 237 * ValueSet based Validation 238 */ 239 VALIDATECODE, 240 /** 241 * added to help the parsers 242 */ 243 NULL; 244 public static TestscriptOperationCodes fromCode(String codeString) throws FHIRException { 245 if (codeString == null || "".equals(codeString)) 246 return null; 247 if ("read".equals(codeString)) 248 return READ; 249 if ("vread".equals(codeString)) 250 return VREAD; 251 if ("update".equals(codeString)) 252 return UPDATE; 253 if ("updateCreate".equals(codeString)) 254 return UPDATECREATE; 255 if ("patch".equals(codeString)) 256 return PATCH; 257 if ("delete".equals(codeString)) 258 return DELETE; 259 if ("deleteCondSingle".equals(codeString)) 260 return DELETECONDSINGLE; 261 if ("deleteCondMultiple".equals(codeString)) 262 return DELETECONDMULTIPLE; 263 if ("history".equals(codeString)) 264 return HISTORY; 265 if ("create".equals(codeString)) 266 return CREATE; 267 if ("search".equals(codeString)) 268 return SEARCH; 269 if ("batch".equals(codeString)) 270 return BATCH; 271 if ("transaction".equals(codeString)) 272 return TRANSACTION; 273 if ("capabilities".equals(codeString)) 274 return CAPABILITIES; 275 if ("apply".equals(codeString)) 276 return APPLY; 277 if ("closure".equals(codeString)) 278 return CLOSURE; 279 if ("find-matches".equals(codeString)) 280 return FINDMATCHES; 281 if ("conforms".equals(codeString)) 282 return CONFORMS; 283 if ("data-requirements".equals(codeString)) 284 return DATAREQUIREMENTS; 285 if ("document".equals(codeString)) 286 return DOCUMENT; 287 if ("evaluate".equals(codeString)) 288 return EVALUATE; 289 if ("evaluate-measure".equals(codeString)) 290 return EVALUATEMEASURE; 291 if ("everything".equals(codeString)) 292 return EVERYTHING; 293 if ("expand".equals(codeString)) 294 return EXPAND; 295 if ("find".equals(codeString)) 296 return FIND; 297 if ("graphql".equals(codeString)) 298 return GRAPHQL; 299 if ("implements".equals(codeString)) 300 return IMPLEMENTS; 301 if ("lastn".equals(codeString)) 302 return LASTN; 303 if ("lookup".equals(codeString)) 304 return LOOKUP; 305 if ("match".equals(codeString)) 306 return MATCH; 307 if ("meta".equals(codeString)) 308 return META; 309 if ("meta-add".equals(codeString)) 310 return METAADD; 311 if ("meta-delete".equals(codeString)) 312 return METADELETE; 313 if ("populate".equals(codeString)) 314 return POPULATE; 315 if ("populatehtml".equals(codeString)) 316 return POPULATEHTML; 317 if ("populatelink".equals(codeString)) 318 return POPULATELINK; 319 if ("process-message".equals(codeString)) 320 return PROCESSMESSAGE; 321 if ("questionnaire".equals(codeString)) 322 return QUESTIONNAIRE; 323 if ("stats".equals(codeString)) 324 return STATS; 325 if ("subset".equals(codeString)) 326 return SUBSET; 327 if ("subsumes".equals(codeString)) 328 return SUBSUMES; 329 if ("transform".equals(codeString)) 330 return TRANSFORM; 331 if ("translate".equals(codeString)) 332 return TRANSLATE; 333 if ("validate".equals(codeString)) 334 return VALIDATE; 335 if ("validate-code".equals(codeString)) 336 return VALIDATECODE; 337 throw new FHIRException("Unknown TestscriptOperationCodes code '"+codeString+"'"); 338 } 339 public String toCode() { 340 switch (this) { 341 case READ: return "read"; 342 case VREAD: return "vread"; 343 case UPDATE: return "update"; 344 case UPDATECREATE: return "updateCreate"; 345 case PATCH: return "patch"; 346 case DELETE: return "delete"; 347 case DELETECONDSINGLE: return "deleteCondSingle"; 348 case DELETECONDMULTIPLE: return "deleteCondMultiple"; 349 case HISTORY: return "history"; 350 case CREATE: return "create"; 351 case SEARCH: return "search"; 352 case BATCH: return "batch"; 353 case TRANSACTION: return "transaction"; 354 case CAPABILITIES: return "capabilities"; 355 case APPLY: return "apply"; 356 case CLOSURE: return "closure"; 357 case FINDMATCHES: return "find-matches"; 358 case CONFORMS: return "conforms"; 359 case DATAREQUIREMENTS: return "data-requirements"; 360 case DOCUMENT: return "document"; 361 case EVALUATE: return "evaluate"; 362 case EVALUATEMEASURE: return "evaluate-measure"; 363 case EVERYTHING: return "everything"; 364 case EXPAND: return "expand"; 365 case FIND: return "find"; 366 case GRAPHQL: return "graphql"; 367 case IMPLEMENTS: return "implements"; 368 case LASTN: return "lastn"; 369 case LOOKUP: return "lookup"; 370 case MATCH: return "match"; 371 case META: return "meta"; 372 case METAADD: return "meta-add"; 373 case METADELETE: return "meta-delete"; 374 case POPULATE: return "populate"; 375 case POPULATEHTML: return "populatehtml"; 376 case POPULATELINK: return "populatelink"; 377 case PROCESSMESSAGE: return "process-message"; 378 case QUESTIONNAIRE: return "questionnaire"; 379 case STATS: return "stats"; 380 case SUBSET: return "subset"; 381 case SUBSUMES: return "subsumes"; 382 case TRANSFORM: return "transform"; 383 case TRANSLATE: return "translate"; 384 case VALIDATE: return "validate"; 385 case VALIDATECODE: return "validate-code"; 386 default: return "?"; 387 } 388 } 389 public String getSystem() { 390 return "http://terminology.hl7.org/CodeSystem/testscript-operation-codes"; 391 } 392 public String getDefinition() { 393 switch (this) { 394 case READ: return "Read the current state of the resource."; 395 case VREAD: return "Read the state of a specific version of the resource."; 396 case UPDATE: return "Update an existing resource by its id."; 397 case UPDATECREATE: return "Update an existing resource by its id (or create it if it is new)."; 398 case PATCH: return "Patch an existing resource by its id."; 399 case DELETE: return "Delete a resource."; 400 case DELETECONDSINGLE: return "Conditionally delete a single resource based on search parameters."; 401 case DELETECONDMULTIPLE: return "Conditionally delete one or more resources based on search parameters."; 402 case HISTORY: return "Retrieve the change history for a particular resource or resource type."; 403 case CREATE: return "Create a new resource with a server assigned id."; 404 case SEARCH: return "Search based on some filter criteria."; 405 case BATCH: return "Update, create or delete a set of resources as independent actions."; 406 case TRANSACTION: return "Update, create or delete a set of resources as a single transaction."; 407 case CAPABILITIES: return "Get a capability statement for the system."; 408 case APPLY: return "Realizes an ActivityDefinition in a specific context"; 409 case CLOSURE: return "Closure Table Maintenance"; 410 case FINDMATCHES: return "Finding Codes based on supplied properties"; 411 case CONFORMS: return "Compare two systems CapabilityStatements"; 412 case DATAREQUIREMENTS: return "Aggregates and returns the parameters and data requirements for a resource and all its dependencies as a single module definition"; 413 case DOCUMENT: return "Generate a Document"; 414 case EVALUATE: return "Request clinical decision support guidance based on a specific decision support module"; 415 case EVALUATEMEASURE: return "Invoke an eMeasure and obtain the results"; 416 case EVERYTHING: return "Return all the related information as described in the Encounter or Patient"; 417 case EXPAND: return "Value Set Expansion"; 418 case FIND: return "Find a functional list"; 419 case GRAPHQL: return "Invoke a GraphQL query"; 420 case IMPLEMENTS: return "Test if a server implements a client's required operations"; 421 case LASTN: return "Last N Observations Query"; 422 case LOOKUP: return "Concept Look Up and Decomposition"; 423 case MATCH: return "Find patient matches using MPI based logic"; 424 case META: return "Access a list of profiles, tags, and security labels"; 425 case METAADD: return "Add profiles, tags, and security labels to a resource"; 426 case METADELETE: return "Delete profiles, tags, and security labels for a resource"; 427 case POPULATE: return "Populate Questionnaire"; 428 case POPULATEHTML: return "Generate HTML for Questionnaire"; 429 case POPULATELINK: return "Generate a link to a Questionnaire completion webpage"; 430 case PROCESSMESSAGE: return "Process a message according to the defined event"; 431 case QUESTIONNAIRE: return "Build Questionnaire"; 432 case STATS: return "Observation Statistics"; 433 case SUBSET: return "Fetch a subset of the CapabilityStatement resource"; 434 case SUBSUMES: return "CodeSystem Subsumption Testing"; 435 case TRANSFORM: return "Model Instance Transformation"; 436 case TRANSLATE: return "Concept Translation"; 437 case VALIDATE: return "Validate a resource"; 438 case VALIDATECODE: return "ValueSet based Validation"; 439 default: return "?"; 440 } 441 } 442 public String getDisplay() { 443 switch (this) { 444 case READ: return "Read"; 445 case VREAD: return "Version Read"; 446 case UPDATE: return "Update"; 447 case UPDATECREATE: return "Create using Update"; 448 case PATCH: return "Patch"; 449 case DELETE: return "Delete"; 450 case DELETECONDSINGLE: return "Conditional Delete Single"; 451 case DELETECONDMULTIPLE: return "Conditional Delete Multiple"; 452 case HISTORY: return "History"; 453 case CREATE: return "Create"; 454 case SEARCH: return "Search"; 455 case BATCH: return "Batch"; 456 case TRANSACTION: return "Transaction"; 457 case CAPABILITIES: return "Capabilities"; 458 case APPLY: return "$apply"; 459 case CLOSURE: return "$closure"; 460 case FINDMATCHES: return "$find-matches"; 461 case CONFORMS: return "$conforms"; 462 case DATAREQUIREMENTS: return "$data-requirements"; 463 case DOCUMENT: return "$document"; 464 case EVALUATE: return "$evaluate"; 465 case EVALUATEMEASURE: return "$evaluate-measure"; 466 case EVERYTHING: return "$everything"; 467 case EXPAND: return "$expand"; 468 case FIND: return "$find"; 469 case GRAPHQL: return "$graphql"; 470 case IMPLEMENTS: return "$implements"; 471 case LASTN: return "$lastn"; 472 case LOOKUP: return "$lookup"; 473 case MATCH: return "$match"; 474 case META: return "$meta"; 475 case METAADD: return "$meta-add"; 476 case METADELETE: return "$meta-delete"; 477 case POPULATE: return "$populate"; 478 case POPULATEHTML: return "$populatehtml"; 479 case POPULATELINK: return "$populatelink"; 480 case PROCESSMESSAGE: return "$process-message"; 481 case QUESTIONNAIRE: return "$questionnaire"; 482 case STATS: return "$stats"; 483 case SUBSET: return "$subset"; 484 case SUBSUMES: return "$subsumes"; 485 case TRANSFORM: return "$transform"; 486 case TRANSLATE: return "$translate"; 487 case VALIDATE: return "$validate"; 488 case VALIDATECODE: return "$validate-code"; 489 default: return "?"; 490 } 491 } 492 493 494} 495