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