001package org.hl7.fhir.dstu3.model.codesystems;
002
003/*-
004 * #%L
005 * org.hl7.fhir.dstu3
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 Sat, Mar 25, 2017 21:03-0400 for FHIR v3.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         * Delete a resource.
078         */
079        DELETE, 
080        /**
081         * Conditionally delete a single resource based on search parameters.
082         */
083        DELETECONDSINGLE, 
084        /**
085         * Conditionally delete one or more resources based on search parameters.
086         */
087        DELETECONDMULTIPLE, 
088        /**
089         * Retrieve the change history for a particular resource or resource type.
090         */
091        HISTORY, 
092        /**
093         * Create a new resource with a server assigned id.
094         */
095        CREATE, 
096        /**
097         * Search based on some filter criteria.
098         */
099        SEARCH, 
100        /**
101         * Update, create or delete a set of resources as independent actions.
102         */
103        BATCH, 
104        /**
105         * Update, create or delete a set of resources as a single transaction.
106         */
107        TRANSACTION, 
108        /**
109         * Get a capability statement for the system.
110         */
111        CAPABILITIES, 
112        /**
113         * Realize a definition in a specific context
114         */
115        APPLY, 
116        /**
117         * Cancel Task
118         */
119        CANCEL, 
120        /**
121         * Closure Table Maintenance
122         */
123        CLOSURE, 
124        /**
125         * Code Composition based on supplied properties
126         */
127        COMPOSE, 
128        /**
129         * Test if a server implements a client's required operations
130         */
131        CONFORMS, 
132        /**
133         * Aggregates and return the parameters and data requirements as a single module definition library
134         */
135        DATAREQUIREMENTS, 
136        /**
137         * Generate a Document
138         */
139        DOCUMENT, 
140        /**
141         * Evaluate DecisionSupportRule / DecisionSupportServiceModule
142         */
143        EVALUATE, 
144        /**
145         * Evaluate Measure
146         */
147        EVALUATEMEASURE, 
148        /**
149         * Fetch Encounter/Patient Record
150         */
151        EVERYTHING, 
152        /**
153         * Value Set Expansion
154         */
155        EXPAND, 
156        /**
157         * Fail Task
158         */
159        FAIL, 
160        /**
161         * Find a functional list
162         */
163        FIND, 
164        /**
165         * Finish Task
166         */
167        FINISH, 
168        /**
169         * Test if a server implements a client's required operations
170         */
171        IMPLEMENTS, 
172        /**
173         * Concept Look Up
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 Message
206         */
207        PROCESSMESSAGE, 
208        /**
209         * Build Questionnaire
210         */
211        QUESTIONNAIRE, 
212        /**
213         * Release Task
214         */
215        RELEASE, 
216        /**
217         * Reserve Task
218         */
219        RESERVE, 
220        /**
221         * Resume Task
222         */
223        RESUME, 
224        /**
225         * Set Task Input
226         */
227        SETINPUT, 
228        /**
229         * Set Task Output
230         */
231        SETOUTPUT, 
232        /**
233         * Start Task
234         */
235        START, 
236        /**
237         * Observation Statistics
238         */
239        STATS, 
240        /**
241         * Stop Task
242         */
243        STOP, 
244        /**
245         * Fetch a subset of the CapabilityStatement resource
246         */
247        SUBSET, 
248        /**
249         * Determine if code A is subsumed by code B
250         */
251        SUBSUMES, 
252        /**
253         * Suspend Task
254         */
255        SUSPEND, 
256        /**
257         * Model Instance Transformation
258         */
259        TRANSFORM, 
260        /**
261         * Concept Translation
262         */
263        TRANSLATE, 
264        /**
265         * Validate a resource
266         */
267        VALIDATE, 
268        /**
269         * Value Set based Validation
270         */
271        VALIDATECODE, 
272        /**
273         * added to help the parsers
274         */
275        NULL;
276        public static TestscriptOperationCodes fromCode(String codeString) throws FHIRException {
277            if (codeString == null || "".equals(codeString))
278                return null;
279        if ("read".equals(codeString))
280          return READ;
281        if ("vread".equals(codeString))
282          return VREAD;
283        if ("update".equals(codeString))
284          return UPDATE;
285        if ("updateCreate".equals(codeString))
286          return UPDATECREATE;
287        if ("delete".equals(codeString))
288          return DELETE;
289        if ("deleteCondSingle".equals(codeString))
290          return DELETECONDSINGLE;
291        if ("deleteCondMultiple".equals(codeString))
292          return DELETECONDMULTIPLE;
293        if ("history".equals(codeString))
294          return HISTORY;
295        if ("create".equals(codeString))
296          return CREATE;
297        if ("search".equals(codeString))
298          return SEARCH;
299        if ("batch".equals(codeString))
300          return BATCH;
301        if ("transaction".equals(codeString))
302          return TRANSACTION;
303        if ("capabilities".equals(codeString))
304          return CAPABILITIES;
305        if ("apply".equals(codeString))
306          return APPLY;
307        if ("cancel".equals(codeString))
308          return CANCEL;
309        if ("closure".equals(codeString))
310          return CLOSURE;
311        if ("compose".equals(codeString))
312          return COMPOSE;
313        if ("conforms".equals(codeString))
314          return CONFORMS;
315        if ("data-requirements".equals(codeString))
316          return DATAREQUIREMENTS;
317        if ("document".equals(codeString))
318          return DOCUMENT;
319        if ("evaluate".equals(codeString))
320          return EVALUATE;
321        if ("evaluate-measure".equals(codeString))
322          return EVALUATEMEASURE;
323        if ("everything".equals(codeString))
324          return EVERYTHING;
325        if ("expand".equals(codeString))
326          return EXPAND;
327        if ("fail".equals(codeString))
328          return FAIL;
329        if ("find".equals(codeString))
330          return FIND;
331        if ("finish".equals(codeString))
332          return FINISH;
333        if ("implements".equals(codeString))
334          return IMPLEMENTS;
335        if ("lookup".equals(codeString))
336          return LOOKUP;
337        if ("match".equals(codeString))
338          return MATCH;
339        if ("meta".equals(codeString))
340          return META;
341        if ("meta-add".equals(codeString))
342          return METAADD;
343        if ("meta-delete".equals(codeString))
344          return METADELETE;
345        if ("populate".equals(codeString))
346          return POPULATE;
347        if ("populatehtml".equals(codeString))
348          return POPULATEHTML;
349        if ("populatelink".equals(codeString))
350          return POPULATELINK;
351        if ("process-message".equals(codeString))
352          return PROCESSMESSAGE;
353        if ("questionnaire".equals(codeString))
354          return QUESTIONNAIRE;
355        if ("release".equals(codeString))
356          return RELEASE;
357        if ("reserve".equals(codeString))
358          return RESERVE;
359        if ("resume".equals(codeString))
360          return RESUME;
361        if ("set-input".equals(codeString))
362          return SETINPUT;
363        if ("set-output".equals(codeString))
364          return SETOUTPUT;
365        if ("start".equals(codeString))
366          return START;
367        if ("stats".equals(codeString))
368          return STATS;
369        if ("stop".equals(codeString))
370          return STOP;
371        if ("subset".equals(codeString))
372          return SUBSET;
373        if ("subsumes".equals(codeString))
374          return SUBSUMES;
375        if ("suspend".equals(codeString))
376          return SUSPEND;
377        if ("transform".equals(codeString))
378          return TRANSFORM;
379        if ("translate".equals(codeString))
380          return TRANSLATE;
381        if ("validate".equals(codeString))
382          return VALIDATE;
383        if ("validate-code".equals(codeString))
384          return VALIDATECODE;
385        throw new FHIRException("Unknown TestscriptOperationCodes code '"+codeString+"'");
386        }
387        public String toCode() {
388          switch (this) {
389            case READ: return "read";
390            case VREAD: return "vread";
391            case UPDATE: return "update";
392            case UPDATECREATE: return "updateCreate";
393            case DELETE: return "delete";
394            case DELETECONDSINGLE: return "deleteCondSingle";
395            case DELETECONDMULTIPLE: return "deleteCondMultiple";
396            case HISTORY: return "history";
397            case CREATE: return "create";
398            case SEARCH: return "search";
399            case BATCH: return "batch";
400            case TRANSACTION: return "transaction";
401            case CAPABILITIES: return "capabilities";
402            case APPLY: return "apply";
403            case CANCEL: return "cancel";
404            case CLOSURE: return "closure";
405            case COMPOSE: return "compose";
406            case CONFORMS: return "conforms";
407            case DATAREQUIREMENTS: return "data-requirements";
408            case DOCUMENT: return "document";
409            case EVALUATE: return "evaluate";
410            case EVALUATEMEASURE: return "evaluate-measure";
411            case EVERYTHING: return "everything";
412            case EXPAND: return "expand";
413            case FAIL: return "fail";
414            case FIND: return "find";
415            case FINISH: return "finish";
416            case IMPLEMENTS: return "implements";
417            case LOOKUP: return "lookup";
418            case MATCH: return "match";
419            case META: return "meta";
420            case METAADD: return "meta-add";
421            case METADELETE: return "meta-delete";
422            case POPULATE: return "populate";
423            case POPULATEHTML: return "populatehtml";
424            case POPULATELINK: return "populatelink";
425            case PROCESSMESSAGE: return "process-message";
426            case QUESTIONNAIRE: return "questionnaire";
427            case RELEASE: return "release";
428            case RESERVE: return "reserve";
429            case RESUME: return "resume";
430            case SETINPUT: return "set-input";
431            case SETOUTPUT: return "set-output";
432            case START: return "start";
433            case STATS: return "stats";
434            case STOP: return "stop";
435            case SUBSET: return "subset";
436            case SUBSUMES: return "subsumes";
437            case SUSPEND: return "suspend";
438            case TRANSFORM: return "transform";
439            case TRANSLATE: return "translate";
440            case VALIDATE: return "validate";
441            case VALIDATECODE: return "validate-code";
442            default: return "?";
443          }
444        }
445        public String getSystem() {
446          return "http://hl7.org/fhir/testscript-operation-codes";
447        }
448        public String getDefinition() {
449          switch (this) {
450            case READ: return "Read the current state of the resource.";
451            case VREAD: return "Read the state of a specific version of the resource.";
452            case UPDATE: return "Update an existing resource by its id.";
453            case UPDATECREATE: return "Update an existing resource by its id (or create it if it is new).";
454            case DELETE: return "Delete a resource.";
455            case DELETECONDSINGLE: return "Conditionally delete a single resource based on search parameters.";
456            case DELETECONDMULTIPLE: return "Conditionally delete one or more resources based on search parameters.";
457            case HISTORY: return "Retrieve the change history for a particular resource or resource type.";
458            case CREATE: return "Create a new resource with a server assigned id.";
459            case SEARCH: return "Search based on some filter criteria.";
460            case BATCH: return "Update, create or delete a set of resources as independent actions.";
461            case TRANSACTION: return "Update, create or delete a set of resources as a single transaction.";
462            case CAPABILITIES: return "Get a capability statement for the system.";
463            case APPLY: return "Realize a definition in a specific context";
464            case CANCEL: return "Cancel Task";
465            case CLOSURE: return "Closure Table Maintenance";
466            case COMPOSE: return "Code Composition based on supplied properties";
467            case CONFORMS: return "Test if a server implements a client's required operations";
468            case DATAREQUIREMENTS: return "Aggregates and return the parameters and data requirements as a single module definition library";
469            case DOCUMENT: return "Generate a Document";
470            case EVALUATE: return "Evaluate DecisionSupportRule / DecisionSupportServiceModule";
471            case EVALUATEMEASURE: return "Evaluate Measure";
472            case EVERYTHING: return "Fetch Encounter/Patient Record";
473            case EXPAND: return "Value Set Expansion";
474            case FAIL: return "Fail Task";
475            case FIND: return "Find a functional list";
476            case FINISH: return "Finish Task";
477            case IMPLEMENTS: return "Test if a server implements a client's required operations";
478            case LOOKUP: return "Concept Look Up";
479            case MATCH: return "Find patient matches using MPI based logic";
480            case META: return "Access a list of profiles, tags, and security labels";
481            case METAADD: return "Add profiles, tags, and security labels to a resource";
482            case METADELETE: return "Delete profiles, tags, and security labels for a resource";
483            case POPULATE: return "Populate Questionnaire";
484            case POPULATEHTML: return "Generate HTML for Questionnaire";
485            case POPULATELINK: return "Generate a link to a Questionnaire completion webpage";
486            case PROCESSMESSAGE: return "Process Message";
487            case QUESTIONNAIRE: return "Build Questionnaire";
488            case RELEASE: return "Release Task";
489            case RESERVE: return "Reserve Task";
490            case RESUME: return "Resume Task";
491            case SETINPUT: return "Set Task Input";
492            case SETOUTPUT: return "Set Task Output";
493            case START: return "Start Task";
494            case STATS: return "Observation Statistics";
495            case STOP: return "Stop Task";
496            case SUBSET: return "Fetch a subset of the CapabilityStatement resource";
497            case SUBSUMES: return "Determine if code A is subsumed by code B";
498            case SUSPEND: return "Suspend Task";
499            case TRANSFORM: return "Model Instance Transformation";
500            case TRANSLATE: return "Concept Translation";
501            case VALIDATE: return "Validate a resource";
502            case VALIDATECODE: return "Value Set based Validation";
503            default: return "?";
504          }
505        }
506        public String getDisplay() {
507          switch (this) {
508            case READ: return "Read";
509            case VREAD: return "Version Read";
510            case UPDATE: return "Update";
511            case UPDATECREATE: return "Create using Update";
512            case DELETE: return "Delete";
513            case DELETECONDSINGLE: return "Conditional Delete Single";
514            case DELETECONDMULTIPLE: return "Conditional Delete Multiple";
515            case HISTORY: return "History";
516            case CREATE: return "Create";
517            case SEARCH: return "Search";
518            case BATCH: return "Batch";
519            case TRANSACTION: return "Transaction";
520            case CAPABILITIES: return "Capabilities";
521            case APPLY: return "$apply";
522            case CANCEL: return "$cancel";
523            case CLOSURE: return "$closure";
524            case COMPOSE: return "$compose";
525            case CONFORMS: return "$conforms";
526            case DATAREQUIREMENTS: return "$data-requirements";
527            case DOCUMENT: return "$document";
528            case EVALUATE: return "$evaluate";
529            case EVALUATEMEASURE: return "$evaluate-measure";
530            case EVERYTHING: return "$everything";
531            case EXPAND: return "$expand";
532            case FAIL: return "$fail";
533            case FIND: return "$find";
534            case FINISH: return "$finish";
535            case IMPLEMENTS: return "$implements";
536            case LOOKUP: return "$lookup";
537            case MATCH: return "$match";
538            case META: return "$meta";
539            case METAADD: return "$meta-add";
540            case METADELETE: return "$meta-delete";
541            case POPULATE: return "$populate";
542            case POPULATEHTML: return "$populatehtml";
543            case POPULATELINK: return "$populatelink";
544            case PROCESSMESSAGE: return "$process-message";
545            case QUESTIONNAIRE: return "$questionnaire";
546            case RELEASE: return "$release";
547            case RESERVE: return "$reserve";
548            case RESUME: return "$resume";
549            case SETINPUT: return "$set-input";
550            case SETOUTPUT: return "$set-output";
551            case START: return "$start";
552            case STATS: return "$stats";
553            case STOP: return "$stop";
554            case SUBSET: return "$subset";
555            case SUBSUMES: return "$subsumes";
556            case SUSPEND: return "$suspend";
557            case TRANSFORM: return "$transform";
558            case TRANSLATE: return "$translate";
559            case VALIDATE: return "$validate";
560            case VALIDATECODE: return "$validate-code";
561            default: return "?";
562          }
563    }
564
565
566}
567