001package org.hl7.fhir.instance.model.valuesets;
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 Wed, Nov 11, 2015 10:54-0500 for FHIR v1.0.2
033
034
035public enum TestscriptOperationCodes {
036
037        /**
038         * Read the current state of the resource.
039         */
040        READ, 
041        /**
042         * Read the state of a specific version of the resource.
043         */
044        VREAD, 
045        /**
046         * Update an existing resource by its id (or create it if it is new).
047         */
048        UPDATE, 
049        /**
050         * Delete a resource.
051         */
052        DELETE, 
053        /**
054         * Retrieve the update history for a particular resource or resource type.
055         */
056        HISTORY, 
057        /**
058         * Create a new resource with a server assigned id.
059         */
060        CREATE, 
061        /**
062         * Search based on some filter criteria.
063         */
064        SEARCH, 
065        /**
066         * Update, create or delete a set of resources as a single transaction.
067         */
068        TRANSACTION, 
069        /**
070         * Get a conformance statement for the system.
071         */
072        CONFORMANCE, 
073        /**
074         * Closure Table Maintenance.
075         */
076        CLOSURE, 
077        /**
078         * Generate a Document.
079         */
080        DOCUMENT, 
081        /**
082         * Fetch Encounter/Patient Record.
083         */
084        EVERYTHING, 
085        /**
086         * Value Set Expansion.
087         */
088        EXPAND, 
089        /**
090         * Find a functional list.
091         */
092        FIND, 
093        /**
094         * Concept Look Up.
095         */
096        LOOKUP, 
097        /**
098         * Access a list of profiles, tags, and security labels.
099         */
100        META, 
101        /**
102         * Add profiles, tags, and security labels to a resource.
103         */
104        METAADD, 
105        /**
106         * Delete profiles, tags, and security labels for a resource.
107         */
108        METADELETE, 
109        /**
110         * Populate Questionnaire.
111         */
112        POPULATE, 
113        /**
114         * Process Message.
115         */
116        PROCESSMESSAGE, 
117        /**
118         * Build Questionnaire.
119         */
120        QUESTIONNAIRE, 
121        /**
122         * Concept Translation.
123         */
124        TRANSLATE, 
125        /**
126         * Validate a resource.
127         */
128        VALIDATE, 
129        /**
130         * Value Set based Validation.
131         */
132        VALIDATECODE, 
133        /**
134         * added to help the parsers
135         */
136        NULL;
137        public static TestscriptOperationCodes fromCode(String codeString) throws Exception {
138            if (codeString == null || "".equals(codeString))
139                return null;
140        if ("read".equals(codeString))
141          return READ;
142        if ("vread".equals(codeString))
143          return VREAD;
144        if ("update".equals(codeString))
145          return UPDATE;
146        if ("delete".equals(codeString))
147          return DELETE;
148        if ("history".equals(codeString))
149          return HISTORY;
150        if ("create".equals(codeString))
151          return CREATE;
152        if ("search".equals(codeString))
153          return SEARCH;
154        if ("transaction".equals(codeString))
155          return TRANSACTION;
156        if ("conformance".equals(codeString))
157          return CONFORMANCE;
158        if ("closure".equals(codeString))
159          return CLOSURE;
160        if ("document".equals(codeString))
161          return DOCUMENT;
162        if ("everything".equals(codeString))
163          return EVERYTHING;
164        if ("expand".equals(codeString))
165          return EXPAND;
166        if ("find".equals(codeString))
167          return FIND;
168        if ("lookup".equals(codeString))
169          return LOOKUP;
170        if ("meta".equals(codeString))
171          return META;
172        if ("meta-add".equals(codeString))
173          return METAADD;
174        if ("meta-delete".equals(codeString))
175          return METADELETE;
176        if ("populate".equals(codeString))
177          return POPULATE;
178        if ("process-message".equals(codeString))
179          return PROCESSMESSAGE;
180        if ("questionnaire".equals(codeString))
181          return QUESTIONNAIRE;
182        if ("translate".equals(codeString))
183          return TRANSLATE;
184        if ("validate".equals(codeString))
185          return VALIDATE;
186        if ("validate-code".equals(codeString))
187          return VALIDATECODE;
188        throw new Exception("Unknown TestscriptOperationCodes code '"+codeString+"'");
189        }
190        public String toCode() {
191          switch (this) {
192            case READ: return "read";
193            case VREAD: return "vread";
194            case UPDATE: return "update";
195            case DELETE: return "delete";
196            case HISTORY: return "history";
197            case CREATE: return "create";
198            case SEARCH: return "search";
199            case TRANSACTION: return "transaction";
200            case CONFORMANCE: return "conformance";
201            case CLOSURE: return "closure";
202            case DOCUMENT: return "document";
203            case EVERYTHING: return "everything";
204            case EXPAND: return "expand";
205            case FIND: return "find";
206            case LOOKUP: return "lookup";
207            case META: return "meta";
208            case METAADD: return "meta-add";
209            case METADELETE: return "meta-delete";
210            case POPULATE: return "populate";
211            case PROCESSMESSAGE: return "process-message";
212            case QUESTIONNAIRE: return "questionnaire";
213            case TRANSLATE: return "translate";
214            case VALIDATE: return "validate";
215            case VALIDATECODE: return "validate-code";
216            default: return "?";
217          }
218        }
219        public String getSystem() {
220          return "http://hl7.org/fhir/testscript-operation-codes";
221        }
222        public String getDefinition() {
223          switch (this) {
224            case READ: return "Read the current state of the resource.";
225            case VREAD: return "Read the state of a specific version of the resource.";
226            case UPDATE: return "Update an existing resource by its id (or create it if it is new).";
227            case DELETE: return "Delete a resource.";
228            case HISTORY: return "Retrieve the update history for a particular resource or resource type.";
229            case CREATE: return "Create a new resource with a server assigned id.";
230            case SEARCH: return "Search based on some filter criteria.";
231            case TRANSACTION: return "Update, create or delete a set of resources as a single transaction.";
232            case CONFORMANCE: return "Get a conformance statement for the system.";
233            case CLOSURE: return "Closure Table Maintenance.";
234            case DOCUMENT: return "Generate a Document.";
235            case EVERYTHING: return "Fetch Encounter/Patient Record.";
236            case EXPAND: return "Value Set Expansion.";
237            case FIND: return "Find a functional list.";
238            case LOOKUP: return "Concept Look Up.";
239            case META: return "Access a list of profiles, tags, and security labels.";
240            case METAADD: return "Add profiles, tags, and security labels to a resource.";
241            case METADELETE: return "Delete profiles, tags, and security labels for a resource.";
242            case POPULATE: return "Populate Questionnaire.";
243            case PROCESSMESSAGE: return "Process Message.";
244            case QUESTIONNAIRE: return "Build Questionnaire.";
245            case TRANSLATE: return "Concept Translation.";
246            case VALIDATE: return "Validate a resource.";
247            case VALIDATECODE: return "Value Set based Validation.";
248            default: return "?";
249          }
250        }
251        public String getDisplay() {
252          switch (this) {
253            case READ: return "Read";
254            case VREAD: return "Version Read";
255            case UPDATE: return "Update";
256            case DELETE: return "Delete";
257            case HISTORY: return "History";
258            case CREATE: return "Create";
259            case SEARCH: return "Search";
260            case TRANSACTION: return "Transaction";
261            case CONFORMANCE: return "Conformance";
262            case CLOSURE: return "$closure";
263            case DOCUMENT: return "$document";
264            case EVERYTHING: return "$everything";
265            case EXPAND: return "$expand";
266            case FIND: return "$find";
267            case LOOKUP: return "$lookup";
268            case META: return "$meta";
269            case METAADD: return "$meta-add";
270            case METADELETE: return "$meta-delete";
271            case POPULATE: return "$populate";
272            case PROCESSMESSAGE: return "$process-message";
273            case QUESTIONNAIRE: return "$questionnaire";
274            case TRANSLATE: return "$translate";
275            case VALIDATE: return "$validate";
276            case VALIDATECODE: return "$validate-code";
277            default: return "?";
278          }
279    }
280
281
282}
283