001package org.hl7.fhir.r4b.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1
033
034
035import org.hl7.fhir.instance.model.api.*;
036import org.hl7.fhir.exceptions.FHIRException;
037
038public class Enumerations {
039
040// In here: 
041//   ActionCardinalityBehavior: Defines behavior for an action or a group for how many times that item may be repeated.[PlanDefinition, RequestGroup]
042//   ActionConditionKind: Defines the kinds of conditions that can appear on actions.[PlanDefinition, RequestGroup]
043//   ActionGroupingBehavior: Defines organization behavior of a group.[PlanDefinition, RequestGroup]
044//   ActionParticipantType: The type of participant for the action.[ActivityDefinition, PlanDefinition]
045//   ActionPrecheckBehavior: Defines selection frequency behavior for an action or group.[PlanDefinition, RequestGroup]
046//   ActionRelationshipType: Defines the types of relationships between actions.[PlanDefinition, RequestGroup]
047//   ActionRequiredBehavior: Defines expectations around whether an action or action group is required.[PlanDefinition, RequestGroup]
048//   ActionSelectionBehavior: Defines selection behavior of a group.[PlanDefinition, RequestGroup]
049//   AdministrativeGender: The gender of a person used for administrative purposes.[ObservationDefinition, Patient, Person, Practitioner, RelatedPerson]
050//   BindingStrength: Indication of the degree of conformance expectations associated with a binding.[ElementDefinition, OperationDefinition]
051//   CapabilityStatementKind: How a capability statement is intended to be used.[CapabilityStatement, TerminologyCapabilities]
052//   CompartmentType: Which type a compartment definition describes.[CompartmentDefinition, GraphDefinition]
053//   CompositionStatus: The workflow/clinical status of the composition.[Composition, DocumentReference]
054//   DaysOfWeek: The days of the week.[HealthcareService, Location, PractitionerRole, Timing]
055//   DeviceNameType: The type of name the device is referred by.[Device, DeviceDefinition]
056//   DocumentReferenceStatus: The status of the document reference.[DocumentManifest, DocumentReference]
057//   DocumentRelationshipType: The type of relationship between documents.[Composition, DocumentReference]
058//   EventStatus: Codes identifying the lifecycle stage of an event.[Communication, Media, Procedure]
059//   EvidenceVariableHandling: The handling of the variable in statistical analysis for exposures or outcomes (E.g. Dichotomous, Continuous, Descriptive).[Evidence, EvidenceVariable]
060//   FHIRAllTypes: A list of all the concrete types defined in this version of the FHIR specification - Abstract Types, Data Types and Resource Types.[DataRequirement, OperationDefinition, ParameterDefinition]
061//   FHIRVersion: All published FHIR Versions.[CapabilityStatement, ImplementationGuide, StructureDefinition]
062//   FilterOperator: The kind of operation to perform as a part of a property based filter.[CodeSystem, ValueSet]
063//   FinancialResourceStatusCodes: This value set includes Status codes.[Claim, ClaimResponse, Coverage, CoverageEligibilityRequest, CoverageEligibilityResponse, EnrollmentRequest, EnrollmentResponse, PaymentNotice, PaymentReconciliation, VisionPrescription]
064//   GroupMeasure: Possible group measure aggregates (E.g. Mean, Median).[EvidenceVariable, ResearchElementDefinition]
065//   InvoicePriceComponentType: Codes indicating the kind of the price component.[ChargeItemDefinition, Invoice]
066//   ListMode: The processing mode that applies to this list.[Composition, EvidenceReport, List]
067//   MeasureImprovementNotation: Observation values that indicate what change in a measurement value or score is indicative of an improvement in the measured item or scored issue.[Measure, MeasureReport]
068//   MimeTypes: This value set includes all possible codes from BCP-13 (http://tools.ietf.org/html/bcp13)[Attachment, Binary, CapabilityStatement, ElementDefinition, Endpoint, Signature, Subscription, TestScript]
069//   NoteType: The presentation types of notes.[ClaimResponse, ExplanationOfBenefit, PaymentReconciliation]
070//   ObservationStatus: Codes providing the status of an observation.[DetectedIssue, Observation, RiskAssessment]
071//   OperationParameterUse: Whether an operation parameter is an input or an output parameter.[OperationDefinition, ParameterDefinition]
072//   ParticipationStatus: The Participation status of an appointment.[Appointment, AppointmentResponse]
073//   PublicationStatus: The lifecycle status of an artifact.[ActivityDefinition, AdministrableProductDefinition, CapabilityStatement, CatalogEntry, ChargeItemDefinition, Citation, CodeSystem, CompartmentDefinition, ConceptMap, EventDefinition, Evidence, EvidenceReport, EvidenceVariable, ExampleScenario, GraphDefinition, ImplementationGuide, Ingredient, InsurancePlan, Library, ManufacturedItemDefinition, Measure, MessageDefinition, NamingSystem, OperationDefinition, PlanDefinition, Questionnaire, ResearchDefinition, ResearchElementDefinition, SearchParameter, StructureDefinition, StructureMap, SubscriptionTopic, TerminologyCapabilities, TestScript, ValueSet]
074//   QuantityComparator: How the Quantity should be understood and represented.[Age, Count, Distance, Duration, Quantity]
075//   RemittanceOutcome: The outcome of the processing.[ClaimResponse, CoverageEligibilityResponse, EnrollmentResponse, ExplanationOfBenefit, PaymentReconciliation]
076//   RequestIntent: Codes indicating the degree of authority/intentionality associated with a request.[ActivityDefinition, DeviceRequest, NutritionOrder, RequestGroup, ServiceRequest]
077//   RequestPriority: Identifies the level of importance to be assigned to actioning the request.[ActivityDefinition, Communication, CommunicationRequest, DeviceRequest, MedicationRequest, PlanDefinition, RequestGroup, ServiceRequest, SupplyRequest, Task]
078//   RequestStatus: Codes identifying the lifecycle stage of a request.[CarePlan, CommunicationRequest, DeviceRequest, NutritionOrder, RequestGroup, ServiceRequest]
079//   ResourceTypeEnum: One of the resource types defined as part of this version of FHIR.[CapabilityStatement, CompartmentDefinition, ExampleScenario, GraphDefinition, ImplementationGuide, MessageDefinition, OperationDefinition, Questionnaire, SearchParameter]
080//   SearchParamType: Data types allowed to be used for search parameters.[CapabilityStatement, OperationDefinition, SearchParameter]
081//   SubscriptionStatus: The status of a subscription.[Subscription, SubscriptionStatus]
082//   Use: The purpose of the Claim: predetermination, preauthorization, claim.[Claim, ClaimResponse, ExplanationOfBenefit]
083
084
085    public enum ActionCardinalityBehavior {
086        /**
087         * The action may only be selected one time.
088         */
089        SINGLE, 
090        /**
091         * The action may be selected multiple times.
092         */
093        MULTIPLE, 
094        /**
095         * added to help the parsers
096         */
097        NULL;
098        public static ActionCardinalityBehavior fromCode(String codeString) throws FHIRException {
099            if (codeString == null || "".equals(codeString))
100                return null;
101        if ("single".equals(codeString))
102          return SINGLE;
103        if ("multiple".equals(codeString))
104          return MULTIPLE;
105        throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
106        }
107        public String toCode() {
108          switch (this) {
109            case SINGLE: return "single";
110            case MULTIPLE: return "multiple";
111            case NULL: return null;
112            default: return "?";
113          }
114        }
115        public String getSystem() {
116          switch (this) {
117            case SINGLE: return "http://hl7.org/fhir/action-cardinality-behavior";
118            case MULTIPLE: return "http://hl7.org/fhir/action-cardinality-behavior";
119            case NULL: return null;
120            default: return "?";
121          }
122        }
123        public String getDefinition() {
124          switch (this) {
125            case SINGLE: return "The action may only be selected one time.";
126            case MULTIPLE: return "The action may be selected multiple times.";
127            case NULL: return null;
128            default: return "?";
129          }
130        }
131        public String getDisplay() {
132          switch (this) {
133            case SINGLE: return "Single";
134            case MULTIPLE: return "Multiple";
135            case NULL: return null;
136            default: return "?";
137          }
138        }
139    }
140
141  public static class ActionCardinalityBehaviorEnumFactory implements EnumFactory<ActionCardinalityBehavior> {
142    public ActionCardinalityBehavior fromCode(String codeString) throws IllegalArgumentException {
143      if (codeString == null || "".equals(codeString))
144            if (codeString == null || "".equals(codeString))
145                return null;
146        if ("single".equals(codeString))
147          return ActionCardinalityBehavior.SINGLE;
148        if ("multiple".equals(codeString))
149          return ActionCardinalityBehavior.MULTIPLE;
150        throw new IllegalArgumentException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
151        }
152        public Enumeration<ActionCardinalityBehavior> fromType(Base code) throws FHIRException {
153          if (code == null)
154            return null;
155          if (code.isEmpty())
156            return new Enumeration<ActionCardinalityBehavior>(this);
157          String codeString = ((PrimitiveType) code).asStringValue();
158          if (codeString == null || "".equals(codeString))
159            return null;
160        if ("single".equals(codeString))
161          return new Enumeration<ActionCardinalityBehavior>(this, ActionCardinalityBehavior.SINGLE);
162        if ("multiple".equals(codeString))
163          return new Enumeration<ActionCardinalityBehavior>(this, ActionCardinalityBehavior.MULTIPLE);
164        throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
165        }
166    public String toCode(ActionCardinalityBehavior code) {
167      if (code == ActionCardinalityBehavior.SINGLE)
168        return "single";
169      if (code == ActionCardinalityBehavior.MULTIPLE)
170        return "multiple";
171      return "?";
172      }
173    public String toSystem(ActionCardinalityBehavior code) {
174      return code.getSystem();
175      }
176    }
177
178    public enum ActionConditionKind {
179        /**
180         * The condition describes whether or not a given action is applicable.
181         */
182        APPLICABILITY, 
183        /**
184         * The condition is a starting condition for the action.
185         */
186        START, 
187        /**
188         * The condition is a stop, or exit condition for the action.
189         */
190        STOP, 
191        /**
192         * added to help the parsers
193         */
194        NULL;
195        public static ActionConditionKind fromCode(String codeString) throws FHIRException {
196            if (codeString == null || "".equals(codeString))
197                return null;
198        if ("applicability".equals(codeString))
199          return APPLICABILITY;
200        if ("start".equals(codeString))
201          return START;
202        if ("stop".equals(codeString))
203          return STOP;
204        throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'");
205        }
206        public String toCode() {
207          switch (this) {
208            case APPLICABILITY: return "applicability";
209            case START: return "start";
210            case STOP: return "stop";
211            case NULL: return null;
212            default: return "?";
213          }
214        }
215        public String getSystem() {
216          switch (this) {
217            case APPLICABILITY: return "http://hl7.org/fhir/action-condition-kind";
218            case START: return "http://hl7.org/fhir/action-condition-kind";
219            case STOP: return "http://hl7.org/fhir/action-condition-kind";
220            case NULL: return null;
221            default: return "?";
222          }
223        }
224        public String getDefinition() {
225          switch (this) {
226            case APPLICABILITY: return "The condition describes whether or not a given action is applicable.";
227            case START: return "The condition is a starting condition for the action.";
228            case STOP: return "The condition is a stop, or exit condition for the action.";
229            case NULL: return null;
230            default: return "?";
231          }
232        }
233        public String getDisplay() {
234          switch (this) {
235            case APPLICABILITY: return "Applicability";
236            case START: return "Start";
237            case STOP: return "Stop";
238            case NULL: return null;
239            default: return "?";
240          }
241        }
242    }
243
244  public static class ActionConditionKindEnumFactory implements EnumFactory<ActionConditionKind> {
245    public ActionConditionKind fromCode(String codeString) throws IllegalArgumentException {
246      if (codeString == null || "".equals(codeString))
247            if (codeString == null || "".equals(codeString))
248                return null;
249        if ("applicability".equals(codeString))
250          return ActionConditionKind.APPLICABILITY;
251        if ("start".equals(codeString))
252          return ActionConditionKind.START;
253        if ("stop".equals(codeString))
254          return ActionConditionKind.STOP;
255        throw new IllegalArgumentException("Unknown ActionConditionKind code '"+codeString+"'");
256        }
257        public Enumeration<ActionConditionKind> fromType(Base code) throws FHIRException {
258          if (code == null)
259            return null;
260          if (code.isEmpty())
261            return new Enumeration<ActionConditionKind>(this);
262          String codeString = ((PrimitiveType) code).asStringValue();
263          if (codeString == null || "".equals(codeString))
264            return null;
265        if ("applicability".equals(codeString))
266          return new Enumeration<ActionConditionKind>(this, ActionConditionKind.APPLICABILITY);
267        if ("start".equals(codeString))
268          return new Enumeration<ActionConditionKind>(this, ActionConditionKind.START);
269        if ("stop".equals(codeString))
270          return new Enumeration<ActionConditionKind>(this, ActionConditionKind.STOP);
271        throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'");
272        }
273    public String toCode(ActionConditionKind code) {
274      if (code == ActionConditionKind.APPLICABILITY)
275        return "applicability";
276      if (code == ActionConditionKind.START)
277        return "start";
278      if (code == ActionConditionKind.STOP)
279        return "stop";
280      return "?";
281      }
282    public String toSystem(ActionConditionKind code) {
283      return code.getSystem();
284      }
285    }
286
287    public enum ActionGroupingBehavior {
288        /**
289         * Any group marked with this behavior should be displayed as a visual group to the end user.
290         */
291        VISUALGROUP, 
292        /**
293         * A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so.
294         */
295        LOGICALGROUP, 
296        /**
297         * A group of related alternative actions is a sentence group if the target referenced by the action is the same in all the actions and each action simply constitutes a different variation on how to specify the details for the target. For example, two actions that could be in a SentenceGroup are "aspirin, 500 mg, 2 times per day" and "aspirin, 300 mg, 3 times per day". In both cases, aspirin is the target referenced by the action, and the two actions represent different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of "AtMostOne", unless it's a required action, in which case, it would be "ExactlyOne".
298         */
299        SENTENCEGROUP, 
300        /**
301         * added to help the parsers
302         */
303        NULL;
304        public static ActionGroupingBehavior fromCode(String codeString) throws FHIRException {
305            if (codeString == null || "".equals(codeString))
306                return null;
307        if ("visual-group".equals(codeString))
308          return VISUALGROUP;
309        if ("logical-group".equals(codeString))
310          return LOGICALGROUP;
311        if ("sentence-group".equals(codeString))
312          return SENTENCEGROUP;
313        throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'");
314        }
315        public String toCode() {
316          switch (this) {
317            case VISUALGROUP: return "visual-group";
318            case LOGICALGROUP: return "logical-group";
319            case SENTENCEGROUP: return "sentence-group";
320            case NULL: return null;
321            default: return "?";
322          }
323        }
324        public String getSystem() {
325          switch (this) {
326            case VISUALGROUP: return "http://hl7.org/fhir/action-grouping-behavior";
327            case LOGICALGROUP: return "http://hl7.org/fhir/action-grouping-behavior";
328            case SENTENCEGROUP: return "http://hl7.org/fhir/action-grouping-behavior";
329            case NULL: return null;
330            default: return "?";
331          }
332        }
333        public String getDefinition() {
334          switch (this) {
335            case VISUALGROUP: return "Any group marked with this behavior should be displayed as a visual group to the end user.";
336            case LOGICALGROUP: return "A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so.";
337            case SENTENCEGROUP: return "A group of related alternative actions is a sentence group if the target referenced by the action is the same in all the actions and each action simply constitutes a different variation on how to specify the details for the target. For example, two actions that could be in a SentenceGroup are \"aspirin, 500 mg, 2 times per day\" and \"aspirin, 300 mg, 3 times per day\". In both cases, aspirin is the target referenced by the action, and the two actions represent different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of \"AtMostOne\", unless it's a required action, in which case, it would be \"ExactlyOne\".";
338            case NULL: return null;
339            default: return "?";
340          }
341        }
342        public String getDisplay() {
343          switch (this) {
344            case VISUALGROUP: return "Visual Group";
345            case LOGICALGROUP: return "Logical Group";
346            case SENTENCEGROUP: return "Sentence Group";
347            case NULL: return null;
348            default: return "?";
349          }
350        }
351    }
352
353  public static class ActionGroupingBehaviorEnumFactory implements EnumFactory<ActionGroupingBehavior> {
354    public ActionGroupingBehavior fromCode(String codeString) throws IllegalArgumentException {
355      if (codeString == null || "".equals(codeString))
356            if (codeString == null || "".equals(codeString))
357                return null;
358        if ("visual-group".equals(codeString))
359          return ActionGroupingBehavior.VISUALGROUP;
360        if ("logical-group".equals(codeString))
361          return ActionGroupingBehavior.LOGICALGROUP;
362        if ("sentence-group".equals(codeString))
363          return ActionGroupingBehavior.SENTENCEGROUP;
364        throw new IllegalArgumentException("Unknown ActionGroupingBehavior code '"+codeString+"'");
365        }
366        public Enumeration<ActionGroupingBehavior> fromType(Base code) throws FHIRException {
367          if (code == null)
368            return null;
369          if (code.isEmpty())
370            return new Enumeration<ActionGroupingBehavior>(this);
371          String codeString = ((PrimitiveType) code).asStringValue();
372          if (codeString == null || "".equals(codeString))
373            return null;
374        if ("visual-group".equals(codeString))
375          return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.VISUALGROUP);
376        if ("logical-group".equals(codeString))
377          return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.LOGICALGROUP);
378        if ("sentence-group".equals(codeString))
379          return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.SENTENCEGROUP);
380        throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'");
381        }
382    public String toCode(ActionGroupingBehavior code) {
383      if (code == ActionGroupingBehavior.VISUALGROUP)
384        return "visual-group";
385      if (code == ActionGroupingBehavior.LOGICALGROUP)
386        return "logical-group";
387      if (code == ActionGroupingBehavior.SENTENCEGROUP)
388        return "sentence-group";
389      return "?";
390      }
391    public String toSystem(ActionGroupingBehavior code) {
392      return code.getSystem();
393      }
394    }
395
396    public enum ActionParticipantType {
397        /**
398         * The participant is the patient under evaluation.
399         */
400        PATIENT, 
401        /**
402         * The participant is a practitioner involved in the patient's care.
403         */
404        PRACTITIONER, 
405        /**
406         * The participant is a person related to the patient.
407         */
408        RELATEDPERSON, 
409        /**
410         * The participant is a system or device used in the care of the patient.
411         */
412        DEVICE, 
413        /**
414         * added to help the parsers
415         */
416        NULL;
417        public static ActionParticipantType fromCode(String codeString) throws FHIRException {
418            if (codeString == null || "".equals(codeString))
419                return null;
420        if ("patient".equals(codeString))
421          return PATIENT;
422        if ("practitioner".equals(codeString))
423          return PRACTITIONER;
424        if ("related-person".equals(codeString))
425          return RELATEDPERSON;
426        if ("device".equals(codeString))
427          return DEVICE;
428        throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'");
429        }
430        public String toCode() {
431          switch (this) {
432            case PATIENT: return "patient";
433            case PRACTITIONER: return "practitioner";
434            case RELATEDPERSON: return "related-person";
435            case DEVICE: return "device";
436            case NULL: return null;
437            default: return "?";
438          }
439        }
440        public String getSystem() {
441          switch (this) {
442            case PATIENT: return "http://hl7.org/fhir/action-participant-type";
443            case PRACTITIONER: return "http://hl7.org/fhir/action-participant-type";
444            case RELATEDPERSON: return "http://hl7.org/fhir/action-participant-type";
445            case DEVICE: return "http://hl7.org/fhir/action-participant-type";
446            case NULL: return null;
447            default: return "?";
448          }
449        }
450        public String getDefinition() {
451          switch (this) {
452            case PATIENT: return "The participant is the patient under evaluation.";
453            case PRACTITIONER: return "The participant is a practitioner involved in the patient's care.";
454            case RELATEDPERSON: return "The participant is a person related to the patient.";
455            case DEVICE: return "The participant is a system or device used in the care of the patient.";
456            case NULL: return null;
457            default: return "?";
458          }
459        }
460        public String getDisplay() {
461          switch (this) {
462            case PATIENT: return "Patient";
463            case PRACTITIONER: return "Practitioner";
464            case RELATEDPERSON: return "Related Person";
465            case DEVICE: return "Device";
466            case NULL: return null;
467            default: return "?";
468          }
469        }
470    }
471
472  public static class ActionParticipantTypeEnumFactory implements EnumFactory<ActionParticipantType> {
473    public ActionParticipantType fromCode(String codeString) throws IllegalArgumentException {
474      if (codeString == null || "".equals(codeString))
475            if (codeString == null || "".equals(codeString))
476                return null;
477        if ("patient".equals(codeString))
478          return ActionParticipantType.PATIENT;
479        if ("practitioner".equals(codeString))
480          return ActionParticipantType.PRACTITIONER;
481        if ("related-person".equals(codeString))
482          return ActionParticipantType.RELATEDPERSON;
483        if ("device".equals(codeString))
484          return ActionParticipantType.DEVICE;
485        throw new IllegalArgumentException("Unknown ActionParticipantType code '"+codeString+"'");
486        }
487        public Enumeration<ActionParticipantType> fromType(Base code) throws FHIRException {
488          if (code == null)
489            return null;
490          if (code.isEmpty())
491            return new Enumeration<ActionParticipantType>(this);
492          String codeString = ((PrimitiveType) code).asStringValue();
493          if (codeString == null || "".equals(codeString))
494            return null;
495        if ("patient".equals(codeString))
496          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.PATIENT);
497        if ("practitioner".equals(codeString))
498          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.PRACTITIONER);
499        if ("related-person".equals(codeString))
500          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.RELATEDPERSON);
501        if ("device".equals(codeString))
502          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.DEVICE);
503        throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'");
504        }
505    public String toCode(ActionParticipantType code) {
506      if (code == ActionParticipantType.PATIENT)
507        return "patient";
508      if (code == ActionParticipantType.PRACTITIONER)
509        return "practitioner";
510      if (code == ActionParticipantType.RELATEDPERSON)
511        return "related-person";
512      if (code == ActionParticipantType.DEVICE)
513        return "device";
514      return "?";
515      }
516    public String toSystem(ActionParticipantType code) {
517      return code.getSystem();
518      }
519    }
520
521    public enum ActionPrecheckBehavior {
522        /**
523         * An action with this behavior is one of the most frequent action that is, or should be, included by an end user, for the particular context in which the action occurs. The system displaying the action to the end user should consider "pre-checking" such an action as a convenience for the user.
524         */
525        YES, 
526        /**
527         * An action with this behavior is one of the less frequent actions included by the end user, for the particular context in which the action occurs. The system displaying the actions to the end user would typically not "pre-check" such an action.
528         */
529        NO, 
530        /**
531         * added to help the parsers
532         */
533        NULL;
534        public static ActionPrecheckBehavior fromCode(String codeString) throws FHIRException {
535            if (codeString == null || "".equals(codeString))
536                return null;
537        if ("yes".equals(codeString))
538          return YES;
539        if ("no".equals(codeString))
540          return NO;
541        throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
542        }
543        public String toCode() {
544          switch (this) {
545            case YES: return "yes";
546            case NO: return "no";
547            case NULL: return null;
548            default: return "?";
549          }
550        }
551        public String getSystem() {
552          switch (this) {
553            case YES: return "http://hl7.org/fhir/action-precheck-behavior";
554            case NO: return "http://hl7.org/fhir/action-precheck-behavior";
555            case NULL: return null;
556            default: return "?";
557          }
558        }
559        public String getDefinition() {
560          switch (this) {
561            case YES: return "An action with this behavior is one of the most frequent action that is, or should be, included by an end user, for the particular context in which the action occurs. The system displaying the action to the end user should consider \"pre-checking\" such an action as a convenience for the user.";
562            case NO: return "An action with this behavior is one of the less frequent actions included by the end user, for the particular context in which the action occurs. The system displaying the actions to the end user would typically not \"pre-check\" such an action.";
563            case NULL: return null;
564            default: return "?";
565          }
566        }
567        public String getDisplay() {
568          switch (this) {
569            case YES: return "Yes";
570            case NO: return "No";
571            case NULL: return null;
572            default: return "?";
573          }
574        }
575    }
576
577  public static class ActionPrecheckBehaviorEnumFactory implements EnumFactory<ActionPrecheckBehavior> {
578    public ActionPrecheckBehavior fromCode(String codeString) throws IllegalArgumentException {
579      if (codeString == null || "".equals(codeString))
580            if (codeString == null || "".equals(codeString))
581                return null;
582        if ("yes".equals(codeString))
583          return ActionPrecheckBehavior.YES;
584        if ("no".equals(codeString))
585          return ActionPrecheckBehavior.NO;
586        throw new IllegalArgumentException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
587        }
588        public Enumeration<ActionPrecheckBehavior> fromType(Base code) throws FHIRException {
589          if (code == null)
590            return null;
591          if (code.isEmpty())
592            return new Enumeration<ActionPrecheckBehavior>(this);
593          String codeString = ((PrimitiveType) code).asStringValue();
594          if (codeString == null || "".equals(codeString))
595            return null;
596        if ("yes".equals(codeString))
597          return new Enumeration<ActionPrecheckBehavior>(this, ActionPrecheckBehavior.YES);
598        if ("no".equals(codeString))
599          return new Enumeration<ActionPrecheckBehavior>(this, ActionPrecheckBehavior.NO);
600        throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
601        }
602    public String toCode(ActionPrecheckBehavior code) {
603      if (code == ActionPrecheckBehavior.YES)
604        return "yes";
605      if (code == ActionPrecheckBehavior.NO)
606        return "no";
607      return "?";
608      }
609    public String toSystem(ActionPrecheckBehavior code) {
610      return code.getSystem();
611      }
612    }
613
614    public enum ActionRelationshipType {
615        /**
616         * The action must be performed before the start of the related action.
617         */
618        BEFORESTART, 
619        /**
620         * The action must be performed before the related action.
621         */
622        BEFORE, 
623        /**
624         * The action must be performed before the end of the related action.
625         */
626        BEFOREEND, 
627        /**
628         * The action must be performed concurrent with the start of the related action.
629         */
630        CONCURRENTWITHSTART, 
631        /**
632         * The action must be performed concurrent with the related action.
633         */
634        CONCURRENT, 
635        /**
636         * The action must be performed concurrent with the end of the related action.
637         */
638        CONCURRENTWITHEND, 
639        /**
640         * The action must be performed after the start of the related action.
641         */
642        AFTERSTART, 
643        /**
644         * The action must be performed after the related action.
645         */
646        AFTER, 
647        /**
648         * The action must be performed after the end of the related action.
649         */
650        AFTEREND, 
651        /**
652         * added to help the parsers
653         */
654        NULL;
655        public static ActionRelationshipType fromCode(String codeString) throws FHIRException {
656            if (codeString == null || "".equals(codeString))
657                return null;
658        if ("before-start".equals(codeString))
659          return BEFORESTART;
660        if ("before".equals(codeString))
661          return BEFORE;
662        if ("before-end".equals(codeString))
663          return BEFOREEND;
664        if ("concurrent-with-start".equals(codeString))
665          return CONCURRENTWITHSTART;
666        if ("concurrent".equals(codeString))
667          return CONCURRENT;
668        if ("concurrent-with-end".equals(codeString))
669          return CONCURRENTWITHEND;
670        if ("after-start".equals(codeString))
671          return AFTERSTART;
672        if ("after".equals(codeString))
673          return AFTER;
674        if ("after-end".equals(codeString))
675          return AFTEREND;
676        throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'");
677        }
678        public String toCode() {
679          switch (this) {
680            case BEFORESTART: return "before-start";
681            case BEFORE: return "before";
682            case BEFOREEND: return "before-end";
683            case CONCURRENTWITHSTART: return "concurrent-with-start";
684            case CONCURRENT: return "concurrent";
685            case CONCURRENTWITHEND: return "concurrent-with-end";
686            case AFTERSTART: return "after-start";
687            case AFTER: return "after";
688            case AFTEREND: return "after-end";
689            case NULL: return null;
690            default: return "?";
691          }
692        }
693        public String getSystem() {
694          switch (this) {
695            case BEFORESTART: return "http://hl7.org/fhir/action-relationship-type";
696            case BEFORE: return "http://hl7.org/fhir/action-relationship-type";
697            case BEFOREEND: return "http://hl7.org/fhir/action-relationship-type";
698            case CONCURRENTWITHSTART: return "http://hl7.org/fhir/action-relationship-type";
699            case CONCURRENT: return "http://hl7.org/fhir/action-relationship-type";
700            case CONCURRENTWITHEND: return "http://hl7.org/fhir/action-relationship-type";
701            case AFTERSTART: return "http://hl7.org/fhir/action-relationship-type";
702            case AFTER: return "http://hl7.org/fhir/action-relationship-type";
703            case AFTEREND: return "http://hl7.org/fhir/action-relationship-type";
704            case NULL: return null;
705            default: return "?";
706          }
707        }
708        public String getDefinition() {
709          switch (this) {
710            case BEFORESTART: return "The action must be performed before the start of the related action.";
711            case BEFORE: return "The action must be performed before the related action.";
712            case BEFOREEND: return "The action must be performed before the end of the related action.";
713            case CONCURRENTWITHSTART: return "The action must be performed concurrent with the start of the related action.";
714            case CONCURRENT: return "The action must be performed concurrent with the related action.";
715            case CONCURRENTWITHEND: return "The action must be performed concurrent with the end of the related action.";
716            case AFTERSTART: return "The action must be performed after the start of the related action.";
717            case AFTER: return "The action must be performed after the related action.";
718            case AFTEREND: return "The action must be performed after the end of the related action.";
719            case NULL: return null;
720            default: return "?";
721          }
722        }
723        public String getDisplay() {
724          switch (this) {
725            case BEFORESTART: return "Before Start";
726            case BEFORE: return "Before";
727            case BEFOREEND: return "Before End";
728            case CONCURRENTWITHSTART: return "Concurrent With Start";
729            case CONCURRENT: return "Concurrent";
730            case CONCURRENTWITHEND: return "Concurrent With End";
731            case AFTERSTART: return "After Start";
732            case AFTER: return "After";
733            case AFTEREND: return "After End";
734            case NULL: return null;
735            default: return "?";
736          }
737        }
738    }
739
740  public static class ActionRelationshipTypeEnumFactory implements EnumFactory<ActionRelationshipType> {
741    public ActionRelationshipType fromCode(String codeString) throws IllegalArgumentException {
742      if (codeString == null || "".equals(codeString))
743            if (codeString == null || "".equals(codeString))
744                return null;
745        if ("before-start".equals(codeString))
746          return ActionRelationshipType.BEFORESTART;
747        if ("before".equals(codeString))
748          return ActionRelationshipType.BEFORE;
749        if ("before-end".equals(codeString))
750          return ActionRelationshipType.BEFOREEND;
751        if ("concurrent-with-start".equals(codeString))
752          return ActionRelationshipType.CONCURRENTWITHSTART;
753        if ("concurrent".equals(codeString))
754          return ActionRelationshipType.CONCURRENT;
755        if ("concurrent-with-end".equals(codeString))
756          return ActionRelationshipType.CONCURRENTWITHEND;
757        if ("after-start".equals(codeString))
758          return ActionRelationshipType.AFTERSTART;
759        if ("after".equals(codeString))
760          return ActionRelationshipType.AFTER;
761        if ("after-end".equals(codeString))
762          return ActionRelationshipType.AFTEREND;
763        throw new IllegalArgumentException("Unknown ActionRelationshipType code '"+codeString+"'");
764        }
765        public Enumeration<ActionRelationshipType> fromType(Base code) throws FHIRException {
766          if (code == null)
767            return null;
768          if (code.isEmpty())
769            return new Enumeration<ActionRelationshipType>(this);
770          String codeString = ((PrimitiveType) code).asStringValue();
771          if (codeString == null || "".equals(codeString))
772            return null;
773        if ("before-start".equals(codeString))
774          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFORESTART);
775        if ("before".equals(codeString))
776          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFORE);
777        if ("before-end".equals(codeString))
778          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFOREEND);
779        if ("concurrent-with-start".equals(codeString))
780          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENTWITHSTART);
781        if ("concurrent".equals(codeString))
782          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENT);
783        if ("concurrent-with-end".equals(codeString))
784          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENTWITHEND);
785        if ("after-start".equals(codeString))
786          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTERSTART);
787        if ("after".equals(codeString))
788          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTER);
789        if ("after-end".equals(codeString))
790          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTEREND);
791        throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'");
792        }
793    public String toCode(ActionRelationshipType code) {
794      if (code == ActionRelationshipType.BEFORESTART)
795        return "before-start";
796      if (code == ActionRelationshipType.BEFORE)
797        return "before";
798      if (code == ActionRelationshipType.BEFOREEND)
799        return "before-end";
800      if (code == ActionRelationshipType.CONCURRENTWITHSTART)
801        return "concurrent-with-start";
802      if (code == ActionRelationshipType.CONCURRENT)
803        return "concurrent";
804      if (code == ActionRelationshipType.CONCURRENTWITHEND)
805        return "concurrent-with-end";
806      if (code == ActionRelationshipType.AFTERSTART)
807        return "after-start";
808      if (code == ActionRelationshipType.AFTER)
809        return "after";
810      if (code == ActionRelationshipType.AFTEREND)
811        return "after-end";
812      return "?";
813      }
814    public String toSystem(ActionRelationshipType code) {
815      return code.getSystem();
816      }
817    }
818
819    public enum ActionRequiredBehavior {
820        /**
821         * An action with this behavior must be included in the actions processed by the end user; the end user SHALL NOT choose not to include this action.
822         */
823        MUST, 
824        /**
825         * An action with this behavior may be included in the set of actions processed by the end user.
826         */
827        COULD, 
828        /**
829         * An action with this behavior must be included in the set of actions processed by the end user, unless the end user provides documentation as to why the action was not included.
830         */
831        MUSTUNLESSDOCUMENTED, 
832        /**
833         * added to help the parsers
834         */
835        NULL;
836        public static ActionRequiredBehavior fromCode(String codeString) throws FHIRException {
837            if (codeString == null || "".equals(codeString))
838                return null;
839        if ("must".equals(codeString))
840          return MUST;
841        if ("could".equals(codeString))
842          return COULD;
843        if ("must-unless-documented".equals(codeString))
844          return MUSTUNLESSDOCUMENTED;
845        throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'");
846        }
847        public String toCode() {
848          switch (this) {
849            case MUST: return "must";
850            case COULD: return "could";
851            case MUSTUNLESSDOCUMENTED: return "must-unless-documented";
852            case NULL: return null;
853            default: return "?";
854          }
855        }
856        public String getSystem() {
857          switch (this) {
858            case MUST: return "http://hl7.org/fhir/action-required-behavior";
859            case COULD: return "http://hl7.org/fhir/action-required-behavior";
860            case MUSTUNLESSDOCUMENTED: return "http://hl7.org/fhir/action-required-behavior";
861            case NULL: return null;
862            default: return "?";
863          }
864        }
865        public String getDefinition() {
866          switch (this) {
867            case MUST: return "An action with this behavior must be included in the actions processed by the end user; the end user SHALL NOT choose not to include this action.";
868            case COULD: return "An action with this behavior may be included in the set of actions processed by the end user.";
869            case MUSTUNLESSDOCUMENTED: return "An action with this behavior must be included in the set of actions processed by the end user, unless the end user provides documentation as to why the action was not included.";
870            case NULL: return null;
871            default: return "?";
872          }
873        }
874        public String getDisplay() {
875          switch (this) {
876            case MUST: return "Must";
877            case COULD: return "Could";
878            case MUSTUNLESSDOCUMENTED: return "Must Unless Documented";
879            case NULL: return null;
880            default: return "?";
881          }
882        }
883    }
884
885  public static class ActionRequiredBehaviorEnumFactory implements EnumFactory<ActionRequiredBehavior> {
886    public ActionRequiredBehavior fromCode(String codeString) throws IllegalArgumentException {
887      if (codeString == null || "".equals(codeString))
888            if (codeString == null || "".equals(codeString))
889                return null;
890        if ("must".equals(codeString))
891          return ActionRequiredBehavior.MUST;
892        if ("could".equals(codeString))
893          return ActionRequiredBehavior.COULD;
894        if ("must-unless-documented".equals(codeString))
895          return ActionRequiredBehavior.MUSTUNLESSDOCUMENTED;
896        throw new IllegalArgumentException("Unknown ActionRequiredBehavior code '"+codeString+"'");
897        }
898        public Enumeration<ActionRequiredBehavior> fromType(Base code) throws FHIRException {
899          if (code == null)
900            return null;
901          if (code.isEmpty())
902            return new Enumeration<ActionRequiredBehavior>(this);
903          String codeString = ((PrimitiveType) code).asStringValue();
904          if (codeString == null || "".equals(codeString))
905            return null;
906        if ("must".equals(codeString))
907          return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.MUST);
908        if ("could".equals(codeString))
909          return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.COULD);
910        if ("must-unless-documented".equals(codeString))
911          return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.MUSTUNLESSDOCUMENTED);
912        throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'");
913        }
914    public String toCode(ActionRequiredBehavior code) {
915      if (code == ActionRequiredBehavior.MUST)
916        return "must";
917      if (code == ActionRequiredBehavior.COULD)
918        return "could";
919      if (code == ActionRequiredBehavior.MUSTUNLESSDOCUMENTED)
920        return "must-unless-documented";
921      return "?";
922      }
923    public String toSystem(ActionRequiredBehavior code) {
924      return code.getSystem();
925      }
926    }
927
928    public enum ActionSelectionBehavior {
929        /**
930         * Any number of the actions in the group may be chosen, from zero to all.
931         */
932        ANY, 
933        /**
934         * All the actions in the group must be selected as a single unit.
935         */
936        ALL, 
937        /**
938         * All the actions in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected.
939         */
940        ALLORNONE, 
941        /**
942         * The end user must choose one and only one of the selectable actions in the group. The user SHALL NOT choose none of the actions in the group.
943         */
944        EXACTLYONE, 
945        /**
946         * The end user may choose zero or at most one of the actions in the group.
947         */
948        ATMOSTONE, 
949        /**
950         * The end user must choose a minimum of one, and as many additional as desired.
951         */
952        ONEORMORE, 
953        /**
954         * added to help the parsers
955         */
956        NULL;
957        public static ActionSelectionBehavior fromCode(String codeString) throws FHIRException {
958            if (codeString == null || "".equals(codeString))
959                return null;
960        if ("any".equals(codeString))
961          return ANY;
962        if ("all".equals(codeString))
963          return ALL;
964        if ("all-or-none".equals(codeString))
965          return ALLORNONE;
966        if ("exactly-one".equals(codeString))
967          return EXACTLYONE;
968        if ("at-most-one".equals(codeString))
969          return ATMOSTONE;
970        if ("one-or-more".equals(codeString))
971          return ONEORMORE;
972        throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'");
973        }
974        public String toCode() {
975          switch (this) {
976            case ANY: return "any";
977            case ALL: return "all";
978            case ALLORNONE: return "all-or-none";
979            case EXACTLYONE: return "exactly-one";
980            case ATMOSTONE: return "at-most-one";
981            case ONEORMORE: return "one-or-more";
982            case NULL: return null;
983            default: return "?";
984          }
985        }
986        public String getSystem() {
987          switch (this) {
988            case ANY: return "http://hl7.org/fhir/action-selection-behavior";
989            case ALL: return "http://hl7.org/fhir/action-selection-behavior";
990            case ALLORNONE: return "http://hl7.org/fhir/action-selection-behavior";
991            case EXACTLYONE: return "http://hl7.org/fhir/action-selection-behavior";
992            case ATMOSTONE: return "http://hl7.org/fhir/action-selection-behavior";
993            case ONEORMORE: return "http://hl7.org/fhir/action-selection-behavior";
994            case NULL: return null;
995            default: return "?";
996          }
997        }
998        public String getDefinition() {
999          switch (this) {
1000            case ANY: return "Any number of the actions in the group may be chosen, from zero to all.";
1001            case ALL: return "All the actions in the group must be selected as a single unit.";
1002            case ALLORNONE: return "All the actions in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected.";
1003            case EXACTLYONE: return "The end user must choose one and only one of the selectable actions in the group. The user SHALL NOT choose none of the actions in the group.";
1004            case ATMOSTONE: return "The end user may choose zero or at most one of the actions in the group.";
1005            case ONEORMORE: return "The end user must choose a minimum of one, and as many additional as desired.";
1006            case NULL: return null;
1007            default: return "?";
1008          }
1009        }
1010        public String getDisplay() {
1011          switch (this) {
1012            case ANY: return "Any";
1013            case ALL: return "All";
1014            case ALLORNONE: return "All Or None";
1015            case EXACTLYONE: return "Exactly One";
1016            case ATMOSTONE: return "At Most One";
1017            case ONEORMORE: return "One Or More";
1018            case NULL: return null;
1019            default: return "?";
1020          }
1021        }
1022    }
1023
1024  public static class ActionSelectionBehaviorEnumFactory implements EnumFactory<ActionSelectionBehavior> {
1025    public ActionSelectionBehavior fromCode(String codeString) throws IllegalArgumentException {
1026      if (codeString == null || "".equals(codeString))
1027            if (codeString == null || "".equals(codeString))
1028                return null;
1029        if ("any".equals(codeString))
1030          return ActionSelectionBehavior.ANY;
1031        if ("all".equals(codeString))
1032          return ActionSelectionBehavior.ALL;
1033        if ("all-or-none".equals(codeString))
1034          return ActionSelectionBehavior.ALLORNONE;
1035        if ("exactly-one".equals(codeString))
1036          return ActionSelectionBehavior.EXACTLYONE;
1037        if ("at-most-one".equals(codeString))
1038          return ActionSelectionBehavior.ATMOSTONE;
1039        if ("one-or-more".equals(codeString))
1040          return ActionSelectionBehavior.ONEORMORE;
1041        throw new IllegalArgumentException("Unknown ActionSelectionBehavior code '"+codeString+"'");
1042        }
1043        public Enumeration<ActionSelectionBehavior> fromType(Base code) throws FHIRException {
1044          if (code == null)
1045            return null;
1046          if (code.isEmpty())
1047            return new Enumeration<ActionSelectionBehavior>(this);
1048          String codeString = ((PrimitiveType) code).asStringValue();
1049          if (codeString == null || "".equals(codeString))
1050            return null;
1051        if ("any".equals(codeString))
1052          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ANY);
1053        if ("all".equals(codeString))
1054          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ALL);
1055        if ("all-or-none".equals(codeString))
1056          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ALLORNONE);
1057        if ("exactly-one".equals(codeString))
1058          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.EXACTLYONE);
1059        if ("at-most-one".equals(codeString))
1060          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ATMOSTONE);
1061        if ("one-or-more".equals(codeString))
1062          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ONEORMORE);
1063        throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'");
1064        }
1065    public String toCode(ActionSelectionBehavior code) {
1066      if (code == ActionSelectionBehavior.ANY)
1067        return "any";
1068      if (code == ActionSelectionBehavior.ALL)
1069        return "all";
1070      if (code == ActionSelectionBehavior.ALLORNONE)
1071        return "all-or-none";
1072      if (code == ActionSelectionBehavior.EXACTLYONE)
1073        return "exactly-one";
1074      if (code == ActionSelectionBehavior.ATMOSTONE)
1075        return "at-most-one";
1076      if (code == ActionSelectionBehavior.ONEORMORE)
1077        return "one-or-more";
1078      return "?";
1079      }
1080    public String toSystem(ActionSelectionBehavior code) {
1081      return code.getSystem();
1082      }
1083    }
1084
1085    public enum AdministrativeGender {
1086        /**
1087         * Male.
1088         */
1089        MALE, 
1090        /**
1091         * Female.
1092         */
1093        FEMALE, 
1094        /**
1095         * Other.
1096         */
1097        OTHER, 
1098        /**
1099         * Unknown.
1100         */
1101        UNKNOWN, 
1102        /**
1103         * added to help the parsers
1104         */
1105        NULL;
1106        public static AdministrativeGender fromCode(String codeString) throws FHIRException {
1107            if (codeString == null || "".equals(codeString))
1108                return null;
1109        if ("male".equals(codeString))
1110          return MALE;
1111        if ("female".equals(codeString))
1112          return FEMALE;
1113        if ("other".equals(codeString))
1114          return OTHER;
1115        if ("unknown".equals(codeString))
1116          return UNKNOWN;
1117        throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'");
1118        }
1119        public String toCode() {
1120          switch (this) {
1121            case MALE: return "male";
1122            case FEMALE: return "female";
1123            case OTHER: return "other";
1124            case UNKNOWN: return "unknown";
1125            case NULL: return null;
1126            default: return "?";
1127          }
1128        }
1129        public String getSystem() {
1130          switch (this) {
1131            case MALE: return "http://hl7.org/fhir/administrative-gender";
1132            case FEMALE: return "http://hl7.org/fhir/administrative-gender";
1133            case OTHER: return "http://hl7.org/fhir/administrative-gender";
1134            case UNKNOWN: return "http://hl7.org/fhir/administrative-gender";
1135            case NULL: return null;
1136            default: return "?";
1137          }
1138        }
1139        public String getDefinition() {
1140          switch (this) {
1141            case MALE: return "Male.";
1142            case FEMALE: return "Female.";
1143            case OTHER: return "Other.";
1144            case UNKNOWN: return "Unknown.";
1145            case NULL: return null;
1146            default: return "?";
1147          }
1148        }
1149        public String getDisplay() {
1150          switch (this) {
1151            case MALE: return "Male";
1152            case FEMALE: return "Female";
1153            case OTHER: return "Other";
1154            case UNKNOWN: return "Unknown";
1155            case NULL: return null;
1156            default: return "?";
1157          }
1158        }
1159    }
1160
1161  public static class AdministrativeGenderEnumFactory implements EnumFactory<AdministrativeGender> {
1162    public AdministrativeGender fromCode(String codeString) throws IllegalArgumentException {
1163      if (codeString == null || "".equals(codeString))
1164            if (codeString == null || "".equals(codeString))
1165                return null;
1166        if ("male".equals(codeString))
1167          return AdministrativeGender.MALE;
1168        if ("female".equals(codeString))
1169          return AdministrativeGender.FEMALE;
1170        if ("other".equals(codeString))
1171          return AdministrativeGender.OTHER;
1172        if ("unknown".equals(codeString))
1173          return AdministrativeGender.UNKNOWN;
1174        throw new IllegalArgumentException("Unknown AdministrativeGender code '"+codeString+"'");
1175        }
1176        public Enumeration<AdministrativeGender> fromType(Base code) throws FHIRException {
1177          if (code == null)
1178            return null;
1179          if (code.isEmpty())
1180            return new Enumeration<AdministrativeGender>(this);
1181          String codeString = ((PrimitiveType) code).asStringValue();
1182          if (codeString == null || "".equals(codeString))
1183            return null;
1184        if ("male".equals(codeString))
1185          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.MALE);
1186        if ("female".equals(codeString))
1187          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.FEMALE);
1188        if ("other".equals(codeString))
1189          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.OTHER);
1190        if ("unknown".equals(codeString))
1191          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.UNKNOWN);
1192        throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'");
1193        }
1194    public String toCode(AdministrativeGender code) {
1195      if (code == AdministrativeGender.MALE)
1196        return "male";
1197      if (code == AdministrativeGender.FEMALE)
1198        return "female";
1199      if (code == AdministrativeGender.OTHER)
1200        return "other";
1201      if (code == AdministrativeGender.UNKNOWN)
1202        return "unknown";
1203      return "?";
1204      }
1205    public String toSystem(AdministrativeGender code) {
1206      return code.getSystem();
1207      }
1208    }
1209
1210    public enum BindingStrength {
1211        /**
1212         * To be conformant, the concept in this element SHALL be from the specified value set.
1213         */
1214        REQUIRED, 
1215        /**
1216         * To be conformant, the concept in this element SHALL be from the specified value set if any of the codes within the value set can apply to the concept being communicated.  If the value set does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead.
1217         */
1218        EXTENSIBLE, 
1219        /**
1220         * Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant.
1221         */
1222        PREFERRED, 
1223        /**
1224         * Instances are not expected or even encouraged to draw from the specified value set.  The value set merely provides examples of the types of concepts intended to be included.
1225         */
1226        EXAMPLE, 
1227        /**
1228         * added to help the parsers
1229         */
1230        NULL;
1231        public static BindingStrength fromCode(String codeString) throws FHIRException {
1232            if (codeString == null || "".equals(codeString))
1233                return null;
1234        if ("required".equals(codeString))
1235          return REQUIRED;
1236        if ("extensible".equals(codeString))
1237          return EXTENSIBLE;
1238        if ("preferred".equals(codeString))
1239          return PREFERRED;
1240        if ("example".equals(codeString))
1241          return EXAMPLE;
1242        throw new FHIRException("Unknown BindingStrength code '"+codeString+"'");
1243        }
1244        public String toCode() {
1245          switch (this) {
1246            case REQUIRED: return "required";
1247            case EXTENSIBLE: return "extensible";
1248            case PREFERRED: return "preferred";
1249            case EXAMPLE: return "example";
1250            case NULL: return null;
1251            default: return "?";
1252          }
1253        }
1254        public String getSystem() {
1255          switch (this) {
1256            case REQUIRED: return "http://hl7.org/fhir/binding-strength";
1257            case EXTENSIBLE: return "http://hl7.org/fhir/binding-strength";
1258            case PREFERRED: return "http://hl7.org/fhir/binding-strength";
1259            case EXAMPLE: return "http://hl7.org/fhir/binding-strength";
1260            case NULL: return null;
1261            default: return "?";
1262          }
1263        }
1264        public String getDefinition() {
1265          switch (this) {
1266            case REQUIRED: return "To be conformant, the concept in this element SHALL be from the specified value set.";
1267            case EXTENSIBLE: return "To be conformant, the concept in this element SHALL be from the specified value set if any of the codes within the value set can apply to the concept being communicated.  If the value set does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead.";
1268            case PREFERRED: return "Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant.";
1269            case EXAMPLE: return "Instances are not expected or even encouraged to draw from the specified value set.  The value set merely provides examples of the types of concepts intended to be included.";
1270            case NULL: return null;
1271            default: return "?";
1272          }
1273        }
1274        public String getDisplay() {
1275          switch (this) {
1276            case REQUIRED: return "Required";
1277            case EXTENSIBLE: return "Extensible";
1278            case PREFERRED: return "Preferred";
1279            case EXAMPLE: return "Example";
1280            case NULL: return null;
1281            default: return "?";
1282          }
1283        }
1284    }
1285
1286  public static class BindingStrengthEnumFactory implements EnumFactory<BindingStrength> {
1287    public BindingStrength fromCode(String codeString) throws IllegalArgumentException {
1288      if (codeString == null || "".equals(codeString))
1289            if (codeString == null || "".equals(codeString))
1290                return null;
1291        if ("required".equals(codeString))
1292          return BindingStrength.REQUIRED;
1293        if ("extensible".equals(codeString))
1294          return BindingStrength.EXTENSIBLE;
1295        if ("preferred".equals(codeString))
1296          return BindingStrength.PREFERRED;
1297        if ("example".equals(codeString))
1298          return BindingStrength.EXAMPLE;
1299        throw new IllegalArgumentException("Unknown BindingStrength code '"+codeString+"'");
1300        }
1301        public Enumeration<BindingStrength> fromType(Base code) throws FHIRException {
1302          if (code == null)
1303            return null;
1304          if (code.isEmpty())
1305            return new Enumeration<BindingStrength>(this);
1306          String codeString = ((PrimitiveType) code).asStringValue();
1307          if (codeString == null || "".equals(codeString))
1308            return null;
1309        if ("required".equals(codeString))
1310          return new Enumeration<BindingStrength>(this, BindingStrength.REQUIRED);
1311        if ("extensible".equals(codeString))
1312          return new Enumeration<BindingStrength>(this, BindingStrength.EXTENSIBLE);
1313        if ("preferred".equals(codeString))
1314          return new Enumeration<BindingStrength>(this, BindingStrength.PREFERRED);
1315        if ("example".equals(codeString))
1316          return new Enumeration<BindingStrength>(this, BindingStrength.EXAMPLE);
1317        throw new FHIRException("Unknown BindingStrength code '"+codeString+"'");
1318        }
1319    public String toCode(BindingStrength code) {
1320      if (code == BindingStrength.REQUIRED)
1321        return "required";
1322      if (code == BindingStrength.EXTENSIBLE)
1323        return "extensible";
1324      if (code == BindingStrength.PREFERRED)
1325        return "preferred";
1326      if (code == BindingStrength.EXAMPLE)
1327        return "example";
1328      return "?";
1329      }
1330    public String toSystem(BindingStrength code) {
1331      return code.getSystem();
1332      }
1333    }
1334
1335    public enum CapabilityStatementKind {
1336        /**
1337         * The CapabilityStatement instance represents the present capabilities of a specific system instance.  This is the kind returned by /metadata for a FHIR server end-point.
1338         */
1339        INSTANCE, 
1340        /**
1341         * The CapabilityStatement instance represents the capabilities of a system or piece of software, independent of a particular installation.
1342         */
1343        CAPABILITY, 
1344        /**
1345         * The CapabilityStatement instance represents a set of requirements for other systems to meet; e.g. as part of an implementation guide or 'request for proposal'.
1346         */
1347        REQUIREMENTS, 
1348        /**
1349         * added to help the parsers
1350         */
1351        NULL;
1352        public static CapabilityStatementKind fromCode(String codeString) throws FHIRException {
1353            if (codeString == null || "".equals(codeString))
1354                return null;
1355        if ("instance".equals(codeString))
1356          return INSTANCE;
1357        if ("capability".equals(codeString))
1358          return CAPABILITY;
1359        if ("requirements".equals(codeString))
1360          return REQUIREMENTS;
1361        throw new FHIRException("Unknown CapabilityStatementKind code '"+codeString+"'");
1362        }
1363        public String toCode() {
1364          switch (this) {
1365            case INSTANCE: return "instance";
1366            case CAPABILITY: return "capability";
1367            case REQUIREMENTS: return "requirements";
1368            case NULL: return null;
1369            default: return "?";
1370          }
1371        }
1372        public String getSystem() {
1373          switch (this) {
1374            case INSTANCE: return "http://hl7.org/fhir/capability-statement-kind";
1375            case CAPABILITY: return "http://hl7.org/fhir/capability-statement-kind";
1376            case REQUIREMENTS: return "http://hl7.org/fhir/capability-statement-kind";
1377            case NULL: return null;
1378            default: return "?";
1379          }
1380        }
1381        public String getDefinition() {
1382          switch (this) {
1383            case INSTANCE: return "The CapabilityStatement instance represents the present capabilities of a specific system instance.  This is the kind returned by /metadata for a FHIR server end-point.";
1384            case CAPABILITY: return "The CapabilityStatement instance represents the capabilities of a system or piece of software, independent of a particular installation.";
1385            case REQUIREMENTS: return "The CapabilityStatement instance represents a set of requirements for other systems to meet; e.g. as part of an implementation guide or 'request for proposal'.";
1386            case NULL: return null;
1387            default: return "?";
1388          }
1389        }
1390        public String getDisplay() {
1391          switch (this) {
1392            case INSTANCE: return "Instance";
1393            case CAPABILITY: return "Capability";
1394            case REQUIREMENTS: return "Requirements";
1395            case NULL: return null;
1396            default: return "?";
1397          }
1398        }
1399    }
1400
1401  public static class CapabilityStatementKindEnumFactory implements EnumFactory<CapabilityStatementKind> {
1402    public CapabilityStatementKind fromCode(String codeString) throws IllegalArgumentException {
1403      if (codeString == null || "".equals(codeString))
1404            if (codeString == null || "".equals(codeString))
1405                return null;
1406        if ("instance".equals(codeString))
1407          return CapabilityStatementKind.INSTANCE;
1408        if ("capability".equals(codeString))
1409          return CapabilityStatementKind.CAPABILITY;
1410        if ("requirements".equals(codeString))
1411          return CapabilityStatementKind.REQUIREMENTS;
1412        throw new IllegalArgumentException("Unknown CapabilityStatementKind code '"+codeString+"'");
1413        }
1414        public Enumeration<CapabilityStatementKind> fromType(Base code) throws FHIRException {
1415          if (code == null)
1416            return null;
1417          if (code.isEmpty())
1418            return new Enumeration<CapabilityStatementKind>(this);
1419          String codeString = ((PrimitiveType) code).asStringValue();
1420          if (codeString == null || "".equals(codeString))
1421            return null;
1422        if ("instance".equals(codeString))
1423          return new Enumeration<CapabilityStatementKind>(this, CapabilityStatementKind.INSTANCE);
1424        if ("capability".equals(codeString))
1425          return new Enumeration<CapabilityStatementKind>(this, CapabilityStatementKind.CAPABILITY);
1426        if ("requirements".equals(codeString))
1427          return new Enumeration<CapabilityStatementKind>(this, CapabilityStatementKind.REQUIREMENTS);
1428        throw new FHIRException("Unknown CapabilityStatementKind code '"+codeString+"'");
1429        }
1430    public String toCode(CapabilityStatementKind code) {
1431      if (code == CapabilityStatementKind.INSTANCE)
1432        return "instance";
1433      if (code == CapabilityStatementKind.CAPABILITY)
1434        return "capability";
1435      if (code == CapabilityStatementKind.REQUIREMENTS)
1436        return "requirements";
1437      return "?";
1438      }
1439    public String toSystem(CapabilityStatementKind code) {
1440      return code.getSystem();
1441      }
1442    }
1443
1444    public enum CompartmentType {
1445        /**
1446         * The compartment definition is for the patient compartment.
1447         */
1448        PATIENT, 
1449        /**
1450         * The compartment definition is for the encounter compartment.
1451         */
1452        ENCOUNTER, 
1453        /**
1454         * The compartment definition is for the related-person compartment.
1455         */
1456        RELATEDPERSON, 
1457        /**
1458         * The compartment definition is for the practitioner compartment.
1459         */
1460        PRACTITIONER, 
1461        /**
1462         * The compartment definition is for the device compartment.
1463         */
1464        DEVICE, 
1465        /**
1466         * added to help the parsers
1467         */
1468        NULL;
1469        public static CompartmentType fromCode(String codeString) throws FHIRException {
1470            if (codeString == null || "".equals(codeString))
1471                return null;
1472        if ("Patient".equals(codeString))
1473          return PATIENT;
1474        if ("Encounter".equals(codeString))
1475          return ENCOUNTER;
1476        if ("RelatedPerson".equals(codeString))
1477          return RELATEDPERSON;
1478        if ("Practitioner".equals(codeString))
1479          return PRACTITIONER;
1480        if ("Device".equals(codeString))
1481          return DEVICE;
1482        throw new FHIRException("Unknown CompartmentType code '"+codeString+"'");
1483        }
1484        public String toCode() {
1485          switch (this) {
1486            case PATIENT: return "Patient";
1487            case ENCOUNTER: return "Encounter";
1488            case RELATEDPERSON: return "RelatedPerson";
1489            case PRACTITIONER: return "Practitioner";
1490            case DEVICE: return "Device";
1491            case NULL: return null;
1492            default: return "?";
1493          }
1494        }
1495        public String getSystem() {
1496          switch (this) {
1497            case PATIENT: return "http://hl7.org/fhir/compartment-type";
1498            case ENCOUNTER: return "http://hl7.org/fhir/compartment-type";
1499            case RELATEDPERSON: return "http://hl7.org/fhir/compartment-type";
1500            case PRACTITIONER: return "http://hl7.org/fhir/compartment-type";
1501            case DEVICE: return "http://hl7.org/fhir/compartment-type";
1502            case NULL: return null;
1503            default: return "?";
1504          }
1505        }
1506        public String getDefinition() {
1507          switch (this) {
1508            case PATIENT: return "The compartment definition is for the patient compartment.";
1509            case ENCOUNTER: return "The compartment definition is for the encounter compartment.";
1510            case RELATEDPERSON: return "The compartment definition is for the related-person compartment.";
1511            case PRACTITIONER: return "The compartment definition is for the practitioner compartment.";
1512            case DEVICE: return "The compartment definition is for the device compartment.";
1513            case NULL: return null;
1514            default: return "?";
1515          }
1516        }
1517        public String getDisplay() {
1518          switch (this) {
1519            case PATIENT: return "Patient";
1520            case ENCOUNTER: return "Encounter";
1521            case RELATEDPERSON: return "RelatedPerson";
1522            case PRACTITIONER: return "Practitioner";
1523            case DEVICE: return "Device";
1524            case NULL: return null;
1525            default: return "?";
1526          }
1527        }
1528    }
1529
1530  public static class CompartmentTypeEnumFactory implements EnumFactory<CompartmentType> {
1531    public CompartmentType fromCode(String codeString) throws IllegalArgumentException {
1532      if (codeString == null || "".equals(codeString))
1533            if (codeString == null || "".equals(codeString))
1534                return null;
1535        if ("Patient".equals(codeString))
1536          return CompartmentType.PATIENT;
1537        if ("Encounter".equals(codeString))
1538          return CompartmentType.ENCOUNTER;
1539        if ("RelatedPerson".equals(codeString))
1540          return CompartmentType.RELATEDPERSON;
1541        if ("Practitioner".equals(codeString))
1542          return CompartmentType.PRACTITIONER;
1543        if ("Device".equals(codeString))
1544          return CompartmentType.DEVICE;
1545        throw new IllegalArgumentException("Unknown CompartmentType code '"+codeString+"'");
1546        }
1547        public Enumeration<CompartmentType> fromType(Base code) throws FHIRException {
1548          if (code == null)
1549            return null;
1550          if (code.isEmpty())
1551            return new Enumeration<CompartmentType>(this);
1552          String codeString = ((PrimitiveType) code).asStringValue();
1553          if (codeString == null || "".equals(codeString))
1554            return null;
1555        if ("Patient".equals(codeString))
1556          return new Enumeration<CompartmentType>(this, CompartmentType.PATIENT);
1557        if ("Encounter".equals(codeString))
1558          return new Enumeration<CompartmentType>(this, CompartmentType.ENCOUNTER);
1559        if ("RelatedPerson".equals(codeString))
1560          return new Enumeration<CompartmentType>(this, CompartmentType.RELATEDPERSON);
1561        if ("Practitioner".equals(codeString))
1562          return new Enumeration<CompartmentType>(this, CompartmentType.PRACTITIONER);
1563        if ("Device".equals(codeString))
1564          return new Enumeration<CompartmentType>(this, CompartmentType.DEVICE);
1565        throw new FHIRException("Unknown CompartmentType code '"+codeString+"'");
1566        }
1567    public String toCode(CompartmentType code) {
1568      if (code == CompartmentType.PATIENT)
1569        return "Patient";
1570      if (code == CompartmentType.ENCOUNTER)
1571        return "Encounter";
1572      if (code == CompartmentType.RELATEDPERSON)
1573        return "RelatedPerson";
1574      if (code == CompartmentType.PRACTITIONER)
1575        return "Practitioner";
1576      if (code == CompartmentType.DEVICE)
1577        return "Device";
1578      return "?";
1579      }
1580    public String toSystem(CompartmentType code) {
1581      return code.getSystem();
1582      }
1583    }
1584
1585    public enum CompositionStatus {
1586        /**
1587         * This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified.
1588         */
1589        PRELIMINARY, 
1590        /**
1591         * This version of the composition is complete and verified by an appropriate person and no further work is planned. Any subsequent updates would be on a new version of the composition.
1592         */
1593        FINAL, 
1594        /**
1595         * The composition content or the referenced resources have been modified (edited or added to) subsequent to being released as "final" and the composition is complete and verified by an authorized person.
1596         */
1597        AMENDED, 
1598        /**
1599         * The composition or document was originally created/issued in error, and this is an amendment that marks that the entire series should not be considered as valid.
1600         */
1601        ENTEREDINERROR, 
1602        /**
1603         * added to help the parsers
1604         */
1605        NULL;
1606        public static CompositionStatus fromCode(String codeString) throws FHIRException {
1607            if (codeString == null || "".equals(codeString))
1608                return null;
1609        if ("preliminary".equals(codeString))
1610          return PRELIMINARY;
1611        if ("final".equals(codeString))
1612          return FINAL;
1613        if ("amended".equals(codeString))
1614          return AMENDED;
1615        if ("entered-in-error".equals(codeString))
1616          return ENTEREDINERROR;
1617        throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'");
1618        }
1619        public String toCode() {
1620          switch (this) {
1621            case PRELIMINARY: return "preliminary";
1622            case FINAL: return "final";
1623            case AMENDED: return "amended";
1624            case ENTEREDINERROR: return "entered-in-error";
1625            case NULL: return null;
1626            default: return "?";
1627          }
1628        }
1629        public String getSystem() {
1630          switch (this) {
1631            case PRELIMINARY: return "http://hl7.org/fhir/composition-status";
1632            case FINAL: return "http://hl7.org/fhir/composition-status";
1633            case AMENDED: return "http://hl7.org/fhir/composition-status";
1634            case ENTEREDINERROR: return "http://hl7.org/fhir/composition-status";
1635            case NULL: return null;
1636            default: return "?";
1637          }
1638        }
1639        public String getDefinition() {
1640          switch (this) {
1641            case PRELIMINARY: return "This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified.";
1642            case FINAL: return "This version of the composition is complete and verified by an appropriate person and no further work is planned. Any subsequent updates would be on a new version of the composition.";
1643            case AMENDED: return "The composition content or the referenced resources have been modified (edited or added to) subsequent to being released as \"final\" and the composition is complete and verified by an authorized person.";
1644            case ENTEREDINERROR: return "The composition or document was originally created/issued in error, and this is an amendment that marks that the entire series should not be considered as valid.";
1645            case NULL: return null;
1646            default: return "?";
1647          }
1648        }
1649        public String getDisplay() {
1650          switch (this) {
1651            case PRELIMINARY: return "Preliminary";
1652            case FINAL: return "Final";
1653            case AMENDED: return "Amended";
1654            case ENTEREDINERROR: return "Entered in Error";
1655            case NULL: return null;
1656            default: return "?";
1657          }
1658        }
1659    }
1660
1661  public static class CompositionStatusEnumFactory implements EnumFactory<CompositionStatus> {
1662    public CompositionStatus fromCode(String codeString) throws IllegalArgumentException {
1663      if (codeString == null || "".equals(codeString))
1664            if (codeString == null || "".equals(codeString))
1665                return null;
1666        if ("preliminary".equals(codeString))
1667          return CompositionStatus.PRELIMINARY;
1668        if ("final".equals(codeString))
1669          return CompositionStatus.FINAL;
1670        if ("amended".equals(codeString))
1671          return CompositionStatus.AMENDED;
1672        if ("entered-in-error".equals(codeString))
1673          return CompositionStatus.ENTEREDINERROR;
1674        throw new IllegalArgumentException("Unknown CompositionStatus code '"+codeString+"'");
1675        }
1676        public Enumeration<CompositionStatus> fromType(Base code) throws FHIRException {
1677          if (code == null)
1678            return null;
1679          if (code.isEmpty())
1680            return new Enumeration<CompositionStatus>(this);
1681          String codeString = ((PrimitiveType) code).asStringValue();
1682          if (codeString == null || "".equals(codeString))
1683            return null;
1684        if ("preliminary".equals(codeString))
1685          return new Enumeration<CompositionStatus>(this, CompositionStatus.PRELIMINARY);
1686        if ("final".equals(codeString))
1687          return new Enumeration<CompositionStatus>(this, CompositionStatus.FINAL);
1688        if ("amended".equals(codeString))
1689          return new Enumeration<CompositionStatus>(this, CompositionStatus.AMENDED);
1690        if ("entered-in-error".equals(codeString))
1691          return new Enumeration<CompositionStatus>(this, CompositionStatus.ENTEREDINERROR);
1692        throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'");
1693        }
1694    public String toCode(CompositionStatus code) {
1695      if (code == CompositionStatus.PRELIMINARY)
1696        return "preliminary";
1697      if (code == CompositionStatus.FINAL)
1698        return "final";
1699      if (code == CompositionStatus.AMENDED)
1700        return "amended";
1701      if (code == CompositionStatus.ENTEREDINERROR)
1702        return "entered-in-error";
1703      return "?";
1704      }
1705    public String toSystem(CompositionStatus code) {
1706      return code.getSystem();
1707      }
1708    }
1709
1710    public enum DaysOfWeek {
1711        /**
1712         * Monday.
1713         */
1714        MON, 
1715        /**
1716         * Tuesday.
1717         */
1718        TUE, 
1719        /**
1720         * Wednesday.
1721         */
1722        WED, 
1723        /**
1724         * Thursday.
1725         */
1726        THU, 
1727        /**
1728         * Friday.
1729         */
1730        FRI, 
1731        /**
1732         * Saturday.
1733         */
1734        SAT, 
1735        /**
1736         * Sunday.
1737         */
1738        SUN, 
1739        /**
1740         * added to help the parsers
1741         */
1742        NULL;
1743        public static DaysOfWeek fromCode(String codeString) throws FHIRException {
1744            if (codeString == null || "".equals(codeString))
1745                return null;
1746        if ("mon".equals(codeString))
1747          return MON;
1748        if ("tue".equals(codeString))
1749          return TUE;
1750        if ("wed".equals(codeString))
1751          return WED;
1752        if ("thu".equals(codeString))
1753          return THU;
1754        if ("fri".equals(codeString))
1755          return FRI;
1756        if ("sat".equals(codeString))
1757          return SAT;
1758        if ("sun".equals(codeString))
1759          return SUN;
1760        throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'");
1761        }
1762        public String toCode() {
1763          switch (this) {
1764            case MON: return "mon";
1765            case TUE: return "tue";
1766            case WED: return "wed";
1767            case THU: return "thu";
1768            case FRI: return "fri";
1769            case SAT: return "sat";
1770            case SUN: return "sun";
1771            case NULL: return null;
1772            default: return "?";
1773          }
1774        }
1775        public String getSystem() {
1776          switch (this) {
1777            case MON: return "http://hl7.org/fhir/days-of-week";
1778            case TUE: return "http://hl7.org/fhir/days-of-week";
1779            case WED: return "http://hl7.org/fhir/days-of-week";
1780            case THU: return "http://hl7.org/fhir/days-of-week";
1781            case FRI: return "http://hl7.org/fhir/days-of-week";
1782            case SAT: return "http://hl7.org/fhir/days-of-week";
1783            case SUN: return "http://hl7.org/fhir/days-of-week";
1784            case NULL: return null;
1785            default: return "?";
1786          }
1787        }
1788        public String getDefinition() {
1789          switch (this) {
1790            case MON: return "Monday.";
1791            case TUE: return "Tuesday.";
1792            case WED: return "Wednesday.";
1793            case THU: return "Thursday.";
1794            case FRI: return "Friday.";
1795            case SAT: return "Saturday.";
1796            case SUN: return "Sunday.";
1797            case NULL: return null;
1798            default: return "?";
1799          }
1800        }
1801        public String getDisplay() {
1802          switch (this) {
1803            case MON: return "Monday";
1804            case TUE: return "Tuesday";
1805            case WED: return "Wednesday";
1806            case THU: return "Thursday";
1807            case FRI: return "Friday";
1808            case SAT: return "Saturday";
1809            case SUN: return "Sunday";
1810            case NULL: return null;
1811            default: return "?";
1812          }
1813        }
1814    }
1815
1816  public static class DaysOfWeekEnumFactory implements EnumFactory<DaysOfWeek> {
1817    public DaysOfWeek fromCode(String codeString) throws IllegalArgumentException {
1818      if (codeString == null || "".equals(codeString))
1819            if (codeString == null || "".equals(codeString))
1820                return null;
1821        if ("mon".equals(codeString))
1822          return DaysOfWeek.MON;
1823        if ("tue".equals(codeString))
1824          return DaysOfWeek.TUE;
1825        if ("wed".equals(codeString))
1826          return DaysOfWeek.WED;
1827        if ("thu".equals(codeString))
1828          return DaysOfWeek.THU;
1829        if ("fri".equals(codeString))
1830          return DaysOfWeek.FRI;
1831        if ("sat".equals(codeString))
1832          return DaysOfWeek.SAT;
1833        if ("sun".equals(codeString))
1834          return DaysOfWeek.SUN;
1835        throw new IllegalArgumentException("Unknown DaysOfWeek code '"+codeString+"'");
1836        }
1837        public Enumeration<DaysOfWeek> fromType(Base code) throws FHIRException {
1838          if (code == null)
1839            return null;
1840          if (code.isEmpty())
1841            return new Enumeration<DaysOfWeek>(this);
1842          String codeString = ((PrimitiveType) code).asStringValue();
1843          if (codeString == null || "".equals(codeString))
1844            return null;
1845        if ("mon".equals(codeString))
1846          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.MON);
1847        if ("tue".equals(codeString))
1848          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.TUE);
1849        if ("wed".equals(codeString))
1850          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.WED);
1851        if ("thu".equals(codeString))
1852          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.THU);
1853        if ("fri".equals(codeString))
1854          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.FRI);
1855        if ("sat".equals(codeString))
1856          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.SAT);
1857        if ("sun".equals(codeString))
1858          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.SUN);
1859        throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'");
1860        }
1861    public String toCode(DaysOfWeek code) {
1862      if (code == DaysOfWeek.MON)
1863        return "mon";
1864      if (code == DaysOfWeek.TUE)
1865        return "tue";
1866      if (code == DaysOfWeek.WED)
1867        return "wed";
1868      if (code == DaysOfWeek.THU)
1869        return "thu";
1870      if (code == DaysOfWeek.FRI)
1871        return "fri";
1872      if (code == DaysOfWeek.SAT)
1873        return "sat";
1874      if (code == DaysOfWeek.SUN)
1875        return "sun";
1876      return "?";
1877      }
1878    public String toSystem(DaysOfWeek code) {
1879      return code.getSystem();
1880      }
1881    }
1882
1883    public enum DeviceNameType {
1884        /**
1885         * UDI Label name.
1886         */
1887        UDILABELNAME, 
1888        /**
1889         * User Friendly name.
1890         */
1891        USERFRIENDLYNAME, 
1892        /**
1893         * Patient Reported name.
1894         */
1895        PATIENTREPORTEDNAME, 
1896        /**
1897         * Manufacturer name.
1898         */
1899        MANUFACTURERNAME, 
1900        /**
1901         * Model name.
1902         */
1903        MODELNAME, 
1904        /**
1905         * other.
1906         */
1907        OTHER, 
1908        /**
1909         * added to help the parsers
1910         */
1911        NULL;
1912        public static DeviceNameType fromCode(String codeString) throws FHIRException {
1913            if (codeString == null || "".equals(codeString))
1914                return null;
1915        if ("udi-label-name".equals(codeString))
1916          return UDILABELNAME;
1917        if ("user-friendly-name".equals(codeString))
1918          return USERFRIENDLYNAME;
1919        if ("patient-reported-name".equals(codeString))
1920          return PATIENTREPORTEDNAME;
1921        if ("manufacturer-name".equals(codeString))
1922          return MANUFACTURERNAME;
1923        if ("model-name".equals(codeString))
1924          return MODELNAME;
1925        if ("other".equals(codeString))
1926          return OTHER;
1927        throw new FHIRException("Unknown DeviceNameType code '"+codeString+"'");
1928        }
1929        public String toCode() {
1930          switch (this) {
1931            case UDILABELNAME: return "udi-label-name";
1932            case USERFRIENDLYNAME: return "user-friendly-name";
1933            case PATIENTREPORTEDNAME: return "patient-reported-name";
1934            case MANUFACTURERNAME: return "manufacturer-name";
1935            case MODELNAME: return "model-name";
1936            case OTHER: return "other";
1937            case NULL: return null;
1938            default: return "?";
1939          }
1940        }
1941        public String getSystem() {
1942          switch (this) {
1943            case UDILABELNAME: return "http://hl7.org/fhir/device-nametype";
1944            case USERFRIENDLYNAME: return "http://hl7.org/fhir/device-nametype";
1945            case PATIENTREPORTEDNAME: return "http://hl7.org/fhir/device-nametype";
1946            case MANUFACTURERNAME: return "http://hl7.org/fhir/device-nametype";
1947            case MODELNAME: return "http://hl7.org/fhir/device-nametype";
1948            case OTHER: return "http://hl7.org/fhir/device-nametype";
1949            case NULL: return null;
1950            default: return "?";
1951          }
1952        }
1953        public String getDefinition() {
1954          switch (this) {
1955            case UDILABELNAME: return "UDI Label name.";
1956            case USERFRIENDLYNAME: return "User Friendly name.";
1957            case PATIENTREPORTEDNAME: return "Patient Reported name.";
1958            case MANUFACTURERNAME: return "Manufacturer name.";
1959            case MODELNAME: return "Model name.";
1960            case OTHER: return "other.";
1961            case NULL: return null;
1962            default: return "?";
1963          }
1964        }
1965        public String getDisplay() {
1966          switch (this) {
1967            case UDILABELNAME: return "UDI Label name";
1968            case USERFRIENDLYNAME: return "User Friendly name";
1969            case PATIENTREPORTEDNAME: return "Patient Reported name";
1970            case MANUFACTURERNAME: return "Manufacturer name";
1971            case MODELNAME: return "Model name";
1972            case OTHER: return "other";
1973            case NULL: return null;
1974            default: return "?";
1975          }
1976        }
1977    }
1978
1979  public static class DeviceNameTypeEnumFactory implements EnumFactory<DeviceNameType> {
1980    public DeviceNameType fromCode(String codeString) throws IllegalArgumentException {
1981      if (codeString == null || "".equals(codeString))
1982            if (codeString == null || "".equals(codeString))
1983                return null;
1984        if ("udi-label-name".equals(codeString))
1985          return DeviceNameType.UDILABELNAME;
1986        if ("user-friendly-name".equals(codeString))
1987          return DeviceNameType.USERFRIENDLYNAME;
1988        if ("patient-reported-name".equals(codeString))
1989          return DeviceNameType.PATIENTREPORTEDNAME;
1990        if ("manufacturer-name".equals(codeString))
1991          return DeviceNameType.MANUFACTURERNAME;
1992        if ("model-name".equals(codeString))
1993          return DeviceNameType.MODELNAME;
1994        if ("other".equals(codeString))
1995          return DeviceNameType.OTHER;
1996        throw new IllegalArgumentException("Unknown DeviceNameType code '"+codeString+"'");
1997        }
1998        public Enumeration<DeviceNameType> fromType(Base code) throws FHIRException {
1999          if (code == null)
2000            return null;
2001          if (code.isEmpty())
2002            return new Enumeration<DeviceNameType>(this);
2003          String codeString = ((PrimitiveType) code).asStringValue();
2004          if (codeString == null || "".equals(codeString))
2005            return null;
2006        if ("udi-label-name".equals(codeString))
2007          return new Enumeration<DeviceNameType>(this, DeviceNameType.UDILABELNAME);
2008        if ("user-friendly-name".equals(codeString))
2009          return new Enumeration<DeviceNameType>(this, DeviceNameType.USERFRIENDLYNAME);
2010        if ("patient-reported-name".equals(codeString))
2011          return new Enumeration<DeviceNameType>(this, DeviceNameType.PATIENTREPORTEDNAME);
2012        if ("manufacturer-name".equals(codeString))
2013          return new Enumeration<DeviceNameType>(this, DeviceNameType.MANUFACTURERNAME);
2014        if ("model-name".equals(codeString))
2015          return new Enumeration<DeviceNameType>(this, DeviceNameType.MODELNAME);
2016        if ("other".equals(codeString))
2017          return new Enumeration<DeviceNameType>(this, DeviceNameType.OTHER);
2018        throw new FHIRException("Unknown DeviceNameType code '"+codeString+"'");
2019        }
2020    public String toCode(DeviceNameType code) {
2021      if (code == DeviceNameType.UDILABELNAME)
2022        return "udi-label-name";
2023      if (code == DeviceNameType.USERFRIENDLYNAME)
2024        return "user-friendly-name";
2025      if (code == DeviceNameType.PATIENTREPORTEDNAME)
2026        return "patient-reported-name";
2027      if (code == DeviceNameType.MANUFACTURERNAME)
2028        return "manufacturer-name";
2029      if (code == DeviceNameType.MODELNAME)
2030        return "model-name";
2031      if (code == DeviceNameType.OTHER)
2032        return "other";
2033      return "?";
2034      }
2035    public String toSystem(DeviceNameType code) {
2036      return code.getSystem();
2037      }
2038    }
2039
2040    public enum DocumentReferenceStatus {
2041        /**
2042         * This is the current reference for this document.
2043         */
2044        CURRENT, 
2045        /**
2046         * This reference has been superseded by another reference.
2047         */
2048        SUPERSEDED, 
2049        /**
2050         * This reference was created in error.
2051         */
2052        ENTEREDINERROR, 
2053        /**
2054         * added to help the parsers
2055         */
2056        NULL;
2057        public static DocumentReferenceStatus fromCode(String codeString) throws FHIRException {
2058            if (codeString == null || "".equals(codeString))
2059                return null;
2060        if ("current".equals(codeString))
2061          return CURRENT;
2062        if ("superseded".equals(codeString))
2063          return SUPERSEDED;
2064        if ("entered-in-error".equals(codeString))
2065          return ENTEREDINERROR;
2066        throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'");
2067        }
2068        public String toCode() {
2069          switch (this) {
2070            case CURRENT: return "current";
2071            case SUPERSEDED: return "superseded";
2072            case ENTEREDINERROR: return "entered-in-error";
2073            case NULL: return null;
2074            default: return "?";
2075          }
2076        }
2077        public String getSystem() {
2078          switch (this) {
2079            case CURRENT: return "http://hl7.org/fhir/document-reference-status";
2080            case SUPERSEDED: return "http://hl7.org/fhir/document-reference-status";
2081            case ENTEREDINERROR: return "http://hl7.org/fhir/document-reference-status";
2082            case NULL: return null;
2083            default: return "?";
2084          }
2085        }
2086        public String getDefinition() {
2087          switch (this) {
2088            case CURRENT: return "This is the current reference for this document.";
2089            case SUPERSEDED: return "This reference has been superseded by another reference.";
2090            case ENTEREDINERROR: return "This reference was created in error.";
2091            case NULL: return null;
2092            default: return "?";
2093          }
2094        }
2095        public String getDisplay() {
2096          switch (this) {
2097            case CURRENT: return "Current";
2098            case SUPERSEDED: return "Superseded";
2099            case ENTEREDINERROR: return "Entered in Error";
2100            case NULL: return null;
2101            default: return "?";
2102          }
2103        }
2104    }
2105
2106  public static class DocumentReferenceStatusEnumFactory implements EnumFactory<DocumentReferenceStatus> {
2107    public DocumentReferenceStatus fromCode(String codeString) throws IllegalArgumentException {
2108      if (codeString == null || "".equals(codeString))
2109            if (codeString == null || "".equals(codeString))
2110                return null;
2111        if ("current".equals(codeString))
2112          return DocumentReferenceStatus.CURRENT;
2113        if ("superseded".equals(codeString))
2114          return DocumentReferenceStatus.SUPERSEDED;
2115        if ("entered-in-error".equals(codeString))
2116          return DocumentReferenceStatus.ENTEREDINERROR;
2117        throw new IllegalArgumentException("Unknown DocumentReferenceStatus code '"+codeString+"'");
2118        }
2119        public Enumeration<DocumentReferenceStatus> fromType(Base code) throws FHIRException {
2120          if (code == null)
2121            return null;
2122          if (code.isEmpty())
2123            return new Enumeration<DocumentReferenceStatus>(this);
2124          String codeString = ((PrimitiveType) code).asStringValue();
2125          if (codeString == null || "".equals(codeString))
2126            return null;
2127        if ("current".equals(codeString))
2128          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.CURRENT);
2129        if ("superseded".equals(codeString))
2130          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.SUPERSEDED);
2131        if ("entered-in-error".equals(codeString))
2132          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.ENTEREDINERROR);
2133        throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'");
2134        }
2135    public String toCode(DocumentReferenceStatus code) {
2136      if (code == DocumentReferenceStatus.CURRENT)
2137        return "current";
2138      if (code == DocumentReferenceStatus.SUPERSEDED)
2139        return "superseded";
2140      if (code == DocumentReferenceStatus.ENTEREDINERROR)
2141        return "entered-in-error";
2142      return "?";
2143      }
2144    public String toSystem(DocumentReferenceStatus code) {
2145      return code.getSystem();
2146      }
2147    }
2148
2149    public enum DocumentRelationshipType {
2150        /**
2151         * This document logically replaces or supersedes the target document.
2152         */
2153        REPLACES, 
2154        /**
2155         * This document was generated by transforming the target document (e.g. format or language conversion).
2156         */
2157        TRANSFORMS, 
2158        /**
2159         * This document is a signature of the target document.
2160         */
2161        SIGNS, 
2162        /**
2163         * This document adds additional information to the target document.
2164         */
2165        APPENDS, 
2166        /**
2167         * added to help the parsers
2168         */
2169        NULL;
2170        public static DocumentRelationshipType fromCode(String codeString) throws FHIRException {
2171            if (codeString == null || "".equals(codeString))
2172                return null;
2173        if ("replaces".equals(codeString))
2174          return REPLACES;
2175        if ("transforms".equals(codeString))
2176          return TRANSFORMS;
2177        if ("signs".equals(codeString))
2178          return SIGNS;
2179        if ("appends".equals(codeString))
2180          return APPENDS;
2181        throw new FHIRException("Unknown DocumentRelationshipType code '"+codeString+"'");
2182        }
2183        public String toCode() {
2184          switch (this) {
2185            case REPLACES: return "replaces";
2186            case TRANSFORMS: return "transforms";
2187            case SIGNS: return "signs";
2188            case APPENDS: return "appends";
2189            case NULL: return null;
2190            default: return "?";
2191          }
2192        }
2193        public String getSystem() {
2194          switch (this) {
2195            case REPLACES: return "http://hl7.org/fhir/document-relationship-type";
2196            case TRANSFORMS: return "http://hl7.org/fhir/document-relationship-type";
2197            case SIGNS: return "http://hl7.org/fhir/document-relationship-type";
2198            case APPENDS: return "http://hl7.org/fhir/document-relationship-type";
2199            case NULL: return null;
2200            default: return "?";
2201          }
2202        }
2203        public String getDefinition() {
2204          switch (this) {
2205            case REPLACES: return "This document logically replaces or supersedes the target document.";
2206            case TRANSFORMS: return "This document was generated by transforming the target document (e.g. format or language conversion).";
2207            case SIGNS: return "This document is a signature of the target document.";
2208            case APPENDS: return "This document adds additional information to the target document.";
2209            case NULL: return null;
2210            default: return "?";
2211          }
2212        }
2213        public String getDisplay() {
2214          switch (this) {
2215            case REPLACES: return "Replaces";
2216            case TRANSFORMS: return "Transforms";
2217            case SIGNS: return "Signs";
2218            case APPENDS: return "Appends";
2219            case NULL: return null;
2220            default: return "?";
2221          }
2222        }
2223    }
2224
2225  public static class DocumentRelationshipTypeEnumFactory implements EnumFactory<DocumentRelationshipType> {
2226    public DocumentRelationshipType fromCode(String codeString) throws IllegalArgumentException {
2227      if (codeString == null || "".equals(codeString))
2228            if (codeString == null || "".equals(codeString))
2229                return null;
2230        if ("replaces".equals(codeString))
2231          return DocumentRelationshipType.REPLACES;
2232        if ("transforms".equals(codeString))
2233          return DocumentRelationshipType.TRANSFORMS;
2234        if ("signs".equals(codeString))
2235          return DocumentRelationshipType.SIGNS;
2236        if ("appends".equals(codeString))
2237          return DocumentRelationshipType.APPENDS;
2238        throw new IllegalArgumentException("Unknown DocumentRelationshipType code '"+codeString+"'");
2239        }
2240        public Enumeration<DocumentRelationshipType> fromType(Base code) throws FHIRException {
2241          if (code == null)
2242            return null;
2243          if (code.isEmpty())
2244            return new Enumeration<DocumentRelationshipType>(this);
2245          String codeString = ((PrimitiveType) code).asStringValue();
2246          if (codeString == null || "".equals(codeString))
2247            return null;
2248        if ("replaces".equals(codeString))
2249          return new Enumeration<DocumentRelationshipType>(this, DocumentRelationshipType.REPLACES);
2250        if ("transforms".equals(codeString))
2251          return new Enumeration<DocumentRelationshipType>(this, DocumentRelationshipType.TRANSFORMS);
2252        if ("signs".equals(codeString))
2253          return new Enumeration<DocumentRelationshipType>(this, DocumentRelationshipType.SIGNS);
2254        if ("appends".equals(codeString))
2255          return new Enumeration<DocumentRelationshipType>(this, DocumentRelationshipType.APPENDS);
2256        throw new FHIRException("Unknown DocumentRelationshipType code '"+codeString+"'");
2257        }
2258    public String toCode(DocumentRelationshipType code) {
2259      if (code == DocumentRelationshipType.REPLACES)
2260        return "replaces";
2261      if (code == DocumentRelationshipType.TRANSFORMS)
2262        return "transforms";
2263      if (code == DocumentRelationshipType.SIGNS)
2264        return "signs";
2265      if (code == DocumentRelationshipType.APPENDS)
2266        return "appends";
2267      return "?";
2268      }
2269    public String toSystem(DocumentRelationshipType code) {
2270      return code.getSystem();
2271      }
2272    }
2273
2274    public enum EventStatus {
2275        /**
2276         * The core event has not started yet, but some staging activities have begun (e.g. surgical suite preparation).  Preparation stages may be tracked for billing purposes.
2277         */
2278        PREPARATION, 
2279        /**
2280         * The event is currently occurring.
2281         */
2282        INPROGRESS, 
2283        /**
2284         * The event was terminated prior to any activity beyond preparation.  I.e. The 'main' activity has not yet begun.  The boundary between preparatory and the 'main' activity is context-specific.
2285         */
2286        NOTDONE, 
2287        /**
2288         * The event has been temporarily stopped but is expected to resume in the future.
2289         */
2290        ONHOLD, 
2291        /**
2292         * The event was terminated prior to the full completion of the intended activity but after at least some of the 'main' activity (beyond preparation) has occurred.
2293         */
2294        STOPPED, 
2295        /**
2296         * The event has now concluded.
2297         */
2298        COMPLETED, 
2299        /**
2300         * This electronic record should never have existed, though it is possible that real-world decisions were based on it.  (If real-world activity has occurred, the status should be "stopped" rather than "entered-in-error".).
2301         */
2302        ENTEREDINERROR, 
2303        /**
2304         * The authoring/source system does not know which of the status values currently applies for this event.  Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply,  but the authoring/source system does not know which.
2305         */
2306        UNKNOWN, 
2307        /**
2308         * added to help the parsers
2309         */
2310        NULL;
2311        public static EventStatus fromCode(String codeString) throws FHIRException {
2312            if (codeString == null || "".equals(codeString))
2313                return null;
2314        if ("preparation".equals(codeString))
2315          return PREPARATION;
2316        if ("in-progress".equals(codeString))
2317          return INPROGRESS;
2318        if ("not-done".equals(codeString))
2319          return NOTDONE;
2320        if ("on-hold".equals(codeString))
2321          return ONHOLD;
2322        if ("stopped".equals(codeString))
2323          return STOPPED;
2324        if ("completed".equals(codeString))
2325          return COMPLETED;
2326        if ("entered-in-error".equals(codeString))
2327          return ENTEREDINERROR;
2328        if ("unknown".equals(codeString))
2329          return UNKNOWN;
2330        throw new FHIRException("Unknown EventStatus code '"+codeString+"'");
2331        }
2332        public String toCode() {
2333          switch (this) {
2334            case PREPARATION: return "preparation";
2335            case INPROGRESS: return "in-progress";
2336            case NOTDONE: return "not-done";
2337            case ONHOLD: return "on-hold";
2338            case STOPPED: return "stopped";
2339            case COMPLETED: return "completed";
2340            case ENTEREDINERROR: return "entered-in-error";
2341            case UNKNOWN: return "unknown";
2342            case NULL: return null;
2343            default: return "?";
2344          }
2345        }
2346        public String getSystem() {
2347          switch (this) {
2348            case PREPARATION: return "http://hl7.org/fhir/event-status";
2349            case INPROGRESS: return "http://hl7.org/fhir/event-status";
2350            case NOTDONE: return "http://hl7.org/fhir/event-status";
2351            case ONHOLD: return "http://hl7.org/fhir/event-status";
2352            case STOPPED: return "http://hl7.org/fhir/event-status";
2353            case COMPLETED: return "http://hl7.org/fhir/event-status";
2354            case ENTEREDINERROR: return "http://hl7.org/fhir/event-status";
2355            case UNKNOWN: return "http://hl7.org/fhir/event-status";
2356            case NULL: return null;
2357            default: return "?";
2358          }
2359        }
2360        public String getDefinition() {
2361          switch (this) {
2362            case PREPARATION: return "The core event has not started yet, but some staging activities have begun (e.g. surgical suite preparation).  Preparation stages may be tracked for billing purposes.";
2363            case INPROGRESS: return "The event is currently occurring.";
2364            case NOTDONE: return "The event was terminated prior to any activity beyond preparation.  I.e. The 'main' activity has not yet begun.  The boundary between preparatory and the 'main' activity is context-specific.";
2365            case ONHOLD: return "The event has been temporarily stopped but is expected to resume in the future.";
2366            case STOPPED: return "The event was terminated prior to the full completion of the intended activity but after at least some of the 'main' activity (beyond preparation) has occurred.";
2367            case COMPLETED: return "The event has now concluded.";
2368            case ENTEREDINERROR: return "This electronic record should never have existed, though it is possible that real-world decisions were based on it.  (If real-world activity has occurred, the status should be \"stopped\" rather than \"entered-in-error\".).";
2369            case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this event.  Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply,  but the authoring/source system does not know which.";
2370            case NULL: return null;
2371            default: return "?";
2372          }
2373        }
2374        public String getDisplay() {
2375          switch (this) {
2376            case PREPARATION: return "Preparation";
2377            case INPROGRESS: return "In Progress";
2378            case NOTDONE: return "Not Done";
2379            case ONHOLD: return "On Hold";
2380            case STOPPED: return "Stopped";
2381            case COMPLETED: return "Completed";
2382            case ENTEREDINERROR: return "Entered in Error";
2383            case UNKNOWN: return "Unknown";
2384            case NULL: return null;
2385            default: return "?";
2386          }
2387        }
2388    }
2389
2390  public static class EventStatusEnumFactory implements EnumFactory<EventStatus> {
2391    public EventStatus fromCode(String codeString) throws IllegalArgumentException {
2392      if (codeString == null || "".equals(codeString))
2393            if (codeString == null || "".equals(codeString))
2394                return null;
2395        if ("preparation".equals(codeString))
2396          return EventStatus.PREPARATION;
2397        if ("in-progress".equals(codeString))
2398          return EventStatus.INPROGRESS;
2399        if ("not-done".equals(codeString))
2400          return EventStatus.NOTDONE;
2401        if ("on-hold".equals(codeString))
2402          return EventStatus.ONHOLD;
2403        if ("stopped".equals(codeString))
2404          return EventStatus.STOPPED;
2405        if ("completed".equals(codeString))
2406          return EventStatus.COMPLETED;
2407        if ("entered-in-error".equals(codeString))
2408          return EventStatus.ENTEREDINERROR;
2409        if ("unknown".equals(codeString))
2410          return EventStatus.UNKNOWN;
2411        throw new IllegalArgumentException("Unknown EventStatus code '"+codeString+"'");
2412        }
2413        public Enumeration<EventStatus> fromType(Base code) throws FHIRException {
2414          if (code == null)
2415            return null;
2416          if (code.isEmpty())
2417            return new Enumeration<EventStatus>(this);
2418          String codeString = ((PrimitiveType) code).asStringValue();
2419          if (codeString == null || "".equals(codeString))
2420            return null;
2421        if ("preparation".equals(codeString))
2422          return new Enumeration<EventStatus>(this, EventStatus.PREPARATION);
2423        if ("in-progress".equals(codeString))
2424          return new Enumeration<EventStatus>(this, EventStatus.INPROGRESS);
2425        if ("not-done".equals(codeString))
2426          return new Enumeration<EventStatus>(this, EventStatus.NOTDONE);
2427        if ("on-hold".equals(codeString))
2428          return new Enumeration<EventStatus>(this, EventStatus.ONHOLD);
2429        if ("stopped".equals(codeString))
2430          return new Enumeration<EventStatus>(this, EventStatus.STOPPED);
2431        if ("completed".equals(codeString))
2432          return new Enumeration<EventStatus>(this, EventStatus.COMPLETED);
2433        if ("entered-in-error".equals(codeString))
2434          return new Enumeration<EventStatus>(this, EventStatus.ENTEREDINERROR);
2435        if ("unknown".equals(codeString))
2436          return new Enumeration<EventStatus>(this, EventStatus.UNKNOWN);
2437        throw new FHIRException("Unknown EventStatus code '"+codeString+"'");
2438        }
2439    public String toCode(EventStatus code) {
2440      if (code == EventStatus.PREPARATION)
2441        return "preparation";
2442      if (code == EventStatus.INPROGRESS)
2443        return "in-progress";
2444      if (code == EventStatus.NOTDONE)
2445        return "not-done";
2446      if (code == EventStatus.ONHOLD)
2447        return "on-hold";
2448      if (code == EventStatus.STOPPED)
2449        return "stopped";
2450      if (code == EventStatus.COMPLETED)
2451        return "completed";
2452      if (code == EventStatus.ENTEREDINERROR)
2453        return "entered-in-error";
2454      if (code == EventStatus.UNKNOWN)
2455        return "unknown";
2456      return "?";
2457      }
2458    public String toSystem(EventStatus code) {
2459      return code.getSystem();
2460      }
2461    }
2462
2463    public enum EvidenceVariableHandling {
2464        /**
2465         * A continuous variable is one for which, within the limits the variable ranges, any value is possible (from STATO http://purl.obolibrary.org/obo/STATO_0000251).
2466         */
2467        CONTINUOUS, 
2468        /**
2469         * A dichotomous variable is a categorical variable which is defined to have only 2 categories or possible values (from STATO http://purl.obolibrary.org/obo/STATO_0000090).
2470         */
2471        DICHOTOMOUS, 
2472        /**
2473         * An ordinal variable is a categorical variable where the discrete possible values are ordered or correspond to an implicit ranking (from STATO http://purl.obolibrary.org/obo/STATO_0000228).
2474         */
2475        ORDINAL, 
2476        /**
2477         * A polychotomous variable is a categorical variable which is defined to have minimally 2 categories or possible values. (from STATO  http://purl.obolibrary.org/obo/STATO_0000087).  Suggestion to limit code use to situations when neither dichotomous nor ordinal variables apply.
2478         */
2479        POLYCHOTOMOUS, 
2480        /**
2481         * added to help the parsers
2482         */
2483        NULL;
2484        public static EvidenceVariableHandling fromCode(String codeString) throws FHIRException {
2485            if (codeString == null || "".equals(codeString))
2486                return null;
2487        if ("continuous".equals(codeString))
2488          return CONTINUOUS;
2489        if ("dichotomous".equals(codeString))
2490          return DICHOTOMOUS;
2491        if ("ordinal".equals(codeString))
2492          return ORDINAL;
2493        if ("polychotomous".equals(codeString))
2494          return POLYCHOTOMOUS;
2495        throw new FHIRException("Unknown EvidenceVariableHandling code '"+codeString+"'");
2496        }
2497        public String toCode() {
2498          switch (this) {
2499            case CONTINUOUS: return "continuous";
2500            case DICHOTOMOUS: return "dichotomous";
2501            case ORDINAL: return "ordinal";
2502            case POLYCHOTOMOUS: return "polychotomous";
2503            case NULL: return null;
2504            default: return "?";
2505          }
2506        }
2507        public String getSystem() {
2508          switch (this) {
2509            case CONTINUOUS: return "http://hl7.org/fhir/variable-handling";
2510            case DICHOTOMOUS: return "http://hl7.org/fhir/variable-handling";
2511            case ORDINAL: return "http://hl7.org/fhir/variable-handling";
2512            case POLYCHOTOMOUS: return "http://hl7.org/fhir/variable-handling";
2513            case NULL: return null;
2514            default: return "?";
2515          }
2516        }
2517        public String getDefinition() {
2518          switch (this) {
2519            case CONTINUOUS: return "A continuous variable is one for which, within the limits the variable ranges, any value is possible (from STATO http://purl.obolibrary.org/obo/STATO_0000251).";
2520            case DICHOTOMOUS: return "A dichotomous variable is a categorical variable which is defined to have only 2 categories or possible values (from STATO http://purl.obolibrary.org/obo/STATO_0000090).";
2521            case ORDINAL: return "An ordinal variable is a categorical variable where the discrete possible values are ordered or correspond to an implicit ranking (from STATO http://purl.obolibrary.org/obo/STATO_0000228).";
2522            case POLYCHOTOMOUS: return "A polychotomous variable is a categorical variable which is defined to have minimally 2 categories or possible values. (from STATO  http://purl.obolibrary.org/obo/STATO_0000087).  Suggestion to limit code use to situations when neither dichotomous nor ordinal variables apply.";
2523            case NULL: return null;
2524            default: return "?";
2525          }
2526        }
2527        public String getDisplay() {
2528          switch (this) {
2529            case CONTINUOUS: return "continuous variable";
2530            case DICHOTOMOUS: return "dichotomous variable";
2531            case ORDINAL: return "ordinal variable";
2532            case POLYCHOTOMOUS: return "polychotomous variable";
2533            case NULL: return null;
2534            default: return "?";
2535          }
2536        }
2537    }
2538
2539  public static class EvidenceVariableHandlingEnumFactory implements EnumFactory<EvidenceVariableHandling> {
2540    public EvidenceVariableHandling fromCode(String codeString) throws IllegalArgumentException {
2541      if (codeString == null || "".equals(codeString))
2542            if (codeString == null || "".equals(codeString))
2543                return null;
2544        if ("continuous".equals(codeString))
2545          return EvidenceVariableHandling.CONTINUOUS;
2546        if ("dichotomous".equals(codeString))
2547          return EvidenceVariableHandling.DICHOTOMOUS;
2548        if ("ordinal".equals(codeString))
2549          return EvidenceVariableHandling.ORDINAL;
2550        if ("polychotomous".equals(codeString))
2551          return EvidenceVariableHandling.POLYCHOTOMOUS;
2552        throw new IllegalArgumentException("Unknown EvidenceVariableHandling code '"+codeString+"'");
2553        }
2554        public Enumeration<EvidenceVariableHandling> fromType(Base code) throws FHIRException {
2555          if (code == null)
2556            return null;
2557          if (code.isEmpty())
2558            return new Enumeration<EvidenceVariableHandling>(this);
2559          String codeString = ((PrimitiveType) code).asStringValue();
2560          if (codeString == null || "".equals(codeString))
2561            return null;
2562        if ("continuous".equals(codeString))
2563          return new Enumeration<EvidenceVariableHandling>(this, EvidenceVariableHandling.CONTINUOUS);
2564        if ("dichotomous".equals(codeString))
2565          return new Enumeration<EvidenceVariableHandling>(this, EvidenceVariableHandling.DICHOTOMOUS);
2566        if ("ordinal".equals(codeString))
2567          return new Enumeration<EvidenceVariableHandling>(this, EvidenceVariableHandling.ORDINAL);
2568        if ("polychotomous".equals(codeString))
2569          return new Enumeration<EvidenceVariableHandling>(this, EvidenceVariableHandling.POLYCHOTOMOUS);
2570        throw new FHIRException("Unknown EvidenceVariableHandling code '"+codeString+"'");
2571        }
2572    public String toCode(EvidenceVariableHandling code) {
2573      if (code == EvidenceVariableHandling.CONTINUOUS)
2574        return "continuous";
2575      if (code == EvidenceVariableHandling.DICHOTOMOUS)
2576        return "dichotomous";
2577      if (code == EvidenceVariableHandling.ORDINAL)
2578        return "ordinal";
2579      if (code == EvidenceVariableHandling.POLYCHOTOMOUS)
2580        return "polychotomous";
2581      return "?";
2582      }
2583    public String toSystem(EvidenceVariableHandling code) {
2584      return code.getSystem();
2585      }
2586    }
2587
2588    public enum FHIRAllTypes {
2589        /**
2590         * An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.
2591         */
2592        ADDRESS, 
2593        /**
2594         * A duration of time during which an organism (or a process) has existed.
2595         */
2596        AGE, 
2597        /**
2598         * A  text note which also  contains information about who made the statement and when.
2599         */
2600        ANNOTATION, 
2601        /**
2602         * For referring to data content defined in other formats.
2603         */
2604        ATTACHMENT, 
2605        /**
2606         * Base definition for all elements that are defined inside a resource - but not those in a data type.
2607         */
2608        BACKBONEELEMENT, 
2609        /**
2610         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
2611         */
2612        CODEABLECONCEPT, 
2613        /**
2614         * A reference to a resource (by instance), or instead, a reference to a cencept defined in a terminology or ontology (by class).
2615         */
2616        CODEABLEREFERENCE, 
2617        /**
2618         * A reference to a code defined by a terminology system.
2619         */
2620        CODING, 
2621        /**
2622         * Specifies contact information for a person or organization.
2623         */
2624        CONTACTDETAIL, 
2625        /**
2626         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
2627         */
2628        CONTACTPOINT, 
2629        /**
2630         * A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.
2631         */
2632        CONTRIBUTOR, 
2633        /**
2634         * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.
2635         */
2636        COUNT, 
2637        /**
2638         * Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.
2639         */
2640        DATAREQUIREMENT, 
2641        /**
2642         * The base class for all re-useable types defined as part of the FHIR Specification.
2643         */
2644        DATATYPE, 
2645        /**
2646         * A length - a value with a unit that is a physical distance.
2647         */
2648        DISTANCE, 
2649        /**
2650         * Indicates how the medication is/was taken or should be taken by the patient.
2651         */
2652        DOSAGE, 
2653        /**
2654         * A length of time.
2655         */
2656        DURATION, 
2657        /**
2658         * Base definition for all elements in a resource.
2659         */
2660        ELEMENT, 
2661        /**
2662         * Captures constraints on each element within the resource, profile, or extension.
2663         */
2664        ELEMENTDEFINITION, 
2665        /**
2666         * A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used.
2667         */
2668        EXPRESSION, 
2669        /**
2670         * Optional Extension Element - found in all resources.
2671         */
2672        EXTENSION, 
2673        /**
2674         * A human's name with the ability to identify parts and usage.
2675         */
2676        HUMANNAME, 
2677        /**
2678         * An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.
2679         */
2680        IDENTIFIER, 
2681        /**
2682         * The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.
2683         */
2684        MARKETINGSTATUS, 
2685        /**
2686         * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
2687         */
2688        META, 
2689        /**
2690         * An amount of economic utility in some recognized currency.
2691         */
2692        MONEY, 
2693        /**
2694         * null
2695         */
2696        MONEYQUANTITY, 
2697        /**
2698         * A human-readable summary of the resource conveying the essential clinical and business information for the resource.
2699         */
2700        NARRATIVE, 
2701        /**
2702         * The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.
2703         */
2704        PARAMETERDEFINITION, 
2705        /**
2706         * A time period defined by a start and end date and optionally time.
2707         */
2708        PERIOD, 
2709        /**
2710         * A populatioof people with some set of grouping criteria.
2711         */
2712        POPULATION, 
2713        /**
2714         * The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.
2715         */
2716        PRODCHARACTERISTIC, 
2717        /**
2718         * The shelf-life and storage information for a medicinal product item or container can be described using this class.
2719         */
2720        PRODUCTSHELFLIFE, 
2721        /**
2722         * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.
2723         */
2724        QUANTITY, 
2725        /**
2726         * A set of ordered Quantities defined by a low and high limit.
2727         */
2728        RANGE, 
2729        /**
2730         * A relationship of two Quantity values - expressed as a numerator and a denominator.
2731         */
2732        RATIO, 
2733        /**
2734         * A range of ratios expressed as a low and high numerator and a denominator.
2735         */
2736        RATIORANGE, 
2737        /**
2738         * A reference from one resource to another.
2739         */
2740        REFERENCE, 
2741        /**
2742         * Related artifacts such as additional documentation, justification, or bibliographic references.
2743         */
2744        RELATEDARTIFACT, 
2745        /**
2746         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
2747         */
2748        SAMPLEDDATA, 
2749        /**
2750         * A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.
2751         */
2752        SIGNATURE, 
2753        /**
2754         * null
2755         */
2756        SIMPLEQUANTITY, 
2757        /**
2758         * Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.
2759         */
2760        TIMING, 
2761        /**
2762         * A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.
2763         */
2764        TRIGGERDEFINITION, 
2765        /**
2766         * Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).
2767         */
2768        USAGECONTEXT, 
2769        /**
2770         * A stream of bytes
2771         */
2772        BASE64BINARY, 
2773        /**
2774         * Value of "true" or "false"
2775         */
2776        BOOLEAN, 
2777        /**
2778         * A URI that is a reference to a canonical URL on a FHIR resource
2779         */
2780        CANONICAL, 
2781        /**
2782         * A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents
2783         */
2784        CODE, 
2785        /**
2786         * A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.
2787         */
2788        DATE, 
2789        /**
2790         * A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.
2791         */
2792        DATETIME, 
2793        /**
2794         * A rational number with implicit precision
2795         */
2796        DECIMAL, 
2797        /**
2798         * Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.
2799         */
2800        ID, 
2801        /**
2802         * An instant in time - known at least to the second
2803         */
2804        INSTANT, 
2805        /**
2806         * A whole number
2807         */
2808        INTEGER, 
2809        /**
2810         * A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine
2811         */
2812        MARKDOWN, 
2813        /**
2814         * An OID represented as a URI
2815         */
2816        OID, 
2817        /**
2818         * An integer with a value that is positive (e.g. >0)
2819         */
2820        POSITIVEINT, 
2821        /**
2822         * A sequence of Unicode characters
2823         */
2824        STRING, 
2825        /**
2826         * A time during the day, with no date specified
2827         */
2828        TIME, 
2829        /**
2830         * An integer with a value that is not negative (e.g. >= 0)
2831         */
2832        UNSIGNEDINT, 
2833        /**
2834         * String of characters used to identify a name or a resource
2835         */
2836        URI, 
2837        /**
2838         * A URI that is a literal reference
2839         */
2840        URL, 
2841        /**
2842         * A UUID, represented as a URI
2843         */
2844        UUID, 
2845        /**
2846         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
2847         */
2848        XHTML, 
2849        /**
2850         * --- Abstract Type! ---This is the base resource type for everything.
2851         */
2852        RESOURCE, 
2853        /**
2854         * A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.
2855         */
2856        BINARY, 
2857        /**
2858         * A container for a collection of resources.
2859         */
2860        BUNDLE, 
2861        /**
2862         * --- Abstract Type! ---A resource that includes narrative, extensions, and contained resources.
2863         */
2864        DOMAINRESOURCE, 
2865        /**
2866         * A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.
2867         */
2868        ACCOUNT, 
2869        /**
2870         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
2871         */
2872        ACTIVITYDEFINITION, 
2873        /**
2874         * A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed).
2875         */
2876        ADMINISTRABLEPRODUCTDEFINITION, 
2877        /**
2878         * Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.
2879         */
2880        ADVERSEEVENT, 
2881        /**
2882         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
2883         */
2884        ALLERGYINTOLERANCE, 
2885        /**
2886         * A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).
2887         */
2888        APPOINTMENT, 
2889        /**
2890         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
2891         */
2892        APPOINTMENTRESPONSE, 
2893        /**
2894         * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.
2895         */
2896        AUDITEVENT, 
2897        /**
2898         * Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.
2899         */
2900        BASIC, 
2901        /**
2902         * A material substance originating from a biological entity intended to be transplanted or infused
2903into another (possibly the same) biological entity.
2904         */
2905        BIOLOGICALLYDERIVEDPRODUCT, 
2906        /**
2907         * Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.
2908         */
2909        BODYSTRUCTURE, 
2910        /**
2911         * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
2912         */
2913        CAPABILITYSTATEMENT, 
2914        /**
2915         * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.
2916         */
2917        CAREPLAN, 
2918        /**
2919         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
2920         */
2921        CARETEAM, 
2922        /**
2923         * Catalog entries are wrappers that contextualize items included in a catalog.
2924         */
2925        CATALOGENTRY, 
2926        /**
2927         * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.
2928         */
2929        CHARGEITEM, 
2930        /**
2931         * The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.
2932         */
2933        CHARGEITEMDEFINITION, 
2934        /**
2935         * The Citation Resource enables reference to any knowledge artifact for purposes of identification and attribution. The Citation Resource supports existing reference structures and developing publication practices such as versioning, expressing complex contributorship roles, and referencing computable resources.
2936         */
2937        CITATION, 
2938        /**
2939         * A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.
2940         */
2941        CLAIM, 
2942        /**
2943         * This resource provides the adjudication details from the processing of a Claim resource.
2944         */
2945        CLAIMRESPONSE, 
2946        /**
2947         * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score.
2948         */
2949        CLINICALIMPRESSION, 
2950        /**
2951         * A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.
2952         */
2953        CLINICALUSEDEFINITION, 
2954        /**
2955         * The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.
2956         */
2957        CODESYSTEM, 
2958        /**
2959         * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.
2960         */
2961        COMMUNICATION, 
2962        /**
2963         * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.
2964         */
2965        COMMUNICATIONREQUEST, 
2966        /**
2967         * A compartment definition that defines how resources are accessed on a server.
2968         */
2969        COMPARTMENTDEFINITION, 
2970        /**
2971         * A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).
2972         */
2973        COMPOSITION, 
2974        /**
2975         * A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.
2976         */
2977        CONCEPTMAP, 
2978        /**
2979         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
2980         */
2981        CONDITION, 
2982        /**
2983         * A record of a healthcare consumer’s  choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.
2984         */
2985        CONSENT, 
2986        /**
2987         * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.
2988         */
2989        CONTRACT, 
2990        /**
2991         * Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.
2992         */
2993        COVERAGE, 
2994        /**
2995         * The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.
2996         */
2997        COVERAGEELIGIBILITYREQUEST, 
2998        /**
2999         * This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.
3000         */
3001        COVERAGEELIGIBILITYRESPONSE, 
3002        /**
3003         * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.
3004         */
3005        DETECTEDISSUE, 
3006        /**
3007         * A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.
3008         */
3009        DEVICE, 
3010        /**
3011         * The characteristics, operational status and capabilities of a medical-related component of a medical device.
3012         */
3013        DEVICEDEFINITION, 
3014        /**
3015         * Describes a measurement, calculation or setting capability of a medical device.
3016         */
3017        DEVICEMETRIC, 
3018        /**
3019         * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.
3020         */
3021        DEVICEREQUEST, 
3022        /**
3023         * A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.
3024         */
3025        DEVICEUSESTATEMENT, 
3026        /**
3027         * The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.
3028         */
3029        DIAGNOSTICREPORT, 
3030        /**
3031         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
3032         */
3033        DOCUMENTMANIFEST, 
3034        /**
3035         * A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.
3036         */
3037        DOCUMENTREFERENCE, 
3038        /**
3039         * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.
3040         */
3041        ENCOUNTER, 
3042        /**
3043         * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.
3044         */
3045        ENDPOINT, 
3046        /**
3047         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
3048         */
3049        ENROLLMENTREQUEST, 
3050        /**
3051         * This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.
3052         */
3053        ENROLLMENTRESPONSE, 
3054        /**
3055         * An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.
3056         */
3057        EPISODEOFCARE, 
3058        /**
3059         * The EventDefinition resource provides a reusable description of when a particular event can occur.
3060         */
3061        EVENTDEFINITION, 
3062        /**
3063         * The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (eg population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.
3064         */
3065        EVIDENCE, 
3066        /**
3067         * The EvidenceReport Resource is a specialized container for a collection of resources and codable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.
3068         */
3069        EVIDENCEREPORT, 
3070        /**
3071         * The EvidenceVariable resource describes an element that knowledge (Evidence) is about.
3072         */
3073        EVIDENCEVARIABLE, 
3074        /**
3075         * Example of workflow instance.
3076         */
3077        EXAMPLESCENARIO, 
3078        /**
3079         * This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.
3080         */
3081        EXPLANATIONOFBENEFIT, 
3082        /**
3083         * Significant health conditions for a person related to the patient relevant in the context of care for the patient.
3084         */
3085        FAMILYMEMBERHISTORY, 
3086        /**
3087         * Prospective warnings of potential issues when providing care to the patient.
3088         */
3089        FLAG, 
3090        /**
3091         * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.
3092         */
3093        GOAL, 
3094        /**
3095         * A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.
3096         */
3097        GRAPHDEFINITION, 
3098        /**
3099         * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.
3100         */
3101        GROUP, 
3102        /**
3103         * A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.
3104         */
3105        GUIDANCERESPONSE, 
3106        /**
3107         * The details of a healthcare service available at a location.
3108         */
3109        HEALTHCARESERVICE, 
3110        /**
3111         * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.
3112         */
3113        IMAGINGSTUDY, 
3114        /**
3115         * Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.
3116         */
3117        IMMUNIZATION, 
3118        /**
3119         * Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those  recommendations.
3120         */
3121        IMMUNIZATIONEVALUATION, 
3122        /**
3123         * A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.
3124         */
3125        IMMUNIZATIONRECOMMENDATION, 
3126        /**
3127         * A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.
3128         */
3129        IMPLEMENTATIONGUIDE, 
3130        /**
3131         * An ingredient of a manufactured item or pharmaceutical product.
3132         */
3133        INGREDIENT, 
3134        /**
3135         * Details of a Health Insurance product/plan provided by an organization.
3136         */
3137        INSURANCEPLAN, 
3138        /**
3139         * Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.
3140         */
3141        INVOICE, 
3142        /**
3143         * The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.
3144         */
3145        LIBRARY, 
3146        /**
3147         * Identifies two or more records (resource instances) that refer to the same real-world "occurrence".
3148         */
3149        LINKAGE, 
3150        /**
3151         * A list is a curated collection of resources.
3152         */
3153        LIST, 
3154        /**
3155         * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.
3156         */
3157        LOCATION, 
3158        /**
3159         * The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.
3160         */
3161        MANUFACTUREDITEMDEFINITION, 
3162        /**
3163         * The Measure resource provides the definition of a quality measure.
3164         */
3165        MEASURE, 
3166        /**
3167         * The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.
3168         */
3169        MEASUREREPORT, 
3170        /**
3171         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
3172         */
3173        MEDIA, 
3174        /**
3175         * This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.
3176         */
3177        MEDICATION, 
3178        /**
3179         * Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.
3180         */
3181        MEDICATIONADMINISTRATION, 
3182        /**
3183         * Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.
3184         */
3185        MEDICATIONDISPENSE, 
3186        /**
3187         * Information about a medication that is used to support knowledge.
3188         */
3189        MEDICATIONKNOWLEDGE, 
3190        /**
3191         * An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.
3192         */
3193        MEDICATIONREQUEST, 
3194        /**
3195         * A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. 
3196
3197The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.
3198         */
3199        MEDICATIONSTATEMENT, 
3200        /**
3201         * Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use, drug catalogs).
3202         */
3203        MEDICINALPRODUCTDEFINITION, 
3204        /**
3205         * Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.
3206         */
3207        MESSAGEDEFINITION, 
3208        /**
3209         * The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.
3210         */
3211        MESSAGEHEADER, 
3212        /**
3213         * Raw data describing a biological sequence.
3214         */
3215        MOLECULARSEQUENCE, 
3216        /**
3217         * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a "System" used within the Identifier and Coding data types.
3218         */
3219        NAMINGSYSTEM, 
3220        /**
3221         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
3222         */
3223        NUTRITIONORDER, 
3224        /**
3225         * A food or fluid product that is consumed by patients.
3226         */
3227        NUTRITIONPRODUCT, 
3228        /**
3229         * Measurements and simple assertions made about a patient, device or other subject.
3230         */
3231        OBSERVATION, 
3232        /**
3233         * Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.
3234         */
3235        OBSERVATIONDEFINITION, 
3236        /**
3237         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
3238         */
3239        OPERATIONDEFINITION, 
3240        /**
3241         * A collection of error, warning, or information messages that result from a system action.
3242         */
3243        OPERATIONOUTCOME, 
3244        /**
3245         * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.
3246         */
3247        ORGANIZATION, 
3248        /**
3249         * Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.
3250         */
3251        ORGANIZATIONAFFILIATION, 
3252        /**
3253         * A medically related item or items, in a container or package.
3254         */
3255        PACKAGEDPRODUCTDEFINITION, 
3256        /**
3257         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
3258         */
3259        PATIENT, 
3260        /**
3261         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
3262         */
3263        PAYMENTNOTICE, 
3264        /**
3265         * This resource provides the details including amount of a payment and allocates the payment items being paid.
3266         */
3267        PAYMENTRECONCILIATION, 
3268        /**
3269         * Demographics and administrative information about a person independent of a specific health-related context.
3270         */
3271        PERSON, 
3272        /**
3273         * This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.
3274         */
3275        PLANDEFINITION, 
3276        /**
3277         * A person who is directly or indirectly involved in the provisioning of healthcare.
3278         */
3279        PRACTITIONER, 
3280        /**
3281         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
3282         */
3283        PRACTITIONERROLE, 
3284        /**
3285         * An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.
3286         */
3287        PROCEDURE, 
3288        /**
3289         * Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.
3290         */
3291        PROVENANCE, 
3292        /**
3293         * A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.
3294         */
3295        QUESTIONNAIRE, 
3296        /**
3297         * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.
3298         */
3299        QUESTIONNAIRERESPONSE, 
3300        /**
3301         * Regulatory approval, clearance or licencing related to a regulated product, treatment, facility or activity that is cited in a guidance, regulation, rule or legislative act. An example is Market Authorization relating to a Medicinal Product.
3302         */
3303        REGULATEDAUTHORIZATION, 
3304        /**
3305         * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.
3306         */
3307        RELATEDPERSON, 
3308        /**
3309         * A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one".
3310         */
3311        REQUESTGROUP, 
3312        /**
3313         * The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.
3314         */
3315        RESEARCHDEFINITION, 
3316        /**
3317         * The ResearchElementDefinition resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.
3318         */
3319        RESEARCHELEMENTDEFINITION, 
3320        /**
3321         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
3322         */
3323        RESEARCHSTUDY, 
3324        /**
3325         * A physical entity which is the primary unit of operational and/or administrative interest in a study.
3326         */
3327        RESEARCHSUBJECT, 
3328        /**
3329         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
3330         */
3331        RISKASSESSMENT, 
3332        /**
3333         * A container for slots of time that may be available for booking appointments.
3334         */
3335        SCHEDULE, 
3336        /**
3337         * A search parameter that defines a named search item that can be used to search/filter on a resource.
3338         */
3339        SEARCHPARAMETER, 
3340        /**
3341         * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.
3342         */
3343        SERVICEREQUEST, 
3344        /**
3345         * A slot of time on a schedule that may be available for booking appointments.
3346         */
3347        SLOT, 
3348        /**
3349         * A sample to be used for analysis.
3350         */
3351        SPECIMEN, 
3352        /**
3353         * A kind of specimen with associated set of requirements.
3354         */
3355        SPECIMENDEFINITION, 
3356        /**
3357         * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.
3358         */
3359        STRUCTUREDEFINITION, 
3360        /**
3361         * A Map of relationships between 2 structures that can be used to transform data.
3362         */
3363        STRUCTUREMAP, 
3364        /**
3365         * The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system can take an appropriate action.
3366         */
3367        SUBSCRIPTION, 
3368        /**
3369         * The SubscriptionStatus resource describes the state of a Subscription during notifications.
3370         */
3371        SUBSCRIPTIONSTATUS, 
3372        /**
3373         * Describes a stream of resource state changes identified by trigger criteria and annotated with labels useful to filter projections from this topic.
3374         */
3375        SUBSCRIPTIONTOPIC, 
3376        /**
3377         * A homogeneous material with a definite composition.
3378         */
3379        SUBSTANCE, 
3380        /**
3381         * The detailed description of a substance, typically at a level beyond what is used for prescribing.
3382         */
3383        SUBSTANCEDEFINITION, 
3384        /**
3385         * Record of delivery of what is supplied.
3386         */
3387        SUPPLYDELIVERY, 
3388        /**
3389         * A record of a request for a medication, substance or device used in the healthcare setting.
3390         */
3391        SUPPLYREQUEST, 
3392        /**
3393         * A task to be performed.
3394         */
3395        TASK, 
3396        /**
3397         * A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
3398         */
3399        TERMINOLOGYCAPABILITIES, 
3400        /**
3401         * A summary of information based on the results of executing a TestScript.
3402         */
3403        TESTREPORT, 
3404        /**
3405         * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
3406         */
3407        TESTSCRIPT, 
3408        /**
3409         * A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).
3410         */
3411        VALUESET, 
3412        /**
3413         * Describes validation requirements, source(s), status and dates for one or more elements.
3414         */
3415        VERIFICATIONRESULT, 
3416        /**
3417         * An authorization for the provision of glasses and/or contact lenses to a patient.
3418         */
3419        VISIONPRESCRIPTION, 
3420        /**
3421         * This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it.
3422         */
3423        PARAMETERS, 
3424        /**
3425         * A place holder that means any kind of data type
3426         */
3427        TYPE, 
3428        /**
3429         * A place holder that means any kind of resource
3430         */
3431        ANY, 
3432        /**
3433         * added to help the parsers
3434         */
3435        NULL;
3436        public static FHIRAllTypes fromCode(String codeString) throws FHIRException {
3437            if (codeString == null || "".equals(codeString))
3438                return null;
3439        if ("Address".equals(codeString))
3440          return ADDRESS;
3441        if ("Age".equals(codeString))
3442          return AGE;
3443        if ("Annotation".equals(codeString))
3444          return ANNOTATION;
3445        if ("Attachment".equals(codeString))
3446          return ATTACHMENT;
3447        if ("BackboneElement".equals(codeString))
3448          return BACKBONEELEMENT;
3449        if ("CodeableConcept".equals(codeString))
3450          return CODEABLECONCEPT;
3451        if ("CodeableReference".equals(codeString))
3452          return CODEABLEREFERENCE;
3453        if ("Coding".equals(codeString))
3454          return CODING;
3455        if ("ContactDetail".equals(codeString))
3456          return CONTACTDETAIL;
3457        if ("ContactPoint".equals(codeString))
3458          return CONTACTPOINT;
3459        if ("Contributor".equals(codeString))
3460          return CONTRIBUTOR;
3461        if ("Count".equals(codeString))
3462          return COUNT;
3463        if ("DataRequirement".equals(codeString))
3464          return DATAREQUIREMENT;
3465        if ("DataType".equals(codeString))
3466          return DATATYPE;
3467        if ("Distance".equals(codeString))
3468          return DISTANCE;
3469        if ("Dosage".equals(codeString))
3470          return DOSAGE;
3471        if ("Duration".equals(codeString))
3472          return DURATION;
3473        if ("Element".equals(codeString))
3474          return ELEMENT;
3475        if ("ElementDefinition".equals(codeString))
3476          return ELEMENTDEFINITION;
3477        if ("Expression".equals(codeString))
3478          return EXPRESSION;
3479        if ("Extension".equals(codeString))
3480          return EXTENSION;
3481        if ("HumanName".equals(codeString))
3482          return HUMANNAME;
3483        if ("Identifier".equals(codeString))
3484          return IDENTIFIER;
3485        if ("MarketingStatus".equals(codeString))
3486          return MARKETINGSTATUS;
3487        if ("Meta".equals(codeString))
3488          return META;
3489        if ("Money".equals(codeString))
3490          return MONEY;
3491        if ("MoneyQuantity".equals(codeString))
3492          return MONEYQUANTITY;
3493        if ("Narrative".equals(codeString))
3494          return NARRATIVE;
3495        if ("ParameterDefinition".equals(codeString))
3496          return PARAMETERDEFINITION;
3497        if ("Period".equals(codeString))
3498          return PERIOD;
3499        if ("Population".equals(codeString))
3500          return POPULATION;
3501        if ("ProdCharacteristic".equals(codeString))
3502          return PRODCHARACTERISTIC;
3503        if ("ProductShelfLife".equals(codeString))
3504          return PRODUCTSHELFLIFE;
3505        if ("Quantity".equals(codeString))
3506          return QUANTITY;
3507        if ("Range".equals(codeString))
3508          return RANGE;
3509        if ("Ratio".equals(codeString))
3510          return RATIO;
3511        if ("RatioRange".equals(codeString))
3512          return RATIORANGE;
3513        if ("Reference".equals(codeString))
3514          return REFERENCE;
3515        if ("RelatedArtifact".equals(codeString))
3516          return RELATEDARTIFACT;
3517        if ("SampledData".equals(codeString))
3518          return SAMPLEDDATA;
3519        if ("Signature".equals(codeString))
3520          return SIGNATURE;
3521        if ("SimpleQuantity".equals(codeString))
3522          return SIMPLEQUANTITY;
3523        if ("Timing".equals(codeString))
3524          return TIMING;
3525        if ("TriggerDefinition".equals(codeString))
3526          return TRIGGERDEFINITION;
3527        if ("UsageContext".equals(codeString))
3528          return USAGECONTEXT;
3529        if ("base64Binary".equals(codeString))
3530          return BASE64BINARY;
3531        if ("boolean".equals(codeString))
3532          return BOOLEAN;
3533        if ("canonical".equals(codeString))
3534          return CANONICAL;
3535        if ("code".equals(codeString))
3536          return CODE;
3537        if ("date".equals(codeString))
3538          return DATE;
3539        if ("dateTime".equals(codeString))
3540          return DATETIME;
3541        if ("decimal".equals(codeString))
3542          return DECIMAL;
3543        if ("id".equals(codeString))
3544          return ID;
3545        if ("instant".equals(codeString))
3546          return INSTANT;
3547        if ("integer".equals(codeString))
3548          return INTEGER;
3549        if ("markdown".equals(codeString))
3550          return MARKDOWN;
3551        if ("oid".equals(codeString))
3552          return OID;
3553        if ("positiveInt".equals(codeString))
3554          return POSITIVEINT;
3555        if ("string".equals(codeString))
3556          return STRING;
3557        if ("time".equals(codeString))
3558          return TIME;
3559        if ("unsignedInt".equals(codeString))
3560          return UNSIGNEDINT;
3561        if ("uri".equals(codeString))
3562          return URI;
3563        if ("url".equals(codeString))
3564          return URL;
3565        if ("uuid".equals(codeString))
3566          return UUID;
3567        if ("xhtml".equals(codeString))
3568          return XHTML;
3569        if ("Resource".equals(codeString))
3570          return RESOURCE;
3571        if ("Binary".equals(codeString))
3572          return BINARY;
3573        if ("Bundle".equals(codeString))
3574          return BUNDLE;
3575        if ("DomainResource".equals(codeString))
3576          return DOMAINRESOURCE;
3577        if ("Account".equals(codeString))
3578          return ACCOUNT;
3579        if ("ActivityDefinition".equals(codeString))
3580          return ACTIVITYDEFINITION;
3581        if ("AdministrableProductDefinition".equals(codeString))
3582          return ADMINISTRABLEPRODUCTDEFINITION;
3583        if ("AdverseEvent".equals(codeString))
3584          return ADVERSEEVENT;
3585        if ("AllergyIntolerance".equals(codeString))
3586          return ALLERGYINTOLERANCE;
3587        if ("Appointment".equals(codeString))
3588          return APPOINTMENT;
3589        if ("AppointmentResponse".equals(codeString))
3590          return APPOINTMENTRESPONSE;
3591        if ("AuditEvent".equals(codeString))
3592          return AUDITEVENT;
3593        if ("Basic".equals(codeString))
3594          return BASIC;
3595        if ("BiologicallyDerivedProduct".equals(codeString))
3596          return BIOLOGICALLYDERIVEDPRODUCT;
3597        if ("BodyStructure".equals(codeString))
3598          return BODYSTRUCTURE;
3599        if ("CapabilityStatement".equals(codeString))
3600          return CAPABILITYSTATEMENT;
3601        if ("CarePlan".equals(codeString))
3602          return CAREPLAN;
3603        if ("CareTeam".equals(codeString))
3604          return CARETEAM;
3605        if ("CatalogEntry".equals(codeString))
3606          return CATALOGENTRY;
3607        if ("ChargeItem".equals(codeString))
3608          return CHARGEITEM;
3609        if ("ChargeItemDefinition".equals(codeString))
3610          return CHARGEITEMDEFINITION;
3611        if ("Citation".equals(codeString))
3612          return CITATION;
3613        if ("Claim".equals(codeString))
3614          return CLAIM;
3615        if ("ClaimResponse".equals(codeString))
3616          return CLAIMRESPONSE;
3617        if ("ClinicalImpression".equals(codeString))
3618          return CLINICALIMPRESSION;
3619        if ("ClinicalUseDefinition".equals(codeString))
3620          return CLINICALUSEDEFINITION;
3621        if ("CodeSystem".equals(codeString))
3622          return CODESYSTEM;
3623        if ("Communication".equals(codeString))
3624          return COMMUNICATION;
3625        if ("CommunicationRequest".equals(codeString))
3626          return COMMUNICATIONREQUEST;
3627        if ("CompartmentDefinition".equals(codeString))
3628          return COMPARTMENTDEFINITION;
3629        if ("Composition".equals(codeString))
3630          return COMPOSITION;
3631        if ("ConceptMap".equals(codeString))
3632          return CONCEPTMAP;
3633        if ("Condition".equals(codeString))
3634          return CONDITION;
3635        if ("Consent".equals(codeString))
3636          return CONSENT;
3637        if ("Contract".equals(codeString))
3638          return CONTRACT;
3639        if ("Coverage".equals(codeString))
3640          return COVERAGE;
3641        if ("CoverageEligibilityRequest".equals(codeString))
3642          return COVERAGEELIGIBILITYREQUEST;
3643        if ("CoverageEligibilityResponse".equals(codeString))
3644          return COVERAGEELIGIBILITYRESPONSE;
3645        if ("DetectedIssue".equals(codeString))
3646          return DETECTEDISSUE;
3647        if ("Device".equals(codeString))
3648          return DEVICE;
3649        if ("DeviceDefinition".equals(codeString))
3650          return DEVICEDEFINITION;
3651        if ("DeviceMetric".equals(codeString))
3652          return DEVICEMETRIC;
3653        if ("DeviceRequest".equals(codeString))
3654          return DEVICEREQUEST;
3655        if ("DeviceUseStatement".equals(codeString))
3656          return DEVICEUSESTATEMENT;
3657        if ("DiagnosticReport".equals(codeString))
3658          return DIAGNOSTICREPORT;
3659        if ("DocumentManifest".equals(codeString))
3660          return DOCUMENTMANIFEST;
3661        if ("DocumentReference".equals(codeString))
3662          return DOCUMENTREFERENCE;
3663        if ("Encounter".equals(codeString))
3664          return ENCOUNTER;
3665        if ("Endpoint".equals(codeString))
3666          return ENDPOINT;
3667        if ("EnrollmentRequest".equals(codeString))
3668          return ENROLLMENTREQUEST;
3669        if ("EnrollmentResponse".equals(codeString))
3670          return ENROLLMENTRESPONSE;
3671        if ("EpisodeOfCare".equals(codeString))
3672          return EPISODEOFCARE;
3673        if ("EventDefinition".equals(codeString))
3674          return EVENTDEFINITION;
3675        if ("Evidence".equals(codeString))
3676          return EVIDENCE;
3677        if ("EvidenceReport".equals(codeString))
3678          return EVIDENCEREPORT;
3679        if ("EvidenceVariable".equals(codeString))
3680          return EVIDENCEVARIABLE;
3681        if ("ExampleScenario".equals(codeString))
3682          return EXAMPLESCENARIO;
3683        if ("ExplanationOfBenefit".equals(codeString))
3684          return EXPLANATIONOFBENEFIT;
3685        if ("FamilyMemberHistory".equals(codeString))
3686          return FAMILYMEMBERHISTORY;
3687        if ("Flag".equals(codeString))
3688          return FLAG;
3689        if ("Goal".equals(codeString))
3690          return GOAL;
3691        if ("GraphDefinition".equals(codeString))
3692          return GRAPHDEFINITION;
3693        if ("Group".equals(codeString))
3694          return GROUP;
3695        if ("GuidanceResponse".equals(codeString))
3696          return GUIDANCERESPONSE;
3697        if ("HealthcareService".equals(codeString))
3698          return HEALTHCARESERVICE;
3699        if ("ImagingStudy".equals(codeString))
3700          return IMAGINGSTUDY;
3701        if ("Immunization".equals(codeString))
3702          return IMMUNIZATION;
3703        if ("ImmunizationEvaluation".equals(codeString))
3704          return IMMUNIZATIONEVALUATION;
3705        if ("ImmunizationRecommendation".equals(codeString))
3706          return IMMUNIZATIONRECOMMENDATION;
3707        if ("ImplementationGuide".equals(codeString))
3708          return IMPLEMENTATIONGUIDE;
3709        if ("Ingredient".equals(codeString))
3710          return INGREDIENT;
3711        if ("InsurancePlan".equals(codeString))
3712          return INSURANCEPLAN;
3713        if ("Invoice".equals(codeString))
3714          return INVOICE;
3715        if ("Library".equals(codeString))
3716          return LIBRARY;
3717        if ("Linkage".equals(codeString))
3718          return LINKAGE;
3719        if ("List".equals(codeString))
3720          return LIST;
3721        if ("Location".equals(codeString))
3722          return LOCATION;
3723        if ("ManufacturedItemDefinition".equals(codeString))
3724          return MANUFACTUREDITEMDEFINITION;
3725        if ("Measure".equals(codeString))
3726          return MEASURE;
3727        if ("MeasureReport".equals(codeString))
3728          return MEASUREREPORT;
3729        if ("Media".equals(codeString))
3730          return MEDIA;
3731        if ("Medication".equals(codeString))
3732          return MEDICATION;
3733        if ("MedicationAdministration".equals(codeString))
3734          return MEDICATIONADMINISTRATION;
3735        if ("MedicationDispense".equals(codeString))
3736          return MEDICATIONDISPENSE;
3737        if ("MedicationKnowledge".equals(codeString))
3738          return MEDICATIONKNOWLEDGE;
3739        if ("MedicationRequest".equals(codeString))
3740          return MEDICATIONREQUEST;
3741        if ("MedicationStatement".equals(codeString))
3742          return MEDICATIONSTATEMENT;
3743        if ("MedicinalProductDefinition".equals(codeString))
3744          return MEDICINALPRODUCTDEFINITION;
3745        if ("MessageDefinition".equals(codeString))
3746          return MESSAGEDEFINITION;
3747        if ("MessageHeader".equals(codeString))
3748          return MESSAGEHEADER;
3749        if ("MolecularSequence".equals(codeString))
3750          return MOLECULARSEQUENCE;
3751        if ("NamingSystem".equals(codeString))
3752          return NAMINGSYSTEM;
3753        if ("NutritionOrder".equals(codeString))
3754          return NUTRITIONORDER;
3755        if ("NutritionProduct".equals(codeString))
3756          return NUTRITIONPRODUCT;
3757        if ("Observation".equals(codeString))
3758          return OBSERVATION;
3759        if ("ObservationDefinition".equals(codeString))
3760          return OBSERVATIONDEFINITION;
3761        if ("OperationDefinition".equals(codeString))
3762          return OPERATIONDEFINITION;
3763        if ("OperationOutcome".equals(codeString))
3764          return OPERATIONOUTCOME;
3765        if ("Organization".equals(codeString))
3766          return ORGANIZATION;
3767        if ("OrganizationAffiliation".equals(codeString))
3768          return ORGANIZATIONAFFILIATION;
3769        if ("PackagedProductDefinition".equals(codeString))
3770          return PACKAGEDPRODUCTDEFINITION;
3771        if ("Patient".equals(codeString))
3772          return PATIENT;
3773        if ("PaymentNotice".equals(codeString))
3774          return PAYMENTNOTICE;
3775        if ("PaymentReconciliation".equals(codeString))
3776          return PAYMENTRECONCILIATION;
3777        if ("Person".equals(codeString))
3778          return PERSON;
3779        if ("PlanDefinition".equals(codeString))
3780          return PLANDEFINITION;
3781        if ("Practitioner".equals(codeString))
3782          return PRACTITIONER;
3783        if ("PractitionerRole".equals(codeString))
3784          return PRACTITIONERROLE;
3785        if ("Procedure".equals(codeString))
3786          return PROCEDURE;
3787        if ("Provenance".equals(codeString))
3788          return PROVENANCE;
3789        if ("Questionnaire".equals(codeString))
3790          return QUESTIONNAIRE;
3791        if ("QuestionnaireResponse".equals(codeString))
3792          return QUESTIONNAIRERESPONSE;
3793        if ("RegulatedAuthorization".equals(codeString))
3794          return REGULATEDAUTHORIZATION;
3795        if ("RelatedPerson".equals(codeString))
3796          return RELATEDPERSON;
3797        if ("RequestGroup".equals(codeString))
3798          return REQUESTGROUP;
3799        if ("ResearchDefinition".equals(codeString))
3800          return RESEARCHDEFINITION;
3801        if ("ResearchElementDefinition".equals(codeString))
3802          return RESEARCHELEMENTDEFINITION;
3803        if ("ResearchStudy".equals(codeString))
3804          return RESEARCHSTUDY;
3805        if ("ResearchSubject".equals(codeString))
3806          return RESEARCHSUBJECT;
3807        if ("RiskAssessment".equals(codeString))
3808          return RISKASSESSMENT;
3809        if ("Schedule".equals(codeString))
3810          return SCHEDULE;
3811        if ("SearchParameter".equals(codeString))
3812          return SEARCHPARAMETER;
3813        if ("ServiceRequest".equals(codeString))
3814          return SERVICEREQUEST;
3815        if ("Slot".equals(codeString))
3816          return SLOT;
3817        if ("Specimen".equals(codeString))
3818          return SPECIMEN;
3819        if ("SpecimenDefinition".equals(codeString))
3820          return SPECIMENDEFINITION;
3821        if ("StructureDefinition".equals(codeString))
3822          return STRUCTUREDEFINITION;
3823        if ("StructureMap".equals(codeString))
3824          return STRUCTUREMAP;
3825        if ("Subscription".equals(codeString))
3826          return SUBSCRIPTION;
3827        if ("SubscriptionStatus".equals(codeString))
3828          return SUBSCRIPTIONSTATUS;
3829        if ("SubscriptionTopic".equals(codeString))
3830          return SUBSCRIPTIONTOPIC;
3831        if ("Substance".equals(codeString))
3832          return SUBSTANCE;
3833        if ("SubstanceDefinition".equals(codeString))
3834          return SUBSTANCEDEFINITION;
3835        if ("SupplyDelivery".equals(codeString))
3836          return SUPPLYDELIVERY;
3837        if ("SupplyRequest".equals(codeString))
3838          return SUPPLYREQUEST;
3839        if ("Task".equals(codeString))
3840          return TASK;
3841        if ("TerminologyCapabilities".equals(codeString))
3842          return TERMINOLOGYCAPABILITIES;
3843        if ("TestReport".equals(codeString))
3844          return TESTREPORT;
3845        if ("TestScript".equals(codeString))
3846          return TESTSCRIPT;
3847        if ("ValueSet".equals(codeString))
3848          return VALUESET;
3849        if ("VerificationResult".equals(codeString))
3850          return VERIFICATIONRESULT;
3851        if ("VisionPrescription".equals(codeString))
3852          return VISIONPRESCRIPTION;
3853        if ("Parameters".equals(codeString))
3854          return PARAMETERS;
3855        if ("Type".equals(codeString))
3856          return TYPE;
3857        if ("Any".equals(codeString))
3858          return ANY;
3859        throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'");
3860        }
3861        public String toCode() {
3862          switch (this) {
3863            case ADDRESS: return "Address";
3864            case AGE: return "Age";
3865            case ANNOTATION: return "Annotation";
3866            case ATTACHMENT: return "Attachment";
3867            case BACKBONEELEMENT: return "BackboneElement";
3868            case CODEABLECONCEPT: return "CodeableConcept";
3869            case CODEABLEREFERENCE: return "CodeableReference";
3870            case CODING: return "Coding";
3871            case CONTACTDETAIL: return "ContactDetail";
3872            case CONTACTPOINT: return "ContactPoint";
3873            case CONTRIBUTOR: return "Contributor";
3874            case COUNT: return "Count";
3875            case DATAREQUIREMENT: return "DataRequirement";
3876            case DATATYPE: return "DataType";
3877            case DISTANCE: return "Distance";
3878            case DOSAGE: return "Dosage";
3879            case DURATION: return "Duration";
3880            case ELEMENT: return "Element";
3881            case ELEMENTDEFINITION: return "ElementDefinition";
3882            case EXPRESSION: return "Expression";
3883            case EXTENSION: return "Extension";
3884            case HUMANNAME: return "HumanName";
3885            case IDENTIFIER: return "Identifier";
3886            case MARKETINGSTATUS: return "MarketingStatus";
3887            case META: return "Meta";
3888            case MONEY: return "Money";
3889            case MONEYQUANTITY: return "MoneyQuantity";
3890            case NARRATIVE: return "Narrative";
3891            case PARAMETERDEFINITION: return "ParameterDefinition";
3892            case PERIOD: return "Period";
3893            case POPULATION: return "Population";
3894            case PRODCHARACTERISTIC: return "ProdCharacteristic";
3895            case PRODUCTSHELFLIFE: return "ProductShelfLife";
3896            case QUANTITY: return "Quantity";
3897            case RANGE: return "Range";
3898            case RATIO: return "Ratio";
3899            case RATIORANGE: return "RatioRange";
3900            case REFERENCE: return "Reference";
3901            case RELATEDARTIFACT: return "RelatedArtifact";
3902            case SAMPLEDDATA: return "SampledData";
3903            case SIGNATURE: return "Signature";
3904            case SIMPLEQUANTITY: return "SimpleQuantity";
3905            case TIMING: return "Timing";
3906            case TRIGGERDEFINITION: return "TriggerDefinition";
3907            case USAGECONTEXT: return "UsageContext";
3908            case BASE64BINARY: return "base64Binary";
3909            case BOOLEAN: return "boolean";
3910            case CANONICAL: return "canonical";
3911            case CODE: return "code";
3912            case DATE: return "date";
3913            case DATETIME: return "dateTime";
3914            case DECIMAL: return "decimal";
3915            case ID: return "id";
3916            case INSTANT: return "instant";
3917            case INTEGER: return "integer";
3918            case MARKDOWN: return "markdown";
3919            case OID: return "oid";
3920            case POSITIVEINT: return "positiveInt";
3921            case STRING: return "string";
3922            case TIME: return "time";
3923            case UNSIGNEDINT: return "unsignedInt";
3924            case URI: return "uri";
3925            case URL: return "url";
3926            case UUID: return "uuid";
3927            case XHTML: return "xhtml";
3928            case RESOURCE: return "Resource";
3929            case BINARY: return "Binary";
3930            case BUNDLE: return "Bundle";
3931            case DOMAINRESOURCE: return "DomainResource";
3932            case ACCOUNT: return "Account";
3933            case ACTIVITYDEFINITION: return "ActivityDefinition";
3934            case ADMINISTRABLEPRODUCTDEFINITION: return "AdministrableProductDefinition";
3935            case ADVERSEEVENT: return "AdverseEvent";
3936            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
3937            case APPOINTMENT: return "Appointment";
3938            case APPOINTMENTRESPONSE: return "AppointmentResponse";
3939            case AUDITEVENT: return "AuditEvent";
3940            case BASIC: return "Basic";
3941            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
3942            case BODYSTRUCTURE: return "BodyStructure";
3943            case CAPABILITYSTATEMENT: return "CapabilityStatement";
3944            case CAREPLAN: return "CarePlan";
3945            case CARETEAM: return "CareTeam";
3946            case CATALOGENTRY: return "CatalogEntry";
3947            case CHARGEITEM: return "ChargeItem";
3948            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
3949            case CITATION: return "Citation";
3950            case CLAIM: return "Claim";
3951            case CLAIMRESPONSE: return "ClaimResponse";
3952            case CLINICALIMPRESSION: return "ClinicalImpression";
3953            case CLINICALUSEDEFINITION: return "ClinicalUseDefinition";
3954            case CODESYSTEM: return "CodeSystem";
3955            case COMMUNICATION: return "Communication";
3956            case COMMUNICATIONREQUEST: return "CommunicationRequest";
3957            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
3958            case COMPOSITION: return "Composition";
3959            case CONCEPTMAP: return "ConceptMap";
3960            case CONDITION: return "Condition";
3961            case CONSENT: return "Consent";
3962            case CONTRACT: return "Contract";
3963            case COVERAGE: return "Coverage";
3964            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
3965            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
3966            case DETECTEDISSUE: return "DetectedIssue";
3967            case DEVICE: return "Device";
3968            case DEVICEDEFINITION: return "DeviceDefinition";
3969            case DEVICEMETRIC: return "DeviceMetric";
3970            case DEVICEREQUEST: return "DeviceRequest";
3971            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
3972            case DIAGNOSTICREPORT: return "DiagnosticReport";
3973            case DOCUMENTMANIFEST: return "DocumentManifest";
3974            case DOCUMENTREFERENCE: return "DocumentReference";
3975            case ENCOUNTER: return "Encounter";
3976            case ENDPOINT: return "Endpoint";
3977            case ENROLLMENTREQUEST: return "EnrollmentRequest";
3978            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
3979            case EPISODEOFCARE: return "EpisodeOfCare";
3980            case EVENTDEFINITION: return "EventDefinition";
3981            case EVIDENCE: return "Evidence";
3982            case EVIDENCEREPORT: return "EvidenceReport";
3983            case EVIDENCEVARIABLE: return "EvidenceVariable";
3984            case EXAMPLESCENARIO: return "ExampleScenario";
3985            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
3986            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
3987            case FLAG: return "Flag";
3988            case GOAL: return "Goal";
3989            case GRAPHDEFINITION: return "GraphDefinition";
3990            case GROUP: return "Group";
3991            case GUIDANCERESPONSE: return "GuidanceResponse";
3992            case HEALTHCARESERVICE: return "HealthcareService";
3993            case IMAGINGSTUDY: return "ImagingStudy";
3994            case IMMUNIZATION: return "Immunization";
3995            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
3996            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
3997            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
3998            case INGREDIENT: return "Ingredient";
3999            case INSURANCEPLAN: return "InsurancePlan";
4000            case INVOICE: return "Invoice";
4001            case LIBRARY: return "Library";
4002            case LINKAGE: return "Linkage";
4003            case LIST: return "List";
4004            case LOCATION: return "Location";
4005            case MANUFACTUREDITEMDEFINITION: return "ManufacturedItemDefinition";
4006            case MEASURE: return "Measure";
4007            case MEASUREREPORT: return "MeasureReport";
4008            case MEDIA: return "Media";
4009            case MEDICATION: return "Medication";
4010            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
4011            case MEDICATIONDISPENSE: return "MedicationDispense";
4012            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
4013            case MEDICATIONREQUEST: return "MedicationRequest";
4014            case MEDICATIONSTATEMENT: return "MedicationStatement";
4015            case MEDICINALPRODUCTDEFINITION: return "MedicinalProductDefinition";
4016            case MESSAGEDEFINITION: return "MessageDefinition";
4017            case MESSAGEHEADER: return "MessageHeader";
4018            case MOLECULARSEQUENCE: return "MolecularSequence";
4019            case NAMINGSYSTEM: return "NamingSystem";
4020            case NUTRITIONORDER: return "NutritionOrder";
4021            case NUTRITIONPRODUCT: return "NutritionProduct";
4022            case OBSERVATION: return "Observation";
4023            case OBSERVATIONDEFINITION: return "ObservationDefinition";
4024            case OPERATIONDEFINITION: return "OperationDefinition";
4025            case OPERATIONOUTCOME: return "OperationOutcome";
4026            case ORGANIZATION: return "Organization";
4027            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
4028            case PACKAGEDPRODUCTDEFINITION: return "PackagedProductDefinition";
4029            case PATIENT: return "Patient";
4030            case PAYMENTNOTICE: return "PaymentNotice";
4031            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
4032            case PERSON: return "Person";
4033            case PLANDEFINITION: return "PlanDefinition";
4034            case PRACTITIONER: return "Practitioner";
4035            case PRACTITIONERROLE: return "PractitionerRole";
4036            case PROCEDURE: return "Procedure";
4037            case PROVENANCE: return "Provenance";
4038            case QUESTIONNAIRE: return "Questionnaire";
4039            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
4040            case REGULATEDAUTHORIZATION: return "RegulatedAuthorization";
4041            case RELATEDPERSON: return "RelatedPerson";
4042            case REQUESTGROUP: return "RequestGroup";
4043            case RESEARCHDEFINITION: return "ResearchDefinition";
4044            case RESEARCHELEMENTDEFINITION: return "ResearchElementDefinition";
4045            case RESEARCHSTUDY: return "ResearchStudy";
4046            case RESEARCHSUBJECT: return "ResearchSubject";
4047            case RISKASSESSMENT: return "RiskAssessment";
4048            case SCHEDULE: return "Schedule";
4049            case SEARCHPARAMETER: return "SearchParameter";
4050            case SERVICEREQUEST: return "ServiceRequest";
4051            case SLOT: return "Slot";
4052            case SPECIMEN: return "Specimen";
4053            case SPECIMENDEFINITION: return "SpecimenDefinition";
4054            case STRUCTUREDEFINITION: return "StructureDefinition";
4055            case STRUCTUREMAP: return "StructureMap";
4056            case SUBSCRIPTION: return "Subscription";
4057            case SUBSCRIPTIONSTATUS: return "SubscriptionStatus";
4058            case SUBSCRIPTIONTOPIC: return "SubscriptionTopic";
4059            case SUBSTANCE: return "Substance";
4060            case SUBSTANCEDEFINITION: return "SubstanceDefinition";
4061            case SUPPLYDELIVERY: return "SupplyDelivery";
4062            case SUPPLYREQUEST: return "SupplyRequest";
4063            case TASK: return "Task";
4064            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
4065            case TESTREPORT: return "TestReport";
4066            case TESTSCRIPT: return "TestScript";
4067            case VALUESET: return "ValueSet";
4068            case VERIFICATIONRESULT: return "VerificationResult";
4069            case VISIONPRESCRIPTION: return "VisionPrescription";
4070            case PARAMETERS: return "Parameters";
4071            case TYPE: return "Type";
4072            case ANY: return "Any";
4073            case NULL: return null;
4074            default: return "?";
4075          }
4076        }
4077        public String getSystem() {
4078          switch (this) {
4079            case ADDRESS: return "http://hl7.org/fhir/data-types";
4080            case AGE: return "http://hl7.org/fhir/data-types";
4081            case ANNOTATION: return "http://hl7.org/fhir/data-types";
4082            case ATTACHMENT: return "http://hl7.org/fhir/data-types";
4083            case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types";
4084            case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types";
4085            case CODEABLEREFERENCE: return "http://hl7.org/fhir/data-types";
4086            case CODING: return "http://hl7.org/fhir/data-types";
4087            case CONTACTDETAIL: return "http://hl7.org/fhir/data-types";
4088            case CONTACTPOINT: return "http://hl7.org/fhir/data-types";
4089            case CONTRIBUTOR: return "http://hl7.org/fhir/data-types";
4090            case COUNT: return "http://hl7.org/fhir/data-types";
4091            case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types";
4092            case DATATYPE: return "http://hl7.org/fhir/data-types";
4093            case DISTANCE: return "http://hl7.org/fhir/data-types";
4094            case DOSAGE: return "http://hl7.org/fhir/data-types";
4095            case DURATION: return "http://hl7.org/fhir/data-types";
4096            case ELEMENT: return "http://hl7.org/fhir/data-types";
4097            case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types";
4098            case EXPRESSION: return "http://hl7.org/fhir/data-types";
4099            case EXTENSION: return "http://hl7.org/fhir/data-types";
4100            case HUMANNAME: return "http://hl7.org/fhir/data-types";
4101            case IDENTIFIER: return "http://hl7.org/fhir/data-types";
4102            case MARKETINGSTATUS: return "http://hl7.org/fhir/data-types";
4103            case META: return "http://hl7.org/fhir/data-types";
4104            case MONEY: return "http://hl7.org/fhir/data-types";
4105            case MONEYQUANTITY: return "http://hl7.org/fhir/data-types";
4106            case NARRATIVE: return "http://hl7.org/fhir/data-types";
4107            case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types";
4108            case PERIOD: return "http://hl7.org/fhir/data-types";
4109            case POPULATION: return "http://hl7.org/fhir/data-types";
4110            case PRODCHARACTERISTIC: return "http://hl7.org/fhir/data-types";
4111            case PRODUCTSHELFLIFE: return "http://hl7.org/fhir/data-types";
4112            case QUANTITY: return "http://hl7.org/fhir/data-types";
4113            case RANGE: return "http://hl7.org/fhir/data-types";
4114            case RATIO: return "http://hl7.org/fhir/data-types";
4115            case RATIORANGE: return "http://hl7.org/fhir/data-types";
4116            case REFERENCE: return "http://hl7.org/fhir/data-types";
4117            case RELATEDARTIFACT: return "http://hl7.org/fhir/data-types";
4118            case SAMPLEDDATA: return "http://hl7.org/fhir/data-types";
4119            case SIGNATURE: return "http://hl7.org/fhir/data-types";
4120            case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types";
4121            case TIMING: return "http://hl7.org/fhir/data-types";
4122            case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types";
4123            case USAGECONTEXT: return "http://hl7.org/fhir/data-types";
4124            case BASE64BINARY: return "http://hl7.org/fhir/data-types";
4125            case BOOLEAN: return "http://hl7.org/fhir/data-types";
4126            case CANONICAL: return "http://hl7.org/fhir/data-types";
4127            case CODE: return "http://hl7.org/fhir/data-types";
4128            case DATE: return "http://hl7.org/fhir/data-types";
4129            case DATETIME: return "http://hl7.org/fhir/data-types";
4130            case DECIMAL: return "http://hl7.org/fhir/data-types";
4131            case ID: return "http://hl7.org/fhir/data-types";
4132            case INSTANT: return "http://hl7.org/fhir/data-types";
4133            case INTEGER: return "http://hl7.org/fhir/data-types";
4134            case MARKDOWN: return "http://hl7.org/fhir/data-types";
4135            case OID: return "http://hl7.org/fhir/data-types";
4136            case POSITIVEINT: return "http://hl7.org/fhir/data-types";
4137            case STRING: return "http://hl7.org/fhir/data-types";
4138            case TIME: return "http://hl7.org/fhir/data-types";
4139            case UNSIGNEDINT: return "http://hl7.org/fhir/data-types";
4140            case URI: return "http://hl7.org/fhir/data-types";
4141            case URL: return "http://hl7.org/fhir/data-types";
4142            case UUID: return "http://hl7.org/fhir/data-types";
4143            case XHTML: return "http://hl7.org/fhir/data-types";
4144            case RESOURCE: return "http://hl7.org/fhir/resource-types";
4145            case BINARY: return "http://hl7.org/fhir/resource-types";
4146            case BUNDLE: return "http://hl7.org/fhir/resource-types";
4147            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
4148            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
4149            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
4150            case ADMINISTRABLEPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
4151            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
4152            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
4153            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
4154            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
4155            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
4156            case BASIC: return "http://hl7.org/fhir/resource-types";
4157            case BIOLOGICALLYDERIVEDPRODUCT: return "http://hl7.org/fhir/resource-types";
4158            case BODYSTRUCTURE: return "http://hl7.org/fhir/resource-types";
4159            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
4160            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
4161            case CARETEAM: return "http://hl7.org/fhir/resource-types";
4162            case CATALOGENTRY: return "http://hl7.org/fhir/resource-types";
4163            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
4164            case CHARGEITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
4165            case CITATION: return "http://hl7.org/fhir/resource-types";
4166            case CLAIM: return "http://hl7.org/fhir/resource-types";
4167            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
4168            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
4169            case CLINICALUSEDEFINITION: return "http://hl7.org/fhir/resource-types";
4170            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
4171            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
4172            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
4173            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
4174            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
4175            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
4176            case CONDITION: return "http://hl7.org/fhir/resource-types";
4177            case CONSENT: return "http://hl7.org/fhir/resource-types";
4178            case CONTRACT: return "http://hl7.org/fhir/resource-types";
4179            case COVERAGE: return "http://hl7.org/fhir/resource-types";
4180            case COVERAGEELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
4181            case COVERAGEELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
4182            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
4183            case DEVICE: return "http://hl7.org/fhir/resource-types";
4184            case DEVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
4185            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
4186            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
4187            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types";
4188            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
4189            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
4190            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
4191            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
4192            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
4193            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
4194            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
4195            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
4196            case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types";
4197            case EVIDENCE: return "http://hl7.org/fhir/resource-types";
4198            case EVIDENCEREPORT: return "http://hl7.org/fhir/resource-types";
4199            case EVIDENCEVARIABLE: return "http://hl7.org/fhir/resource-types";
4200            case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types";
4201            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
4202            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
4203            case FLAG: return "http://hl7.org/fhir/resource-types";
4204            case GOAL: return "http://hl7.org/fhir/resource-types";
4205            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
4206            case GROUP: return "http://hl7.org/fhir/resource-types";
4207            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
4208            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
4209            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
4210            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
4211            case IMMUNIZATIONEVALUATION: return "http://hl7.org/fhir/resource-types";
4212            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
4213            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
4214            case INGREDIENT: return "http://hl7.org/fhir/resource-types";
4215            case INSURANCEPLAN: return "http://hl7.org/fhir/resource-types";
4216            case INVOICE: return "http://hl7.org/fhir/resource-types";
4217            case LIBRARY: return "http://hl7.org/fhir/resource-types";
4218            case LINKAGE: return "http://hl7.org/fhir/resource-types";
4219            case LIST: return "http://hl7.org/fhir/resource-types";
4220            case LOCATION: return "http://hl7.org/fhir/resource-types";
4221            case MANUFACTUREDITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
4222            case MEASURE: return "http://hl7.org/fhir/resource-types";
4223            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
4224            case MEDIA: return "http://hl7.org/fhir/resource-types";
4225            case MEDICATION: return "http://hl7.org/fhir/resource-types";
4226            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
4227            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
4228            case MEDICATIONKNOWLEDGE: return "http://hl7.org/fhir/resource-types";
4229            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
4230            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types";
4231            case MEDICINALPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
4232            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
4233            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
4234            case MOLECULARSEQUENCE: return "http://hl7.org/fhir/resource-types";
4235            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
4236            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
4237            case NUTRITIONPRODUCT: return "http://hl7.org/fhir/resource-types";
4238            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
4239            case OBSERVATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
4240            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
4241            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
4242            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
4243            case ORGANIZATIONAFFILIATION: return "http://hl7.org/fhir/resource-types";
4244            case PACKAGEDPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
4245            case PATIENT: return "http://hl7.org/fhir/resource-types";
4246            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
4247            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
4248            case PERSON: return "http://hl7.org/fhir/resource-types";
4249            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
4250            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
4251            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
4252            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
4253            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
4254            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
4255            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
4256            case REGULATEDAUTHORIZATION: return "http://hl7.org/fhir/resource-types";
4257            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
4258            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
4259            case RESEARCHDEFINITION: return "http://hl7.org/fhir/resource-types";
4260            case RESEARCHELEMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
4261            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
4262            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
4263            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
4264            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
4265            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
4266            case SERVICEREQUEST: return "http://hl7.org/fhir/resource-types";
4267            case SLOT: return "http://hl7.org/fhir/resource-types";
4268            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
4269            case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types";
4270            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
4271            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
4272            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
4273            case SUBSCRIPTIONSTATUS: return "http://hl7.org/fhir/resource-types";
4274            case SUBSCRIPTIONTOPIC: return "http://hl7.org/fhir/resource-types";
4275            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
4276            case SUBSTANCEDEFINITION: return "http://hl7.org/fhir/resource-types";
4277            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
4278            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
4279            case TASK: return "http://hl7.org/fhir/resource-types";
4280            case TERMINOLOGYCAPABILITIES: return "http://hl7.org/fhir/resource-types";
4281            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
4282            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
4283            case VALUESET: return "http://hl7.org/fhir/resource-types";
4284            case VERIFICATIONRESULT: return "http://hl7.org/fhir/resource-types";
4285            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
4286            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
4287            case TYPE: return "http://hl7.org/fhir/abstract-types";
4288            case ANY: return "http://hl7.org/fhir/abstract-types";
4289            case NULL: return null;
4290            default: return "?";
4291          }
4292        }
4293        public String getDefinition() {
4294          switch (this) {
4295            case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.";
4296            case AGE: return "A duration of time during which an organism (or a process) has existed.";
4297            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
4298            case ATTACHMENT: return "For referring to data content defined in other formats.";
4299            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
4300            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
4301            case CODEABLEREFERENCE: return "A reference to a resource (by instance), or instead, a reference to a cencept defined in a terminology or ontology (by class).";
4302            case CODING: return "A reference to a code defined by a terminology system.";
4303            case CONTACTDETAIL: return "Specifies contact information for a person or organization.";
4304            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
4305            case CONTRIBUTOR: return "A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.";
4306            case COUNT: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
4307            case DATAREQUIREMENT: return "Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.";
4308            case DATATYPE: return "The base class for all re-useable types defined as part of the FHIR Specification.";
4309            case DISTANCE: return "A length - a value with a unit that is a physical distance.";
4310            case DOSAGE: return "Indicates how the medication is/was taken or should be taken by the patient.";
4311            case DURATION: return "A length of time.";
4312            case ELEMENT: return "Base definition for all elements in a resource.";
4313            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
4314            case EXPRESSION: return "A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used.";
4315            case EXTENSION: return "Optional Extension Element - found in all resources.";
4316            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
4317            case IDENTIFIER: return "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.";
4318            case MARKETINGSTATUS: return "The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.";
4319            case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.";
4320            case MONEY: return "An amount of economic utility in some recognized currency.";
4321            case MONEYQUANTITY: return "";
4322            case NARRATIVE: return "A human-readable summary of the resource conveying the essential clinical and business information for the resource.";
4323            case PARAMETERDEFINITION: return "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.";
4324            case PERIOD: return "A time period defined by a start and end date and optionally time.";
4325            case POPULATION: return "A populatioof people with some set of grouping criteria.";
4326            case PRODCHARACTERISTIC: return "The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.";
4327            case PRODUCTSHELFLIFE: return "The shelf-life and storage information for a medicinal product item or container can be described using this class.";
4328            case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
4329            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
4330            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
4331            case RATIORANGE: return "A range of ratios expressed as a low and high numerator and a denominator.";
4332            case REFERENCE: return "A reference from one resource to another.";
4333            case RELATEDARTIFACT: return "Related artifacts such as additional documentation, justification, or bibliographic references.";
4334            case SAMPLEDDATA: return "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.";
4335            case SIGNATURE: return "A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.";
4336            case SIMPLEQUANTITY: return "";
4337            case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.";
4338            case TRIGGERDEFINITION: return "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.";
4339            case USAGECONTEXT: return "Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).";
4340            case BASE64BINARY: return "A stream of bytes";
4341            case BOOLEAN: return "Value of \"true\" or \"false\"";
4342            case CANONICAL: return "A URI that is a reference to a canonical URL on a FHIR resource";
4343            case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents";
4344            case DATE: return "A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.";
4345            case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.";
4346            case DECIMAL: return "A rational number with implicit precision";
4347            case ID: return "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.";
4348            case INSTANT: return "An instant in time - known at least to the second";
4349            case INTEGER: return "A whole number";
4350            case MARKDOWN: return "A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine";
4351            case OID: return "An OID represented as a URI";
4352            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
4353            case STRING: return "A sequence of Unicode characters";
4354            case TIME: return "A time during the day, with no date specified";
4355            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
4356            case URI: return "String of characters used to identify a name or a resource";
4357            case URL: return "A URI that is a literal reference";
4358            case UUID: return "A UUID, represented as a URI";
4359            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
4360            case RESOURCE: return "--- Abstract Type! ---This is the base resource type for everything.";
4361            case BINARY: return "A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
4362            case BUNDLE: return "A container for a collection of resources.";
4363            case DOMAINRESOURCE: return "--- Abstract Type! ---A resource that includes narrative, extensions, and contained resources.";
4364            case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.";
4365            case ACTIVITYDEFINITION: return "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.";
4366            case ADMINISTRABLEPRODUCTDEFINITION: return "A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed).";
4367            case ADVERSEEVENT: return "Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.";
4368            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
4369            case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).";
4370            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
4371            case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.";
4372            case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.";
4373            case BIOLOGICALLYDERIVEDPRODUCT: return "A material substance originating from a biological entity intended to be transplanted or infused\ninto another (possibly the same) biological entity.";
4374            case BODYSTRUCTURE: return "Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.";
4375            case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
4376            case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.";
4377            case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.";
4378            case CATALOGENTRY: return "Catalog entries are wrappers that contextualize items included in a catalog.";
4379            case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.";
4380            case CHARGEITEMDEFINITION: return "The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.";
4381            case CITATION: return "The Citation Resource enables reference to any knowledge artifact for purposes of identification and attribution. The Citation Resource supports existing reference structures and developing publication practices such as versioning, expressing complex contributorship roles, and referencing computable resources.";
4382            case CLAIM: return "A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.";
4383            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
4384            case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score.";
4385            case CLINICALUSEDEFINITION: return "A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.";
4386            case CODESYSTEM: return "The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.";
4387            case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.";
4388            case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.";
4389            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
4390            case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).";
4391            case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.";
4392            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
4393            case CONSENT: return "A record of a healthcare consumer’s  choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.";
4394            case CONTRACT: return "Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.";
4395            case COVERAGE: return "Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.";
4396            case COVERAGEELIGIBILITYREQUEST: return "The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.";
4397            case COVERAGEELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.";
4398            case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.";
4399            case DEVICE: return "A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.";
4400            case DEVICEDEFINITION: return "The characteristics, operational status and capabilities of a medical-related component of a medical device.";
4401            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
4402            case DEVICEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.";
4403            case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.";
4404            case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.";
4405            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
4406            case DOCUMENTREFERENCE: return "A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.";
4407            case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.";
4408            case ENDPOINT: return "The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.";
4409            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
4410            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.";
4411            case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.";
4412            case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur.";
4413            case EVIDENCE: return "The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (eg population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.";
4414            case EVIDENCEREPORT: return "The EvidenceReport Resource is a specialized container for a collection of resources and codable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.";
4415            case EVIDENCEVARIABLE: return "The EvidenceVariable resource describes an element that knowledge (Evidence) is about.";
4416            case EXAMPLESCENARIO: return "Example of workflow instance.";
4417            case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.";
4418            case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient.";
4419            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
4420            case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.";
4421            case GRAPHDEFINITION: return "A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.";
4422            case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.";
4423            case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.";
4424            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
4425            case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.";
4426            case IMMUNIZATION: return "Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.";
4427            case IMMUNIZATIONEVALUATION: return "Describes a comparison of an immunization event against published recommendations to determine if the administration is \"valid\" in relation to those  recommendations.";
4428            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.";
4429            case IMPLEMENTATIONGUIDE: return "A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.";
4430            case INGREDIENT: return "An ingredient of a manufactured item or pharmaceutical product.";
4431            case INSURANCEPLAN: return "Details of a Health Insurance product/plan provided by an organization.";
4432            case INVOICE: return "Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.";
4433            case LIBRARY: return "The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.";
4434            case LINKAGE: return "Identifies two or more records (resource instances) that refer to the same real-world \"occurrence\".";
4435            case LIST: return "A list is a curated collection of resources.";
4436            case LOCATION: return "Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.";
4437            case MANUFACTUREDITEMDEFINITION: return "The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.";
4438            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
4439            case MEASUREREPORT: return "The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.";
4440            case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.";
4441            case MEDICATION: return "This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.";
4442            case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.";
4443            case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.";
4444            case MEDICATIONKNOWLEDGE: return "Information about a medication that is used to support knowledge.";
4445            case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.";
4446            case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. \n\nThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.";
4447            case MEDICINALPRODUCTDEFINITION: return "Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use, drug catalogs).";
4448            case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.";
4449            case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.";
4450            case MOLECULARSEQUENCE: return "Raw data describing a biological sequence.";
4451            case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a \"System\" used within the Identifier and Coding data types.";
4452            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
4453            case NUTRITIONPRODUCT: return "A food or fluid product that is consumed by patients.";
4454            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
4455            case OBSERVATIONDEFINITION: return "Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.";
4456            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
4457            case OPERATIONOUTCOME: return "A collection of error, warning, or information messages that result from a system action.";
4458            case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.";
4459            case ORGANIZATIONAFFILIATION: return "Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.";
4460            case PACKAGEDPRODUCTDEFINITION: return "A medically related item or items, in a container or package.";
4461            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
4462            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
4463            case PAYMENTRECONCILIATION: return "This resource provides the details including amount of a payment and allocates the payment items being paid.";
4464            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
4465            case PLANDEFINITION: return "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.";
4466            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
4467            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
4468            case PROCEDURE: return "An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.";
4469            case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.";
4470            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.";
4471            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.";
4472            case REGULATEDAUTHORIZATION: return "Regulatory approval, clearance or licencing related to a regulated product, treatment, facility or activity that is cited in a guidance, regulation, rule or legislative act. An example is Market Authorization relating to a Medicinal Product.";
4473            case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.";
4474            case REQUESTGROUP: return "A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\".";
4475            case RESEARCHDEFINITION: return "The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.";
4476            case RESEARCHELEMENTDEFINITION: return "The ResearchElementDefinition resource describes a \"PICO\" element that knowledge (evidence, assertion, recommendation) is about.";
4477            case RESEARCHSTUDY: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
4478            case RESEARCHSUBJECT: return "A physical entity which is the primary unit of operational and/or administrative interest in a study.";
4479            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
4480            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
4481            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
4482            case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.";
4483            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
4484            case SPECIMEN: return "A sample to be used for analysis.";
4485            case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements.";
4486            case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.";
4487            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
4488            case SUBSCRIPTION: return "The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system can take an appropriate action.";
4489            case SUBSCRIPTIONSTATUS: return "The SubscriptionStatus resource describes the state of a Subscription during notifications.";
4490            case SUBSCRIPTIONTOPIC: return "Describes a stream of resource state changes identified by trigger criteria and annotated with labels useful to filter projections from this topic.";
4491            case SUBSTANCE: return "A homogeneous material with a definite composition.";
4492            case SUBSTANCEDEFINITION: return "The detailed description of a substance, typically at a level beyond what is used for prescribing.";
4493            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
4494            case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting.";
4495            case TASK: return "A task to be performed.";
4496            case TERMINOLOGYCAPABILITIES: return "A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
4497            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
4498            case TESTSCRIPT: return "A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.";
4499            case VALUESET: return "A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).";
4500            case VERIFICATIONRESULT: return "Describes validation requirements, source(s), status and dates for one or more elements.";
4501            case VISIONPRESCRIPTION: return "An authorization for the provision of glasses and/or contact lenses to a patient.";
4502            case PARAMETERS: return "This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it.";
4503            case TYPE: return "A place holder that means any kind of data type";
4504            case ANY: return "A place holder that means any kind of resource";
4505            case NULL: return null;
4506            default: return "?";
4507          }
4508        }
4509        public String getDisplay() {
4510          switch (this) {
4511            case ADDRESS: return "Address";
4512            case AGE: return "Age";
4513            case ANNOTATION: return "Annotation";
4514            case ATTACHMENT: return "Attachment";
4515            case BACKBONEELEMENT: return "BackboneElement";
4516            case CODEABLECONCEPT: return "CodeableConcept";
4517            case CODEABLEREFERENCE: return "CodeableReference";
4518            case CODING: return "Coding";
4519            case CONTACTDETAIL: return "ContactDetail";
4520            case CONTACTPOINT: return "ContactPoint";
4521            case CONTRIBUTOR: return "Contributor";
4522            case COUNT: return "Count";
4523            case DATAREQUIREMENT: return "DataRequirement";
4524            case DATATYPE: return "DataType";
4525            case DISTANCE: return "Distance";
4526            case DOSAGE: return "Dosage";
4527            case DURATION: return "Duration";
4528            case ELEMENT: return "Element";
4529            case ELEMENTDEFINITION: return "ElementDefinition";
4530            case EXPRESSION: return "Expression";
4531            case EXTENSION: return "Extension";
4532            case HUMANNAME: return "HumanName";
4533            case IDENTIFIER: return "Identifier";
4534            case MARKETINGSTATUS: return "MarketingStatus";
4535            case META: return "Meta";
4536            case MONEY: return "Money";
4537            case MONEYQUANTITY: return "MoneyQuantity";
4538            case NARRATIVE: return "Narrative";
4539            case PARAMETERDEFINITION: return "ParameterDefinition";
4540            case PERIOD: return "Period";
4541            case POPULATION: return "Population";
4542            case PRODCHARACTERISTIC: return "ProdCharacteristic";
4543            case PRODUCTSHELFLIFE: return "ProductShelfLife";
4544            case QUANTITY: return "Quantity";
4545            case RANGE: return "Range";
4546            case RATIO: return "Ratio";
4547            case RATIORANGE: return "RatioRange";
4548            case REFERENCE: return "Reference";
4549            case RELATEDARTIFACT: return "RelatedArtifact";
4550            case SAMPLEDDATA: return "SampledData";
4551            case SIGNATURE: return "Signature";
4552            case SIMPLEQUANTITY: return "SimpleQuantity";
4553            case TIMING: return "Timing";
4554            case TRIGGERDEFINITION: return "TriggerDefinition";
4555            case USAGECONTEXT: return "UsageContext";
4556            case BASE64BINARY: return "base64Binary";
4557            case BOOLEAN: return "boolean";
4558            case CANONICAL: return "canonical";
4559            case CODE: return "code";
4560            case DATE: return "date";
4561            case DATETIME: return "dateTime";
4562            case DECIMAL: return "decimal";
4563            case ID: return "id";
4564            case INSTANT: return "instant";
4565            case INTEGER: return "integer";
4566            case MARKDOWN: return "markdown";
4567            case OID: return "oid";
4568            case POSITIVEINT: return "positiveInt";
4569            case STRING: return "string";
4570            case TIME: return "time";
4571            case UNSIGNEDINT: return "unsignedInt";
4572            case URI: return "uri";
4573            case URL: return "url";
4574            case UUID: return "uuid";
4575            case XHTML: return "XHTML";
4576            case RESOURCE: return "Resource";
4577            case BINARY: return "Binary";
4578            case BUNDLE: return "Bundle";
4579            case DOMAINRESOURCE: return "DomainResource";
4580            case ACCOUNT: return "Account";
4581            case ACTIVITYDEFINITION: return "ActivityDefinition";
4582            case ADMINISTRABLEPRODUCTDEFINITION: return "AdministrableProductDefinition";
4583            case ADVERSEEVENT: return "AdverseEvent";
4584            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
4585            case APPOINTMENT: return "Appointment";
4586            case APPOINTMENTRESPONSE: return "AppointmentResponse";
4587            case AUDITEVENT: return "AuditEvent";
4588            case BASIC: return "Basic";
4589            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
4590            case BODYSTRUCTURE: return "BodyStructure";
4591            case CAPABILITYSTATEMENT: return "CapabilityStatement";
4592            case CAREPLAN: return "CarePlan";
4593            case CARETEAM: return "CareTeam";
4594            case CATALOGENTRY: return "CatalogEntry";
4595            case CHARGEITEM: return "ChargeItem";
4596            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
4597            case CITATION: return "Citation";
4598            case CLAIM: return "Claim";
4599            case CLAIMRESPONSE: return "ClaimResponse";
4600            case CLINICALIMPRESSION: return "ClinicalImpression";
4601            case CLINICALUSEDEFINITION: return "ClinicalUseDefinition";
4602            case CODESYSTEM: return "CodeSystem";
4603            case COMMUNICATION: return "Communication";
4604            case COMMUNICATIONREQUEST: return "CommunicationRequest";
4605            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
4606            case COMPOSITION: return "Composition";
4607            case CONCEPTMAP: return "ConceptMap";
4608            case CONDITION: return "Condition";
4609            case CONSENT: return "Consent";
4610            case CONTRACT: return "Contract";
4611            case COVERAGE: return "Coverage";
4612            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
4613            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
4614            case DETECTEDISSUE: return "DetectedIssue";
4615            case DEVICE: return "Device";
4616            case DEVICEDEFINITION: return "DeviceDefinition";
4617            case DEVICEMETRIC: return "DeviceMetric";
4618            case DEVICEREQUEST: return "DeviceRequest";
4619            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
4620            case DIAGNOSTICREPORT: return "DiagnosticReport";
4621            case DOCUMENTMANIFEST: return "DocumentManifest";
4622            case DOCUMENTREFERENCE: return "DocumentReference";
4623            case ENCOUNTER: return "Encounter";
4624            case ENDPOINT: return "Endpoint";
4625            case ENROLLMENTREQUEST: return "EnrollmentRequest";
4626            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
4627            case EPISODEOFCARE: return "EpisodeOfCare";
4628            case EVENTDEFINITION: return "EventDefinition";
4629            case EVIDENCE: return "Evidence";
4630            case EVIDENCEREPORT: return "EvidenceReport";
4631            case EVIDENCEVARIABLE: return "EvidenceVariable";
4632            case EXAMPLESCENARIO: return "ExampleScenario";
4633            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
4634            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
4635            case FLAG: return "Flag";
4636            case GOAL: return "Goal";
4637            case GRAPHDEFINITION: return "GraphDefinition";
4638            case GROUP: return "Group";
4639            case GUIDANCERESPONSE: return "GuidanceResponse";
4640            case HEALTHCARESERVICE: return "HealthcareService";
4641            case IMAGINGSTUDY: return "ImagingStudy";
4642            case IMMUNIZATION: return "Immunization";
4643            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
4644            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
4645            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
4646            case INGREDIENT: return "Ingredient";
4647            case INSURANCEPLAN: return "InsurancePlan";
4648            case INVOICE: return "Invoice";
4649            case LIBRARY: return "Library";
4650            case LINKAGE: return "Linkage";
4651            case LIST: return "List";
4652            case LOCATION: return "Location";
4653            case MANUFACTUREDITEMDEFINITION: return "ManufacturedItemDefinition";
4654            case MEASURE: return "Measure";
4655            case MEASUREREPORT: return "MeasureReport";
4656            case MEDIA: return "Media";
4657            case MEDICATION: return "Medication";
4658            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
4659            case MEDICATIONDISPENSE: return "MedicationDispense";
4660            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
4661            case MEDICATIONREQUEST: return "MedicationRequest";
4662            case MEDICATIONSTATEMENT: return "MedicationStatement";
4663            case MEDICINALPRODUCTDEFINITION: return "MedicinalProductDefinition";
4664            case MESSAGEDEFINITION: return "MessageDefinition";
4665            case MESSAGEHEADER: return "MessageHeader";
4666            case MOLECULARSEQUENCE: return "MolecularSequence";
4667            case NAMINGSYSTEM: return "NamingSystem";
4668            case NUTRITIONORDER: return "NutritionOrder";
4669            case NUTRITIONPRODUCT: return "NutritionProduct";
4670            case OBSERVATION: return "Observation";
4671            case OBSERVATIONDEFINITION: return "ObservationDefinition";
4672            case OPERATIONDEFINITION: return "OperationDefinition";
4673            case OPERATIONOUTCOME: return "OperationOutcome";
4674            case ORGANIZATION: return "Organization";
4675            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
4676            case PACKAGEDPRODUCTDEFINITION: return "PackagedProductDefinition";
4677            case PATIENT: return "Patient";
4678            case PAYMENTNOTICE: return "PaymentNotice";
4679            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
4680            case PERSON: return "Person";
4681            case PLANDEFINITION: return "PlanDefinition";
4682            case PRACTITIONER: return "Practitioner";
4683            case PRACTITIONERROLE: return "PractitionerRole";
4684            case PROCEDURE: return "Procedure";
4685            case PROVENANCE: return "Provenance";
4686            case QUESTIONNAIRE: return "Questionnaire";
4687            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
4688            case REGULATEDAUTHORIZATION: return "RegulatedAuthorization";
4689            case RELATEDPERSON: return "RelatedPerson";
4690            case REQUESTGROUP: return "RequestGroup";
4691            case RESEARCHDEFINITION: return "ResearchDefinition";
4692            case RESEARCHELEMENTDEFINITION: return "ResearchElementDefinition";
4693            case RESEARCHSTUDY: return "ResearchStudy";
4694            case RESEARCHSUBJECT: return "ResearchSubject";
4695            case RISKASSESSMENT: return "RiskAssessment";
4696            case SCHEDULE: return "Schedule";
4697            case SEARCHPARAMETER: return "SearchParameter";
4698            case SERVICEREQUEST: return "ServiceRequest";
4699            case SLOT: return "Slot";
4700            case SPECIMEN: return "Specimen";
4701            case SPECIMENDEFINITION: return "SpecimenDefinition";
4702            case STRUCTUREDEFINITION: return "StructureDefinition";
4703            case STRUCTUREMAP: return "StructureMap";
4704            case SUBSCRIPTION: return "Subscription";
4705            case SUBSCRIPTIONSTATUS: return "SubscriptionStatus";
4706            case SUBSCRIPTIONTOPIC: return "SubscriptionTopic";
4707            case SUBSTANCE: return "Substance";
4708            case SUBSTANCEDEFINITION: return "SubstanceDefinition";
4709            case SUPPLYDELIVERY: return "SupplyDelivery";
4710            case SUPPLYREQUEST: return "SupplyRequest";
4711            case TASK: return "Task";
4712            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
4713            case TESTREPORT: return "TestReport";
4714            case TESTSCRIPT: return "TestScript";
4715            case VALUESET: return "ValueSet";
4716            case VERIFICATIONRESULT: return "VerificationResult";
4717            case VISIONPRESCRIPTION: return "VisionPrescription";
4718            case PARAMETERS: return "Parameters";
4719            case TYPE: return "Type";
4720            case ANY: return "Any";
4721            case NULL: return null;
4722            default: return "?";
4723          }
4724        }
4725    }
4726
4727  public static class FHIRAllTypesEnumFactory implements EnumFactory<FHIRAllTypes> {
4728    public FHIRAllTypes fromCode(String codeString) throws IllegalArgumentException {
4729      if (codeString == null || "".equals(codeString))
4730            if (codeString == null || "".equals(codeString))
4731                return null;
4732        if ("Address".equals(codeString))
4733          return FHIRAllTypes.ADDRESS;
4734        if ("Age".equals(codeString))
4735          return FHIRAllTypes.AGE;
4736        if ("Annotation".equals(codeString))
4737          return FHIRAllTypes.ANNOTATION;
4738        if ("Attachment".equals(codeString))
4739          return FHIRAllTypes.ATTACHMENT;
4740        if ("BackboneElement".equals(codeString))
4741          return FHIRAllTypes.BACKBONEELEMENT;
4742        if ("CodeableConcept".equals(codeString))
4743          return FHIRAllTypes.CODEABLECONCEPT;
4744        if ("CodeableReference".equals(codeString))
4745          return FHIRAllTypes.CODEABLEREFERENCE;
4746        if ("Coding".equals(codeString))
4747          return FHIRAllTypes.CODING;
4748        if ("ContactDetail".equals(codeString))
4749          return FHIRAllTypes.CONTACTDETAIL;
4750        if ("ContactPoint".equals(codeString))
4751          return FHIRAllTypes.CONTACTPOINT;
4752        if ("Contributor".equals(codeString))
4753          return FHIRAllTypes.CONTRIBUTOR;
4754        if ("Count".equals(codeString))
4755          return FHIRAllTypes.COUNT;
4756        if ("DataRequirement".equals(codeString))
4757          return FHIRAllTypes.DATAREQUIREMENT;
4758        if ("DataType".equals(codeString))
4759          return FHIRAllTypes.DATATYPE;
4760        if ("Distance".equals(codeString))
4761          return FHIRAllTypes.DISTANCE;
4762        if ("Dosage".equals(codeString))
4763          return FHIRAllTypes.DOSAGE;
4764        if ("Duration".equals(codeString))
4765          return FHIRAllTypes.DURATION;
4766        if ("Element".equals(codeString))
4767          return FHIRAllTypes.ELEMENT;
4768        if ("ElementDefinition".equals(codeString))
4769          return FHIRAllTypes.ELEMENTDEFINITION;
4770        if ("Expression".equals(codeString))
4771          return FHIRAllTypes.EXPRESSION;
4772        if ("Extension".equals(codeString))
4773          return FHIRAllTypes.EXTENSION;
4774        if ("HumanName".equals(codeString))
4775          return FHIRAllTypes.HUMANNAME;
4776        if ("Identifier".equals(codeString))
4777          return FHIRAllTypes.IDENTIFIER;
4778        if ("MarketingStatus".equals(codeString))
4779          return FHIRAllTypes.MARKETINGSTATUS;
4780        if ("Meta".equals(codeString))
4781          return FHIRAllTypes.META;
4782        if ("Money".equals(codeString))
4783          return FHIRAllTypes.MONEY;
4784        if ("MoneyQuantity".equals(codeString))
4785          return FHIRAllTypes.MONEYQUANTITY;
4786        if ("Narrative".equals(codeString))
4787          return FHIRAllTypes.NARRATIVE;
4788        if ("ParameterDefinition".equals(codeString))
4789          return FHIRAllTypes.PARAMETERDEFINITION;
4790        if ("Period".equals(codeString))
4791          return FHIRAllTypes.PERIOD;
4792        if ("Population".equals(codeString))
4793          return FHIRAllTypes.POPULATION;
4794        if ("ProdCharacteristic".equals(codeString))
4795          return FHIRAllTypes.PRODCHARACTERISTIC;
4796        if ("ProductShelfLife".equals(codeString))
4797          return FHIRAllTypes.PRODUCTSHELFLIFE;
4798        if ("Quantity".equals(codeString))
4799          return FHIRAllTypes.QUANTITY;
4800        if ("Range".equals(codeString))
4801          return FHIRAllTypes.RANGE;
4802        if ("Ratio".equals(codeString))
4803          return FHIRAllTypes.RATIO;
4804        if ("RatioRange".equals(codeString))
4805          return FHIRAllTypes.RATIORANGE;
4806        if ("Reference".equals(codeString))
4807          return FHIRAllTypes.REFERENCE;
4808        if ("RelatedArtifact".equals(codeString))
4809          return FHIRAllTypes.RELATEDARTIFACT;
4810        if ("SampledData".equals(codeString))
4811          return FHIRAllTypes.SAMPLEDDATA;
4812        if ("Signature".equals(codeString))
4813          return FHIRAllTypes.SIGNATURE;
4814        if ("SimpleQuantity".equals(codeString))
4815          return FHIRAllTypes.SIMPLEQUANTITY;
4816        if ("Timing".equals(codeString))
4817          return FHIRAllTypes.TIMING;
4818        if ("TriggerDefinition".equals(codeString))
4819          return FHIRAllTypes.TRIGGERDEFINITION;
4820        if ("UsageContext".equals(codeString))
4821          return FHIRAllTypes.USAGECONTEXT;
4822        if ("base64Binary".equals(codeString))
4823          return FHIRAllTypes.BASE64BINARY;
4824        if ("boolean".equals(codeString))
4825          return FHIRAllTypes.BOOLEAN;
4826        if ("canonical".equals(codeString))
4827          return FHIRAllTypes.CANONICAL;
4828        if ("code".equals(codeString))
4829          return FHIRAllTypes.CODE;
4830        if ("date".equals(codeString))
4831          return FHIRAllTypes.DATE;
4832        if ("dateTime".equals(codeString))
4833          return FHIRAllTypes.DATETIME;
4834        if ("decimal".equals(codeString))
4835          return FHIRAllTypes.DECIMAL;
4836        if ("id".equals(codeString))
4837          return FHIRAllTypes.ID;
4838        if ("instant".equals(codeString))
4839          return FHIRAllTypes.INSTANT;
4840        if ("integer".equals(codeString))
4841          return FHIRAllTypes.INTEGER;
4842        if ("markdown".equals(codeString))
4843          return FHIRAllTypes.MARKDOWN;
4844        if ("oid".equals(codeString))
4845          return FHIRAllTypes.OID;
4846        if ("positiveInt".equals(codeString))
4847          return FHIRAllTypes.POSITIVEINT;
4848        if ("string".equals(codeString))
4849          return FHIRAllTypes.STRING;
4850        if ("time".equals(codeString))
4851          return FHIRAllTypes.TIME;
4852        if ("unsignedInt".equals(codeString))
4853          return FHIRAllTypes.UNSIGNEDINT;
4854        if ("uri".equals(codeString))
4855          return FHIRAllTypes.URI;
4856        if ("url".equals(codeString))
4857          return FHIRAllTypes.URL;
4858        if ("uuid".equals(codeString))
4859          return FHIRAllTypes.UUID;
4860        if ("xhtml".equals(codeString))
4861          return FHIRAllTypes.XHTML;
4862        if ("Resource".equals(codeString))
4863          return FHIRAllTypes.RESOURCE;
4864        if ("Binary".equals(codeString))
4865          return FHIRAllTypes.BINARY;
4866        if ("Bundle".equals(codeString))
4867          return FHIRAllTypes.BUNDLE;
4868        if ("DomainResource".equals(codeString))
4869          return FHIRAllTypes.DOMAINRESOURCE;
4870        if ("Account".equals(codeString))
4871          return FHIRAllTypes.ACCOUNT;
4872        if ("ActivityDefinition".equals(codeString))
4873          return FHIRAllTypes.ACTIVITYDEFINITION;
4874        if ("AdministrableProductDefinition".equals(codeString))
4875          return FHIRAllTypes.ADMINISTRABLEPRODUCTDEFINITION;
4876        if ("AdverseEvent".equals(codeString))
4877          return FHIRAllTypes.ADVERSEEVENT;
4878        if ("AllergyIntolerance".equals(codeString))
4879          return FHIRAllTypes.ALLERGYINTOLERANCE;
4880        if ("Appointment".equals(codeString))
4881          return FHIRAllTypes.APPOINTMENT;
4882        if ("AppointmentResponse".equals(codeString))
4883          return FHIRAllTypes.APPOINTMENTRESPONSE;
4884        if ("AuditEvent".equals(codeString))
4885          return FHIRAllTypes.AUDITEVENT;
4886        if ("Basic".equals(codeString))
4887          return FHIRAllTypes.BASIC;
4888        if ("BiologicallyDerivedProduct".equals(codeString))
4889          return FHIRAllTypes.BIOLOGICALLYDERIVEDPRODUCT;
4890        if ("BodyStructure".equals(codeString))
4891          return FHIRAllTypes.BODYSTRUCTURE;
4892        if ("CapabilityStatement".equals(codeString))
4893          return FHIRAllTypes.CAPABILITYSTATEMENT;
4894        if ("CarePlan".equals(codeString))
4895          return FHIRAllTypes.CAREPLAN;
4896        if ("CareTeam".equals(codeString))
4897          return FHIRAllTypes.CARETEAM;
4898        if ("CatalogEntry".equals(codeString))
4899          return FHIRAllTypes.CATALOGENTRY;
4900        if ("ChargeItem".equals(codeString))
4901          return FHIRAllTypes.CHARGEITEM;
4902        if ("ChargeItemDefinition".equals(codeString))
4903          return FHIRAllTypes.CHARGEITEMDEFINITION;
4904        if ("Citation".equals(codeString))
4905          return FHIRAllTypes.CITATION;
4906        if ("Claim".equals(codeString))
4907          return FHIRAllTypes.CLAIM;
4908        if ("ClaimResponse".equals(codeString))
4909          return FHIRAllTypes.CLAIMRESPONSE;
4910        if ("ClinicalImpression".equals(codeString))
4911          return FHIRAllTypes.CLINICALIMPRESSION;
4912        if ("ClinicalUseDefinition".equals(codeString))
4913          return FHIRAllTypes.CLINICALUSEDEFINITION;
4914        if ("CodeSystem".equals(codeString))
4915          return FHIRAllTypes.CODESYSTEM;
4916        if ("Communication".equals(codeString))
4917          return FHIRAllTypes.COMMUNICATION;
4918        if ("CommunicationRequest".equals(codeString))
4919          return FHIRAllTypes.COMMUNICATIONREQUEST;
4920        if ("CompartmentDefinition".equals(codeString))
4921          return FHIRAllTypes.COMPARTMENTDEFINITION;
4922        if ("Composition".equals(codeString))
4923          return FHIRAllTypes.COMPOSITION;
4924        if ("ConceptMap".equals(codeString))
4925          return FHIRAllTypes.CONCEPTMAP;
4926        if ("Condition".equals(codeString))
4927          return FHIRAllTypes.CONDITION;
4928        if ("Consent".equals(codeString))
4929          return FHIRAllTypes.CONSENT;
4930        if ("Contract".equals(codeString))
4931          return FHIRAllTypes.CONTRACT;
4932        if ("Coverage".equals(codeString))
4933          return FHIRAllTypes.COVERAGE;
4934        if ("CoverageEligibilityRequest".equals(codeString))
4935          return FHIRAllTypes.COVERAGEELIGIBILITYREQUEST;
4936        if ("CoverageEligibilityResponse".equals(codeString))
4937          return FHIRAllTypes.COVERAGEELIGIBILITYRESPONSE;
4938        if ("DetectedIssue".equals(codeString))
4939          return FHIRAllTypes.DETECTEDISSUE;
4940        if ("Device".equals(codeString))
4941          return FHIRAllTypes.DEVICE;
4942        if ("DeviceDefinition".equals(codeString))
4943          return FHIRAllTypes.DEVICEDEFINITION;
4944        if ("DeviceMetric".equals(codeString))
4945          return FHIRAllTypes.DEVICEMETRIC;
4946        if ("DeviceRequest".equals(codeString))
4947          return FHIRAllTypes.DEVICEREQUEST;
4948        if ("DeviceUseStatement".equals(codeString))
4949          return FHIRAllTypes.DEVICEUSESTATEMENT;
4950        if ("DiagnosticReport".equals(codeString))
4951          return FHIRAllTypes.DIAGNOSTICREPORT;
4952        if ("DocumentManifest".equals(codeString))
4953          return FHIRAllTypes.DOCUMENTMANIFEST;
4954        if ("DocumentReference".equals(codeString))
4955          return FHIRAllTypes.DOCUMENTREFERENCE;
4956        if ("Encounter".equals(codeString))
4957          return FHIRAllTypes.ENCOUNTER;
4958        if ("Endpoint".equals(codeString))
4959          return FHIRAllTypes.ENDPOINT;
4960        if ("EnrollmentRequest".equals(codeString))
4961          return FHIRAllTypes.ENROLLMENTREQUEST;
4962        if ("EnrollmentResponse".equals(codeString))
4963          return FHIRAllTypes.ENROLLMENTRESPONSE;
4964        if ("EpisodeOfCare".equals(codeString))
4965          return FHIRAllTypes.EPISODEOFCARE;
4966        if ("EventDefinition".equals(codeString))
4967          return FHIRAllTypes.EVENTDEFINITION;
4968        if ("Evidence".equals(codeString))
4969          return FHIRAllTypes.EVIDENCE;
4970        if ("EvidenceReport".equals(codeString))
4971          return FHIRAllTypes.EVIDENCEREPORT;
4972        if ("EvidenceVariable".equals(codeString))
4973          return FHIRAllTypes.EVIDENCEVARIABLE;
4974        if ("ExampleScenario".equals(codeString))
4975          return FHIRAllTypes.EXAMPLESCENARIO;
4976        if ("ExplanationOfBenefit".equals(codeString))
4977          return FHIRAllTypes.EXPLANATIONOFBENEFIT;
4978        if ("FamilyMemberHistory".equals(codeString))
4979          return FHIRAllTypes.FAMILYMEMBERHISTORY;
4980        if ("Flag".equals(codeString))
4981          return FHIRAllTypes.FLAG;
4982        if ("Goal".equals(codeString))
4983          return FHIRAllTypes.GOAL;
4984        if ("GraphDefinition".equals(codeString))
4985          return FHIRAllTypes.GRAPHDEFINITION;
4986        if ("Group".equals(codeString))
4987          return FHIRAllTypes.GROUP;
4988        if ("GuidanceResponse".equals(codeString))
4989          return FHIRAllTypes.GUIDANCERESPONSE;
4990        if ("HealthcareService".equals(codeString))
4991          return FHIRAllTypes.HEALTHCARESERVICE;
4992        if ("ImagingStudy".equals(codeString))
4993          return FHIRAllTypes.IMAGINGSTUDY;
4994        if ("Immunization".equals(codeString))
4995          return FHIRAllTypes.IMMUNIZATION;
4996        if ("ImmunizationEvaluation".equals(codeString))
4997          return FHIRAllTypes.IMMUNIZATIONEVALUATION;
4998        if ("ImmunizationRecommendation".equals(codeString))
4999          return FHIRAllTypes.IMMUNIZATIONRECOMMENDATION;
5000        if ("ImplementationGuide".equals(codeString))
5001          return FHIRAllTypes.IMPLEMENTATIONGUIDE;
5002        if ("Ingredient".equals(codeString))
5003          return FHIRAllTypes.INGREDIENT;
5004        if ("InsurancePlan".equals(codeString))
5005          return FHIRAllTypes.INSURANCEPLAN;
5006        if ("Invoice".equals(codeString))
5007          return FHIRAllTypes.INVOICE;
5008        if ("Library".equals(codeString))
5009          return FHIRAllTypes.LIBRARY;
5010        if ("Linkage".equals(codeString))
5011          return FHIRAllTypes.LINKAGE;
5012        if ("List".equals(codeString))
5013          return FHIRAllTypes.LIST;
5014        if ("Location".equals(codeString))
5015          return FHIRAllTypes.LOCATION;
5016        if ("ManufacturedItemDefinition".equals(codeString))
5017          return FHIRAllTypes.MANUFACTUREDITEMDEFINITION;
5018        if ("Measure".equals(codeString))
5019          return FHIRAllTypes.MEASURE;
5020        if ("MeasureReport".equals(codeString))
5021          return FHIRAllTypes.MEASUREREPORT;
5022        if ("Media".equals(codeString))
5023          return FHIRAllTypes.MEDIA;
5024        if ("Medication".equals(codeString))
5025          return FHIRAllTypes.MEDICATION;
5026        if ("MedicationAdministration".equals(codeString))
5027          return FHIRAllTypes.MEDICATIONADMINISTRATION;
5028        if ("MedicationDispense".equals(codeString))
5029          return FHIRAllTypes.MEDICATIONDISPENSE;
5030        if ("MedicationKnowledge".equals(codeString))
5031          return FHIRAllTypes.MEDICATIONKNOWLEDGE;
5032        if ("MedicationRequest".equals(codeString))
5033          return FHIRAllTypes.MEDICATIONREQUEST;
5034        if ("MedicationStatement".equals(codeString))
5035          return FHIRAllTypes.MEDICATIONSTATEMENT;
5036        if ("MedicinalProductDefinition".equals(codeString))
5037          return FHIRAllTypes.MEDICINALPRODUCTDEFINITION;
5038        if ("MessageDefinition".equals(codeString))
5039          return FHIRAllTypes.MESSAGEDEFINITION;
5040        if ("MessageHeader".equals(codeString))
5041          return FHIRAllTypes.MESSAGEHEADER;
5042        if ("MolecularSequence".equals(codeString))
5043          return FHIRAllTypes.MOLECULARSEQUENCE;
5044        if ("NamingSystem".equals(codeString))
5045          return FHIRAllTypes.NAMINGSYSTEM;
5046        if ("NutritionOrder".equals(codeString))
5047          return FHIRAllTypes.NUTRITIONORDER;
5048        if ("NutritionProduct".equals(codeString))
5049          return FHIRAllTypes.NUTRITIONPRODUCT;
5050        if ("Observation".equals(codeString))
5051          return FHIRAllTypes.OBSERVATION;
5052        if ("ObservationDefinition".equals(codeString))
5053          return FHIRAllTypes.OBSERVATIONDEFINITION;
5054        if ("OperationDefinition".equals(codeString))
5055          return FHIRAllTypes.OPERATIONDEFINITION;
5056        if ("OperationOutcome".equals(codeString))
5057          return FHIRAllTypes.OPERATIONOUTCOME;
5058        if ("Organization".equals(codeString))
5059          return FHIRAllTypes.ORGANIZATION;
5060        if ("OrganizationAffiliation".equals(codeString))
5061          return FHIRAllTypes.ORGANIZATIONAFFILIATION;
5062        if ("PackagedProductDefinition".equals(codeString))
5063          return FHIRAllTypes.PACKAGEDPRODUCTDEFINITION;
5064        if ("Patient".equals(codeString))
5065          return FHIRAllTypes.PATIENT;
5066        if ("PaymentNotice".equals(codeString))
5067          return FHIRAllTypes.PAYMENTNOTICE;
5068        if ("PaymentReconciliation".equals(codeString))
5069          return FHIRAllTypes.PAYMENTRECONCILIATION;
5070        if ("Person".equals(codeString))
5071          return FHIRAllTypes.PERSON;
5072        if ("PlanDefinition".equals(codeString))
5073          return FHIRAllTypes.PLANDEFINITION;
5074        if ("Practitioner".equals(codeString))
5075          return FHIRAllTypes.PRACTITIONER;
5076        if ("PractitionerRole".equals(codeString))
5077          return FHIRAllTypes.PRACTITIONERROLE;
5078        if ("Procedure".equals(codeString))
5079          return FHIRAllTypes.PROCEDURE;
5080        if ("Provenance".equals(codeString))
5081          return FHIRAllTypes.PROVENANCE;
5082        if ("Questionnaire".equals(codeString))
5083          return FHIRAllTypes.QUESTIONNAIRE;
5084        if ("QuestionnaireResponse".equals(codeString))
5085          return FHIRAllTypes.QUESTIONNAIRERESPONSE;
5086        if ("RegulatedAuthorization".equals(codeString))
5087          return FHIRAllTypes.REGULATEDAUTHORIZATION;
5088        if ("RelatedPerson".equals(codeString))
5089          return FHIRAllTypes.RELATEDPERSON;
5090        if ("RequestGroup".equals(codeString))
5091          return FHIRAllTypes.REQUESTGROUP;
5092        if ("ResearchDefinition".equals(codeString))
5093          return FHIRAllTypes.RESEARCHDEFINITION;
5094        if ("ResearchElementDefinition".equals(codeString))
5095          return FHIRAllTypes.RESEARCHELEMENTDEFINITION;
5096        if ("ResearchStudy".equals(codeString))
5097          return FHIRAllTypes.RESEARCHSTUDY;
5098        if ("ResearchSubject".equals(codeString))
5099          return FHIRAllTypes.RESEARCHSUBJECT;
5100        if ("RiskAssessment".equals(codeString))
5101          return FHIRAllTypes.RISKASSESSMENT;
5102        if ("Schedule".equals(codeString))
5103          return FHIRAllTypes.SCHEDULE;
5104        if ("SearchParameter".equals(codeString))
5105          return FHIRAllTypes.SEARCHPARAMETER;
5106        if ("ServiceRequest".equals(codeString))
5107          return FHIRAllTypes.SERVICEREQUEST;
5108        if ("Slot".equals(codeString))
5109          return FHIRAllTypes.SLOT;
5110        if ("Specimen".equals(codeString))
5111          return FHIRAllTypes.SPECIMEN;
5112        if ("SpecimenDefinition".equals(codeString))
5113          return FHIRAllTypes.SPECIMENDEFINITION;
5114        if ("StructureDefinition".equals(codeString))
5115          return FHIRAllTypes.STRUCTUREDEFINITION;
5116        if ("StructureMap".equals(codeString))
5117          return FHIRAllTypes.STRUCTUREMAP;
5118        if ("Subscription".equals(codeString))
5119          return FHIRAllTypes.SUBSCRIPTION;
5120        if ("SubscriptionStatus".equals(codeString))
5121          return FHIRAllTypes.SUBSCRIPTIONSTATUS;
5122        if ("SubscriptionTopic".equals(codeString))
5123          return FHIRAllTypes.SUBSCRIPTIONTOPIC;
5124        if ("Substance".equals(codeString))
5125          return FHIRAllTypes.SUBSTANCE;
5126        if ("SubstanceDefinition".equals(codeString))
5127          return FHIRAllTypes.SUBSTANCEDEFINITION;
5128        if ("SupplyDelivery".equals(codeString))
5129          return FHIRAllTypes.SUPPLYDELIVERY;
5130        if ("SupplyRequest".equals(codeString))
5131          return FHIRAllTypes.SUPPLYREQUEST;
5132        if ("Task".equals(codeString))
5133          return FHIRAllTypes.TASK;
5134        if ("TerminologyCapabilities".equals(codeString))
5135          return FHIRAllTypes.TERMINOLOGYCAPABILITIES;
5136        if ("TestReport".equals(codeString))
5137          return FHIRAllTypes.TESTREPORT;
5138        if ("TestScript".equals(codeString))
5139          return FHIRAllTypes.TESTSCRIPT;
5140        if ("ValueSet".equals(codeString))
5141          return FHIRAllTypes.VALUESET;
5142        if ("VerificationResult".equals(codeString))
5143          return FHIRAllTypes.VERIFICATIONRESULT;
5144        if ("VisionPrescription".equals(codeString))
5145          return FHIRAllTypes.VISIONPRESCRIPTION;
5146        if ("Parameters".equals(codeString))
5147          return FHIRAllTypes.PARAMETERS;
5148        if ("Type".equals(codeString))
5149          return FHIRAllTypes.TYPE;
5150        if ("Any".equals(codeString))
5151          return FHIRAllTypes.ANY;
5152        throw new IllegalArgumentException("Unknown FHIRAllTypes code '"+codeString+"'");
5153        }
5154        public Enumeration<FHIRAllTypes> fromType(Base code) throws FHIRException {
5155          if (code == null)
5156            return null;
5157          if (code.isEmpty())
5158            return new Enumeration<FHIRAllTypes>(this);
5159          String codeString = ((PrimitiveType) code).asStringValue();
5160          if (codeString == null || "".equals(codeString))
5161            return null;
5162        if ("Address".equals(codeString))
5163          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADDRESS);
5164        if ("Age".equals(codeString))
5165          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.AGE);
5166        if ("Annotation".equals(codeString))
5167          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ANNOTATION);
5168        if ("Attachment".equals(codeString))
5169          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ATTACHMENT);
5170        if ("BackboneElement".equals(codeString))
5171          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BACKBONEELEMENT);
5172        if ("CodeableConcept".equals(codeString))
5173          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODEABLECONCEPT);
5174        if ("CodeableReference".equals(codeString))
5175          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODEABLEREFERENCE);
5176        if ("Coding".equals(codeString))
5177          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODING);
5178        if ("ContactDetail".equals(codeString))
5179          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTACTDETAIL);
5180        if ("ContactPoint".equals(codeString))
5181          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTACTPOINT);
5182        if ("Contributor".equals(codeString))
5183          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTRIBUTOR);
5184        if ("Count".equals(codeString))
5185          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COUNT);
5186        if ("DataRequirement".equals(codeString))
5187          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATAREQUIREMENT);
5188        if ("DataType".equals(codeString))
5189          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATATYPE);
5190        if ("Distance".equals(codeString))
5191          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DISTANCE);
5192        if ("Dosage".equals(codeString))
5193          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOSAGE);
5194        if ("Duration".equals(codeString))
5195          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DURATION);
5196        if ("Element".equals(codeString))
5197          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELEMENT);
5198        if ("ElementDefinition".equals(codeString))
5199          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELEMENTDEFINITION);
5200        if ("Expression".equals(codeString))
5201          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXPRESSION);
5202        if ("Extension".equals(codeString))
5203          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXTENSION);
5204        if ("HumanName".equals(codeString))
5205          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.HUMANNAME);
5206        if ("Identifier".equals(codeString))
5207          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IDENTIFIER);
5208        if ("MarketingStatus".equals(codeString))
5209          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MARKETINGSTATUS);
5210        if ("Meta".equals(codeString))
5211          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.META);
5212        if ("Money".equals(codeString))
5213          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MONEY);
5214        if ("MoneyQuantity".equals(codeString))
5215          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MONEYQUANTITY);
5216        if ("Narrative".equals(codeString))
5217          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NARRATIVE);
5218        if ("ParameterDefinition".equals(codeString))
5219          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PARAMETERDEFINITION);
5220        if ("Period".equals(codeString))
5221          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERIOD);
5222        if ("Population".equals(codeString))
5223          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.POPULATION);
5224        if ("ProdCharacteristic".equals(codeString))
5225          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRODCHARACTERISTIC);
5226        if ("ProductShelfLife".equals(codeString))
5227          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRODUCTSHELFLIFE);
5228        if ("Quantity".equals(codeString))
5229          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUANTITY);
5230        if ("Range".equals(codeString))
5231          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RANGE);
5232        if ("Ratio".equals(codeString))
5233          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RATIO);
5234        if ("RatioRange".equals(codeString))
5235          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RATIORANGE);
5236        if ("Reference".equals(codeString))
5237          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REFERENCE);
5238        if ("RelatedArtifact".equals(codeString))
5239          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RELATEDARTIFACT);
5240        if ("SampledData".equals(codeString))
5241          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SAMPLEDDATA);
5242        if ("Signature".equals(codeString))
5243          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SIGNATURE);
5244        if ("SimpleQuantity".equals(codeString))
5245          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SIMPLEQUANTITY);
5246        if ("Timing".equals(codeString))
5247          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TIMING);
5248        if ("TriggerDefinition".equals(codeString))
5249          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TRIGGERDEFINITION);
5250        if ("UsageContext".equals(codeString))
5251          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.USAGECONTEXT);
5252        if ("base64Binary".equals(codeString))
5253          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASE64BINARY);
5254        if ("boolean".equals(codeString))
5255          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BOOLEAN);
5256        if ("canonical".equals(codeString))
5257          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CANONICAL);
5258        if ("code".equals(codeString))
5259          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODE);
5260        if ("date".equals(codeString))
5261          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATE);
5262        if ("dateTime".equals(codeString))
5263          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATETIME);
5264        if ("decimal".equals(codeString))
5265          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DECIMAL);
5266        if ("id".equals(codeString))
5267          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ID);
5268        if ("instant".equals(codeString))
5269          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INSTANT);
5270        if ("integer".equals(codeString))
5271          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INTEGER);
5272        if ("markdown".equals(codeString))
5273          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MARKDOWN);
5274        if ("oid".equals(codeString))
5275          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OID);
5276        if ("positiveInt".equals(codeString))
5277          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.POSITIVEINT);
5278        if ("string".equals(codeString))
5279          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRING);
5280        if ("time".equals(codeString))
5281          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TIME);
5282        if ("unsignedInt".equals(codeString))
5283          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.UNSIGNEDINT);
5284        if ("uri".equals(codeString))
5285          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.URI);
5286        if ("url".equals(codeString))
5287          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.URL);
5288        if ("uuid".equals(codeString))
5289          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.UUID);
5290        if ("xhtml".equals(codeString))
5291          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.XHTML);
5292        if ("Resource".equals(codeString))
5293          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESOURCE);
5294        if ("Binary".equals(codeString))
5295          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BINARY);
5296        if ("Bundle".equals(codeString))
5297          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BUNDLE);
5298        if ("DomainResource".equals(codeString))
5299          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOMAINRESOURCE);
5300        if ("Account".equals(codeString))
5301          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ACCOUNT);
5302        if ("ActivityDefinition".equals(codeString))
5303          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ACTIVITYDEFINITION);
5304        if ("AdministrableProductDefinition".equals(codeString))
5305          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADMINISTRABLEPRODUCTDEFINITION);
5306        if ("AdverseEvent".equals(codeString))
5307          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADVERSEEVENT);
5308        if ("AllergyIntolerance".equals(codeString))
5309          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ALLERGYINTOLERANCE);
5310        if ("Appointment".equals(codeString))
5311          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.APPOINTMENT);
5312        if ("AppointmentResponse".equals(codeString))
5313          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.APPOINTMENTRESPONSE);
5314        if ("AuditEvent".equals(codeString))
5315          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.AUDITEVENT);
5316        if ("Basic".equals(codeString))
5317          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASIC);
5318        if ("BiologicallyDerivedProduct".equals(codeString))
5319          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BIOLOGICALLYDERIVEDPRODUCT);
5320        if ("BodyStructure".equals(codeString))
5321          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BODYSTRUCTURE);
5322        if ("CapabilityStatement".equals(codeString))
5323          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CAPABILITYSTATEMENT);
5324        if ("CarePlan".equals(codeString))
5325          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CAREPLAN);
5326        if ("CareTeam".equals(codeString))
5327          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CARETEAM);
5328        if ("CatalogEntry".equals(codeString))
5329          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CATALOGENTRY);
5330        if ("ChargeItem".equals(codeString))
5331          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CHARGEITEM);
5332        if ("ChargeItemDefinition".equals(codeString))
5333          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CHARGEITEMDEFINITION);
5334        if ("Citation".equals(codeString))
5335          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CITATION);
5336        if ("Claim".equals(codeString))
5337          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLAIM);
5338        if ("ClaimResponse".equals(codeString))
5339          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLAIMRESPONSE);
5340        if ("ClinicalImpression".equals(codeString))
5341          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLINICALIMPRESSION);
5342        if ("ClinicalUseDefinition".equals(codeString))
5343          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLINICALUSEDEFINITION);
5344        if ("CodeSystem".equals(codeString))
5345          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODESYSTEM);
5346        if ("Communication".equals(codeString))
5347          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMMUNICATION);
5348        if ("CommunicationRequest".equals(codeString))
5349          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMMUNICATIONREQUEST);
5350        if ("CompartmentDefinition".equals(codeString))
5351          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMPARTMENTDEFINITION);
5352        if ("Composition".equals(codeString))
5353          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMPOSITION);
5354        if ("ConceptMap".equals(codeString))
5355          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONCEPTMAP);
5356        if ("Condition".equals(codeString))
5357          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONDITION);
5358        if ("Consent".equals(codeString))
5359          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONSENT);
5360        if ("Contract".equals(codeString))
5361          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTRACT);
5362        if ("Coverage".equals(codeString))
5363          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGE);
5364        if ("CoverageEligibilityRequest".equals(codeString))
5365          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGEELIGIBILITYREQUEST);
5366        if ("CoverageEligibilityResponse".equals(codeString))
5367          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGEELIGIBILITYRESPONSE);
5368        if ("DetectedIssue".equals(codeString))
5369          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DETECTEDISSUE);
5370        if ("Device".equals(codeString))
5371          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICE);
5372        if ("DeviceDefinition".equals(codeString))
5373          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEDEFINITION);
5374        if ("DeviceMetric".equals(codeString))
5375          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEMETRIC);
5376        if ("DeviceRequest".equals(codeString))
5377          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEREQUEST);
5378        if ("DeviceUseStatement".equals(codeString))
5379          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEUSESTATEMENT);
5380        if ("DiagnosticReport".equals(codeString))
5381          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DIAGNOSTICREPORT);
5382        if ("DocumentManifest".equals(codeString))
5383          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOCUMENTMANIFEST);
5384        if ("DocumentReference".equals(codeString))
5385          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOCUMENTREFERENCE);
5386        if ("Encounter".equals(codeString))
5387          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENCOUNTER);
5388        if ("Endpoint".equals(codeString))
5389          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENDPOINT);
5390        if ("EnrollmentRequest".equals(codeString))
5391          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENROLLMENTREQUEST);
5392        if ("EnrollmentResponse".equals(codeString))
5393          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENROLLMENTRESPONSE);
5394        if ("EpisodeOfCare".equals(codeString))
5395          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EPISODEOFCARE);
5396        if ("EventDefinition".equals(codeString))
5397          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVENTDEFINITION);
5398        if ("Evidence".equals(codeString))
5399          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVIDENCE);
5400        if ("EvidenceReport".equals(codeString))
5401          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVIDENCEREPORT);
5402        if ("EvidenceVariable".equals(codeString))
5403          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVIDENCEVARIABLE);
5404        if ("ExampleScenario".equals(codeString))
5405          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXAMPLESCENARIO);
5406        if ("ExplanationOfBenefit".equals(codeString))
5407          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXPLANATIONOFBENEFIT);
5408        if ("FamilyMemberHistory".equals(codeString))
5409          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.FAMILYMEMBERHISTORY);
5410        if ("Flag".equals(codeString))
5411          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.FLAG);
5412        if ("Goal".equals(codeString))
5413          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GOAL);
5414        if ("GraphDefinition".equals(codeString))
5415          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GRAPHDEFINITION);
5416        if ("Group".equals(codeString))
5417          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GROUP);
5418        if ("GuidanceResponse".equals(codeString))
5419          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GUIDANCERESPONSE);
5420        if ("HealthcareService".equals(codeString))
5421          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.HEALTHCARESERVICE);
5422        if ("ImagingStudy".equals(codeString))
5423          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMAGINGSTUDY);
5424        if ("Immunization".equals(codeString))
5425          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATION);
5426        if ("ImmunizationEvaluation".equals(codeString))
5427          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATIONEVALUATION);
5428        if ("ImmunizationRecommendation".equals(codeString))
5429          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATIONRECOMMENDATION);
5430        if ("ImplementationGuide".equals(codeString))
5431          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMPLEMENTATIONGUIDE);
5432        if ("Ingredient".equals(codeString))
5433          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INGREDIENT);
5434        if ("InsurancePlan".equals(codeString))
5435          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INSURANCEPLAN);
5436        if ("Invoice".equals(codeString))
5437          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INVOICE);
5438        if ("Library".equals(codeString))
5439          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LIBRARY);
5440        if ("Linkage".equals(codeString))
5441          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LINKAGE);
5442        if ("List".equals(codeString))
5443          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LIST);
5444        if ("Location".equals(codeString))
5445          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LOCATION);
5446        if ("ManufacturedItemDefinition".equals(codeString))
5447          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MANUFACTUREDITEMDEFINITION);
5448        if ("Measure".equals(codeString))
5449          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEASURE);
5450        if ("MeasureReport".equals(codeString))
5451          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEASUREREPORT);
5452        if ("Media".equals(codeString))
5453          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDIA);
5454        if ("Medication".equals(codeString))
5455          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATION);
5456        if ("MedicationAdministration".equals(codeString))
5457          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONADMINISTRATION);
5458        if ("MedicationDispense".equals(codeString))
5459          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONDISPENSE);
5460        if ("MedicationKnowledge".equals(codeString))
5461          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONKNOWLEDGE);
5462        if ("MedicationRequest".equals(codeString))
5463          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONREQUEST);
5464        if ("MedicationStatement".equals(codeString))
5465          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONSTATEMENT);
5466        if ("MedicinalProductDefinition".equals(codeString))
5467          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICINALPRODUCTDEFINITION);
5468        if ("MessageDefinition".equals(codeString))
5469          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MESSAGEDEFINITION);
5470        if ("MessageHeader".equals(codeString))
5471          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MESSAGEHEADER);
5472        if ("MolecularSequence".equals(codeString))
5473          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MOLECULARSEQUENCE);
5474        if ("NamingSystem".equals(codeString))
5475          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NAMINGSYSTEM);
5476        if ("NutritionOrder".equals(codeString))
5477          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NUTRITIONORDER);
5478        if ("NutritionProduct".equals(codeString))
5479          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NUTRITIONPRODUCT);
5480        if ("Observation".equals(codeString))
5481          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OBSERVATION);
5482        if ("ObservationDefinition".equals(codeString))
5483          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OBSERVATIONDEFINITION);
5484        if ("OperationDefinition".equals(codeString))
5485          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OPERATIONDEFINITION);
5486        if ("OperationOutcome".equals(codeString))
5487          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OPERATIONOUTCOME);
5488        if ("Organization".equals(codeString))
5489          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ORGANIZATION);
5490        if ("OrganizationAffiliation".equals(codeString))
5491          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ORGANIZATIONAFFILIATION);
5492        if ("PackagedProductDefinition".equals(codeString))
5493          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PACKAGEDPRODUCTDEFINITION);
5494        if ("Patient".equals(codeString))
5495          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PATIENT);
5496        if ("PaymentNotice".equals(codeString))
5497          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PAYMENTNOTICE);
5498        if ("PaymentReconciliation".equals(codeString))
5499          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PAYMENTRECONCILIATION);
5500        if ("Person".equals(codeString))
5501          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERSON);
5502        if ("PlanDefinition".equals(codeString))
5503          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PLANDEFINITION);
5504        if ("Practitioner".equals(codeString))
5505          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRACTITIONER);
5506        if ("PractitionerRole".equals(codeString))
5507          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRACTITIONERROLE);
5508        if ("Procedure".equals(codeString))
5509          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROCEDURE);
5510        if ("Provenance".equals(codeString))
5511          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROVENANCE);
5512        if ("Questionnaire".equals(codeString))
5513          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUESTIONNAIRE);
5514        if ("QuestionnaireResponse".equals(codeString))
5515          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUESTIONNAIRERESPONSE);
5516        if ("RegulatedAuthorization".equals(codeString))
5517          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REGULATEDAUTHORIZATION);
5518        if ("RelatedPerson".equals(codeString))
5519          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RELATEDPERSON);
5520        if ("RequestGroup".equals(codeString))
5521          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REQUESTGROUP);
5522        if ("ResearchDefinition".equals(codeString))
5523          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHDEFINITION);
5524        if ("ResearchElementDefinition".equals(codeString))
5525          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHELEMENTDEFINITION);
5526        if ("ResearchStudy".equals(codeString))
5527          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHSTUDY);
5528        if ("ResearchSubject".equals(codeString))
5529          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHSUBJECT);
5530        if ("RiskAssessment".equals(codeString))
5531          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RISKASSESSMENT);
5532        if ("Schedule".equals(codeString))
5533          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SCHEDULE);
5534        if ("SearchParameter".equals(codeString))
5535          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SEARCHPARAMETER);
5536        if ("ServiceRequest".equals(codeString))
5537          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SERVICEREQUEST);
5538        if ("Slot".equals(codeString))
5539          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SLOT);
5540        if ("Specimen".equals(codeString))
5541          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SPECIMEN);
5542        if ("SpecimenDefinition".equals(codeString))
5543          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SPECIMENDEFINITION);
5544        if ("StructureDefinition".equals(codeString))
5545          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRUCTUREDEFINITION);
5546        if ("StructureMap".equals(codeString))
5547          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRUCTUREMAP);
5548        if ("Subscription".equals(codeString))
5549          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSCRIPTION);
5550        if ("SubscriptionStatus".equals(codeString))
5551          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSCRIPTIONSTATUS);
5552        if ("SubscriptionTopic".equals(codeString))
5553          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSCRIPTIONTOPIC);
5554        if ("Substance".equals(codeString))
5555          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCE);
5556        if ("SubstanceDefinition".equals(codeString))
5557          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCEDEFINITION);
5558        if ("SupplyDelivery".equals(codeString))
5559          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUPPLYDELIVERY);
5560        if ("SupplyRequest".equals(codeString))
5561          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUPPLYREQUEST);
5562        if ("Task".equals(codeString))
5563          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TASK);
5564        if ("TerminologyCapabilities".equals(codeString))
5565          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TERMINOLOGYCAPABILITIES);
5566        if ("TestReport".equals(codeString))
5567          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TESTREPORT);
5568        if ("TestScript".equals(codeString))
5569          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TESTSCRIPT);
5570        if ("ValueSet".equals(codeString))
5571          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VALUESET);
5572        if ("VerificationResult".equals(codeString))
5573          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VERIFICATIONRESULT);
5574        if ("VisionPrescription".equals(codeString))
5575          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VISIONPRESCRIPTION);
5576        if ("Parameters".equals(codeString))
5577          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PARAMETERS);
5578        if ("Type".equals(codeString))
5579          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TYPE);
5580        if ("Any".equals(codeString))
5581          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ANY);
5582        throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'");
5583        }
5584    public String toCode(FHIRAllTypes code) {
5585      if (code == FHIRAllTypes.ADDRESS)
5586        return "Address";
5587      if (code == FHIRAllTypes.AGE)
5588        return "Age";
5589      if (code == FHIRAllTypes.ANNOTATION)
5590        return "Annotation";
5591      if (code == FHIRAllTypes.ATTACHMENT)
5592        return "Attachment";
5593      if (code == FHIRAllTypes.BACKBONEELEMENT)
5594        return "BackboneElement";
5595      if (code == FHIRAllTypes.CODEABLECONCEPT)
5596        return "CodeableConcept";
5597      if (code == FHIRAllTypes.CODEABLEREFERENCE)
5598        return "CodeableReference";
5599      if (code == FHIRAllTypes.CODING)
5600        return "Coding";
5601      if (code == FHIRAllTypes.CONTACTDETAIL)
5602        return "ContactDetail";
5603      if (code == FHIRAllTypes.CONTACTPOINT)
5604        return "ContactPoint";
5605      if (code == FHIRAllTypes.CONTRIBUTOR)
5606        return "Contributor";
5607      if (code == FHIRAllTypes.COUNT)
5608        return "Count";
5609      if (code == FHIRAllTypes.DATAREQUIREMENT)
5610        return "DataRequirement";
5611      if (code == FHIRAllTypes.DATATYPE)
5612        return "DataType";
5613      if (code == FHIRAllTypes.DISTANCE)
5614        return "Distance";
5615      if (code == FHIRAllTypes.DOSAGE)
5616        return "Dosage";
5617      if (code == FHIRAllTypes.DURATION)
5618        return "Duration";
5619      if (code == FHIRAllTypes.ELEMENT)
5620        return "Element";
5621      if (code == FHIRAllTypes.ELEMENTDEFINITION)
5622        return "ElementDefinition";
5623      if (code == FHIRAllTypes.EXPRESSION)
5624        return "Expression";
5625      if (code == FHIRAllTypes.EXTENSION)
5626        return "Extension";
5627      if (code == FHIRAllTypes.HUMANNAME)
5628        return "HumanName";
5629      if (code == FHIRAllTypes.IDENTIFIER)
5630        return "Identifier";
5631      if (code == FHIRAllTypes.MARKETINGSTATUS)
5632        return "MarketingStatus";
5633      if (code == FHIRAllTypes.META)
5634        return "Meta";
5635      if (code == FHIRAllTypes.MONEY)
5636        return "Money";
5637      if (code == FHIRAllTypes.MONEYQUANTITY)
5638        return "MoneyQuantity";
5639      if (code == FHIRAllTypes.NARRATIVE)
5640        return "Narrative";
5641      if (code == FHIRAllTypes.PARAMETERDEFINITION)
5642        return "ParameterDefinition";
5643      if (code == FHIRAllTypes.PERIOD)
5644        return "Period";
5645      if (code == FHIRAllTypes.POPULATION)
5646        return "Population";
5647      if (code == FHIRAllTypes.PRODCHARACTERISTIC)
5648        return "ProdCharacteristic";
5649      if (code == FHIRAllTypes.PRODUCTSHELFLIFE)
5650        return "ProductShelfLife";
5651      if (code == FHIRAllTypes.QUANTITY)
5652        return "Quantity";
5653      if (code == FHIRAllTypes.RANGE)
5654        return "Range";
5655      if (code == FHIRAllTypes.RATIO)
5656        return "Ratio";
5657      if (code == FHIRAllTypes.RATIORANGE)
5658        return "RatioRange";
5659      if (code == FHIRAllTypes.REFERENCE)
5660        return "Reference";
5661      if (code == FHIRAllTypes.RELATEDARTIFACT)
5662        return "RelatedArtifact";
5663      if (code == FHIRAllTypes.SAMPLEDDATA)
5664        return "SampledData";
5665      if (code == FHIRAllTypes.SIGNATURE)
5666        return "Signature";
5667      if (code == FHIRAllTypes.SIMPLEQUANTITY)
5668        return "SimpleQuantity";
5669      if (code == FHIRAllTypes.TIMING)
5670        return "Timing";
5671      if (code == FHIRAllTypes.TRIGGERDEFINITION)
5672        return "TriggerDefinition";
5673      if (code == FHIRAllTypes.USAGECONTEXT)
5674        return "UsageContext";
5675      if (code == FHIRAllTypes.BASE64BINARY)
5676        return "base64Binary";
5677      if (code == FHIRAllTypes.BOOLEAN)
5678        return "boolean";
5679      if (code == FHIRAllTypes.CANONICAL)
5680        return "canonical";
5681      if (code == FHIRAllTypes.CODE)
5682        return "code";
5683      if (code == FHIRAllTypes.DATE)
5684        return "date";
5685      if (code == FHIRAllTypes.DATETIME)
5686        return "dateTime";
5687      if (code == FHIRAllTypes.DECIMAL)
5688        return "decimal";
5689      if (code == FHIRAllTypes.ID)
5690        return "id";
5691      if (code == FHIRAllTypes.INSTANT)
5692        return "instant";
5693      if (code == FHIRAllTypes.INTEGER)
5694        return "integer";
5695      if (code == FHIRAllTypes.MARKDOWN)
5696        return "markdown";
5697      if (code == FHIRAllTypes.OID)
5698        return "oid";
5699      if (code == FHIRAllTypes.POSITIVEINT)
5700        return "positiveInt";
5701      if (code == FHIRAllTypes.STRING)
5702        return "string";
5703      if (code == FHIRAllTypes.TIME)
5704        return "time";
5705      if (code == FHIRAllTypes.UNSIGNEDINT)
5706        return "unsignedInt";
5707      if (code == FHIRAllTypes.URI)
5708        return "uri";
5709      if (code == FHIRAllTypes.URL)
5710        return "url";
5711      if (code == FHIRAllTypes.UUID)
5712        return "uuid";
5713      if (code == FHIRAllTypes.XHTML)
5714        return "xhtml";
5715      if (code == FHIRAllTypes.RESOURCE)
5716        return "Resource";
5717      if (code == FHIRAllTypes.BINARY)
5718        return "Binary";
5719      if (code == FHIRAllTypes.BUNDLE)
5720        return "Bundle";
5721      if (code == FHIRAllTypes.DOMAINRESOURCE)
5722        return "DomainResource";
5723      if (code == FHIRAllTypes.ACCOUNT)
5724        return "Account";
5725      if (code == FHIRAllTypes.ACTIVITYDEFINITION)
5726        return "ActivityDefinition";
5727      if (code == FHIRAllTypes.ADMINISTRABLEPRODUCTDEFINITION)
5728        return "AdministrableProductDefinition";
5729      if (code == FHIRAllTypes.ADVERSEEVENT)
5730        return "AdverseEvent";
5731      if (code == FHIRAllTypes.ALLERGYINTOLERANCE)
5732        return "AllergyIntolerance";
5733      if (code == FHIRAllTypes.APPOINTMENT)
5734        return "Appointment";
5735      if (code == FHIRAllTypes.APPOINTMENTRESPONSE)
5736        return "AppointmentResponse";
5737      if (code == FHIRAllTypes.AUDITEVENT)
5738        return "AuditEvent";
5739      if (code == FHIRAllTypes.BASIC)
5740        return "Basic";
5741      if (code == FHIRAllTypes.BIOLOGICALLYDERIVEDPRODUCT)
5742        return "BiologicallyDerivedProduct";
5743      if (code == FHIRAllTypes.BODYSTRUCTURE)
5744        return "BodyStructure";
5745      if (code == FHIRAllTypes.CAPABILITYSTATEMENT)
5746        return "CapabilityStatement";
5747      if (code == FHIRAllTypes.CAREPLAN)
5748        return "CarePlan";
5749      if (code == FHIRAllTypes.CARETEAM)
5750        return "CareTeam";
5751      if (code == FHIRAllTypes.CATALOGENTRY)
5752        return "CatalogEntry";
5753      if (code == FHIRAllTypes.CHARGEITEM)
5754        return "ChargeItem";
5755      if (code == FHIRAllTypes.CHARGEITEMDEFINITION)
5756        return "ChargeItemDefinition";
5757      if (code == FHIRAllTypes.CITATION)
5758        return "Citation";
5759      if (code == FHIRAllTypes.CLAIM)
5760        return "Claim";
5761      if (code == FHIRAllTypes.CLAIMRESPONSE)
5762        return "ClaimResponse";
5763      if (code == FHIRAllTypes.CLINICALIMPRESSION)
5764        return "ClinicalImpression";
5765      if (code == FHIRAllTypes.CLINICALUSEDEFINITION)
5766        return "ClinicalUseDefinition";
5767      if (code == FHIRAllTypes.CODESYSTEM)
5768        return "CodeSystem";
5769      if (code == FHIRAllTypes.COMMUNICATION)
5770        return "Communication";
5771      if (code == FHIRAllTypes.COMMUNICATIONREQUEST)
5772        return "CommunicationRequest";
5773      if (code == FHIRAllTypes.COMPARTMENTDEFINITION)
5774        return "CompartmentDefinition";
5775      if (code == FHIRAllTypes.COMPOSITION)
5776        return "Composition";
5777      if (code == FHIRAllTypes.CONCEPTMAP)
5778        return "ConceptMap";
5779      if (code == FHIRAllTypes.CONDITION)
5780        return "Condition";
5781      if (code == FHIRAllTypes.CONSENT)
5782        return "Consent";
5783      if (code == FHIRAllTypes.CONTRACT)
5784        return "Contract";
5785      if (code == FHIRAllTypes.COVERAGE)
5786        return "Coverage";
5787      if (code == FHIRAllTypes.COVERAGEELIGIBILITYREQUEST)
5788        return "CoverageEligibilityRequest";
5789      if (code == FHIRAllTypes.COVERAGEELIGIBILITYRESPONSE)
5790        return "CoverageEligibilityResponse";
5791      if (code == FHIRAllTypes.DETECTEDISSUE)
5792        return "DetectedIssue";
5793      if (code == FHIRAllTypes.DEVICE)
5794        return "Device";
5795      if (code == FHIRAllTypes.DEVICEDEFINITION)
5796        return "DeviceDefinition";
5797      if (code == FHIRAllTypes.DEVICEMETRIC)
5798        return "DeviceMetric";
5799      if (code == FHIRAllTypes.DEVICEREQUEST)
5800        return "DeviceRequest";
5801      if (code == FHIRAllTypes.DEVICEUSESTATEMENT)
5802        return "DeviceUseStatement";
5803      if (code == FHIRAllTypes.DIAGNOSTICREPORT)
5804        return "DiagnosticReport";
5805      if (code == FHIRAllTypes.DOCUMENTMANIFEST)
5806        return "DocumentManifest";
5807      if (code == FHIRAllTypes.DOCUMENTREFERENCE)
5808        return "DocumentReference";
5809      if (code == FHIRAllTypes.ENCOUNTER)
5810        return "Encounter";
5811      if (code == FHIRAllTypes.ENDPOINT)
5812        return "Endpoint";
5813      if (code == FHIRAllTypes.ENROLLMENTREQUEST)
5814        return "EnrollmentRequest";
5815      if (code == FHIRAllTypes.ENROLLMENTRESPONSE)
5816        return "EnrollmentResponse";
5817      if (code == FHIRAllTypes.EPISODEOFCARE)
5818        return "EpisodeOfCare";
5819      if (code == FHIRAllTypes.EVENTDEFINITION)
5820        return "EventDefinition";
5821      if (code == FHIRAllTypes.EVIDENCE)
5822        return "Evidence";
5823      if (code == FHIRAllTypes.EVIDENCEREPORT)
5824        return "EvidenceReport";
5825      if (code == FHIRAllTypes.EVIDENCEVARIABLE)
5826        return "EvidenceVariable";
5827      if (code == FHIRAllTypes.EXAMPLESCENARIO)
5828        return "ExampleScenario";
5829      if (code == FHIRAllTypes.EXPLANATIONOFBENEFIT)
5830        return "ExplanationOfBenefit";
5831      if (code == FHIRAllTypes.FAMILYMEMBERHISTORY)
5832        return "FamilyMemberHistory";
5833      if (code == FHIRAllTypes.FLAG)
5834        return "Flag";
5835      if (code == FHIRAllTypes.GOAL)
5836        return "Goal";
5837      if (code == FHIRAllTypes.GRAPHDEFINITION)
5838        return "GraphDefinition";
5839      if (code == FHIRAllTypes.GROUP)
5840        return "Group";
5841      if (code == FHIRAllTypes.GUIDANCERESPONSE)
5842        return "GuidanceResponse";
5843      if (code == FHIRAllTypes.HEALTHCARESERVICE)
5844        return "HealthcareService";
5845      if (code == FHIRAllTypes.IMAGINGSTUDY)
5846        return "ImagingStudy";
5847      if (code == FHIRAllTypes.IMMUNIZATION)
5848        return "Immunization";
5849      if (code == FHIRAllTypes.IMMUNIZATIONEVALUATION)
5850        return "ImmunizationEvaluation";
5851      if (code == FHIRAllTypes.IMMUNIZATIONRECOMMENDATION)
5852        return "ImmunizationRecommendation";
5853      if (code == FHIRAllTypes.IMPLEMENTATIONGUIDE)
5854        return "ImplementationGuide";
5855      if (code == FHIRAllTypes.INGREDIENT)
5856        return "Ingredient";
5857      if (code == FHIRAllTypes.INSURANCEPLAN)
5858        return "InsurancePlan";
5859      if (code == FHIRAllTypes.INVOICE)
5860        return "Invoice";
5861      if (code == FHIRAllTypes.LIBRARY)
5862        return "Library";
5863      if (code == FHIRAllTypes.LINKAGE)
5864        return "Linkage";
5865      if (code == FHIRAllTypes.LIST)
5866        return "List";
5867      if (code == FHIRAllTypes.LOCATION)
5868        return "Location";
5869      if (code == FHIRAllTypes.MANUFACTUREDITEMDEFINITION)
5870        return "ManufacturedItemDefinition";
5871      if (code == FHIRAllTypes.MEASURE)
5872        return "Measure";
5873      if (code == FHIRAllTypes.MEASUREREPORT)
5874        return "MeasureReport";
5875      if (code == FHIRAllTypes.MEDIA)
5876        return "Media";
5877      if (code == FHIRAllTypes.MEDICATION)
5878        return "Medication";
5879      if (code == FHIRAllTypes.MEDICATIONADMINISTRATION)
5880        return "MedicationAdministration";
5881      if (code == FHIRAllTypes.MEDICATIONDISPENSE)
5882        return "MedicationDispense";
5883      if (code == FHIRAllTypes.MEDICATIONKNOWLEDGE)
5884        return "MedicationKnowledge";
5885      if (code == FHIRAllTypes.MEDICATIONREQUEST)
5886        return "MedicationRequest";
5887      if (code == FHIRAllTypes.MEDICATIONSTATEMENT)
5888        return "MedicationStatement";
5889      if (code == FHIRAllTypes.MEDICINALPRODUCTDEFINITION)
5890        return "MedicinalProductDefinition";
5891      if (code == FHIRAllTypes.MESSAGEDEFINITION)
5892        return "MessageDefinition";
5893      if (code == FHIRAllTypes.MESSAGEHEADER)
5894        return "MessageHeader";
5895      if (code == FHIRAllTypes.MOLECULARSEQUENCE)
5896        return "MolecularSequence";
5897      if (code == FHIRAllTypes.NAMINGSYSTEM)
5898        return "NamingSystem";
5899      if (code == FHIRAllTypes.NUTRITIONORDER)
5900        return "NutritionOrder";
5901      if (code == FHIRAllTypes.NUTRITIONPRODUCT)
5902        return "NutritionProduct";
5903      if (code == FHIRAllTypes.OBSERVATION)
5904        return "Observation";
5905      if (code == FHIRAllTypes.OBSERVATIONDEFINITION)
5906        return "ObservationDefinition";
5907      if (code == FHIRAllTypes.OPERATIONDEFINITION)
5908        return "OperationDefinition";
5909      if (code == FHIRAllTypes.OPERATIONOUTCOME)
5910        return "OperationOutcome";
5911      if (code == FHIRAllTypes.ORGANIZATION)
5912        return "Organization";
5913      if (code == FHIRAllTypes.ORGANIZATIONAFFILIATION)
5914        return "OrganizationAffiliation";
5915      if (code == FHIRAllTypes.PACKAGEDPRODUCTDEFINITION)
5916        return "PackagedProductDefinition";
5917      if (code == FHIRAllTypes.PATIENT)
5918        return "Patient";
5919      if (code == FHIRAllTypes.PAYMENTNOTICE)
5920        return "PaymentNotice";
5921      if (code == FHIRAllTypes.PAYMENTRECONCILIATION)
5922        return "PaymentReconciliation";
5923      if (code == FHIRAllTypes.PERSON)
5924        return "Person";
5925      if (code == FHIRAllTypes.PLANDEFINITION)
5926        return "PlanDefinition";
5927      if (code == FHIRAllTypes.PRACTITIONER)
5928        return "Practitioner";
5929      if (code == FHIRAllTypes.PRACTITIONERROLE)
5930        return "PractitionerRole";
5931      if (code == FHIRAllTypes.PROCEDURE)
5932        return "Procedure";
5933      if (code == FHIRAllTypes.PROVENANCE)
5934        return "Provenance";
5935      if (code == FHIRAllTypes.QUESTIONNAIRE)
5936        return "Questionnaire";
5937      if (code == FHIRAllTypes.QUESTIONNAIRERESPONSE)
5938        return "QuestionnaireResponse";
5939      if (code == FHIRAllTypes.REGULATEDAUTHORIZATION)
5940        return "RegulatedAuthorization";
5941      if (code == FHIRAllTypes.RELATEDPERSON)
5942        return "RelatedPerson";
5943      if (code == FHIRAllTypes.REQUESTGROUP)
5944        return "RequestGroup";
5945      if (code == FHIRAllTypes.RESEARCHDEFINITION)
5946        return "ResearchDefinition";
5947      if (code == FHIRAllTypes.RESEARCHELEMENTDEFINITION)
5948        return "ResearchElementDefinition";
5949      if (code == FHIRAllTypes.RESEARCHSTUDY)
5950        return "ResearchStudy";
5951      if (code == FHIRAllTypes.RESEARCHSUBJECT)
5952        return "ResearchSubject";
5953      if (code == FHIRAllTypes.RISKASSESSMENT)
5954        return "RiskAssessment";
5955      if (code == FHIRAllTypes.SCHEDULE)
5956        return "Schedule";
5957      if (code == FHIRAllTypes.SEARCHPARAMETER)
5958        return "SearchParameter";
5959      if (code == FHIRAllTypes.SERVICEREQUEST)
5960        return "ServiceRequest";
5961      if (code == FHIRAllTypes.SLOT)
5962        return "Slot";
5963      if (code == FHIRAllTypes.SPECIMEN)
5964        return "Specimen";
5965      if (code == FHIRAllTypes.SPECIMENDEFINITION)
5966        return "SpecimenDefinition";
5967      if (code == FHIRAllTypes.STRUCTUREDEFINITION)
5968        return "StructureDefinition";
5969      if (code == FHIRAllTypes.STRUCTUREMAP)
5970        return "StructureMap";
5971      if (code == FHIRAllTypes.SUBSCRIPTION)
5972        return "Subscription";
5973      if (code == FHIRAllTypes.SUBSCRIPTIONSTATUS)
5974        return "SubscriptionStatus";
5975      if (code == FHIRAllTypes.SUBSCRIPTIONTOPIC)
5976        return "SubscriptionTopic";
5977      if (code == FHIRAllTypes.SUBSTANCE)
5978        return "Substance";
5979      if (code == FHIRAllTypes.SUBSTANCEDEFINITION)
5980        return "SubstanceDefinition";
5981      if (code == FHIRAllTypes.SUPPLYDELIVERY)
5982        return "SupplyDelivery";
5983      if (code == FHIRAllTypes.SUPPLYREQUEST)
5984        return "SupplyRequest";
5985      if (code == FHIRAllTypes.TASK)
5986        return "Task";
5987      if (code == FHIRAllTypes.TERMINOLOGYCAPABILITIES)
5988        return "TerminologyCapabilities";
5989      if (code == FHIRAllTypes.TESTREPORT)
5990        return "TestReport";
5991      if (code == FHIRAllTypes.TESTSCRIPT)
5992        return "TestScript";
5993      if (code == FHIRAllTypes.VALUESET)
5994        return "ValueSet";
5995      if (code == FHIRAllTypes.VERIFICATIONRESULT)
5996        return "VerificationResult";
5997      if (code == FHIRAllTypes.VISIONPRESCRIPTION)
5998        return "VisionPrescription";
5999      if (code == FHIRAllTypes.PARAMETERS)
6000        return "Parameters";
6001      if (code == FHIRAllTypes.TYPE)
6002        return "Type";
6003      if (code == FHIRAllTypes.ANY)
6004        return "Any";
6005      return "?";
6006      }
6007    public String toSystem(FHIRAllTypes code) {
6008      return code.getSystem();
6009      }
6010    }
6011
6012    public enum FHIRVersion {
6013        /**
6014         * Oldest archived version of FHIR.
6015         */
6016        _0_01, 
6017        /**
6018         * 1st Draft for Comment (Sept 2012 Ballot).
6019         */
6020        _0_05, 
6021        /**
6022         * 2nd Draft for Comment (January 2013 Ballot).
6023         */
6024        _0_06, 
6025        /**
6026         * DSTU 1 Ballot version.
6027         */
6028        _0_11, 
6029        /**
6030         * DSTU 1 Official version.
6031         */
6032        _0_0_80, 
6033        /**
6034         * DSTU 1 Official version Technical Errata #1.
6035         */
6036        _0_0_81, 
6037        /**
6038         * DSTU 1 Official version Technical Errata #2.
6039         */
6040        _0_0_82, 
6041        /**
6042         * Draft For Comment (January 2015 Ballot).
6043         */
6044        _0_4_0, 
6045        /**
6046         * DSTU 2 Ballot version (May 2015 Ballot).
6047         */
6048        _0_5_0, 
6049        /**
6050         * DSTU 2 QA Preview + CQIF Ballot (Sep 2015).
6051         */
6052        _1_0_0, 
6053        /**
6054         * DSTU 2 (Official version).
6055         */
6056        _1_0_1, 
6057        /**
6058         * DSTU 2 (Official version) with 1 technical errata.
6059         */
6060        _1_0_2, 
6061        /**
6062         * GAO Ballot + draft changes to main FHIR standard.
6063         */
6064        _1_1_0, 
6065        /**
6066         * CQF on FHIR Ballot + Connectathon 12 (Montreal).
6067         */
6068        _1_4_0, 
6069        /**
6070         * FHIR STU3 Ballot + Connectathon 13 (Baltimore).
6071         */
6072        _1_6_0, 
6073        /**
6074         * FHIR STU3 Candidate + Connectathon 14 (San Antonio).
6075         */
6076        _1_8_0, 
6077        /**
6078         * FHIR Release 3 (STU).
6079         */
6080        _3_0_0, 
6081        /**
6082         * FHIR Release 3 (STU) with 1 technical errata.
6083         */
6084        _3_0_1, 
6085        _3_0_2, 
6086        /**
6087         * R4 Ballot #1.
6088         */
6089        _3_3_0, 
6090        /**
6091         * R4 Ballot #2.
6092         */
6093        _3_5_0, 
6094        /**
6095         * FHIR Release 4 (Normative + STU).
6096         */
6097        _4_0_0, 
6098        /**
6099         * FHIR Release 4 Technical Correction.
6100         */
6101        _4_0_1, 
6102        /**
6103         * FHIR Release 4B Ballot #1.
6104         */
6105        _4_1_0, 
6106        _4_2_0, 
6107        /**
6108         * FHIR Release 4B Snapshot #1.
6109         */
6110        _4_3_0SNAPSHOT1, 
6111        /**
6112         * FHIR Release 4B CI-Build.
6113         */
6114        _4_3_0CIBUILD, 
6115        /**
6116         * added to help the parsers
6117         */
6118        NULL;
6119        public static FHIRVersion fromCode(String codeString) throws FHIRException {
6120            if (codeString == null || "".equals(codeString))
6121                return null;
6122        if ("0.01".equals(codeString))
6123          return _0_01;
6124        if ("0.05".equals(codeString))
6125          return _0_05;
6126        if ("0.06".equals(codeString))
6127          return _0_06;
6128        if ("0.11".equals(codeString))
6129          return _0_11;
6130        if ("0.0.80".equals(codeString))
6131          return _0_0_80;
6132        if ("0.0.81".equals(codeString))
6133          return _0_0_81;
6134        if ("0.0.82".equals(codeString))
6135          return _0_0_82;
6136        if ("0.4.0".equals(codeString))
6137          return _0_4_0;
6138        if ("0.5.0".equals(codeString))
6139          return _0_5_0;
6140        if ("1.0.0".equals(codeString))
6141          return _1_0_0;
6142        if ("1.0.1".equals(codeString))
6143          return _1_0_1;
6144        if ("1.0.2".equals(codeString))
6145          return _1_0_2;
6146        if ("1.1.0".equals(codeString))
6147          return _1_1_0;
6148        if ("1.4.0".equals(codeString))
6149          return _1_4_0;
6150        if ("1.6.0".equals(codeString))
6151          return _1_6_0;
6152        if ("1.8.0".equals(codeString))
6153          return _1_8_0;
6154        if ("3.0.0".equals(codeString))
6155          return _3_0_0;
6156        if ("3.0.1".equals(codeString))
6157          return _3_0_1;
6158        if ("3.0.2".equals(codeString))
6159          return _3_0_2;
6160        if ("3.3.0".equals(codeString))
6161          return _3_3_0;
6162        if ("3.5.0".equals(codeString))
6163          return _3_5_0;
6164        if ("4.0.0".equals(codeString))
6165          return _4_0_0;
6166        if ("4.0.1".equals(codeString))
6167          return _4_0_1;
6168        if ("4.1.0".equals(codeString))
6169          return _4_1_0;
6170        if ("4.2.0".equals(codeString))
6171          return _4_2_0;
6172        if ("4.3.0-snapshot1".equals(codeString))
6173          return _4_3_0SNAPSHOT1;
6174        if ("4.3.0-cibuild".equals(codeString))
6175          return _4_3_0CIBUILD;
6176        throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'");
6177        }
6178        public String toCode() {
6179          switch (this) {
6180            case _0_01: return "0.01";
6181            case _0_05: return "0.05";
6182            case _0_06: return "0.06";
6183            case _0_11: return "0.11";
6184            case _0_0_80: return "0.0.80";
6185            case _0_0_81: return "0.0.81";
6186            case _0_0_82: return "0.0.82";
6187            case _0_4_0: return "0.4.0";
6188            case _0_5_0: return "0.5.0";
6189            case _1_0_0: return "1.0.0";
6190            case _1_0_1: return "1.0.1";
6191            case _1_0_2: return "1.0.2";
6192            case _1_1_0: return "1.1.0";
6193            case _1_4_0: return "1.4.0";
6194            case _1_6_0: return "1.6.0";
6195            case _1_8_0: return "1.8.0";
6196            case _3_0_0: return "3.0.0";
6197            case _3_0_1: return "3.0.1";
6198            case _3_0_2: return "3.0.2";
6199            case _3_3_0: return "3.3.0";
6200            case _3_5_0: return "3.5.0";
6201            case _4_0_0: return "4.0.0";
6202            case _4_0_1: return "4.0.1";
6203            case _4_1_0: return "4.1.0";
6204            case _4_2_0: return "4.2.0";
6205            case _4_3_0SNAPSHOT1: return "4.3.0-snapshot1";
6206            case _4_3_0CIBUILD: return "4.3.0-cibuild";
6207            case NULL: return null;
6208            default: return "?";
6209          }
6210        }
6211        public String getSystem() {
6212          switch (this) {
6213            case _0_01: return "http://hl7.org/fhir/FHIR-version";
6214            case _0_05: return "http://hl7.org/fhir/FHIR-version";
6215            case _0_06: return "http://hl7.org/fhir/FHIR-version";
6216            case _0_11: return "http://hl7.org/fhir/FHIR-version";
6217            case _0_0_80: return "http://hl7.org/fhir/FHIR-version";
6218            case _0_0_81: return "http://hl7.org/fhir/FHIR-version";
6219            case _0_0_82: return "http://hl7.org/fhir/FHIR-version";
6220            case _0_4_0: return "http://hl7.org/fhir/FHIR-version";
6221            case _0_5_0: return "http://hl7.org/fhir/FHIR-version";
6222            case _1_0_0: return "http://hl7.org/fhir/FHIR-version";
6223            case _1_0_1: return "http://hl7.org/fhir/FHIR-version";
6224            case _1_0_2: return "http://hl7.org/fhir/FHIR-version";
6225            case _1_1_0: return "http://hl7.org/fhir/FHIR-version";
6226            case _1_4_0: return "http://hl7.org/fhir/FHIR-version";
6227            case _1_6_0: return "http://hl7.org/fhir/FHIR-version";
6228            case _1_8_0: return "http://hl7.org/fhir/FHIR-version";
6229            case _3_0_0: return "http://hl7.org/fhir/FHIR-version";
6230            case _3_0_1: return "http://hl7.org/fhir/FHIR-version";
6231            case _3_0_2: return "http://hl7.org/fhir/FHIR-version";
6232            case _3_3_0: return "http://hl7.org/fhir/FHIR-version";
6233            case _3_5_0: return "http://hl7.org/fhir/FHIR-version";
6234            case _4_0_0: return "http://hl7.org/fhir/FHIR-version";
6235            case _4_0_1: return "http://hl7.org/fhir/FHIR-version";
6236            case _4_1_0: return "http://hl7.org/fhir/FHIR-version";
6237            case _4_2_0: return "http://hl7.org/fhir/FHIR-version";
6238            case _4_3_0SNAPSHOT1: return "http://hl7.org/fhir/FHIR-version";
6239            case _4_3_0CIBUILD: return "http://hl7.org/fhir/FHIR-version";
6240            case NULL: return null;
6241            default: return "?";
6242          }
6243        }
6244        public String getDefinition() {
6245          switch (this) {
6246            case _0_01: return "Oldest archived version of FHIR.";
6247            case _0_05: return "1st Draft for Comment (Sept 2012 Ballot).";
6248            case _0_06: return "2nd Draft for Comment (January 2013 Ballot).";
6249            case _0_11: return "DSTU 1 Ballot version.";
6250            case _0_0_80: return "DSTU 1 Official version.";
6251            case _0_0_81: return "DSTU 1 Official version Technical Errata #1.";
6252            case _0_0_82: return "DSTU 1 Official version Technical Errata #2.";
6253            case _0_4_0: return "Draft For Comment (January 2015 Ballot).";
6254            case _0_5_0: return "DSTU 2 Ballot version (May 2015 Ballot).";
6255            case _1_0_0: return "DSTU 2 QA Preview + CQIF Ballot (Sep 2015).";
6256            case _1_0_1: return "DSTU 2 (Official version).";
6257            case _1_0_2: return "DSTU 2 (Official version) with 1 technical errata.";
6258            case _1_1_0: return "GAO Ballot + draft changes to main FHIR standard.";
6259            case _1_4_0: return "CQF on FHIR Ballot + Connectathon 12 (Montreal).";
6260            case _1_6_0: return "FHIR STU3 Ballot + Connectathon 13 (Baltimore).";
6261            case _1_8_0: return "FHIR STU3 Candidate + Connectathon 14 (San Antonio).";
6262            case _3_0_0: return "FHIR Release 3 (STU).";
6263            case _3_0_1: return "FHIR Release 3 (STU) with 1 technical errata.";
6264            case _3_0_2: return "FHIR Release 3 (STU) with 2 technical errata.";
6265            case _3_3_0: return "R4 Ballot #1.";
6266            case _3_5_0: return "R4 Ballot #2.";
6267            case _4_0_0: return "FHIR Release 4 (Normative + STU).";
6268            case _4_0_1: return "FHIR Release 4 Technical Correction.";
6269            case _4_1_0: return "FHIR Release 4B Ballot #1.";
6270            case _4_2_0: return "FHIR Release 5 Draft #1.";
6271            case _4_3_0SNAPSHOT1: return "FHIR Release 4B Snapshot #1.";
6272            case _4_3_0CIBUILD: return "FHIR Release 4B CI-Build.";
6273            case NULL: return null;
6274            default: return "?";
6275          }
6276        }
6277        public String getDisplay() {
6278          switch (this) {
6279            case _0_01: return "0.01";
6280            case _0_05: return "0.05";
6281            case _0_06: return "0.06";
6282            case _0_11: return "0.11";
6283            case _0_0_80: return "0.0.80";
6284            case _0_0_81: return "0.0.81";
6285            case _0_0_82: return "0.0.82";
6286            case _0_4_0: return "0.4.0";
6287            case _0_5_0: return "0.5.0";
6288            case _1_0_0: return "1.0.0";
6289            case _1_0_1: return "1.0.1";
6290            case _1_0_2: return "1.0.2";
6291            case _1_1_0: return "1.1.0";
6292            case _1_4_0: return "1.4.0";
6293            case _1_6_0: return "1.6.0";
6294            case _1_8_0: return "1.8.0";
6295            case _3_0_0: return "3.0.0";
6296            case _3_0_1: return "3.0.1";
6297            case _3_0_2: return "3.0.2";
6298            case _3_3_0: return "3.3.0";
6299            case _3_5_0: return "3.5.0";
6300            case _4_0_0: return "4.0.0";
6301            case _4_0_1: return "4.0.1";
6302            case _4_1_0: return "4.1.0";
6303            case _4_2_0: return "4.2.0";
6304            case _4_3_0SNAPSHOT1: return "4.3.0-snapshot1";
6305            case _4_3_0CIBUILD: return "4.3.0-cibuild";
6306            case NULL: return null;
6307            default: return "?";
6308          }
6309        }
6310// manual code from configuration.txt:
6311public String toCode(int len) {
6312          return toCode().substring(0, len);
6313        }
6314
6315        public static boolean isR4Plus(String version) {
6316           return version != null && (version.startsWith("4.") || version.startsWith("5.") || "current".equals(version));
6317        }
6318        
6319       public static boolean isValidCode(String codeString) {
6320          if (codeString == null || "".equals(codeString))
6321              return false;
6322      if ("0.01".equals(codeString))
6323        return true;
6324      if ("0.05".equals(codeString))
6325        return true;
6326      if ("0.06".equals(codeString))
6327        return true;
6328      if ("0.11".equals(codeString))
6329        return true;
6330      if ("0.0.80".equals(codeString))
6331        return true;
6332      if ("0.0.81".equals(codeString))
6333        return true;
6334      if ("0.0.82".equals(codeString))
6335        return true;
6336      if ("0.4.0".equals(codeString))
6337        return true;
6338      if ("0.5.0".equals(codeString))
6339        return true;
6340      if ("1.0.0".equals(codeString))
6341        return true;
6342      if ("1.0.1".equals(codeString))
6343        return true;
6344      if ("1.0.2".equals(codeString))
6345        return true;
6346      if ("1.1.0".equals(codeString))
6347        return true;
6348      if ("1.4.0".equals(codeString))
6349        return true;
6350      if ("1.6.0".equals(codeString))
6351        return true;
6352      if ("1.8.0".equals(codeString))
6353        return true;
6354      if ("3.0.0".equals(codeString))
6355        return true;
6356      if ("3.0.1".equals(codeString))
6357        return true;
6358      if ("3.3.0".equals(codeString))
6359        return true;
6360      if ("3.5.0".equals(codeString))
6361        return true;
6362      if ("4.0.0".equals(codeString))
6363        return true;
6364      if ("4.2.0".equals(codeString))
6365        return true;
6366      return false;
6367      }
6368
6369        @Override
6370        public String toString() {
6371          return toCode();
6372        }
6373        
6374        
6375        public boolean isR4B() {
6376          return toCode().startsWith("4.1");
6377        }
6378        
6379// end addition
6380    }
6381
6382  public static class FHIRVersionEnumFactory implements EnumFactory<FHIRVersion> {
6383    public FHIRVersion fromCode(String codeString) throws IllegalArgumentException {
6384      if (codeString == null || "".equals(codeString))
6385            if (codeString == null || "".equals(codeString))
6386                return null;
6387        if ("0.01".equals(codeString))
6388          return FHIRVersion._0_01;
6389        if ("0.05".equals(codeString))
6390          return FHIRVersion._0_05;
6391        if ("0.06".equals(codeString))
6392          return FHIRVersion._0_06;
6393        if ("0.11".equals(codeString))
6394          return FHIRVersion._0_11;
6395        if ("0.0.80".equals(codeString))
6396          return FHIRVersion._0_0_80;
6397        if ("0.0.81".equals(codeString))
6398          return FHIRVersion._0_0_81;
6399        if ("0.0.82".equals(codeString))
6400          return FHIRVersion._0_0_82;
6401        if ("0.4.0".equals(codeString))
6402          return FHIRVersion._0_4_0;
6403        if ("0.5.0".equals(codeString))
6404          return FHIRVersion._0_5_0;
6405        if ("1.0.0".equals(codeString))
6406          return FHIRVersion._1_0_0;
6407        if ("1.0.1".equals(codeString))
6408          return FHIRVersion._1_0_1;
6409        if ("1.0.2".equals(codeString))
6410          return FHIRVersion._1_0_2;
6411        if ("1.1.0".equals(codeString))
6412          return FHIRVersion._1_1_0;
6413        if ("1.4.0".equals(codeString))
6414          return FHIRVersion._1_4_0;
6415        if ("1.6.0".equals(codeString))
6416          return FHIRVersion._1_6_0;
6417        if ("1.8.0".equals(codeString))
6418          return FHIRVersion._1_8_0;
6419        if ("3.0.0".equals(codeString))
6420          return FHIRVersion._3_0_0;
6421        if ("3.0.1".equals(codeString))
6422          return FHIRVersion._3_0_1;
6423        if ("3.0.2".equals(codeString))
6424          return FHIRVersion._3_0_2;
6425        if ("3.3.0".equals(codeString))
6426          return FHIRVersion._3_3_0;
6427        if ("3.5.0".equals(codeString))
6428          return FHIRVersion._3_5_0;
6429        if ("4.0.0".equals(codeString))
6430          return FHIRVersion._4_0_0;
6431        if ("4.0.1".equals(codeString))
6432          return FHIRVersion._4_0_1;
6433        if ("4.1.0".equals(codeString))
6434          return FHIRVersion._4_1_0;
6435        if ("4.2.0".equals(codeString))
6436          return FHIRVersion._4_2_0;
6437        if ("4.3.0-snapshot1".equals(codeString))
6438          return FHIRVersion._4_3_0SNAPSHOT1;
6439        if ("4.3.0-cibuild".equals(codeString))
6440          return FHIRVersion._4_3_0CIBUILD;
6441        throw new IllegalArgumentException("Unknown FHIRVersion code '"+codeString+"'");
6442        }
6443        public Enumeration<FHIRVersion> fromType(Base code) throws FHIRException {
6444          if (code == null)
6445            return null;
6446          if (code.isEmpty())
6447            return new Enumeration<FHIRVersion>(this);
6448          String codeString = ((PrimitiveType) code).asStringValue();
6449          if (codeString == null || "".equals(codeString))
6450            return null;
6451        if ("0.01".equals(codeString))
6452          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_01);
6453        if ("0.05".equals(codeString))
6454          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_05);
6455        if ("0.06".equals(codeString))
6456          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_06);
6457        if ("0.11".equals(codeString))
6458          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_11);
6459        if ("0.0.80".equals(codeString))
6460          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_80);
6461        if ("0.0.81".equals(codeString))
6462          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_81);
6463        if ("0.0.82".equals(codeString))
6464          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_82);
6465        if ("0.4.0".equals(codeString))
6466          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_4_0);
6467        if ("0.5.0".equals(codeString))
6468          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_5_0);
6469        if ("1.0.0".equals(codeString))
6470          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_0);
6471        if ("1.0.1".equals(codeString))
6472          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_1);
6473        if ("1.0.2".equals(codeString))
6474          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_2);
6475        if ("1.1.0".equals(codeString))
6476          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_1_0);
6477        if ("1.4.0".equals(codeString))
6478          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_4_0);
6479        if ("1.6.0".equals(codeString))
6480          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_6_0);
6481        if ("1.8.0".equals(codeString))
6482          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_8_0);
6483        if ("3.0.0".equals(codeString))
6484          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_0);
6485        if ("3.0.1".equals(codeString))
6486          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_1);
6487        if ("3.0.2".equals(codeString))
6488          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_2);
6489        if ("3.3.0".equals(codeString))
6490          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_3_0);
6491        if ("3.5.0".equals(codeString))
6492          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_5_0);
6493        if ("4.0.0".equals(codeString))
6494          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_0_0);
6495        if ("4.0.1".equals(codeString))
6496          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_0_1);
6497        if ("4.1.0".equals(codeString))
6498          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_1_0);
6499        if ("4.2.0".equals(codeString))
6500          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_2_0);
6501        if ("4.3.0-snapshot1".equals(codeString))
6502          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3_0SNAPSHOT1);
6503        if ("4.3.0-cibuild".equals(codeString))
6504          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3_0CIBUILD);
6505        throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'");
6506        }
6507    public String toCode(FHIRVersion code) {
6508      if (code == FHIRVersion._0_01)
6509        return "0.01";
6510      if (code == FHIRVersion._0_05)
6511        return "0.05";
6512      if (code == FHIRVersion._0_06)
6513        return "0.06";
6514      if (code == FHIRVersion._0_11)
6515        return "0.11";
6516      if (code == FHIRVersion._0_0_80)
6517        return "0.0.80";
6518      if (code == FHIRVersion._0_0_81)
6519        return "0.0.81";
6520      if (code == FHIRVersion._0_0_82)
6521        return "0.0.82";
6522      if (code == FHIRVersion._0_4_0)
6523        return "0.4.0";
6524      if (code == FHIRVersion._0_5_0)
6525        return "0.5.0";
6526      if (code == FHIRVersion._1_0_0)
6527        return "1.0.0";
6528      if (code == FHIRVersion._1_0_1)
6529        return "1.0.1";
6530      if (code == FHIRVersion._1_0_2)
6531        return "1.0.2";
6532      if (code == FHIRVersion._1_1_0)
6533        return "1.1.0";
6534      if (code == FHIRVersion._1_4_0)
6535        return "1.4.0";
6536      if (code == FHIRVersion._1_6_0)
6537        return "1.6.0";
6538      if (code == FHIRVersion._1_8_0)
6539        return "1.8.0";
6540      if (code == FHIRVersion._3_0_0)
6541        return "3.0.0";
6542      if (code == FHIRVersion._3_0_1)
6543        return "3.0.1";
6544      if (code == FHIRVersion._3_0_2)
6545        return "3.0.2";
6546      if (code == FHIRVersion._3_3_0)
6547        return "3.3.0";
6548      if (code == FHIRVersion._3_5_0)
6549        return "3.5.0";
6550      if (code == FHIRVersion._4_0_0)
6551        return "4.0.0";
6552      if (code == FHIRVersion._4_0_1)
6553        return "4.0.1";
6554      if (code == FHIRVersion._4_1_0)
6555        return "4.1.0";
6556      if (code == FHIRVersion._4_2_0)
6557        return "4.2.0";
6558      if (code == FHIRVersion._4_3_0SNAPSHOT1)
6559        return "4.3.0-snapshot1";
6560      if (code == FHIRVersion._4_3_0CIBUILD)
6561        return "4.3.0-cibuild";
6562      return "?";
6563      }
6564    public String toSystem(FHIRVersion code) {
6565      return code.getSystem();
6566      }
6567    }
6568
6569    public enum FilterOperator {
6570        /**
6571         * The specified property of the code equals the provided value.
6572         */
6573        EQUAL, 
6574        /**
6575         * Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, including the provided concept itself (include descendant codes and self).
6576         */
6577        ISA, 
6578        /**
6579         * Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, excluding the provided concept itself i.e. include descendant codes only).
6580         */
6581        DESCENDENTOF, 
6582        /**
6583         * The specified property of the code does not have an is-a relationship with the provided value.
6584         */
6585        ISNOTA, 
6586        /**
6587         * The specified property of the code  matches the regex specified in the provided value.
6588         */
6589        REGEX, 
6590        /**
6591         * The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list).
6592         */
6593        IN, 
6594        /**
6595         * The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list).
6596         */
6597        NOTIN, 
6598        /**
6599         * Includes all concept ids that have a transitive is-a relationship from the concept Id provided as the value, including the provided concept itself (i.e. include ancestor codes and self).
6600         */
6601        GENERALIZES, 
6602        /**
6603         * The specified property of the code has at least one value (if the specified value is true; if the specified value is false, then matches when the specified property of the code has no values).
6604         */
6605        EXISTS, 
6606        /**
6607         * added to help the parsers
6608         */
6609        NULL;
6610        public static FilterOperator fromCode(String codeString) throws FHIRException {
6611            if (codeString == null || "".equals(codeString))
6612                return null;
6613        if ("=".equals(codeString))
6614          return EQUAL;
6615        if ("is-a".equals(codeString))
6616          return ISA;
6617        if ("descendent-of".equals(codeString))
6618          return DESCENDENTOF;
6619        if ("is-not-a".equals(codeString))
6620          return ISNOTA;
6621        if ("regex".equals(codeString))
6622          return REGEX;
6623        if ("in".equals(codeString))
6624          return IN;
6625        if ("not-in".equals(codeString))
6626          return NOTIN;
6627        if ("generalizes".equals(codeString))
6628          return GENERALIZES;
6629        if ("exists".equals(codeString))
6630          return EXISTS;
6631        throw new FHIRException("Unknown FilterOperator code '"+codeString+"'");
6632        }
6633        public String toCode() {
6634          switch (this) {
6635            case EQUAL: return "=";
6636            case ISA: return "is-a";
6637            case DESCENDENTOF: return "descendent-of";
6638            case ISNOTA: return "is-not-a";
6639            case REGEX: return "regex";
6640            case IN: return "in";
6641            case NOTIN: return "not-in";
6642            case GENERALIZES: return "generalizes";
6643            case EXISTS: return "exists";
6644            case NULL: return null;
6645            default: return "?";
6646          }
6647        }
6648        public String getSystem() {
6649          switch (this) {
6650            case EQUAL: return "http://hl7.org/fhir/filter-operator";
6651            case ISA: return "http://hl7.org/fhir/filter-operator";
6652            case DESCENDENTOF: return "http://hl7.org/fhir/filter-operator";
6653            case ISNOTA: return "http://hl7.org/fhir/filter-operator";
6654            case REGEX: return "http://hl7.org/fhir/filter-operator";
6655            case IN: return "http://hl7.org/fhir/filter-operator";
6656            case NOTIN: return "http://hl7.org/fhir/filter-operator";
6657            case GENERALIZES: return "http://hl7.org/fhir/filter-operator";
6658            case EXISTS: return "http://hl7.org/fhir/filter-operator";
6659            case NULL: return null;
6660            default: return "?";
6661          }
6662        }
6663        public String getDefinition() {
6664          switch (this) {
6665            case EQUAL: return "The specified property of the code equals the provided value.";
6666            case ISA: return "Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, including the provided concept itself (include descendant codes and self).";
6667            case DESCENDENTOF: return "Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, excluding the provided concept itself i.e. include descendant codes only).";
6668            case ISNOTA: return "The specified property of the code does not have an is-a relationship with the provided value.";
6669            case REGEX: return "The specified property of the code  matches the regex specified in the provided value.";
6670            case IN: return "The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list).";
6671            case NOTIN: return "The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list).";
6672            case GENERALIZES: return "Includes all concept ids that have a transitive is-a relationship from the concept Id provided as the value, including the provided concept itself (i.e. include ancestor codes and self).";
6673            case EXISTS: return "The specified property of the code has at least one value (if the specified value is true; if the specified value is false, then matches when the specified property of the code has no values).";
6674            case NULL: return null;
6675            default: return "?";
6676          }
6677        }
6678        public String getDisplay() {
6679          switch (this) {
6680            case EQUAL: return "Equals";
6681            case ISA: return "Is A (by subsumption)";
6682            case DESCENDENTOF: return "Descendent Of (by subsumption)";
6683            case ISNOTA: return "Not (Is A) (by subsumption)";
6684            case REGEX: return "Regular Expression";
6685            case IN: return "In Set";
6686            case NOTIN: return "Not in Set";
6687            case GENERALIZES: return "Generalizes (by Subsumption)";
6688            case EXISTS: return "Exists";
6689            case NULL: return null;
6690            default: return "?";
6691          }
6692        }
6693    }
6694
6695  public static class FilterOperatorEnumFactory implements EnumFactory<FilterOperator> {
6696    public FilterOperator fromCode(String codeString) throws IllegalArgumentException {
6697      if (codeString == null || "".equals(codeString))
6698            if (codeString == null || "".equals(codeString))
6699                return null;
6700        if ("=".equals(codeString))
6701          return FilterOperator.EQUAL;
6702        if ("is-a".equals(codeString))
6703          return FilterOperator.ISA;
6704        if ("descendent-of".equals(codeString))
6705          return FilterOperator.DESCENDENTOF;
6706        if ("is-not-a".equals(codeString))
6707          return FilterOperator.ISNOTA;
6708        if ("regex".equals(codeString))
6709          return FilterOperator.REGEX;
6710        if ("in".equals(codeString))
6711          return FilterOperator.IN;
6712        if ("not-in".equals(codeString))
6713          return FilterOperator.NOTIN;
6714        if ("generalizes".equals(codeString))
6715          return FilterOperator.GENERALIZES;
6716        if ("exists".equals(codeString))
6717          return FilterOperator.EXISTS;
6718        throw new IllegalArgumentException("Unknown FilterOperator code '"+codeString+"'");
6719        }
6720        public Enumeration<FilterOperator> fromType(Base code) throws FHIRException {
6721          if (code == null)
6722            return null;
6723          if (code.isEmpty())
6724            return new Enumeration<FilterOperator>(this);
6725          String codeString = ((PrimitiveType) code).asStringValue();
6726          if (codeString == null || "".equals(codeString))
6727            return null;
6728        if ("=".equals(codeString))
6729          return new Enumeration<FilterOperator>(this, FilterOperator.EQUAL);
6730        if ("is-a".equals(codeString))
6731          return new Enumeration<FilterOperator>(this, FilterOperator.ISA);
6732        if ("descendent-of".equals(codeString))
6733          return new Enumeration<FilterOperator>(this, FilterOperator.DESCENDENTOF);
6734        if ("is-not-a".equals(codeString))
6735          return new Enumeration<FilterOperator>(this, FilterOperator.ISNOTA);
6736        if ("regex".equals(codeString))
6737          return new Enumeration<FilterOperator>(this, FilterOperator.REGEX);
6738        if ("in".equals(codeString))
6739          return new Enumeration<FilterOperator>(this, FilterOperator.IN);
6740        if ("not-in".equals(codeString))
6741          return new Enumeration<FilterOperator>(this, FilterOperator.NOTIN);
6742        if ("generalizes".equals(codeString))
6743          return new Enumeration<FilterOperator>(this, FilterOperator.GENERALIZES);
6744        if ("exists".equals(codeString))
6745          return new Enumeration<FilterOperator>(this, FilterOperator.EXISTS);
6746        throw new FHIRException("Unknown FilterOperator code '"+codeString+"'");
6747        }
6748    public String toCode(FilterOperator code) {
6749      if (code == FilterOperator.EQUAL)
6750        return "=";
6751      if (code == FilterOperator.ISA)
6752        return "is-a";
6753      if (code == FilterOperator.DESCENDENTOF)
6754        return "descendent-of";
6755      if (code == FilterOperator.ISNOTA)
6756        return "is-not-a";
6757      if (code == FilterOperator.REGEX)
6758        return "regex";
6759      if (code == FilterOperator.IN)
6760        return "in";
6761      if (code == FilterOperator.NOTIN)
6762        return "not-in";
6763      if (code == FilterOperator.GENERALIZES)
6764        return "generalizes";
6765      if (code == FilterOperator.EXISTS)
6766        return "exists";
6767      return "?";
6768      }
6769    public String toSystem(FilterOperator code) {
6770      return code.getSystem();
6771      }
6772    }
6773
6774    public enum FinancialResourceStatusCodes {
6775        /**
6776         * The instance is currently in-force.
6777         */
6778        ACTIVE, 
6779        /**
6780         * The instance is withdrawn, rescinded or reversed.
6781         */
6782        CANCELLED, 
6783        /**
6784         * A new instance the contents of which is not complete.
6785         */
6786        DRAFT, 
6787        /**
6788         * The instance was entered in error.
6789         */
6790        ENTEREDINERROR, 
6791        /**
6792         * added to help the parsers
6793         */
6794        NULL;
6795        public static FinancialResourceStatusCodes fromCode(String codeString) throws FHIRException {
6796            if (codeString == null || "".equals(codeString))
6797                return null;
6798        if ("active".equals(codeString))
6799          return ACTIVE;
6800        if ("cancelled".equals(codeString))
6801          return CANCELLED;
6802        if ("draft".equals(codeString))
6803          return DRAFT;
6804        if ("entered-in-error".equals(codeString))
6805          return ENTEREDINERROR;
6806        throw new FHIRException("Unknown FinancialResourceStatusCodes code '"+codeString+"'");
6807        }
6808        public String toCode() {
6809          switch (this) {
6810            case ACTIVE: return "active";
6811            case CANCELLED: return "cancelled";
6812            case DRAFT: return "draft";
6813            case ENTEREDINERROR: return "entered-in-error";
6814            case NULL: return null;
6815            default: return "?";
6816          }
6817        }
6818        public String getSystem() {
6819          switch (this) {
6820            case ACTIVE: return "http://hl7.org/fhir/fm-status";
6821            case CANCELLED: return "http://hl7.org/fhir/fm-status";
6822            case DRAFT: return "http://hl7.org/fhir/fm-status";
6823            case ENTEREDINERROR: return "http://hl7.org/fhir/fm-status";
6824            case NULL: return null;
6825            default: return "?";
6826          }
6827        }
6828        public String getDefinition() {
6829          switch (this) {
6830            case ACTIVE: return "The instance is currently in-force.";
6831            case CANCELLED: return "The instance is withdrawn, rescinded or reversed.";
6832            case DRAFT: return "A new instance the contents of which is not complete.";
6833            case ENTEREDINERROR: return "The instance was entered in error.";
6834            case NULL: return null;
6835            default: return "?";
6836          }
6837        }
6838        public String getDisplay() {
6839          switch (this) {
6840            case ACTIVE: return "Active";
6841            case CANCELLED: return "Cancelled";
6842            case DRAFT: return "Draft";
6843            case ENTEREDINERROR: return "Entered in Error";
6844            case NULL: return null;
6845            default: return "?";
6846          }
6847        }
6848    }
6849
6850  public static class FinancialResourceStatusCodesEnumFactory implements EnumFactory<FinancialResourceStatusCodes> {
6851    public FinancialResourceStatusCodes fromCode(String codeString) throws IllegalArgumentException {
6852      if (codeString == null || "".equals(codeString))
6853            if (codeString == null || "".equals(codeString))
6854                return null;
6855        if ("active".equals(codeString))
6856          return FinancialResourceStatusCodes.ACTIVE;
6857        if ("cancelled".equals(codeString))
6858          return FinancialResourceStatusCodes.CANCELLED;
6859        if ("draft".equals(codeString))
6860          return FinancialResourceStatusCodes.DRAFT;
6861        if ("entered-in-error".equals(codeString))
6862          return FinancialResourceStatusCodes.ENTEREDINERROR;
6863        throw new IllegalArgumentException("Unknown FinancialResourceStatusCodes code '"+codeString+"'");
6864        }
6865        public Enumeration<FinancialResourceStatusCodes> fromType(Base code) throws FHIRException {
6866          if (code == null)
6867            return null;
6868          if (code.isEmpty())
6869            return new Enumeration<FinancialResourceStatusCodes>(this);
6870          String codeString = ((PrimitiveType) code).asStringValue();
6871          if (codeString == null || "".equals(codeString))
6872            return null;
6873        if ("active".equals(codeString))
6874          return new Enumeration<FinancialResourceStatusCodes>(this, FinancialResourceStatusCodes.ACTIVE);
6875        if ("cancelled".equals(codeString))
6876          return new Enumeration<FinancialResourceStatusCodes>(this, FinancialResourceStatusCodes.CANCELLED);
6877        if ("draft".equals(codeString))
6878          return new Enumeration<FinancialResourceStatusCodes>(this, FinancialResourceStatusCodes.DRAFT);
6879        if ("entered-in-error".equals(codeString))
6880          return new Enumeration<FinancialResourceStatusCodes>(this, FinancialResourceStatusCodes.ENTEREDINERROR);
6881        throw new FHIRException("Unknown FinancialResourceStatusCodes code '"+codeString+"'");
6882        }
6883    public String toCode(FinancialResourceStatusCodes code) {
6884      if (code == FinancialResourceStatusCodes.ACTIVE)
6885        return "active";
6886      if (code == FinancialResourceStatusCodes.CANCELLED)
6887        return "cancelled";
6888      if (code == FinancialResourceStatusCodes.DRAFT)
6889        return "draft";
6890      if (code == FinancialResourceStatusCodes.ENTEREDINERROR)
6891        return "entered-in-error";
6892      return "?";
6893      }
6894    public String toSystem(FinancialResourceStatusCodes code) {
6895      return code.getSystem();
6896      }
6897    }
6898
6899    public enum GroupMeasure {
6900        /**
6901         * Aggregated using Mean of participant values.
6902         */
6903        MEAN, 
6904        /**
6905         * Aggregated using Median of participant values.
6906         */
6907        MEDIAN, 
6908        /**
6909         * Aggregated using Mean of study mean values.
6910         */
6911        MEANOFMEAN, 
6912        /**
6913         * Aggregated using Mean of study median values.
6914         */
6915        MEANOFMEDIAN, 
6916        /**
6917         * Aggregated using Median of study mean values.
6918         */
6919        MEDIANOFMEAN, 
6920        /**
6921         * Aggregated using Median of study median values.
6922         */
6923        MEDIANOFMEDIAN, 
6924        /**
6925         * added to help the parsers
6926         */
6927        NULL;
6928        public static GroupMeasure fromCode(String codeString) throws FHIRException {
6929            if (codeString == null || "".equals(codeString))
6930                return null;
6931        if ("mean".equals(codeString))
6932          return MEAN;
6933        if ("median".equals(codeString))
6934          return MEDIAN;
6935        if ("mean-of-mean".equals(codeString))
6936          return MEANOFMEAN;
6937        if ("mean-of-median".equals(codeString))
6938          return MEANOFMEDIAN;
6939        if ("median-of-mean".equals(codeString))
6940          return MEDIANOFMEAN;
6941        if ("median-of-median".equals(codeString))
6942          return MEDIANOFMEDIAN;
6943        throw new FHIRException("Unknown GroupMeasure code '"+codeString+"'");
6944        }
6945        public String toCode() {
6946          switch (this) {
6947            case MEAN: return "mean";
6948            case MEDIAN: return "median";
6949            case MEANOFMEAN: return "mean-of-mean";
6950            case MEANOFMEDIAN: return "mean-of-median";
6951            case MEDIANOFMEAN: return "median-of-mean";
6952            case MEDIANOFMEDIAN: return "median-of-median";
6953            case NULL: return null;
6954            default: return "?";
6955          }
6956        }
6957        public String getSystem() {
6958          switch (this) {
6959            case MEAN: return "http://hl7.org/fhir/group-measure";
6960            case MEDIAN: return "http://hl7.org/fhir/group-measure";
6961            case MEANOFMEAN: return "http://hl7.org/fhir/group-measure";
6962            case MEANOFMEDIAN: return "http://hl7.org/fhir/group-measure";
6963            case MEDIANOFMEAN: return "http://hl7.org/fhir/group-measure";
6964            case MEDIANOFMEDIAN: return "http://hl7.org/fhir/group-measure";
6965            case NULL: return null;
6966            default: return "?";
6967          }
6968        }
6969        public String getDefinition() {
6970          switch (this) {
6971            case MEAN: return "Aggregated using Mean of participant values.";
6972            case MEDIAN: return "Aggregated using Median of participant values.";
6973            case MEANOFMEAN: return "Aggregated using Mean of study mean values.";
6974            case MEANOFMEDIAN: return "Aggregated using Mean of study median values.";
6975            case MEDIANOFMEAN: return "Aggregated using Median of study mean values.";
6976            case MEDIANOFMEDIAN: return "Aggregated using Median of study median values.";
6977            case NULL: return null;
6978            default: return "?";
6979          }
6980        }
6981        public String getDisplay() {
6982          switch (this) {
6983            case MEAN: return "Mean";
6984            case MEDIAN: return "Median";
6985            case MEANOFMEAN: return "Mean of Study Means";
6986            case MEANOFMEDIAN: return "Mean of Study Medins";
6987            case MEDIANOFMEAN: return "Median of Study Means";
6988            case MEDIANOFMEDIAN: return "Median of Study Medians";
6989            case NULL: return null;
6990            default: return "?";
6991          }
6992        }
6993    }
6994
6995  public static class GroupMeasureEnumFactory implements EnumFactory<GroupMeasure> {
6996    public GroupMeasure fromCode(String codeString) throws IllegalArgumentException {
6997      if (codeString == null || "".equals(codeString))
6998            if (codeString == null || "".equals(codeString))
6999                return null;
7000        if ("mean".equals(codeString))
7001          return GroupMeasure.MEAN;
7002        if ("median".equals(codeString))
7003          return GroupMeasure.MEDIAN;
7004        if ("mean-of-mean".equals(codeString))
7005          return GroupMeasure.MEANOFMEAN;
7006        if ("mean-of-median".equals(codeString))
7007          return GroupMeasure.MEANOFMEDIAN;
7008        if ("median-of-mean".equals(codeString))
7009          return GroupMeasure.MEDIANOFMEAN;
7010        if ("median-of-median".equals(codeString))
7011          return GroupMeasure.MEDIANOFMEDIAN;
7012        throw new IllegalArgumentException("Unknown GroupMeasure code '"+codeString+"'");
7013        }
7014        public Enumeration<GroupMeasure> fromType(Base code) throws FHIRException {
7015          if (code == null)
7016            return null;
7017          if (code.isEmpty())
7018            return new Enumeration<GroupMeasure>(this);
7019          String codeString = ((PrimitiveType) code).asStringValue();
7020          if (codeString == null || "".equals(codeString))
7021            return null;
7022        if ("mean".equals(codeString))
7023          return new Enumeration<GroupMeasure>(this, GroupMeasure.MEAN);
7024        if ("median".equals(codeString))
7025          return new Enumeration<GroupMeasure>(this, GroupMeasure.MEDIAN);
7026        if ("mean-of-mean".equals(codeString))
7027          return new Enumeration<GroupMeasure>(this, GroupMeasure.MEANOFMEAN);
7028        if ("mean-of-median".equals(codeString))
7029          return new Enumeration<GroupMeasure>(this, GroupMeasure.MEANOFMEDIAN);
7030        if ("median-of-mean".equals(codeString))
7031          return new Enumeration<GroupMeasure>(this, GroupMeasure.MEDIANOFMEAN);
7032        if ("median-of-median".equals(codeString))
7033          return new Enumeration<GroupMeasure>(this, GroupMeasure.MEDIANOFMEDIAN);
7034        throw new FHIRException("Unknown GroupMeasure code '"+codeString+"'");
7035        }
7036    public String toCode(GroupMeasure code) {
7037      if (code == GroupMeasure.MEAN)
7038        return "mean";
7039      if (code == GroupMeasure.MEDIAN)
7040        return "median";
7041      if (code == GroupMeasure.MEANOFMEAN)
7042        return "mean-of-mean";
7043      if (code == GroupMeasure.MEANOFMEDIAN)
7044        return "mean-of-median";
7045      if (code == GroupMeasure.MEDIANOFMEAN)
7046        return "median-of-mean";
7047      if (code == GroupMeasure.MEDIANOFMEDIAN)
7048        return "median-of-median";
7049      return "?";
7050      }
7051    public String toSystem(GroupMeasure code) {
7052      return code.getSystem();
7053      }
7054    }
7055
7056    public enum InvoicePriceComponentType {
7057        /**
7058         * the amount is the base price used for calculating the total price before applying surcharges, discount or taxes.
7059         */
7060        BASE, 
7061        /**
7062         * the amount is a surcharge applied on the base price.
7063         */
7064        SURCHARGE, 
7065        /**
7066         * the amount is a deduction applied on the base price.
7067         */
7068        DEDUCTION, 
7069        /**
7070         * the amount is a discount applied on the base price.
7071         */
7072        DISCOUNT, 
7073        /**
7074         * the amount is the tax component of the total price.
7075         */
7076        TAX, 
7077        /**
7078         * the amount is of informational character, it has not been applied in the calculation of the total price.
7079         */
7080        INFORMATIONAL, 
7081        /**
7082         * added to help the parsers
7083         */
7084        NULL;
7085        public static InvoicePriceComponentType fromCode(String codeString) throws FHIRException {
7086            if (codeString == null || "".equals(codeString))
7087                return null;
7088        if ("base".equals(codeString))
7089          return BASE;
7090        if ("surcharge".equals(codeString))
7091          return SURCHARGE;
7092        if ("deduction".equals(codeString))
7093          return DEDUCTION;
7094        if ("discount".equals(codeString))
7095          return DISCOUNT;
7096        if ("tax".equals(codeString))
7097          return TAX;
7098        if ("informational".equals(codeString))
7099          return INFORMATIONAL;
7100        throw new FHIRException("Unknown InvoicePriceComponentType code '"+codeString+"'");
7101        }
7102        public String toCode() {
7103          switch (this) {
7104            case BASE: return "base";
7105            case SURCHARGE: return "surcharge";
7106            case DEDUCTION: return "deduction";
7107            case DISCOUNT: return "discount";
7108            case TAX: return "tax";
7109            case INFORMATIONAL: return "informational";
7110            case NULL: return null;
7111            default: return "?";
7112          }
7113        }
7114        public String getSystem() {
7115          switch (this) {
7116            case BASE: return "http://hl7.org/fhir/invoice-priceComponentType";
7117            case SURCHARGE: return "http://hl7.org/fhir/invoice-priceComponentType";
7118            case DEDUCTION: return "http://hl7.org/fhir/invoice-priceComponentType";
7119            case DISCOUNT: return "http://hl7.org/fhir/invoice-priceComponentType";
7120            case TAX: return "http://hl7.org/fhir/invoice-priceComponentType";
7121            case INFORMATIONAL: return "http://hl7.org/fhir/invoice-priceComponentType";
7122            case NULL: return null;
7123            default: return "?";
7124          }
7125        }
7126        public String getDefinition() {
7127          switch (this) {
7128            case BASE: return "the amount is the base price used for calculating the total price before applying surcharges, discount or taxes.";
7129            case SURCHARGE: return "the amount is a surcharge applied on the base price.";
7130            case DEDUCTION: return "the amount is a deduction applied on the base price.";
7131            case DISCOUNT: return "the amount is a discount applied on the base price.";
7132            case TAX: return "the amount is the tax component of the total price.";
7133            case INFORMATIONAL: return "the amount is of informational character, it has not been applied in the calculation of the total price.";
7134            case NULL: return null;
7135            default: return "?";
7136          }
7137        }
7138        public String getDisplay() {
7139          switch (this) {
7140            case BASE: return "base price";
7141            case SURCHARGE: return "surcharge";
7142            case DEDUCTION: return "deduction";
7143            case DISCOUNT: return "discount";
7144            case TAX: return "tax";
7145            case INFORMATIONAL: return "informational";
7146            case NULL: return null;
7147            default: return "?";
7148          }
7149        }
7150    }
7151
7152  public static class InvoicePriceComponentTypeEnumFactory implements EnumFactory<InvoicePriceComponentType> {
7153    public InvoicePriceComponentType fromCode(String codeString) throws IllegalArgumentException {
7154      if (codeString == null || "".equals(codeString))
7155            if (codeString == null || "".equals(codeString))
7156                return null;
7157        if ("base".equals(codeString))
7158          return InvoicePriceComponentType.BASE;
7159        if ("surcharge".equals(codeString))
7160          return InvoicePriceComponentType.SURCHARGE;
7161        if ("deduction".equals(codeString))
7162          return InvoicePriceComponentType.DEDUCTION;
7163        if ("discount".equals(codeString))
7164          return InvoicePriceComponentType.DISCOUNT;
7165        if ("tax".equals(codeString))
7166          return InvoicePriceComponentType.TAX;
7167        if ("informational".equals(codeString))
7168          return InvoicePriceComponentType.INFORMATIONAL;
7169        throw new IllegalArgumentException("Unknown InvoicePriceComponentType code '"+codeString+"'");
7170        }
7171        public Enumeration<InvoicePriceComponentType> fromType(Base code) throws FHIRException {
7172          if (code == null)
7173            return null;
7174          if (code.isEmpty())
7175            return new Enumeration<InvoicePriceComponentType>(this);
7176          String codeString = ((PrimitiveType) code).asStringValue();
7177          if (codeString == null || "".equals(codeString))
7178            return null;
7179        if ("base".equals(codeString))
7180          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.BASE);
7181        if ("surcharge".equals(codeString))
7182          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.SURCHARGE);
7183        if ("deduction".equals(codeString))
7184          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.DEDUCTION);
7185        if ("discount".equals(codeString))
7186          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.DISCOUNT);
7187        if ("tax".equals(codeString))
7188          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.TAX);
7189        if ("informational".equals(codeString))
7190          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.INFORMATIONAL);
7191        throw new FHIRException("Unknown InvoicePriceComponentType code '"+codeString+"'");
7192        }
7193    public String toCode(InvoicePriceComponentType code) {
7194      if (code == InvoicePriceComponentType.BASE)
7195        return "base";
7196      if (code == InvoicePriceComponentType.SURCHARGE)
7197        return "surcharge";
7198      if (code == InvoicePriceComponentType.DEDUCTION)
7199        return "deduction";
7200      if (code == InvoicePriceComponentType.DISCOUNT)
7201        return "discount";
7202      if (code == InvoicePriceComponentType.TAX)
7203        return "tax";
7204      if (code == InvoicePriceComponentType.INFORMATIONAL)
7205        return "informational";
7206      return "?";
7207      }
7208    public String toSystem(InvoicePriceComponentType code) {
7209      return code.getSystem();
7210      }
7211    }
7212
7213    public enum ListMode {
7214        /**
7215         * This list is the master list, maintained in an ongoing fashion with regular updates as the real world list it is tracking changes.
7216         */
7217        WORKING, 
7218        /**
7219         * This list was prepared as a snapshot. It should not be assumed to be current.
7220         */
7221        SNAPSHOT, 
7222        /**
7223         * A point-in-time list that shows what changes have been made or recommended.  E.g. a discharge medication list showing what was added and removed during an encounter.
7224         */
7225        CHANGES, 
7226        /**
7227         * added to help the parsers
7228         */
7229        NULL;
7230        public static ListMode fromCode(String codeString) throws FHIRException {
7231            if (codeString == null || "".equals(codeString))
7232                return null;
7233        if ("working".equals(codeString))
7234          return WORKING;
7235        if ("snapshot".equals(codeString))
7236          return SNAPSHOT;
7237        if ("changes".equals(codeString))
7238          return CHANGES;
7239        throw new FHIRException("Unknown ListMode code '"+codeString+"'");
7240        }
7241        public String toCode() {
7242          switch (this) {
7243            case WORKING: return "working";
7244            case SNAPSHOT: return "snapshot";
7245            case CHANGES: return "changes";
7246            case NULL: return null;
7247            default: return "?";
7248          }
7249        }
7250        public String getSystem() {
7251          switch (this) {
7252            case WORKING: return "http://hl7.org/fhir/list-mode";
7253            case SNAPSHOT: return "http://hl7.org/fhir/list-mode";
7254            case CHANGES: return "http://hl7.org/fhir/list-mode";
7255            case NULL: return null;
7256            default: return "?";
7257          }
7258        }
7259        public String getDefinition() {
7260          switch (this) {
7261            case WORKING: return "This list is the master list, maintained in an ongoing fashion with regular updates as the real world list it is tracking changes.";
7262            case SNAPSHOT: return "This list was prepared as a snapshot. It should not be assumed to be current.";
7263            case CHANGES: return "A point-in-time list that shows what changes have been made or recommended.  E.g. a discharge medication list showing what was added and removed during an encounter.";
7264            case NULL: return null;
7265            default: return "?";
7266          }
7267        }
7268        public String getDisplay() {
7269          switch (this) {
7270            case WORKING: return "Working List";
7271            case SNAPSHOT: return "Snapshot List";
7272            case CHANGES: return "Change List";
7273            case NULL: return null;
7274            default: return "?";
7275          }
7276        }
7277    }
7278
7279  public static class ListModeEnumFactory implements EnumFactory<ListMode> {
7280    public ListMode fromCode(String codeString) throws IllegalArgumentException {
7281      if (codeString == null || "".equals(codeString))
7282            if (codeString == null || "".equals(codeString))
7283                return null;
7284        if ("working".equals(codeString))
7285          return ListMode.WORKING;
7286        if ("snapshot".equals(codeString))
7287          return ListMode.SNAPSHOT;
7288        if ("changes".equals(codeString))
7289          return ListMode.CHANGES;
7290        throw new IllegalArgumentException("Unknown ListMode code '"+codeString+"'");
7291        }
7292        public Enumeration<ListMode> fromType(Base code) throws FHIRException {
7293          if (code == null)
7294            return null;
7295          if (code.isEmpty())
7296            return new Enumeration<ListMode>(this);
7297          String codeString = ((PrimitiveType) code).asStringValue();
7298          if (codeString == null || "".equals(codeString))
7299            return null;
7300        if ("working".equals(codeString))
7301          return new Enumeration<ListMode>(this, ListMode.WORKING);
7302        if ("snapshot".equals(codeString))
7303          return new Enumeration<ListMode>(this, ListMode.SNAPSHOT);
7304        if ("changes".equals(codeString))
7305          return new Enumeration<ListMode>(this, ListMode.CHANGES);
7306        throw new FHIRException("Unknown ListMode code '"+codeString+"'");
7307        }
7308    public String toCode(ListMode code) {
7309      if (code == ListMode.WORKING)
7310        return "working";
7311      if (code == ListMode.SNAPSHOT)
7312        return "snapshot";
7313      if (code == ListMode.CHANGES)
7314        return "changes";
7315      return "?";
7316      }
7317    public String toSystem(ListMode code) {
7318      return code.getSystem();
7319      }
7320    }
7321
7322    public enum MeasureImprovementNotation {
7323        /**
7324         * Improvement is indicated as an increase in the score or measurement (e.g. Higher score indicates better quality).
7325         */
7326        INCREASE, 
7327        /**
7328         * Improvement is indicated as a decrease in the score or measurement (e.g. Lower score indicates better quality).
7329         */
7330        DECREASE, 
7331        /**
7332         * added to help the parsers
7333         */
7334        NULL;
7335        public static MeasureImprovementNotation fromCode(String codeString) throws FHIRException {
7336            if (codeString == null || "".equals(codeString))
7337                return null;
7338        if ("increase".equals(codeString))
7339          return INCREASE;
7340        if ("decrease".equals(codeString))
7341          return DECREASE;
7342        throw new FHIRException("Unknown MeasureImprovementNotation code '"+codeString+"'");
7343        }
7344        public String toCode() {
7345          switch (this) {
7346            case INCREASE: return "increase";
7347            case DECREASE: return "decrease";
7348            case NULL: return null;
7349            default: return "?";
7350          }
7351        }
7352        public String getSystem() {
7353          switch (this) {
7354            case INCREASE: return "http://terminology.hl7.org/CodeSystem/measure-improvement-notation";
7355            case DECREASE: return "http://terminology.hl7.org/CodeSystem/measure-improvement-notation";
7356            case NULL: return null;
7357            default: return "?";
7358          }
7359        }
7360        public String getDefinition() {
7361          switch (this) {
7362            case INCREASE: return "Improvement is indicated as an increase in the score or measurement (e.g. Higher score indicates better quality).";
7363            case DECREASE: return "Improvement is indicated as a decrease in the score or measurement (e.g. Lower score indicates better quality).";
7364            case NULL: return null;
7365            default: return "?";
7366          }
7367        }
7368        public String getDisplay() {
7369          switch (this) {
7370            case INCREASE: return "Increased score indicates improvement";
7371            case DECREASE: return "Decreased score indicates improvement";
7372            case NULL: return null;
7373            default: return "?";
7374          }
7375        }
7376    }
7377
7378  public static class MeasureImprovementNotationEnumFactory implements EnumFactory<MeasureImprovementNotation> {
7379    public MeasureImprovementNotation fromCode(String codeString) throws IllegalArgumentException {
7380      if (codeString == null || "".equals(codeString))
7381            if (codeString == null || "".equals(codeString))
7382                return null;
7383        if ("increase".equals(codeString))
7384          return MeasureImprovementNotation.INCREASE;
7385        if ("decrease".equals(codeString))
7386          return MeasureImprovementNotation.DECREASE;
7387        throw new IllegalArgumentException("Unknown MeasureImprovementNotation code '"+codeString+"'");
7388        }
7389        public Enumeration<MeasureImprovementNotation> fromType(Base code) throws FHIRException {
7390          if (code == null)
7391            return null;
7392          if (code.isEmpty())
7393            return new Enumeration<MeasureImprovementNotation>(this);
7394          String codeString = ((PrimitiveType) code).asStringValue();
7395          if (codeString == null || "".equals(codeString))
7396            return null;
7397        if ("increase".equals(codeString))
7398          return new Enumeration<MeasureImprovementNotation>(this, MeasureImprovementNotation.INCREASE);
7399        if ("decrease".equals(codeString))
7400          return new Enumeration<MeasureImprovementNotation>(this, MeasureImprovementNotation.DECREASE);
7401        throw new FHIRException("Unknown MeasureImprovementNotation code '"+codeString+"'");
7402        }
7403    public String toCode(MeasureImprovementNotation code) {
7404      if (code == MeasureImprovementNotation.INCREASE)
7405        return "increase";
7406      if (code == MeasureImprovementNotation.DECREASE)
7407        return "decrease";
7408      return "?";
7409      }
7410    public String toSystem(MeasureImprovementNotation code) {
7411      return code.getSystem();
7412      }
7413    }
7414
7415    public enum MimeTypes {
7416        /**
7417         * added to help the parsers
7418         */
7419        NULL;
7420        public static MimeTypes fromCode(String codeString) throws FHIRException {
7421            if (codeString == null || "".equals(codeString))
7422                return null;
7423        throw new FHIRException("Unknown MimeTypes code '"+codeString+"'");
7424        }
7425        public String toCode() {
7426          switch (this) {
7427            case NULL: return null;
7428            default: return "?";
7429          }
7430        }
7431        public String getSystem() {
7432          switch (this) {
7433            case NULL: return null;
7434            default: return "?";
7435          }
7436        }
7437        public String getDefinition() {
7438          switch (this) {
7439            case NULL: return null;
7440            default: return "?";
7441          }
7442        }
7443        public String getDisplay() {
7444          switch (this) {
7445            case NULL: return null;
7446            default: return "?";
7447          }
7448        }
7449    }
7450
7451  public static class MimeTypesEnumFactory implements EnumFactory<MimeTypes> {
7452    public MimeTypes fromCode(String codeString) throws IllegalArgumentException {
7453      if (codeString == null || "".equals(codeString))
7454            if (codeString == null || "".equals(codeString))
7455                return null;
7456        throw new IllegalArgumentException("Unknown MimeTypes code '"+codeString+"'");
7457        }
7458        public Enumeration<MimeTypes> fromType(Base code) throws FHIRException {
7459          if (code == null)
7460            return null;
7461          if (code.isEmpty())
7462            return new Enumeration<MimeTypes>(this);
7463          String codeString = ((PrimitiveType) code).asStringValue();
7464          if (codeString == null || "".equals(codeString))
7465            return null;
7466        throw new FHIRException("Unknown MimeTypes code '"+codeString+"'");
7467        }
7468    public String toCode(MimeTypes code) {
7469      return "?";
7470      }
7471    public String toSystem(MimeTypes code) {
7472      return code.getSystem();
7473      }
7474    }
7475
7476    public enum NoteType {
7477        /**
7478         * Display the note.
7479         */
7480        DISPLAY, 
7481        /**
7482         * Print the note on the form.
7483         */
7484        PRINT, 
7485        /**
7486         * Print the note for the operator.
7487         */
7488        PRINTOPER, 
7489        /**
7490         * added to help the parsers
7491         */
7492        NULL;
7493        public static NoteType fromCode(String codeString) throws FHIRException {
7494            if (codeString == null || "".equals(codeString))
7495                return null;
7496        if ("display".equals(codeString))
7497          return DISPLAY;
7498        if ("print".equals(codeString))
7499          return PRINT;
7500        if ("printoper".equals(codeString))
7501          return PRINTOPER;
7502        throw new FHIRException("Unknown NoteType code '"+codeString+"'");
7503        }
7504        public String toCode() {
7505          switch (this) {
7506            case DISPLAY: return "display";
7507            case PRINT: return "print";
7508            case PRINTOPER: return "printoper";
7509            case NULL: return null;
7510            default: return "?";
7511          }
7512        }
7513        public String getSystem() {
7514          switch (this) {
7515            case DISPLAY: return "http://hl7.org/fhir/note-type";
7516            case PRINT: return "http://hl7.org/fhir/note-type";
7517            case PRINTOPER: return "http://hl7.org/fhir/note-type";
7518            case NULL: return null;
7519            default: return "?";
7520          }
7521        }
7522        public String getDefinition() {
7523          switch (this) {
7524            case DISPLAY: return "Display the note.";
7525            case PRINT: return "Print the note on the form.";
7526            case PRINTOPER: return "Print the note for the operator.";
7527            case NULL: return null;
7528            default: return "?";
7529          }
7530        }
7531        public String getDisplay() {
7532          switch (this) {
7533            case DISPLAY: return "Display";
7534            case PRINT: return "Print (Form)";
7535            case PRINTOPER: return "Print (Operator)";
7536            case NULL: return null;
7537            default: return "?";
7538          }
7539        }
7540    }
7541
7542  public static class NoteTypeEnumFactory implements EnumFactory<NoteType> {
7543    public NoteType fromCode(String codeString) throws IllegalArgumentException {
7544      if (codeString == null || "".equals(codeString))
7545            if (codeString == null || "".equals(codeString))
7546                return null;
7547        if ("display".equals(codeString))
7548          return NoteType.DISPLAY;
7549        if ("print".equals(codeString))
7550          return NoteType.PRINT;
7551        if ("printoper".equals(codeString))
7552          return NoteType.PRINTOPER;
7553        throw new IllegalArgumentException("Unknown NoteType code '"+codeString+"'");
7554        }
7555        public Enumeration<NoteType> fromType(Base code) throws FHIRException {
7556          if (code == null)
7557            return null;
7558          if (code.isEmpty())
7559            return new Enumeration<NoteType>(this);
7560          String codeString = ((PrimitiveType) code).asStringValue();
7561          if (codeString == null || "".equals(codeString))
7562            return null;
7563        if ("display".equals(codeString))
7564          return new Enumeration<NoteType>(this, NoteType.DISPLAY);
7565        if ("print".equals(codeString))
7566          return new Enumeration<NoteType>(this, NoteType.PRINT);
7567        if ("printoper".equals(codeString))
7568          return new Enumeration<NoteType>(this, NoteType.PRINTOPER);
7569        throw new FHIRException("Unknown NoteType code '"+codeString+"'");
7570        }
7571    public String toCode(NoteType code) {
7572      if (code == NoteType.DISPLAY)
7573        return "display";
7574      if (code == NoteType.PRINT)
7575        return "print";
7576      if (code == NoteType.PRINTOPER)
7577        return "printoper";
7578      return "?";
7579      }
7580    public String toSystem(NoteType code) {
7581      return code.getSystem();
7582      }
7583    }
7584
7585    public enum ObservationStatus {
7586        /**
7587         * The existence of the observation is registered, but there is no result yet available.
7588         */
7589        REGISTERED, 
7590        /**
7591         * This is an initial or interim observation: data may be incomplete or unverified.
7592         */
7593        PRELIMINARY, 
7594        /**
7595         * The observation is complete and there are no further actions needed. Additional information such "released", "signed", etc would be represented using [Provenance](provenance.html) which provides not only the act but also the actors and dates and other related data. These act states would be associated with an observation status of `preliminary` until they are all completed and then a status of `final` would be applied.
7596         */
7597        FINAL, 
7598        /**
7599         * Subsequent to being Final, the observation has been modified subsequent.  This includes updates/new information and corrections.
7600         */
7601        AMENDED, 
7602        /**
7603         * Subsequent to being Final, the observation has been modified to correct an error in the test result.
7604         */
7605        CORRECTED, 
7606        /**
7607         * The observation is unavailable because the measurement was not started or not completed (also sometimes called "aborted").
7608         */
7609        CANCELLED, 
7610        /**
7611         * The observation has been withdrawn following previous final release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".).
7612         */
7613        ENTEREDINERROR, 
7614        /**
7615         * The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which.
7616         */
7617        UNKNOWN, 
7618        /**
7619         * added to help the parsers
7620         */
7621        NULL;
7622        public static ObservationStatus fromCode(String codeString) throws FHIRException {
7623            if (codeString == null || "".equals(codeString))
7624                return null;
7625        if ("registered".equals(codeString))
7626          return REGISTERED;
7627        if ("preliminary".equals(codeString))
7628          return PRELIMINARY;
7629        if ("final".equals(codeString))
7630          return FINAL;
7631        if ("amended".equals(codeString))
7632          return AMENDED;
7633        if ("corrected".equals(codeString))
7634          return CORRECTED;
7635        if ("cancelled".equals(codeString))
7636          return CANCELLED;
7637        if ("entered-in-error".equals(codeString))
7638          return ENTEREDINERROR;
7639        if ("unknown".equals(codeString))
7640          return UNKNOWN;
7641        throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'");
7642        }
7643        public String toCode() {
7644          switch (this) {
7645            case REGISTERED: return "registered";
7646            case PRELIMINARY: return "preliminary";
7647            case FINAL: return "final";
7648            case AMENDED: return "amended";
7649            case CORRECTED: return "corrected";
7650            case CANCELLED: return "cancelled";
7651            case ENTEREDINERROR: return "entered-in-error";
7652            case UNKNOWN: return "unknown";
7653            case NULL: return null;
7654            default: return "?";
7655          }
7656        }
7657        public String getSystem() {
7658          switch (this) {
7659            case REGISTERED: return "http://hl7.org/fhir/observation-status";
7660            case PRELIMINARY: return "http://hl7.org/fhir/observation-status";
7661            case FINAL: return "http://hl7.org/fhir/observation-status";
7662            case AMENDED: return "http://hl7.org/fhir/observation-status";
7663            case CORRECTED: return "http://hl7.org/fhir/observation-status";
7664            case CANCELLED: return "http://hl7.org/fhir/observation-status";
7665            case ENTEREDINERROR: return "http://hl7.org/fhir/observation-status";
7666            case UNKNOWN: return "http://hl7.org/fhir/observation-status";
7667            case NULL: return null;
7668            default: return "?";
7669          }
7670        }
7671        public String getDefinition() {
7672          switch (this) {
7673            case REGISTERED: return "The existence of the observation is registered, but there is no result yet available.";
7674            case PRELIMINARY: return "This is an initial or interim observation: data may be incomplete or unverified.";
7675            case FINAL: return "The observation is complete and there are no further actions needed. Additional information such \"released\", \"signed\", etc would be represented using [Provenance](provenance.html) which provides not only the act but also the actors and dates and other related data. These act states would be associated with an observation status of `preliminary` until they are all completed and then a status of `final` would be applied.";
7676            case AMENDED: return "Subsequent to being Final, the observation has been modified subsequent.  This includes updates/new information and corrections.";
7677            case CORRECTED: return "Subsequent to being Final, the observation has been modified to correct an error in the test result.";
7678            case CANCELLED: return "The observation is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\").";
7679            case ENTEREDINERROR: return "The observation has been withdrawn following previous final release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".).";
7680            case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which.";
7681            case NULL: return null;
7682            default: return "?";
7683          }
7684        }
7685        public String getDisplay() {
7686          switch (this) {
7687            case REGISTERED: return "Registered";
7688            case PRELIMINARY: return "Preliminary";
7689            case FINAL: return "Final";
7690            case AMENDED: return "Amended";
7691            case CORRECTED: return "Corrected";
7692            case CANCELLED: return "Cancelled";
7693            case ENTEREDINERROR: return "Entered in Error";
7694            case UNKNOWN: return "Unknown";
7695            case NULL: return null;
7696            default: return "?";
7697          }
7698        }
7699    }
7700
7701  public static class ObservationStatusEnumFactory implements EnumFactory<ObservationStatus> {
7702    public ObservationStatus fromCode(String codeString) throws IllegalArgumentException {
7703      if (codeString == null || "".equals(codeString))
7704            if (codeString == null || "".equals(codeString))
7705                return null;
7706        if ("registered".equals(codeString))
7707          return ObservationStatus.REGISTERED;
7708        if ("preliminary".equals(codeString))
7709          return ObservationStatus.PRELIMINARY;
7710        if ("final".equals(codeString))
7711          return ObservationStatus.FINAL;
7712        if ("amended".equals(codeString))
7713          return ObservationStatus.AMENDED;
7714        if ("corrected".equals(codeString))
7715          return ObservationStatus.CORRECTED;
7716        if ("cancelled".equals(codeString))
7717          return ObservationStatus.CANCELLED;
7718        if ("entered-in-error".equals(codeString))
7719          return ObservationStatus.ENTEREDINERROR;
7720        if ("unknown".equals(codeString))
7721          return ObservationStatus.UNKNOWN;
7722        throw new IllegalArgumentException("Unknown ObservationStatus code '"+codeString+"'");
7723        }
7724        public Enumeration<ObservationStatus> fromType(Base code) throws FHIRException {
7725          if (code == null)
7726            return null;
7727          if (code.isEmpty())
7728            return new Enumeration<ObservationStatus>(this);
7729          String codeString = ((PrimitiveType) code).asStringValue();
7730          if (codeString == null || "".equals(codeString))
7731            return null;
7732        if ("registered".equals(codeString))
7733          return new Enumeration<ObservationStatus>(this, ObservationStatus.REGISTERED);
7734        if ("preliminary".equals(codeString))
7735          return new Enumeration<ObservationStatus>(this, ObservationStatus.PRELIMINARY);
7736        if ("final".equals(codeString))
7737          return new Enumeration<ObservationStatus>(this, ObservationStatus.FINAL);
7738        if ("amended".equals(codeString))
7739          return new Enumeration<ObservationStatus>(this, ObservationStatus.AMENDED);
7740        if ("corrected".equals(codeString))
7741          return new Enumeration<ObservationStatus>(this, ObservationStatus.CORRECTED);
7742        if ("cancelled".equals(codeString))
7743          return new Enumeration<ObservationStatus>(this, ObservationStatus.CANCELLED);
7744        if ("entered-in-error".equals(codeString))
7745          return new Enumeration<ObservationStatus>(this, ObservationStatus.ENTEREDINERROR);
7746        if ("unknown".equals(codeString))
7747          return new Enumeration<ObservationStatus>(this, ObservationStatus.UNKNOWN);
7748        throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'");
7749        }
7750    public String toCode(ObservationStatus code) {
7751      if (code == ObservationStatus.REGISTERED)
7752        return "registered";
7753      if (code == ObservationStatus.PRELIMINARY)
7754        return "preliminary";
7755      if (code == ObservationStatus.FINAL)
7756        return "final";
7757      if (code == ObservationStatus.AMENDED)
7758        return "amended";
7759      if (code == ObservationStatus.CORRECTED)
7760        return "corrected";
7761      if (code == ObservationStatus.CANCELLED)
7762        return "cancelled";
7763      if (code == ObservationStatus.ENTEREDINERROR)
7764        return "entered-in-error";
7765      if (code == ObservationStatus.UNKNOWN)
7766        return "unknown";
7767      return "?";
7768      }
7769    public String toSystem(ObservationStatus code) {
7770      return code.getSystem();
7771      }
7772    }
7773
7774    public enum OperationParameterUse {
7775        /**
7776         * This is an input parameter.
7777         */
7778        IN, 
7779        /**
7780         * This is an output parameter.
7781         */
7782        OUT, 
7783        /**
7784         * added to help the parsers
7785         */
7786        NULL;
7787        public static OperationParameterUse fromCode(String codeString) throws FHIRException {
7788            if (codeString == null || "".equals(codeString))
7789                return null;
7790        if ("in".equals(codeString))
7791          return IN;
7792        if ("out".equals(codeString))
7793          return OUT;
7794        throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'");
7795        }
7796        public String toCode() {
7797          switch (this) {
7798            case IN: return "in";
7799            case OUT: return "out";
7800            case NULL: return null;
7801            default: return "?";
7802          }
7803        }
7804        public String getSystem() {
7805          switch (this) {
7806            case IN: return "http://hl7.org/fhir/operation-parameter-use";
7807            case OUT: return "http://hl7.org/fhir/operation-parameter-use";
7808            case NULL: return null;
7809            default: return "?";
7810          }
7811        }
7812        public String getDefinition() {
7813          switch (this) {
7814            case IN: return "This is an input parameter.";
7815            case OUT: return "This is an output parameter.";
7816            case NULL: return null;
7817            default: return "?";
7818          }
7819        }
7820        public String getDisplay() {
7821          switch (this) {
7822            case IN: return "In";
7823            case OUT: return "Out";
7824            case NULL: return null;
7825            default: return "?";
7826          }
7827        }
7828    }
7829
7830  public static class OperationParameterUseEnumFactory implements EnumFactory<OperationParameterUse> {
7831    public OperationParameterUse fromCode(String codeString) throws IllegalArgumentException {
7832      if (codeString == null || "".equals(codeString))
7833            if (codeString == null || "".equals(codeString))
7834                return null;
7835        if ("in".equals(codeString))
7836          return OperationParameterUse.IN;
7837        if ("out".equals(codeString))
7838          return OperationParameterUse.OUT;
7839        throw new IllegalArgumentException("Unknown OperationParameterUse code '"+codeString+"'");
7840        }
7841        public Enumeration<OperationParameterUse> fromType(Base code) throws FHIRException {
7842          if (code == null)
7843            return null;
7844          if (code.isEmpty())
7845            return new Enumeration<OperationParameterUse>(this);
7846          String codeString = ((PrimitiveType) code).asStringValue();
7847          if (codeString == null || "".equals(codeString))
7848            return null;
7849        if ("in".equals(codeString))
7850          return new Enumeration<OperationParameterUse>(this, OperationParameterUse.IN);
7851        if ("out".equals(codeString))
7852          return new Enumeration<OperationParameterUse>(this, OperationParameterUse.OUT);
7853        throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'");
7854        }
7855    public String toCode(OperationParameterUse code) {
7856      if (code == OperationParameterUse.IN)
7857        return "in";
7858      if (code == OperationParameterUse.OUT)
7859        return "out";
7860      return "?";
7861      }
7862    public String toSystem(OperationParameterUse code) {
7863      return code.getSystem();
7864      }
7865    }
7866
7867    public enum ParticipationStatus {
7868        /**
7869         * The participant has accepted the appointment.
7870         */
7871        ACCEPTED, 
7872        /**
7873         * The participant has declined the appointment and will not participate in the appointment.
7874         */
7875        DECLINED, 
7876        /**
7877         * The participant has  tentatively accepted the appointment. This could be automatically created by a system and requires further processing before it can be accepted. There is no commitment that attendance will occur.
7878         */
7879        TENTATIVE, 
7880        /**
7881         * The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses.
7882         */
7883        NEEDSACTION, 
7884        /**
7885         * added to help the parsers
7886         */
7887        NULL;
7888        public static ParticipationStatus fromCode(String codeString) throws FHIRException {
7889            if (codeString == null || "".equals(codeString))
7890                return null;
7891        if ("accepted".equals(codeString))
7892          return ACCEPTED;
7893        if ("declined".equals(codeString))
7894          return DECLINED;
7895        if ("tentative".equals(codeString))
7896          return TENTATIVE;
7897        if ("needs-action".equals(codeString))
7898          return NEEDSACTION;
7899        throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'");
7900        }
7901        public String toCode() {
7902          switch (this) {
7903            case ACCEPTED: return "accepted";
7904            case DECLINED: return "declined";
7905            case TENTATIVE: return "tentative";
7906            case NEEDSACTION: return "needs-action";
7907            case NULL: return null;
7908            default: return "?";
7909          }
7910        }
7911        public String getSystem() {
7912          switch (this) {
7913            case ACCEPTED: return "http://hl7.org/fhir/participationstatus";
7914            case DECLINED: return "http://hl7.org/fhir/participationstatus";
7915            case TENTATIVE: return "http://hl7.org/fhir/participationstatus";
7916            case NEEDSACTION: return "http://hl7.org/fhir/participationstatus";
7917            case NULL: return null;
7918            default: return "?";
7919          }
7920        }
7921        public String getDefinition() {
7922          switch (this) {
7923            case ACCEPTED: return "The participant has accepted the appointment.";
7924            case DECLINED: return "The participant has declined the appointment and will not participate in the appointment.";
7925            case TENTATIVE: return "The participant has  tentatively accepted the appointment. This could be automatically created by a system and requires further processing before it can be accepted. There is no commitment that attendance will occur.";
7926            case NEEDSACTION: return "The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses.";
7927            case NULL: return null;
7928            default: return "?";
7929          }
7930        }
7931        public String getDisplay() {
7932          switch (this) {
7933            case ACCEPTED: return "Accepted";
7934            case DECLINED: return "Declined";
7935            case TENTATIVE: return "Tentative";
7936            case NEEDSACTION: return "Needs Action";
7937            case NULL: return null;
7938            default: return "?";
7939          }
7940        }
7941    }
7942
7943  public static class ParticipationStatusEnumFactory implements EnumFactory<ParticipationStatus> {
7944    public ParticipationStatus fromCode(String codeString) throws IllegalArgumentException {
7945      if (codeString == null || "".equals(codeString))
7946            if (codeString == null || "".equals(codeString))
7947                return null;
7948        if ("accepted".equals(codeString))
7949          return ParticipationStatus.ACCEPTED;
7950        if ("declined".equals(codeString))
7951          return ParticipationStatus.DECLINED;
7952        if ("tentative".equals(codeString))
7953          return ParticipationStatus.TENTATIVE;
7954        if ("needs-action".equals(codeString))
7955          return ParticipationStatus.NEEDSACTION;
7956        throw new IllegalArgumentException("Unknown ParticipationStatus code '"+codeString+"'");
7957        }
7958        public Enumeration<ParticipationStatus> fromType(Base code) throws FHIRException {
7959          if (code == null)
7960            return null;
7961          if (code.isEmpty())
7962            return new Enumeration<ParticipationStatus>(this);
7963          String codeString = ((PrimitiveType) code).asStringValue();
7964          if (codeString == null || "".equals(codeString))
7965            return null;
7966        if ("accepted".equals(codeString))
7967          return new Enumeration<ParticipationStatus>(this, ParticipationStatus.ACCEPTED);
7968        if ("declined".equals(codeString))
7969          return new Enumeration<ParticipationStatus>(this, ParticipationStatus.DECLINED);
7970        if ("tentative".equals(codeString))
7971          return new Enumeration<ParticipationStatus>(this, ParticipationStatus.TENTATIVE);
7972        if ("needs-action".equals(codeString))
7973          return new Enumeration<ParticipationStatus>(this, ParticipationStatus.NEEDSACTION);
7974        throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'");
7975        }
7976    public String toCode(ParticipationStatus code) {
7977      if (code == ParticipationStatus.ACCEPTED)
7978        return "accepted";
7979      if (code == ParticipationStatus.DECLINED)
7980        return "declined";
7981      if (code == ParticipationStatus.TENTATIVE)
7982        return "tentative";
7983      if (code == ParticipationStatus.NEEDSACTION)
7984        return "needs-action";
7985      return "?";
7986      }
7987    public String toSystem(ParticipationStatus code) {
7988      return code.getSystem();
7989      }
7990    }
7991
7992    public enum PublicationStatus {
7993        /**
7994         * This resource is still under development and is not yet considered to be ready for normal use.
7995         */
7996        DRAFT, 
7997        /**
7998         * This resource is ready for normal use.
7999         */
8000        ACTIVE, 
8001        /**
8002         * This resource has been withdrawn or superseded and should no longer be used.
8003         */
8004        RETIRED, 
8005        /**
8006         * The authoring system does not know which of the status values currently applies for this resource.  Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one.
8007         */
8008        UNKNOWN, 
8009        /**
8010         * added to help the parsers
8011         */
8012        NULL;
8013        public static PublicationStatus fromCode(String codeString) throws FHIRException {
8014            if (codeString == null || "".equals(codeString))
8015                return null;
8016        if ("draft".equals(codeString))
8017          return DRAFT;
8018        if ("active".equals(codeString))
8019          return ACTIVE;
8020        if ("retired".equals(codeString))
8021          return RETIRED;
8022        if ("unknown".equals(codeString))
8023          return UNKNOWN;
8024        throw new FHIRException("Unknown PublicationStatus code '"+codeString+"'");
8025        }
8026        public String toCode() {
8027          switch (this) {
8028            case DRAFT: return "draft";
8029            case ACTIVE: return "active";
8030            case RETIRED: return "retired";
8031            case UNKNOWN: return "unknown";
8032            case NULL: return null;
8033            default: return "?";
8034          }
8035        }
8036        public String getSystem() {
8037          switch (this) {
8038            case DRAFT: return "http://hl7.org/fhir/publication-status";
8039            case ACTIVE: return "http://hl7.org/fhir/publication-status";
8040            case RETIRED: return "http://hl7.org/fhir/publication-status";
8041            case UNKNOWN: return "http://hl7.org/fhir/publication-status";
8042            case NULL: return null;
8043            default: return "?";
8044          }
8045        }
8046        public String getDefinition() {
8047          switch (this) {
8048            case DRAFT: return "This resource is still under development and is not yet considered to be ready for normal use.";
8049            case ACTIVE: return "This resource is ready for normal use.";
8050            case RETIRED: return "This resource has been withdrawn or superseded and should no longer be used.";
8051            case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this resource.  Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one.";
8052            case NULL: return null;
8053            default: return "?";
8054          }
8055        }
8056        public String getDisplay() {
8057          switch (this) {
8058            case DRAFT: return "Draft";
8059            case ACTIVE: return "Active";
8060            case RETIRED: return "Retired";
8061            case UNKNOWN: return "Unknown";
8062            case NULL: return null;
8063            default: return "?";
8064          }
8065        }
8066    }
8067
8068  public static class PublicationStatusEnumFactory implements EnumFactory<PublicationStatus> {
8069    public PublicationStatus fromCode(String codeString) throws IllegalArgumentException {
8070      if (codeString == null || "".equals(codeString))
8071            if (codeString == null || "".equals(codeString))
8072                return null;
8073        if ("draft".equals(codeString))
8074          return PublicationStatus.DRAFT;
8075        if ("active".equals(codeString))
8076          return PublicationStatus.ACTIVE;
8077        if ("retired".equals(codeString))
8078          return PublicationStatus.RETIRED;
8079        if ("unknown".equals(codeString))
8080          return PublicationStatus.UNKNOWN;
8081        throw new IllegalArgumentException("Unknown PublicationStatus code '"+codeString+"'");
8082        }
8083        public Enumeration<PublicationStatus> fromType(Base code) throws FHIRException {
8084          if (code == null)
8085            return null;
8086          if (code.isEmpty())
8087            return new Enumeration<PublicationStatus>(this);
8088          String codeString = ((PrimitiveType) code).asStringValue();
8089          if (codeString == null || "".equals(codeString))
8090            return null;
8091        if ("draft".equals(codeString))
8092          return new Enumeration<PublicationStatus>(this, PublicationStatus.DRAFT);
8093        if ("active".equals(codeString))
8094          return new Enumeration<PublicationStatus>(this, PublicationStatus.ACTIVE);
8095        if ("retired".equals(codeString))
8096          return new Enumeration<PublicationStatus>(this, PublicationStatus.RETIRED);
8097        if ("unknown".equals(codeString))
8098          return new Enumeration<PublicationStatus>(this, PublicationStatus.UNKNOWN);
8099        throw new FHIRException("Unknown PublicationStatus code '"+codeString+"'");
8100        }
8101    public String toCode(PublicationStatus code) {
8102      if (code == PublicationStatus.DRAFT)
8103        return "draft";
8104      if (code == PublicationStatus.ACTIVE)
8105        return "active";
8106      if (code == PublicationStatus.RETIRED)
8107        return "retired";
8108      if (code == PublicationStatus.UNKNOWN)
8109        return "unknown";
8110      return "?";
8111      }
8112    public String toSystem(PublicationStatus code) {
8113      return code.getSystem();
8114      }
8115    }
8116
8117    public enum QuantityComparator {
8118        /**
8119         * The actual value is less than the given value.
8120         */
8121        LESS_THAN, 
8122        /**
8123         * The actual value is less than or equal to the given value.
8124         */
8125        LESS_OR_EQUAL, 
8126        /**
8127         * The actual value is greater than or equal to the given value.
8128         */
8129        GREATER_OR_EQUAL, 
8130        /**
8131         * The actual value is greater than the given value.
8132         */
8133        GREATER_THAN, 
8134        /**
8135         * added to help the parsers
8136         */
8137        NULL;
8138        public static QuantityComparator fromCode(String codeString) throws FHIRException {
8139            if (codeString == null || "".equals(codeString))
8140                return null;
8141        if ("<".equals(codeString))
8142          return LESS_THAN;
8143        if ("<=".equals(codeString))
8144          return LESS_OR_EQUAL;
8145        if (">=".equals(codeString))
8146          return GREATER_OR_EQUAL;
8147        if (">".equals(codeString))
8148          return GREATER_THAN;
8149        throw new FHIRException("Unknown QuantityComparator code '"+codeString+"'");
8150        }
8151        public String toCode() {
8152          switch (this) {
8153            case LESS_THAN: return "<";
8154            case LESS_OR_EQUAL: return "<=";
8155            case GREATER_OR_EQUAL: return ">=";
8156            case GREATER_THAN: return ">";
8157            case NULL: return null;
8158            default: return "?";
8159          }
8160        }
8161        public String getSystem() {
8162          switch (this) {
8163            case LESS_THAN: return "http://hl7.org/fhir/quantity-comparator";
8164            case LESS_OR_EQUAL: return "http://hl7.org/fhir/quantity-comparator";
8165            case GREATER_OR_EQUAL: return "http://hl7.org/fhir/quantity-comparator";
8166            case GREATER_THAN: return "http://hl7.org/fhir/quantity-comparator";
8167            case NULL: return null;
8168            default: return "?";
8169          }
8170        }
8171        public String getDefinition() {
8172          switch (this) {
8173            case LESS_THAN: return "The actual value is less than the given value.";
8174            case LESS_OR_EQUAL: return "The actual value is less than or equal to the given value.";
8175            case GREATER_OR_EQUAL: return "The actual value is greater than or equal to the given value.";
8176            case GREATER_THAN: return "The actual value is greater than the given value.";
8177            case NULL: return null;
8178            default: return "?";
8179          }
8180        }
8181        public String getDisplay() {
8182          switch (this) {
8183            case LESS_THAN: return "Less than";
8184            case LESS_OR_EQUAL: return "Less or Equal to";
8185            case GREATER_OR_EQUAL: return "Greater or Equal to";
8186            case GREATER_THAN: return "Greater than";
8187            case NULL: return null;
8188            default: return "?";
8189          }
8190        }
8191    }
8192
8193  public static class QuantityComparatorEnumFactory implements EnumFactory<QuantityComparator> {
8194    public QuantityComparator fromCode(String codeString) throws IllegalArgumentException {
8195      if (codeString == null || "".equals(codeString))
8196            if (codeString == null || "".equals(codeString))
8197                return null;
8198        if ("<".equals(codeString))
8199          return QuantityComparator.LESS_THAN;
8200        if ("<=".equals(codeString))
8201          return QuantityComparator.LESS_OR_EQUAL;
8202        if (">=".equals(codeString))
8203          return QuantityComparator.GREATER_OR_EQUAL;
8204        if (">".equals(codeString))
8205          return QuantityComparator.GREATER_THAN;
8206        throw new IllegalArgumentException("Unknown QuantityComparator code '"+codeString+"'");
8207        }
8208        public Enumeration<QuantityComparator> fromType(Base code) throws FHIRException {
8209          if (code == null)
8210            return null;
8211          if (code.isEmpty())
8212            return new Enumeration<QuantityComparator>(this);
8213          String codeString = ((PrimitiveType) code).asStringValue();
8214          if (codeString == null || "".equals(codeString))
8215            return null;
8216        if ("<".equals(codeString))
8217          return new Enumeration<QuantityComparator>(this, QuantityComparator.LESS_THAN);
8218        if ("<=".equals(codeString))
8219          return new Enumeration<QuantityComparator>(this, QuantityComparator.LESS_OR_EQUAL);
8220        if (">=".equals(codeString))
8221          return new Enumeration<QuantityComparator>(this, QuantityComparator.GREATER_OR_EQUAL);
8222        if (">".equals(codeString))
8223          return new Enumeration<QuantityComparator>(this, QuantityComparator.GREATER_THAN);
8224        throw new FHIRException("Unknown QuantityComparator code '"+codeString+"'");
8225        }
8226    public String toCode(QuantityComparator code) {
8227      if (code == QuantityComparator.LESS_THAN)
8228        return "<";
8229      if (code == QuantityComparator.LESS_OR_EQUAL)
8230        return "<=";
8231      if (code == QuantityComparator.GREATER_OR_EQUAL)
8232        return ">=";
8233      if (code == QuantityComparator.GREATER_THAN)
8234        return ">";
8235      return "?";
8236      }
8237    public String toSystem(QuantityComparator code) {
8238      return code.getSystem();
8239      }
8240    }
8241
8242    public enum RemittanceOutcome {
8243        /**
8244         * The Claim/Pre-authorization/Pre-determination has been received but processing has not begun.
8245         */
8246        QUEUED, 
8247        /**
8248         * The processing completed without errors.
8249         */
8250        COMPLETE, 
8251        /**
8252         * The processing identified errors.
8253         */
8254        ERROR, 
8255        /**
8256         * No errors have been detected and some of the adjudication has been performed.
8257         */
8258        PARTIAL, 
8259        /**
8260         * added to help the parsers
8261         */
8262        NULL;
8263        public static RemittanceOutcome fromCode(String codeString) throws FHIRException {
8264            if (codeString == null || "".equals(codeString))
8265                return null;
8266        if ("queued".equals(codeString))
8267          return QUEUED;
8268        if ("complete".equals(codeString))
8269          return COMPLETE;
8270        if ("error".equals(codeString))
8271          return ERROR;
8272        if ("partial".equals(codeString))
8273          return PARTIAL;
8274        throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'");
8275        }
8276        public String toCode() {
8277          switch (this) {
8278            case QUEUED: return "queued";
8279            case COMPLETE: return "complete";
8280            case ERROR: return "error";
8281            case PARTIAL: return "partial";
8282            case NULL: return null;
8283            default: return "?";
8284          }
8285        }
8286        public String getSystem() {
8287          switch (this) {
8288            case QUEUED: return "http://hl7.org/fhir/remittance-outcome";
8289            case COMPLETE: return "http://hl7.org/fhir/remittance-outcome";
8290            case ERROR: return "http://hl7.org/fhir/remittance-outcome";
8291            case PARTIAL: return "http://hl7.org/fhir/remittance-outcome";
8292            case NULL: return null;
8293            default: return "?";
8294          }
8295        }
8296        public String getDefinition() {
8297          switch (this) {
8298            case QUEUED: return "The Claim/Pre-authorization/Pre-determination has been received but processing has not begun.";
8299            case COMPLETE: return "The processing completed without errors.";
8300            case ERROR: return "The processing identified errors.";
8301            case PARTIAL: return "No errors have been detected and some of the adjudication has been performed.";
8302            case NULL: return null;
8303            default: return "?";
8304          }
8305        }
8306        public String getDisplay() {
8307          switch (this) {
8308            case QUEUED: return "Queued";
8309            case COMPLETE: return "Complete";
8310            case ERROR: return "Error";
8311            case PARTIAL: return "Partial";
8312            case NULL: return null;
8313            default: return "?";
8314          }
8315        }
8316    }
8317
8318  public static class RemittanceOutcomeEnumFactory implements EnumFactory<RemittanceOutcome> {
8319    public RemittanceOutcome fromCode(String codeString) throws IllegalArgumentException {
8320      if (codeString == null || "".equals(codeString))
8321            if (codeString == null || "".equals(codeString))
8322                return null;
8323        if ("queued".equals(codeString))
8324          return RemittanceOutcome.QUEUED;
8325        if ("complete".equals(codeString))
8326          return RemittanceOutcome.COMPLETE;
8327        if ("error".equals(codeString))
8328          return RemittanceOutcome.ERROR;
8329        if ("partial".equals(codeString))
8330          return RemittanceOutcome.PARTIAL;
8331        throw new IllegalArgumentException("Unknown RemittanceOutcome code '"+codeString+"'");
8332        }
8333        public Enumeration<RemittanceOutcome> fromType(Base code) throws FHIRException {
8334          if (code == null)
8335            return null;
8336          if (code.isEmpty())
8337            return new Enumeration<RemittanceOutcome>(this);
8338          String codeString = ((PrimitiveType) code).asStringValue();
8339          if (codeString == null || "".equals(codeString))
8340            return null;
8341        if ("queued".equals(codeString))
8342          return new Enumeration<RemittanceOutcome>(this, RemittanceOutcome.QUEUED);
8343        if ("complete".equals(codeString))
8344          return new Enumeration<RemittanceOutcome>(this, RemittanceOutcome.COMPLETE);
8345        if ("error".equals(codeString))
8346          return new Enumeration<RemittanceOutcome>(this, RemittanceOutcome.ERROR);
8347        if ("partial".equals(codeString))
8348          return new Enumeration<RemittanceOutcome>(this, RemittanceOutcome.PARTIAL);
8349        throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'");
8350        }
8351    public String toCode(RemittanceOutcome code) {
8352      if (code == RemittanceOutcome.QUEUED)
8353        return "queued";
8354      if (code == RemittanceOutcome.COMPLETE)
8355        return "complete";
8356      if (code == RemittanceOutcome.ERROR)
8357        return "error";
8358      if (code == RemittanceOutcome.PARTIAL)
8359        return "partial";
8360      return "?";
8361      }
8362    public String toSystem(RemittanceOutcome code) {
8363      return code.getSystem();
8364      }
8365    }
8366
8367    public enum RequestIntent {
8368        /**
8369         * The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act.
8370         */
8371        PROPOSAL, 
8372        /**
8373         * The request represents an intention to ensure something occurs without providing an authorization for others to act.
8374         */
8375        PLAN, 
8376        /**
8377         * The request represents a legally binding instruction authored by a Patient or RelatedPerson.
8378         */
8379        DIRECTIVE, 
8380        /**
8381         * The request represents a request/demand and authorization for action by a Practitioner.
8382         */
8383        ORDER, 
8384        /**
8385         * The request represents an original authorization for action.
8386         */
8387        ORIGINALORDER, 
8388        /**
8389         * The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization.
8390         */
8391        REFLEXORDER, 
8392        /**
8393         * The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order.
8394         */
8395        FILLERORDER, 
8396        /**
8397         * An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence.  E.g. The administration of a single dose of a drug.
8398         */
8399        INSTANCEORDER, 
8400        /**
8401         * The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestGroup]]] for additional information on how this status is used.
8402         */
8403        OPTION, 
8404        /**
8405         * added to help the parsers
8406         */
8407        NULL;
8408        public static RequestIntent fromCode(String codeString) throws FHIRException {
8409            if (codeString == null || "".equals(codeString))
8410                return null;
8411        if ("proposal".equals(codeString))
8412          return PROPOSAL;
8413        if ("plan".equals(codeString))
8414          return PLAN;
8415        if ("directive".equals(codeString))
8416          return DIRECTIVE;
8417        if ("order".equals(codeString))
8418          return ORDER;
8419        if ("original-order".equals(codeString))
8420          return ORIGINALORDER;
8421        if ("reflex-order".equals(codeString))
8422          return REFLEXORDER;
8423        if ("filler-order".equals(codeString))
8424          return FILLERORDER;
8425        if ("instance-order".equals(codeString))
8426          return INSTANCEORDER;
8427        if ("option".equals(codeString))
8428          return OPTION;
8429        throw new FHIRException("Unknown RequestIntent code '"+codeString+"'");
8430        }
8431        public String toCode() {
8432          switch (this) {
8433            case PROPOSAL: return "proposal";
8434            case PLAN: return "plan";
8435            case DIRECTIVE: return "directive";
8436            case ORDER: return "order";
8437            case ORIGINALORDER: return "original-order";
8438            case REFLEXORDER: return "reflex-order";
8439            case FILLERORDER: return "filler-order";
8440            case INSTANCEORDER: return "instance-order";
8441            case OPTION: return "option";
8442            case NULL: return null;
8443            default: return "?";
8444          }
8445        }
8446        public String getSystem() {
8447          switch (this) {
8448            case PROPOSAL: return "http://hl7.org/fhir/request-intent";
8449            case PLAN: return "http://hl7.org/fhir/request-intent";
8450            case DIRECTIVE: return "http://hl7.org/fhir/request-intent";
8451            case ORDER: return "http://hl7.org/fhir/request-intent";
8452            case ORIGINALORDER: return "http://hl7.org/fhir/request-intent";
8453            case REFLEXORDER: return "http://hl7.org/fhir/request-intent";
8454            case FILLERORDER: return "http://hl7.org/fhir/request-intent";
8455            case INSTANCEORDER: return "http://hl7.org/fhir/request-intent";
8456            case OPTION: return "http://hl7.org/fhir/request-intent";
8457            case NULL: return null;
8458            default: return "?";
8459          }
8460        }
8461        public String getDefinition() {
8462          switch (this) {
8463            case PROPOSAL: return "The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act.";
8464            case PLAN: return "The request represents an intention to ensure something occurs without providing an authorization for others to act.";
8465            case DIRECTIVE: return "The request represents a legally binding instruction authored by a Patient or RelatedPerson.";
8466            case ORDER: return "The request represents a request/demand and authorization for action by a Practitioner.";
8467            case ORIGINALORDER: return "The request represents an original authorization for action.";
8468            case REFLEXORDER: return "The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization.";
8469            case FILLERORDER: return "The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order.";
8470            case INSTANCEORDER: return "An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence.  E.g. The administration of a single dose of a drug.";
8471            case OPTION: return "The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestGroup]]] for additional information on how this status is used.";
8472            case NULL: return null;
8473            default: return "?";
8474          }
8475        }
8476        public String getDisplay() {
8477          switch (this) {
8478            case PROPOSAL: return "Proposal";
8479            case PLAN: return "Plan";
8480            case DIRECTIVE: return "Directive";
8481            case ORDER: return "Order";
8482            case ORIGINALORDER: return "Original Order";
8483            case REFLEXORDER: return "Reflex Order";
8484            case FILLERORDER: return "Filler Order";
8485            case INSTANCEORDER: return "Instance Order";
8486            case OPTION: return "Option";
8487            case NULL: return null;
8488            default: return "?";
8489          }
8490        }
8491    }
8492
8493  public static class RequestIntentEnumFactory implements EnumFactory<RequestIntent> {
8494    public RequestIntent fromCode(String codeString) throws IllegalArgumentException {
8495      if (codeString == null || "".equals(codeString))
8496            if (codeString == null || "".equals(codeString))
8497                return null;
8498        if ("proposal".equals(codeString))
8499          return RequestIntent.PROPOSAL;
8500        if ("plan".equals(codeString))
8501          return RequestIntent.PLAN;
8502        if ("directive".equals(codeString))
8503          return RequestIntent.DIRECTIVE;
8504        if ("order".equals(codeString))
8505          return RequestIntent.ORDER;
8506        if ("original-order".equals(codeString))
8507          return RequestIntent.ORIGINALORDER;
8508        if ("reflex-order".equals(codeString))
8509          return RequestIntent.REFLEXORDER;
8510        if ("filler-order".equals(codeString))
8511          return RequestIntent.FILLERORDER;
8512        if ("instance-order".equals(codeString))
8513          return RequestIntent.INSTANCEORDER;
8514        if ("option".equals(codeString))
8515          return RequestIntent.OPTION;
8516        throw new IllegalArgumentException("Unknown RequestIntent code '"+codeString+"'");
8517        }
8518        public Enumeration<RequestIntent> fromType(Base code) throws FHIRException {
8519          if (code == null)
8520            return null;
8521          if (code.isEmpty())
8522            return new Enumeration<RequestIntent>(this);
8523          String codeString = ((PrimitiveType) code).asStringValue();
8524          if (codeString == null || "".equals(codeString))
8525            return null;
8526        if ("proposal".equals(codeString))
8527          return new Enumeration<RequestIntent>(this, RequestIntent.PROPOSAL);
8528        if ("plan".equals(codeString))
8529          return new Enumeration<RequestIntent>(this, RequestIntent.PLAN);
8530        if ("directive".equals(codeString))
8531          return new Enumeration<RequestIntent>(this, RequestIntent.DIRECTIVE);
8532        if ("order".equals(codeString))
8533          return new Enumeration<RequestIntent>(this, RequestIntent.ORDER);
8534        if ("original-order".equals(codeString))
8535          return new Enumeration<RequestIntent>(this, RequestIntent.ORIGINALORDER);
8536        if ("reflex-order".equals(codeString))
8537          return new Enumeration<RequestIntent>(this, RequestIntent.REFLEXORDER);
8538        if ("filler-order".equals(codeString))
8539          return new Enumeration<RequestIntent>(this, RequestIntent.FILLERORDER);
8540        if ("instance-order".equals(codeString))
8541          return new Enumeration<RequestIntent>(this, RequestIntent.INSTANCEORDER);
8542        if ("option".equals(codeString))
8543          return new Enumeration<RequestIntent>(this, RequestIntent.OPTION);
8544        throw new FHIRException("Unknown RequestIntent code '"+codeString+"'");
8545        }
8546    public String toCode(RequestIntent code) {
8547      if (code == RequestIntent.PROPOSAL)
8548        return "proposal";
8549      if (code == RequestIntent.PLAN)
8550        return "plan";
8551      if (code == RequestIntent.DIRECTIVE)
8552        return "directive";
8553      if (code == RequestIntent.ORDER)
8554        return "order";
8555      if (code == RequestIntent.ORIGINALORDER)
8556        return "original-order";
8557      if (code == RequestIntent.REFLEXORDER)
8558        return "reflex-order";
8559      if (code == RequestIntent.FILLERORDER)
8560        return "filler-order";
8561      if (code == RequestIntent.INSTANCEORDER)
8562        return "instance-order";
8563      if (code == RequestIntent.OPTION)
8564        return "option";
8565      return "?";
8566      }
8567    public String toSystem(RequestIntent code) {
8568      return code.getSystem();
8569      }
8570    }
8571
8572    public enum RequestPriority {
8573        /**
8574         * The request has normal priority.
8575         */
8576        ROUTINE, 
8577        /**
8578         * The request should be actioned promptly - higher priority than routine.
8579         */
8580        URGENT, 
8581        /**
8582         * The request should be actioned as soon as possible - higher priority than urgent.
8583         */
8584        ASAP, 
8585        /**
8586         * The request should be actioned immediately - highest possible priority.  E.g. an emergency.
8587         */
8588        STAT, 
8589        /**
8590         * added to help the parsers
8591         */
8592        NULL;
8593        public static RequestPriority fromCode(String codeString) throws FHIRException {
8594            if (codeString == null || "".equals(codeString))
8595                return null;
8596        if ("routine".equals(codeString))
8597          return ROUTINE;
8598        if ("urgent".equals(codeString))
8599          return URGENT;
8600        if ("asap".equals(codeString))
8601          return ASAP;
8602        if ("stat".equals(codeString))
8603          return STAT;
8604        throw new FHIRException("Unknown RequestPriority code '"+codeString+"'");
8605        }
8606        public String toCode() {
8607          switch (this) {
8608            case ROUTINE: return "routine";
8609            case URGENT: return "urgent";
8610            case ASAP: return "asap";
8611            case STAT: return "stat";
8612            case NULL: return null;
8613            default: return "?";
8614          }
8615        }
8616        public String getSystem() {
8617          switch (this) {
8618            case ROUTINE: return "http://hl7.org/fhir/request-priority";
8619            case URGENT: return "http://hl7.org/fhir/request-priority";
8620            case ASAP: return "http://hl7.org/fhir/request-priority";
8621            case STAT: return "http://hl7.org/fhir/request-priority";
8622            case NULL: return null;
8623            default: return "?";
8624          }
8625        }
8626        public String getDefinition() {
8627          switch (this) {
8628            case ROUTINE: return "The request has normal priority.";
8629            case URGENT: return "The request should be actioned promptly - higher priority than routine.";
8630            case ASAP: return "The request should be actioned as soon as possible - higher priority than urgent.";
8631            case STAT: return "The request should be actioned immediately - highest possible priority.  E.g. an emergency.";
8632            case NULL: return null;
8633            default: return "?";
8634          }
8635        }
8636        public String getDisplay() {
8637          switch (this) {
8638            case ROUTINE: return "Routine";
8639            case URGENT: return "Urgent";
8640            case ASAP: return "ASAP";
8641            case STAT: return "STAT";
8642            case NULL: return null;
8643            default: return "?";
8644          }
8645        }
8646    }
8647
8648  public static class RequestPriorityEnumFactory implements EnumFactory<RequestPriority> {
8649    public RequestPriority fromCode(String codeString) throws IllegalArgumentException {
8650      if (codeString == null || "".equals(codeString))
8651            if (codeString == null || "".equals(codeString))
8652                return null;
8653        if ("routine".equals(codeString))
8654          return RequestPriority.ROUTINE;
8655        if ("urgent".equals(codeString))
8656          return RequestPriority.URGENT;
8657        if ("asap".equals(codeString))
8658          return RequestPriority.ASAP;
8659        if ("stat".equals(codeString))
8660          return RequestPriority.STAT;
8661        throw new IllegalArgumentException("Unknown RequestPriority code '"+codeString+"'");
8662        }
8663        public Enumeration<RequestPriority> fromType(Base code) throws FHIRException {
8664          if (code == null)
8665            return null;
8666          if (code.isEmpty())
8667            return new Enumeration<RequestPriority>(this);
8668          String codeString = ((PrimitiveType) code).asStringValue();
8669          if (codeString == null || "".equals(codeString))
8670            return null;
8671        if ("routine".equals(codeString))
8672          return new Enumeration<RequestPriority>(this, RequestPriority.ROUTINE);
8673        if ("urgent".equals(codeString))
8674          return new Enumeration<RequestPriority>(this, RequestPriority.URGENT);
8675        if ("asap".equals(codeString))
8676          return new Enumeration<RequestPriority>(this, RequestPriority.ASAP);
8677        if ("stat".equals(codeString))
8678          return new Enumeration<RequestPriority>(this, RequestPriority.STAT);
8679        throw new FHIRException("Unknown RequestPriority code '"+codeString+"'");
8680        }
8681    public String toCode(RequestPriority code) {
8682      if (code == RequestPriority.ROUTINE)
8683        return "routine";
8684      if (code == RequestPriority.URGENT)
8685        return "urgent";
8686      if (code == RequestPriority.ASAP)
8687        return "asap";
8688      if (code == RequestPriority.STAT)
8689        return "stat";
8690      return "?";
8691      }
8692    public String toSystem(RequestPriority code) {
8693      return code.getSystem();
8694      }
8695    }
8696
8697    public enum RequestStatus {
8698        /**
8699         * The request has been created but is not yet complete or ready for action.
8700         */
8701        DRAFT, 
8702        /**
8703         * The request is in force and ready to be acted upon.
8704         */
8705        ACTIVE, 
8706        /**
8707         * The request (and any implicit authorization to act) has been temporarily withdrawn but is expected to resume in the future.
8708         */
8709        ONHOLD, 
8710        /**
8711         * The request (and any implicit authorization to act) has been terminated prior to the known full completion of the intended actions.  No further activity should occur.
8712         */
8713        REVOKED, 
8714        /**
8715         * The activity described by the request has been fully performed.  No further activity will occur.
8716         */
8717        COMPLETED, 
8718        /**
8719         * This request should never have existed and should be considered 'void'.  (It is possible that real-world decisions were based on it.  If real-world activity has occurred, the status should be "revoked" rather than "entered-in-error".).
8720         */
8721        ENTEREDINERROR, 
8722        /**
8723         * The authoring/source system does not know which of the status values currently applies for this request.  Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply,  but the authoring/source system does not know which.
8724         */
8725        UNKNOWN, 
8726        /**
8727         * added to help the parsers
8728         */
8729        NULL;
8730        public static RequestStatus fromCode(String codeString) throws FHIRException {
8731            if (codeString == null || "".equals(codeString))
8732                return null;
8733        if ("draft".equals(codeString))
8734          return DRAFT;
8735        if ("active".equals(codeString))
8736          return ACTIVE;
8737        if ("on-hold".equals(codeString))
8738          return ONHOLD;
8739        if ("revoked".equals(codeString))
8740          return REVOKED;
8741        if ("completed".equals(codeString))
8742          return COMPLETED;
8743        if ("entered-in-error".equals(codeString))
8744          return ENTEREDINERROR;
8745        if ("unknown".equals(codeString))
8746          return UNKNOWN;
8747        throw new FHIRException("Unknown RequestStatus code '"+codeString+"'");
8748        }
8749        public String toCode() {
8750          switch (this) {
8751            case DRAFT: return "draft";
8752            case ACTIVE: return "active";
8753            case ONHOLD: return "on-hold";
8754            case REVOKED: return "revoked";
8755            case COMPLETED: return "completed";
8756            case ENTEREDINERROR: return "entered-in-error";
8757            case UNKNOWN: return "unknown";
8758            case NULL: return null;
8759            default: return "?";
8760          }
8761        }
8762        public String getSystem() {
8763          switch (this) {
8764            case DRAFT: return "http://hl7.org/fhir/request-status";
8765            case ACTIVE: return "http://hl7.org/fhir/request-status";
8766            case ONHOLD: return "http://hl7.org/fhir/request-status";
8767            case REVOKED: return "http://hl7.org/fhir/request-status";
8768            case COMPLETED: return "http://hl7.org/fhir/request-status";
8769            case ENTEREDINERROR: return "http://hl7.org/fhir/request-status";
8770            case UNKNOWN: return "http://hl7.org/fhir/request-status";
8771            case NULL: return null;
8772            default: return "?";
8773          }
8774        }
8775        public String getDefinition() {
8776          switch (this) {
8777            case DRAFT: return "The request has been created but is not yet complete or ready for action.";
8778            case ACTIVE: return "The request is in force and ready to be acted upon.";
8779            case ONHOLD: return "The request (and any implicit authorization to act) has been temporarily withdrawn but is expected to resume in the future.";
8780            case REVOKED: return "The request (and any implicit authorization to act) has been terminated prior to the known full completion of the intended actions.  No further activity should occur.";
8781            case COMPLETED: return "The activity described by the request has been fully performed.  No further activity will occur.";
8782            case ENTEREDINERROR: return "This request should never have existed and should be considered 'void'.  (It is possible that real-world decisions were based on it.  If real-world activity has occurred, the status should be \"revoked\" rather than \"entered-in-error\".).";
8783            case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this request.  Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply,  but the authoring/source system does not know which.";
8784            case NULL: return null;
8785            default: return "?";
8786          }
8787        }
8788        public String getDisplay() {
8789          switch (this) {
8790            case DRAFT: return "Draft";
8791            case ACTIVE: return "Active";
8792            case ONHOLD: return "On Hold";
8793            case REVOKED: return "Revoked";
8794            case COMPLETED: return "Completed";
8795            case ENTEREDINERROR: return "Entered in Error";
8796            case UNKNOWN: return "Unknown";
8797            case NULL: return null;
8798            default: return "?";
8799          }
8800        }
8801    }
8802
8803  public static class RequestStatusEnumFactory implements EnumFactory<RequestStatus> {
8804    public RequestStatus fromCode(String codeString) throws IllegalArgumentException {
8805      if (codeString == null || "".equals(codeString))
8806            if (codeString == null || "".equals(codeString))
8807                return null;
8808        if ("draft".equals(codeString))
8809          return RequestStatus.DRAFT;
8810        if ("active".equals(codeString))
8811          return RequestStatus.ACTIVE;
8812        if ("on-hold".equals(codeString))
8813          return RequestStatus.ONHOLD;
8814        if ("revoked".equals(codeString))
8815          return RequestStatus.REVOKED;
8816        if ("completed".equals(codeString))
8817          return RequestStatus.COMPLETED;
8818        if ("entered-in-error".equals(codeString))
8819          return RequestStatus.ENTEREDINERROR;
8820        if ("unknown".equals(codeString))
8821          return RequestStatus.UNKNOWN;
8822        throw new IllegalArgumentException("Unknown RequestStatus code '"+codeString+"'");
8823        }
8824        public Enumeration<RequestStatus> fromType(Base code) throws FHIRException {
8825          if (code == null)
8826            return null;
8827          if (code.isEmpty())
8828            return new Enumeration<RequestStatus>(this);
8829          String codeString = ((PrimitiveType) code).asStringValue();
8830          if (codeString == null || "".equals(codeString))
8831            return null;
8832        if ("draft".equals(codeString))
8833          return new Enumeration<RequestStatus>(this, RequestStatus.DRAFT);
8834        if ("active".equals(codeString))
8835          return new Enumeration<RequestStatus>(this, RequestStatus.ACTIVE);
8836        if ("on-hold".equals(codeString))
8837          return new Enumeration<RequestStatus>(this, RequestStatus.ONHOLD);
8838        if ("revoked".equals(codeString))
8839          return new Enumeration<RequestStatus>(this, RequestStatus.REVOKED);
8840        if ("completed".equals(codeString))
8841          return new Enumeration<RequestStatus>(this, RequestStatus.COMPLETED);
8842        if ("entered-in-error".equals(codeString))
8843          return new Enumeration<RequestStatus>(this, RequestStatus.ENTEREDINERROR);
8844        if ("unknown".equals(codeString))
8845          return new Enumeration<RequestStatus>(this, RequestStatus.UNKNOWN);
8846        throw new FHIRException("Unknown RequestStatus code '"+codeString+"'");
8847        }
8848    public String toCode(RequestStatus code) {
8849      if (code == RequestStatus.DRAFT)
8850        return "draft";
8851      if (code == RequestStatus.ACTIVE)
8852        return "active";
8853      if (code == RequestStatus.ONHOLD)
8854        return "on-hold";
8855      if (code == RequestStatus.REVOKED)
8856        return "revoked";
8857      if (code == RequestStatus.COMPLETED)
8858        return "completed";
8859      if (code == RequestStatus.ENTEREDINERROR)
8860        return "entered-in-error";
8861      if (code == RequestStatus.UNKNOWN)
8862        return "unknown";
8863      return "?";
8864      }
8865    public String toSystem(RequestStatus code) {
8866      return code.getSystem();
8867      }
8868    }
8869
8870    public enum ResourceTypeEnum {
8871        /**
8872         * --- Abstract Type! ---This is the base resource type for everything.
8873         */
8874        RESOURCE, 
8875        /**
8876         * A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.
8877         */
8878        BINARY, 
8879        /**
8880         * A container for a collection of resources.
8881         */
8882        BUNDLE, 
8883        /**
8884         * --- Abstract Type! ---A resource that includes narrative, extensions, and contained resources.
8885         */
8886        DOMAINRESOURCE, 
8887        /**
8888         * A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.
8889         */
8890        ACCOUNT, 
8891        /**
8892         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
8893         */
8894        ACTIVITYDEFINITION, 
8895        /**
8896         * A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed).
8897         */
8898        ADMINISTRABLEPRODUCTDEFINITION, 
8899        /**
8900         * Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.
8901         */
8902        ADVERSEEVENT, 
8903        /**
8904         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
8905         */
8906        ALLERGYINTOLERANCE, 
8907        /**
8908         * A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).
8909         */
8910        APPOINTMENT, 
8911        /**
8912         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
8913         */
8914        APPOINTMENTRESPONSE, 
8915        /**
8916         * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.
8917         */
8918        AUDITEVENT, 
8919        /**
8920         * Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.
8921         */
8922        BASIC, 
8923        /**
8924         * A material substance originating from a biological entity intended to be transplanted or infused
8925into another (possibly the same) biological entity.
8926         */
8927        BIOLOGICALLYDERIVEDPRODUCT, 
8928        /**
8929         * Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.
8930         */
8931        BODYSTRUCTURE, 
8932        /**
8933         * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
8934         */
8935        CAPABILITYSTATEMENT, 
8936        /**
8937         * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.
8938         */
8939        CAREPLAN, 
8940        /**
8941         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
8942         */
8943        CARETEAM, 
8944        /**
8945         * Catalog entries are wrappers that contextualize items included in a catalog.
8946         */
8947        CATALOGENTRY, 
8948        /**
8949         * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.
8950         */
8951        CHARGEITEM, 
8952        /**
8953         * The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.
8954         */
8955        CHARGEITEMDEFINITION, 
8956        /**
8957         * The Citation Resource enables reference to any knowledge artifact for purposes of identification and attribution. The Citation Resource supports existing reference structures and developing publication practices such as versioning, expressing complex contributorship roles, and referencing computable resources.
8958         */
8959        CITATION, 
8960        /**
8961         * A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.
8962         */
8963        CLAIM, 
8964        /**
8965         * This resource provides the adjudication details from the processing of a Claim resource.
8966         */
8967        CLAIMRESPONSE, 
8968        /**
8969         * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score.
8970         */
8971        CLINICALIMPRESSION, 
8972        /**
8973         * A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.
8974         */
8975        CLINICALUSEDEFINITION, 
8976        /**
8977         * The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.
8978         */
8979        CODESYSTEM, 
8980        /**
8981         * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.
8982         */
8983        COMMUNICATION, 
8984        /**
8985         * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.
8986         */
8987        COMMUNICATIONREQUEST, 
8988        /**
8989         * A compartment definition that defines how resources are accessed on a server.
8990         */
8991        COMPARTMENTDEFINITION, 
8992        /**
8993         * A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).
8994         */
8995        COMPOSITION, 
8996        /**
8997         * A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.
8998         */
8999        CONCEPTMAP, 
9000        /**
9001         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
9002         */
9003        CONDITION, 
9004        /**
9005         * A record of a healthcare consumer’s  choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.
9006         */
9007        CONSENT, 
9008        /**
9009         * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.
9010         */
9011        CONTRACT, 
9012        /**
9013         * Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.
9014         */
9015        COVERAGE, 
9016        /**
9017         * The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.
9018         */
9019        COVERAGEELIGIBILITYREQUEST, 
9020        /**
9021         * This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.
9022         */
9023        COVERAGEELIGIBILITYRESPONSE, 
9024        /**
9025         * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.
9026         */
9027        DETECTEDISSUE, 
9028        /**
9029         * A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.
9030         */
9031        DEVICE, 
9032        /**
9033         * The characteristics, operational status and capabilities of a medical-related component of a medical device.
9034         */
9035        DEVICEDEFINITION, 
9036        /**
9037         * Describes a measurement, calculation or setting capability of a medical device.
9038         */
9039        DEVICEMETRIC, 
9040        /**
9041         * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.
9042         */
9043        DEVICEREQUEST, 
9044        /**
9045         * A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.
9046         */
9047        DEVICEUSESTATEMENT, 
9048        /**
9049         * The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.
9050         */
9051        DIAGNOSTICREPORT, 
9052        /**
9053         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
9054         */
9055        DOCUMENTMANIFEST, 
9056        /**
9057         * A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.
9058         */
9059        DOCUMENTREFERENCE, 
9060        /**
9061         * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.
9062         */
9063        ENCOUNTER, 
9064        /**
9065         * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.
9066         */
9067        ENDPOINT, 
9068        /**
9069         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
9070         */
9071        ENROLLMENTREQUEST, 
9072        /**
9073         * This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.
9074         */
9075        ENROLLMENTRESPONSE, 
9076        /**
9077         * An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.
9078         */
9079        EPISODEOFCARE, 
9080        /**
9081         * The EventDefinition resource provides a reusable description of when a particular event can occur.
9082         */
9083        EVENTDEFINITION, 
9084        /**
9085         * The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (eg population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.
9086         */
9087        EVIDENCE, 
9088        /**
9089         * The EvidenceReport Resource is a specialized container for a collection of resources and codable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.
9090         */
9091        EVIDENCEREPORT, 
9092        /**
9093         * The EvidenceVariable resource describes an element that knowledge (Evidence) is about.
9094         */
9095        EVIDENCEVARIABLE, 
9096        /**
9097         * Example of workflow instance.
9098         */
9099        EXAMPLESCENARIO, 
9100        /**
9101         * This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.
9102         */
9103        EXPLANATIONOFBENEFIT, 
9104        /**
9105         * Significant health conditions for a person related to the patient relevant in the context of care for the patient.
9106         */
9107        FAMILYMEMBERHISTORY, 
9108        /**
9109         * Prospective warnings of potential issues when providing care to the patient.
9110         */
9111        FLAG, 
9112        /**
9113         * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.
9114         */
9115        GOAL, 
9116        /**
9117         * A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.
9118         */
9119        GRAPHDEFINITION, 
9120        /**
9121         * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.
9122         */
9123        GROUP, 
9124        /**
9125         * A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.
9126         */
9127        GUIDANCERESPONSE, 
9128        /**
9129         * The details of a healthcare service available at a location.
9130         */
9131        HEALTHCARESERVICE, 
9132        /**
9133         * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.
9134         */
9135        IMAGINGSTUDY, 
9136        /**
9137         * Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.
9138         */
9139        IMMUNIZATION, 
9140        /**
9141         * Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those  recommendations.
9142         */
9143        IMMUNIZATIONEVALUATION, 
9144        /**
9145         * A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.
9146         */
9147        IMMUNIZATIONRECOMMENDATION, 
9148        /**
9149         * A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.
9150         */
9151        IMPLEMENTATIONGUIDE, 
9152        /**
9153         * An ingredient of a manufactured item or pharmaceutical product.
9154         */
9155        INGREDIENT, 
9156        /**
9157         * Details of a Health Insurance product/plan provided by an organization.
9158         */
9159        INSURANCEPLAN, 
9160        /**
9161         * Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.
9162         */
9163        INVOICE, 
9164        /**
9165         * The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.
9166         */
9167        LIBRARY, 
9168        /**
9169         * Identifies two or more records (resource instances) that refer to the same real-world "occurrence".
9170         */
9171        LINKAGE, 
9172        /**
9173         * A list is a curated collection of resources.
9174         */
9175        LIST, 
9176        /**
9177         * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.
9178         */
9179        LOCATION, 
9180        /**
9181         * The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.
9182         */
9183        MANUFACTUREDITEMDEFINITION, 
9184        /**
9185         * The Measure resource provides the definition of a quality measure.
9186         */
9187        MEASURE, 
9188        /**
9189         * The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.
9190         */
9191        MEASUREREPORT, 
9192        /**
9193         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
9194         */
9195        MEDIA, 
9196        /**
9197         * This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.
9198         */
9199        MEDICATION, 
9200        /**
9201         * Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.
9202         */
9203        MEDICATIONADMINISTRATION, 
9204        /**
9205         * Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.
9206         */
9207        MEDICATIONDISPENSE, 
9208        /**
9209         * Information about a medication that is used to support knowledge.
9210         */
9211        MEDICATIONKNOWLEDGE, 
9212        /**
9213         * An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.
9214         */
9215        MEDICATIONREQUEST, 
9216        /**
9217         * A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. 
9218
9219The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.
9220         */
9221        MEDICATIONSTATEMENT, 
9222        /**
9223         * Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use, drug catalogs).
9224         */
9225        MEDICINALPRODUCTDEFINITION, 
9226        /**
9227         * Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.
9228         */
9229        MESSAGEDEFINITION, 
9230        /**
9231         * The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.
9232         */
9233        MESSAGEHEADER, 
9234        /**
9235         * Raw data describing a biological sequence.
9236         */
9237        MOLECULARSEQUENCE, 
9238        /**
9239         * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a "System" used within the Identifier and Coding data types.
9240         */
9241        NAMINGSYSTEM, 
9242        /**
9243         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
9244         */
9245        NUTRITIONORDER, 
9246        /**
9247         * A food or fluid product that is consumed by patients.
9248         */
9249        NUTRITIONPRODUCT, 
9250        /**
9251         * Measurements and simple assertions made about a patient, device or other subject.
9252         */
9253        OBSERVATION, 
9254        /**
9255         * Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.
9256         */
9257        OBSERVATIONDEFINITION, 
9258        /**
9259         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
9260         */
9261        OPERATIONDEFINITION, 
9262        /**
9263         * A collection of error, warning, or information messages that result from a system action.
9264         */
9265        OPERATIONOUTCOME, 
9266        /**
9267         * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.
9268         */
9269        ORGANIZATION, 
9270        /**
9271         * Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.
9272         */
9273        ORGANIZATIONAFFILIATION, 
9274        /**
9275         * A medically related item or items, in a container or package.
9276         */
9277        PACKAGEDPRODUCTDEFINITION, 
9278        /**
9279         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
9280         */
9281        PATIENT, 
9282        /**
9283         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
9284         */
9285        PAYMENTNOTICE, 
9286        /**
9287         * This resource provides the details including amount of a payment and allocates the payment items being paid.
9288         */
9289        PAYMENTRECONCILIATION, 
9290        /**
9291         * Demographics and administrative information about a person independent of a specific health-related context.
9292         */
9293        PERSON, 
9294        /**
9295         * This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.
9296         */
9297        PLANDEFINITION, 
9298        /**
9299         * A person who is directly or indirectly involved in the provisioning of healthcare.
9300         */
9301        PRACTITIONER, 
9302        /**
9303         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
9304         */
9305        PRACTITIONERROLE, 
9306        /**
9307         * An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.
9308         */
9309        PROCEDURE, 
9310        /**
9311         * Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.
9312         */
9313        PROVENANCE, 
9314        /**
9315         * A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.
9316         */
9317        QUESTIONNAIRE, 
9318        /**
9319         * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.
9320         */
9321        QUESTIONNAIRERESPONSE, 
9322        /**
9323         * Regulatory approval, clearance or licencing related to a regulated product, treatment, facility or activity that is cited in a guidance, regulation, rule or legislative act. An example is Market Authorization relating to a Medicinal Product.
9324         */
9325        REGULATEDAUTHORIZATION, 
9326        /**
9327         * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.
9328         */
9329        RELATEDPERSON, 
9330        /**
9331         * A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one".
9332         */
9333        REQUESTGROUP, 
9334        /**
9335         * The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.
9336         */
9337        RESEARCHDEFINITION, 
9338        /**
9339         * The ResearchElementDefinition resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.
9340         */
9341        RESEARCHELEMENTDEFINITION, 
9342        /**
9343         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
9344         */
9345        RESEARCHSTUDY, 
9346        /**
9347         * A physical entity which is the primary unit of operational and/or administrative interest in a study.
9348         */
9349        RESEARCHSUBJECT, 
9350        /**
9351         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
9352         */
9353        RISKASSESSMENT, 
9354        /**
9355         * A container for slots of time that may be available for booking appointments.
9356         */
9357        SCHEDULE, 
9358        /**
9359         * A search parameter that defines a named search item that can be used to search/filter on a resource.
9360         */
9361        SEARCHPARAMETER, 
9362        /**
9363         * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.
9364         */
9365        SERVICEREQUEST, 
9366        /**
9367         * A slot of time on a schedule that may be available for booking appointments.
9368         */
9369        SLOT, 
9370        /**
9371         * A sample to be used for analysis.
9372         */
9373        SPECIMEN, 
9374        /**
9375         * A kind of specimen with associated set of requirements.
9376         */
9377        SPECIMENDEFINITION, 
9378        /**
9379         * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.
9380         */
9381        STRUCTUREDEFINITION, 
9382        /**
9383         * A Map of relationships between 2 structures that can be used to transform data.
9384         */
9385        STRUCTUREMAP, 
9386        /**
9387         * The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system can take an appropriate action.
9388         */
9389        SUBSCRIPTION, 
9390        /**
9391         * The SubscriptionStatus resource describes the state of a Subscription during notifications.
9392         */
9393        SUBSCRIPTIONSTATUS, 
9394        /**
9395         * Describes a stream of resource state changes identified by trigger criteria and annotated with labels useful to filter projections from this topic.
9396         */
9397        SUBSCRIPTIONTOPIC, 
9398        /**
9399         * A homogeneous material with a definite composition.
9400         */
9401        SUBSTANCE, 
9402        /**
9403         * The detailed description of a substance, typically at a level beyond what is used for prescribing.
9404         */
9405        SUBSTANCEDEFINITION, 
9406        /**
9407         * Record of delivery of what is supplied.
9408         */
9409        SUPPLYDELIVERY, 
9410        /**
9411         * A record of a request for a medication, substance or device used in the healthcare setting.
9412         */
9413        SUPPLYREQUEST, 
9414        /**
9415         * A task to be performed.
9416         */
9417        TASK, 
9418        /**
9419         * A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
9420         */
9421        TERMINOLOGYCAPABILITIES, 
9422        /**
9423         * A summary of information based on the results of executing a TestScript.
9424         */
9425        TESTREPORT, 
9426        /**
9427         * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
9428         */
9429        TESTSCRIPT, 
9430        /**
9431         * A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).
9432         */
9433        VALUESET, 
9434        /**
9435         * Describes validation requirements, source(s), status and dates for one or more elements.
9436         */
9437        VERIFICATIONRESULT, 
9438        /**
9439         * An authorization for the provision of glasses and/or contact lenses to a patient.
9440         */
9441        VISIONPRESCRIPTION, 
9442        /**
9443         * This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it.
9444         */
9445        PARAMETERS, 
9446        /**
9447         * added to help the parsers
9448         */
9449        NULL;
9450        public static ResourceTypeEnum fromCode(String codeString) throws FHIRException {
9451            if (codeString == null || "".equals(codeString))
9452                return null;
9453        if ("Resource".equals(codeString))
9454          return RESOURCE;
9455        if ("Binary".equals(codeString))
9456          return BINARY;
9457        if ("Bundle".equals(codeString))
9458          return BUNDLE;
9459        if ("DomainResource".equals(codeString))
9460          return DOMAINRESOURCE;
9461        if ("Account".equals(codeString))
9462          return ACCOUNT;
9463        if ("ActivityDefinition".equals(codeString))
9464          return ACTIVITYDEFINITION;
9465        if ("AdministrableProductDefinition".equals(codeString))
9466          return ADMINISTRABLEPRODUCTDEFINITION;
9467        if ("AdverseEvent".equals(codeString))
9468          return ADVERSEEVENT;
9469        if ("AllergyIntolerance".equals(codeString))
9470          return ALLERGYINTOLERANCE;
9471        if ("Appointment".equals(codeString))
9472          return APPOINTMENT;
9473        if ("AppointmentResponse".equals(codeString))
9474          return APPOINTMENTRESPONSE;
9475        if ("AuditEvent".equals(codeString))
9476          return AUDITEVENT;
9477        if ("Basic".equals(codeString))
9478          return BASIC;
9479        if ("BiologicallyDerivedProduct".equals(codeString))
9480          return BIOLOGICALLYDERIVEDPRODUCT;
9481        if ("BodyStructure".equals(codeString))
9482          return BODYSTRUCTURE;
9483        if ("CapabilityStatement".equals(codeString))
9484          return CAPABILITYSTATEMENT;
9485        if ("CarePlan".equals(codeString))
9486          return CAREPLAN;
9487        if ("CareTeam".equals(codeString))
9488          return CARETEAM;
9489        if ("CatalogEntry".equals(codeString))
9490          return CATALOGENTRY;
9491        if ("ChargeItem".equals(codeString))
9492          return CHARGEITEM;
9493        if ("ChargeItemDefinition".equals(codeString))
9494          return CHARGEITEMDEFINITION;
9495        if ("Citation".equals(codeString))
9496          return CITATION;
9497        if ("Claim".equals(codeString))
9498          return CLAIM;
9499        if ("ClaimResponse".equals(codeString))
9500          return CLAIMRESPONSE;
9501        if ("ClinicalImpression".equals(codeString))
9502          return CLINICALIMPRESSION;
9503        if ("ClinicalUseDefinition".equals(codeString))
9504          return CLINICALUSEDEFINITION;
9505        if ("CodeSystem".equals(codeString))
9506          return CODESYSTEM;
9507        if ("Communication".equals(codeString))
9508          return COMMUNICATION;
9509        if ("CommunicationRequest".equals(codeString))
9510          return COMMUNICATIONREQUEST;
9511        if ("CompartmentDefinition".equals(codeString))
9512          return COMPARTMENTDEFINITION;
9513        if ("Composition".equals(codeString))
9514          return COMPOSITION;
9515        if ("ConceptMap".equals(codeString))
9516          return CONCEPTMAP;
9517        if ("Condition".equals(codeString))
9518          return CONDITION;
9519        if ("Consent".equals(codeString))
9520          return CONSENT;
9521        if ("Contract".equals(codeString))
9522          return CONTRACT;
9523        if ("Coverage".equals(codeString))
9524          return COVERAGE;
9525        if ("CoverageEligibilityRequest".equals(codeString))
9526          return COVERAGEELIGIBILITYREQUEST;
9527        if ("CoverageEligibilityResponse".equals(codeString))
9528          return COVERAGEELIGIBILITYRESPONSE;
9529        if ("DetectedIssue".equals(codeString))
9530          return DETECTEDISSUE;
9531        if ("Device".equals(codeString))
9532          return DEVICE;
9533        if ("DeviceDefinition".equals(codeString))
9534          return DEVICEDEFINITION;
9535        if ("DeviceMetric".equals(codeString))
9536          return DEVICEMETRIC;
9537        if ("DeviceRequest".equals(codeString))
9538          return DEVICEREQUEST;
9539        if ("DeviceUseStatement".equals(codeString))
9540          return DEVICEUSESTATEMENT;
9541        if ("DiagnosticReport".equals(codeString))
9542          return DIAGNOSTICREPORT;
9543        if ("DocumentManifest".equals(codeString))
9544          return DOCUMENTMANIFEST;
9545        if ("DocumentReference".equals(codeString))
9546          return DOCUMENTREFERENCE;
9547        if ("Encounter".equals(codeString))
9548          return ENCOUNTER;
9549        if ("Endpoint".equals(codeString))
9550          return ENDPOINT;
9551        if ("EnrollmentRequest".equals(codeString))
9552          return ENROLLMENTREQUEST;
9553        if ("EnrollmentResponse".equals(codeString))
9554          return ENROLLMENTRESPONSE;
9555        if ("EpisodeOfCare".equals(codeString))
9556          return EPISODEOFCARE;
9557        if ("EventDefinition".equals(codeString))
9558          return EVENTDEFINITION;
9559        if ("Evidence".equals(codeString))
9560          return EVIDENCE;
9561        if ("EvidenceReport".equals(codeString))
9562          return EVIDENCEREPORT;
9563        if ("EvidenceVariable".equals(codeString))
9564          return EVIDENCEVARIABLE;
9565        if ("ExampleScenario".equals(codeString))
9566          return EXAMPLESCENARIO;
9567        if ("ExplanationOfBenefit".equals(codeString))
9568          return EXPLANATIONOFBENEFIT;
9569        if ("FamilyMemberHistory".equals(codeString))
9570          return FAMILYMEMBERHISTORY;
9571        if ("Flag".equals(codeString))
9572          return FLAG;
9573        if ("Goal".equals(codeString))
9574          return GOAL;
9575        if ("GraphDefinition".equals(codeString))
9576          return GRAPHDEFINITION;
9577        if ("Group".equals(codeString))
9578          return GROUP;
9579        if ("GuidanceResponse".equals(codeString))
9580          return GUIDANCERESPONSE;
9581        if ("HealthcareService".equals(codeString))
9582          return HEALTHCARESERVICE;
9583        if ("ImagingStudy".equals(codeString))
9584          return IMAGINGSTUDY;
9585        if ("Immunization".equals(codeString))
9586          return IMMUNIZATION;
9587        if ("ImmunizationEvaluation".equals(codeString))
9588          return IMMUNIZATIONEVALUATION;
9589        if ("ImmunizationRecommendation".equals(codeString))
9590          return IMMUNIZATIONRECOMMENDATION;
9591        if ("ImplementationGuide".equals(codeString))
9592          return IMPLEMENTATIONGUIDE;
9593        if ("Ingredient".equals(codeString))
9594          return INGREDIENT;
9595        if ("InsurancePlan".equals(codeString))
9596          return INSURANCEPLAN;
9597        if ("Invoice".equals(codeString))
9598          return INVOICE;
9599        if ("Library".equals(codeString))
9600          return LIBRARY;
9601        if ("Linkage".equals(codeString))
9602          return LINKAGE;
9603        if ("List".equals(codeString))
9604          return LIST;
9605        if ("Location".equals(codeString))
9606          return LOCATION;
9607        if ("ManufacturedItemDefinition".equals(codeString))
9608          return MANUFACTUREDITEMDEFINITION;
9609        if ("Measure".equals(codeString))
9610          return MEASURE;
9611        if ("MeasureReport".equals(codeString))
9612          return MEASUREREPORT;
9613        if ("Media".equals(codeString))
9614          return MEDIA;
9615        if ("Medication".equals(codeString))
9616          return MEDICATION;
9617        if ("MedicationAdministration".equals(codeString))
9618          return MEDICATIONADMINISTRATION;
9619        if ("MedicationDispense".equals(codeString))
9620          return MEDICATIONDISPENSE;
9621        if ("MedicationKnowledge".equals(codeString))
9622          return MEDICATIONKNOWLEDGE;
9623        if ("MedicationRequest".equals(codeString))
9624          return MEDICATIONREQUEST;
9625        if ("MedicationStatement".equals(codeString))
9626          return MEDICATIONSTATEMENT;
9627        if ("MedicinalProductDefinition".equals(codeString))
9628          return MEDICINALPRODUCTDEFINITION;
9629        if ("MessageDefinition".equals(codeString))
9630          return MESSAGEDEFINITION;
9631        if ("MessageHeader".equals(codeString))
9632          return MESSAGEHEADER;
9633        if ("MolecularSequence".equals(codeString))
9634          return MOLECULARSEQUENCE;
9635        if ("NamingSystem".equals(codeString))
9636          return NAMINGSYSTEM;
9637        if ("NutritionOrder".equals(codeString))
9638          return NUTRITIONORDER;
9639        if ("NutritionProduct".equals(codeString))
9640          return NUTRITIONPRODUCT;
9641        if ("Observation".equals(codeString))
9642          return OBSERVATION;
9643        if ("ObservationDefinition".equals(codeString))
9644          return OBSERVATIONDEFINITION;
9645        if ("OperationDefinition".equals(codeString))
9646          return OPERATIONDEFINITION;
9647        if ("OperationOutcome".equals(codeString))
9648          return OPERATIONOUTCOME;
9649        if ("Organization".equals(codeString))
9650          return ORGANIZATION;
9651        if ("OrganizationAffiliation".equals(codeString))
9652          return ORGANIZATIONAFFILIATION;
9653        if ("PackagedProductDefinition".equals(codeString))
9654          return PACKAGEDPRODUCTDEFINITION;
9655        if ("Patient".equals(codeString))
9656          return PATIENT;
9657        if ("PaymentNotice".equals(codeString))
9658          return PAYMENTNOTICE;
9659        if ("PaymentReconciliation".equals(codeString))
9660          return PAYMENTRECONCILIATION;
9661        if ("Person".equals(codeString))
9662          return PERSON;
9663        if ("PlanDefinition".equals(codeString))
9664          return PLANDEFINITION;
9665        if ("Practitioner".equals(codeString))
9666          return PRACTITIONER;
9667        if ("PractitionerRole".equals(codeString))
9668          return PRACTITIONERROLE;
9669        if ("Procedure".equals(codeString))
9670          return PROCEDURE;
9671        if ("Provenance".equals(codeString))
9672          return PROVENANCE;
9673        if ("Questionnaire".equals(codeString))
9674          return QUESTIONNAIRE;
9675        if ("QuestionnaireResponse".equals(codeString))
9676          return QUESTIONNAIRERESPONSE;
9677        if ("RegulatedAuthorization".equals(codeString))
9678          return REGULATEDAUTHORIZATION;
9679        if ("RelatedPerson".equals(codeString))
9680          return RELATEDPERSON;
9681        if ("RequestGroup".equals(codeString))
9682          return REQUESTGROUP;
9683        if ("ResearchDefinition".equals(codeString))
9684          return RESEARCHDEFINITION;
9685        if ("ResearchElementDefinition".equals(codeString))
9686          return RESEARCHELEMENTDEFINITION;
9687        if ("ResearchStudy".equals(codeString))
9688          return RESEARCHSTUDY;
9689        if ("ResearchSubject".equals(codeString))
9690          return RESEARCHSUBJECT;
9691        if ("RiskAssessment".equals(codeString))
9692          return RISKASSESSMENT;
9693        if ("Schedule".equals(codeString))
9694          return SCHEDULE;
9695        if ("SearchParameter".equals(codeString))
9696          return SEARCHPARAMETER;
9697        if ("ServiceRequest".equals(codeString))
9698          return SERVICEREQUEST;
9699        if ("Slot".equals(codeString))
9700          return SLOT;
9701        if ("Specimen".equals(codeString))
9702          return SPECIMEN;
9703        if ("SpecimenDefinition".equals(codeString))
9704          return SPECIMENDEFINITION;
9705        if ("StructureDefinition".equals(codeString))
9706          return STRUCTUREDEFINITION;
9707        if ("StructureMap".equals(codeString))
9708          return STRUCTUREMAP;
9709        if ("Subscription".equals(codeString))
9710          return SUBSCRIPTION;
9711        if ("SubscriptionStatus".equals(codeString))
9712          return SUBSCRIPTIONSTATUS;
9713        if ("SubscriptionTopic".equals(codeString))
9714          return SUBSCRIPTIONTOPIC;
9715        if ("Substance".equals(codeString))
9716          return SUBSTANCE;
9717        if ("SubstanceDefinition".equals(codeString))
9718          return SUBSTANCEDEFINITION;
9719        if ("SupplyDelivery".equals(codeString))
9720          return SUPPLYDELIVERY;
9721        if ("SupplyRequest".equals(codeString))
9722          return SUPPLYREQUEST;
9723        if ("Task".equals(codeString))
9724          return TASK;
9725        if ("TerminologyCapabilities".equals(codeString))
9726          return TERMINOLOGYCAPABILITIES;
9727        if ("TestReport".equals(codeString))
9728          return TESTREPORT;
9729        if ("TestScript".equals(codeString))
9730          return TESTSCRIPT;
9731        if ("ValueSet".equals(codeString))
9732          return VALUESET;
9733        if ("VerificationResult".equals(codeString))
9734          return VERIFICATIONRESULT;
9735        if ("VisionPrescription".equals(codeString))
9736          return VISIONPRESCRIPTION;
9737        if ("Parameters".equals(codeString))
9738          return PARAMETERS;
9739        throw new FHIRException("Unknown ResourceTypeEnum code '"+codeString+"'");
9740        }
9741        public String toCode() {
9742          switch (this) {
9743            case RESOURCE: return "Resource";
9744            case BINARY: return "Binary";
9745            case BUNDLE: return "Bundle";
9746            case DOMAINRESOURCE: return "DomainResource";
9747            case ACCOUNT: return "Account";
9748            case ACTIVITYDEFINITION: return "ActivityDefinition";
9749            case ADMINISTRABLEPRODUCTDEFINITION: return "AdministrableProductDefinition";
9750            case ADVERSEEVENT: return "AdverseEvent";
9751            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
9752            case APPOINTMENT: return "Appointment";
9753            case APPOINTMENTRESPONSE: return "AppointmentResponse";
9754            case AUDITEVENT: return "AuditEvent";
9755            case BASIC: return "Basic";
9756            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
9757            case BODYSTRUCTURE: return "BodyStructure";
9758            case CAPABILITYSTATEMENT: return "CapabilityStatement";
9759            case CAREPLAN: return "CarePlan";
9760            case CARETEAM: return "CareTeam";
9761            case CATALOGENTRY: return "CatalogEntry";
9762            case CHARGEITEM: return "ChargeItem";
9763            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
9764            case CITATION: return "Citation";
9765            case CLAIM: return "Claim";
9766            case CLAIMRESPONSE: return "ClaimResponse";
9767            case CLINICALIMPRESSION: return "ClinicalImpression";
9768            case CLINICALUSEDEFINITION: return "ClinicalUseDefinition";
9769            case CODESYSTEM: return "CodeSystem";
9770            case COMMUNICATION: return "Communication";
9771            case COMMUNICATIONREQUEST: return "CommunicationRequest";
9772            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
9773            case COMPOSITION: return "Composition";
9774            case CONCEPTMAP: return "ConceptMap";
9775            case CONDITION: return "Condition";
9776            case CONSENT: return "Consent";
9777            case CONTRACT: return "Contract";
9778            case COVERAGE: return "Coverage";
9779            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
9780            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
9781            case DETECTEDISSUE: return "DetectedIssue";
9782            case DEVICE: return "Device";
9783            case DEVICEDEFINITION: return "DeviceDefinition";
9784            case DEVICEMETRIC: return "DeviceMetric";
9785            case DEVICEREQUEST: return "DeviceRequest";
9786            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
9787            case DIAGNOSTICREPORT: return "DiagnosticReport";
9788            case DOCUMENTMANIFEST: return "DocumentManifest";
9789            case DOCUMENTREFERENCE: return "DocumentReference";
9790            case ENCOUNTER: return "Encounter";
9791            case ENDPOINT: return "Endpoint";
9792            case ENROLLMENTREQUEST: return "EnrollmentRequest";
9793            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
9794            case EPISODEOFCARE: return "EpisodeOfCare";
9795            case EVENTDEFINITION: return "EventDefinition";
9796            case EVIDENCE: return "Evidence";
9797            case EVIDENCEREPORT: return "EvidenceReport";
9798            case EVIDENCEVARIABLE: return "EvidenceVariable";
9799            case EXAMPLESCENARIO: return "ExampleScenario";
9800            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
9801            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
9802            case FLAG: return "Flag";
9803            case GOAL: return "Goal";
9804            case GRAPHDEFINITION: return "GraphDefinition";
9805            case GROUP: return "Group";
9806            case GUIDANCERESPONSE: return "GuidanceResponse";
9807            case HEALTHCARESERVICE: return "HealthcareService";
9808            case IMAGINGSTUDY: return "ImagingStudy";
9809            case IMMUNIZATION: return "Immunization";
9810            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
9811            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
9812            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
9813            case INGREDIENT: return "Ingredient";
9814            case INSURANCEPLAN: return "InsurancePlan";
9815            case INVOICE: return "Invoice";
9816            case LIBRARY: return "Library";
9817            case LINKAGE: return "Linkage";
9818            case LIST: return "List";
9819            case LOCATION: return "Location";
9820            case MANUFACTUREDITEMDEFINITION: return "ManufacturedItemDefinition";
9821            case MEASURE: return "Measure";
9822            case MEASUREREPORT: return "MeasureReport";
9823            case MEDIA: return "Media";
9824            case MEDICATION: return "Medication";
9825            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
9826            case MEDICATIONDISPENSE: return "MedicationDispense";
9827            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
9828            case MEDICATIONREQUEST: return "MedicationRequest";
9829            case MEDICATIONSTATEMENT: return "MedicationStatement";
9830            case MEDICINALPRODUCTDEFINITION: return "MedicinalProductDefinition";
9831            case MESSAGEDEFINITION: return "MessageDefinition";
9832            case MESSAGEHEADER: return "MessageHeader";
9833            case MOLECULARSEQUENCE: return "MolecularSequence";
9834            case NAMINGSYSTEM: return "NamingSystem";
9835            case NUTRITIONORDER: return "NutritionOrder";
9836            case NUTRITIONPRODUCT: return "NutritionProduct";
9837            case OBSERVATION: return "Observation";
9838            case OBSERVATIONDEFINITION: return "ObservationDefinition";
9839            case OPERATIONDEFINITION: return "OperationDefinition";
9840            case OPERATIONOUTCOME: return "OperationOutcome";
9841            case ORGANIZATION: return "Organization";
9842            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
9843            case PACKAGEDPRODUCTDEFINITION: return "PackagedProductDefinition";
9844            case PATIENT: return "Patient";
9845            case PAYMENTNOTICE: return "PaymentNotice";
9846            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
9847            case PERSON: return "Person";
9848            case PLANDEFINITION: return "PlanDefinition";
9849            case PRACTITIONER: return "Practitioner";
9850            case PRACTITIONERROLE: return "PractitionerRole";
9851            case PROCEDURE: return "Procedure";
9852            case PROVENANCE: return "Provenance";
9853            case QUESTIONNAIRE: return "Questionnaire";
9854            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
9855            case REGULATEDAUTHORIZATION: return "RegulatedAuthorization";
9856            case RELATEDPERSON: return "RelatedPerson";
9857            case REQUESTGROUP: return "RequestGroup";
9858            case RESEARCHDEFINITION: return "ResearchDefinition";
9859            case RESEARCHELEMENTDEFINITION: return "ResearchElementDefinition";
9860            case RESEARCHSTUDY: return "ResearchStudy";
9861            case RESEARCHSUBJECT: return "ResearchSubject";
9862            case RISKASSESSMENT: return "RiskAssessment";
9863            case SCHEDULE: return "Schedule";
9864            case SEARCHPARAMETER: return "SearchParameter";
9865            case SERVICEREQUEST: return "ServiceRequest";
9866            case SLOT: return "Slot";
9867            case SPECIMEN: return "Specimen";
9868            case SPECIMENDEFINITION: return "SpecimenDefinition";
9869            case STRUCTUREDEFINITION: return "StructureDefinition";
9870            case STRUCTUREMAP: return "StructureMap";
9871            case SUBSCRIPTION: return "Subscription";
9872            case SUBSCRIPTIONSTATUS: return "SubscriptionStatus";
9873            case SUBSCRIPTIONTOPIC: return "SubscriptionTopic";
9874            case SUBSTANCE: return "Substance";
9875            case SUBSTANCEDEFINITION: return "SubstanceDefinition";
9876            case SUPPLYDELIVERY: return "SupplyDelivery";
9877            case SUPPLYREQUEST: return "SupplyRequest";
9878            case TASK: return "Task";
9879            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
9880            case TESTREPORT: return "TestReport";
9881            case TESTSCRIPT: return "TestScript";
9882            case VALUESET: return "ValueSet";
9883            case VERIFICATIONRESULT: return "VerificationResult";
9884            case VISIONPRESCRIPTION: return "VisionPrescription";
9885            case PARAMETERS: return "Parameters";
9886            case NULL: return null;
9887            default: return "?";
9888          }
9889        }
9890        public String getSystem() {
9891          switch (this) {
9892            case RESOURCE: return "http://hl7.org/fhir/resource-types";
9893            case BINARY: return "http://hl7.org/fhir/resource-types";
9894            case BUNDLE: return "http://hl7.org/fhir/resource-types";
9895            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
9896            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
9897            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
9898            case ADMINISTRABLEPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
9899            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
9900            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
9901            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
9902            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
9903            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
9904            case BASIC: return "http://hl7.org/fhir/resource-types";
9905            case BIOLOGICALLYDERIVEDPRODUCT: return "http://hl7.org/fhir/resource-types";
9906            case BODYSTRUCTURE: return "http://hl7.org/fhir/resource-types";
9907            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
9908            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
9909            case CARETEAM: return "http://hl7.org/fhir/resource-types";
9910            case CATALOGENTRY: return "http://hl7.org/fhir/resource-types";
9911            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
9912            case CHARGEITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
9913            case CITATION: return "http://hl7.org/fhir/resource-types";
9914            case CLAIM: return "http://hl7.org/fhir/resource-types";
9915            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
9916            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
9917            case CLINICALUSEDEFINITION: return "http://hl7.org/fhir/resource-types";
9918            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
9919            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
9920            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
9921            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
9922            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
9923            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
9924            case CONDITION: return "http://hl7.org/fhir/resource-types";
9925            case CONSENT: return "http://hl7.org/fhir/resource-types";
9926            case CONTRACT: return "http://hl7.org/fhir/resource-types";
9927            case COVERAGE: return "http://hl7.org/fhir/resource-types";
9928            case COVERAGEELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
9929            case COVERAGEELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
9930            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
9931            case DEVICE: return "http://hl7.org/fhir/resource-types";
9932            case DEVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
9933            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
9934            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
9935            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types";
9936            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
9937            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
9938            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
9939            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
9940            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
9941            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
9942            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
9943            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
9944            case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types";
9945            case EVIDENCE: return "http://hl7.org/fhir/resource-types";
9946            case EVIDENCEREPORT: return "http://hl7.org/fhir/resource-types";
9947            case EVIDENCEVARIABLE: return "http://hl7.org/fhir/resource-types";
9948            case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types";
9949            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
9950            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
9951            case FLAG: return "http://hl7.org/fhir/resource-types";
9952            case GOAL: return "http://hl7.org/fhir/resource-types";
9953            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
9954            case GROUP: return "http://hl7.org/fhir/resource-types";
9955            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
9956            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
9957            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
9958            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
9959            case IMMUNIZATIONEVALUATION: return "http://hl7.org/fhir/resource-types";
9960            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
9961            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
9962            case INGREDIENT: return "http://hl7.org/fhir/resource-types";
9963            case INSURANCEPLAN: return "http://hl7.org/fhir/resource-types";
9964            case INVOICE: return "http://hl7.org/fhir/resource-types";
9965            case LIBRARY: return "http://hl7.org/fhir/resource-types";
9966            case LINKAGE: return "http://hl7.org/fhir/resource-types";
9967            case LIST: return "http://hl7.org/fhir/resource-types";
9968            case LOCATION: return "http://hl7.org/fhir/resource-types";
9969            case MANUFACTUREDITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
9970            case MEASURE: return "http://hl7.org/fhir/resource-types";
9971            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
9972            case MEDIA: return "http://hl7.org/fhir/resource-types";
9973            case MEDICATION: return "http://hl7.org/fhir/resource-types";
9974            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
9975            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
9976            case MEDICATIONKNOWLEDGE: return "http://hl7.org/fhir/resource-types";
9977            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
9978            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types";
9979            case MEDICINALPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
9980            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
9981            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
9982            case MOLECULARSEQUENCE: return "http://hl7.org/fhir/resource-types";
9983            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
9984            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
9985            case NUTRITIONPRODUCT: return "http://hl7.org/fhir/resource-types";
9986            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
9987            case OBSERVATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
9988            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
9989            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
9990            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
9991            case ORGANIZATIONAFFILIATION: return "http://hl7.org/fhir/resource-types";
9992            case PACKAGEDPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
9993            case PATIENT: return "http://hl7.org/fhir/resource-types";
9994            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
9995            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
9996            case PERSON: return "http://hl7.org/fhir/resource-types";
9997            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
9998            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
9999            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
10000            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
10001            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
10002            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
10003            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
10004            case REGULATEDAUTHORIZATION: return "http://hl7.org/fhir/resource-types";
10005            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
10006            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
10007            case RESEARCHDEFINITION: return "http://hl7.org/fhir/resource-types";
10008            case RESEARCHELEMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
10009            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
10010            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
10011            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
10012            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
10013            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
10014            case SERVICEREQUEST: return "http://hl7.org/fhir/resource-types";
10015            case SLOT: return "http://hl7.org/fhir/resource-types";
10016            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
10017            case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types";
10018            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
10019            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
10020            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
10021            case SUBSCRIPTIONSTATUS: return "http://hl7.org/fhir/resource-types";
10022            case SUBSCRIPTIONTOPIC: return "http://hl7.org/fhir/resource-types";
10023            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
10024            case SUBSTANCEDEFINITION: return "http://hl7.org/fhir/resource-types";
10025            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
10026            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
10027            case TASK: return "http://hl7.org/fhir/resource-types";
10028            case TERMINOLOGYCAPABILITIES: return "http://hl7.org/fhir/resource-types";
10029            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
10030            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
10031            case VALUESET: return "http://hl7.org/fhir/resource-types";
10032            case VERIFICATIONRESULT: return "http://hl7.org/fhir/resource-types";
10033            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
10034            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
10035            case NULL: return null;
10036            default: return "?";
10037          }
10038        }
10039        public String getDefinition() {
10040          switch (this) {
10041            case RESOURCE: return "--- Abstract Type! ---This is the base resource type for everything.";
10042            case BINARY: return "A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
10043            case BUNDLE: return "A container for a collection of resources.";
10044            case DOMAINRESOURCE: return "--- Abstract Type! ---A resource that includes narrative, extensions, and contained resources.";
10045            case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.";
10046            case ACTIVITYDEFINITION: return "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.";
10047            case ADMINISTRABLEPRODUCTDEFINITION: return "A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed).";
10048            case ADVERSEEVENT: return "Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.";
10049            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
10050            case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).";
10051            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
10052            case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.";
10053            case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.";
10054            case BIOLOGICALLYDERIVEDPRODUCT: return "A material substance originating from a biological entity intended to be transplanted or infused\ninto another (possibly the same) biological entity.";
10055            case BODYSTRUCTURE: return "Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.";
10056            case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
10057            case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.";
10058            case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.";
10059            case CATALOGENTRY: return "Catalog entries are wrappers that contextualize items included in a catalog.";
10060            case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.";
10061            case CHARGEITEMDEFINITION: return "The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.";
10062            case CITATION: return "The Citation Resource enables reference to any knowledge artifact for purposes of identification and attribution. The Citation Resource supports existing reference structures and developing publication practices such as versioning, expressing complex contributorship roles, and referencing computable resources.";
10063            case CLAIM: return "A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.";
10064            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
10065            case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score.";
10066            case CLINICALUSEDEFINITION: return "A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.";
10067            case CODESYSTEM: return "The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.";
10068            case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.";
10069            case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.";
10070            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
10071            case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).";
10072            case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.";
10073            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
10074            case CONSENT: return "A record of a healthcare consumer’s  choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.";
10075            case CONTRACT: return "Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.";
10076            case COVERAGE: return "Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.";
10077            case COVERAGEELIGIBILITYREQUEST: return "The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.";
10078            case COVERAGEELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.";
10079            case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.";
10080            case DEVICE: return "A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.";
10081            case DEVICEDEFINITION: return "The characteristics, operational status and capabilities of a medical-related component of a medical device.";
10082            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
10083            case DEVICEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.";
10084            case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.";
10085            case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.";
10086            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
10087            case DOCUMENTREFERENCE: return "A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.";
10088            case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.";
10089            case ENDPOINT: return "The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.";
10090            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
10091            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.";
10092            case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.";
10093            case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur.";
10094            case EVIDENCE: return "The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (eg population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.";
10095            case EVIDENCEREPORT: return "The EvidenceReport Resource is a specialized container for a collection of resources and codable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.";
10096            case EVIDENCEVARIABLE: return "The EvidenceVariable resource describes an element that knowledge (Evidence) is about.";
10097            case EXAMPLESCENARIO: return "Example of workflow instance.";
10098            case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.";
10099            case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient.";
10100            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
10101            case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.";
10102            case GRAPHDEFINITION: return "A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.";
10103            case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.";
10104            case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.";
10105            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
10106            case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.";
10107            case IMMUNIZATION: return "Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.";
10108            case IMMUNIZATIONEVALUATION: return "Describes a comparison of an immunization event against published recommendations to determine if the administration is \"valid\" in relation to those  recommendations.";
10109            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.";
10110            case IMPLEMENTATIONGUIDE: return "A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.";
10111            case INGREDIENT: return "An ingredient of a manufactured item or pharmaceutical product.";
10112            case INSURANCEPLAN: return "Details of a Health Insurance product/plan provided by an organization.";
10113            case INVOICE: return "Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.";
10114            case LIBRARY: return "The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.";
10115            case LINKAGE: return "Identifies two or more records (resource instances) that refer to the same real-world \"occurrence\".";
10116            case LIST: return "A list is a curated collection of resources.";
10117            case LOCATION: return "Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.";
10118            case MANUFACTUREDITEMDEFINITION: return "The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.";
10119            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
10120            case MEASUREREPORT: return "The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.";
10121            case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.";
10122            case MEDICATION: return "This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.";
10123            case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.";
10124            case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.";
10125            case MEDICATIONKNOWLEDGE: return "Information about a medication that is used to support knowledge.";
10126            case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.";
10127            case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. \n\nThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.";
10128            case MEDICINALPRODUCTDEFINITION: return "Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use, drug catalogs).";
10129            case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.";
10130            case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.";
10131            case MOLECULARSEQUENCE: return "Raw data describing a biological sequence.";
10132            case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a \"System\" used within the Identifier and Coding data types.";
10133            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
10134            case NUTRITIONPRODUCT: return "A food or fluid product that is consumed by patients.";
10135            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
10136            case OBSERVATIONDEFINITION: return "Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.";
10137            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
10138            case OPERATIONOUTCOME: return "A collection of error, warning, or information messages that result from a system action.";
10139            case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.";
10140            case ORGANIZATIONAFFILIATION: return "Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.";
10141            case PACKAGEDPRODUCTDEFINITION: return "A medically related item or items, in a container or package.";
10142            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
10143            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
10144            case PAYMENTRECONCILIATION: return "This resource provides the details including amount of a payment and allocates the payment items being paid.";
10145            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
10146            case PLANDEFINITION: return "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications.";
10147            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
10148            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
10149            case PROCEDURE: return "An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.";
10150            case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.";
10151            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.";
10152            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.";
10153            case REGULATEDAUTHORIZATION: return "Regulatory approval, clearance or licencing related to a regulated product, treatment, facility or activity that is cited in a guidance, regulation, rule or legislative act. An example is Market Authorization relating to a Medicinal Product.";
10154            case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.";
10155            case REQUESTGROUP: return "A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\".";
10156            case RESEARCHDEFINITION: return "The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.";
10157            case RESEARCHELEMENTDEFINITION: return "The ResearchElementDefinition resource describes a \"PICO\" element that knowledge (evidence, assertion, recommendation) is about.";
10158            case RESEARCHSTUDY: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
10159            case RESEARCHSUBJECT: return "A physical entity which is the primary unit of operational and/or administrative interest in a study.";
10160            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
10161            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
10162            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
10163            case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.";
10164            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
10165            case SPECIMEN: return "A sample to be used for analysis.";
10166            case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements.";
10167            case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.";
10168            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
10169            case SUBSCRIPTION: return "The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system can take an appropriate action.";
10170            case SUBSCRIPTIONSTATUS: return "The SubscriptionStatus resource describes the state of a Subscription during notifications.";
10171            case SUBSCRIPTIONTOPIC: return "Describes a stream of resource state changes identified by trigger criteria and annotated with labels useful to filter projections from this topic.";
10172            case SUBSTANCE: return "A homogeneous material with a definite composition.";
10173            case SUBSTANCEDEFINITION: return "The detailed description of a substance, typically at a level beyond what is used for prescribing.";
10174            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
10175            case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting.";
10176            case TASK: return "A task to be performed.";
10177            case TERMINOLOGYCAPABILITIES: return "A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
10178            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
10179            case TESTSCRIPT: return "A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.";
10180            case VALUESET: return "A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).";
10181            case VERIFICATIONRESULT: return "Describes validation requirements, source(s), status and dates for one or more elements.";
10182            case VISIONPRESCRIPTION: return "An authorization for the provision of glasses and/or contact lenses to a patient.";
10183            case PARAMETERS: return "This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it.";
10184            case NULL: return null;
10185            default: return "?";
10186          }
10187        }
10188        public String getDisplay() {
10189          switch (this) {
10190            case RESOURCE: return "Resource";
10191            case BINARY: return "Binary";
10192            case BUNDLE: return "Bundle";
10193            case DOMAINRESOURCE: return "DomainResource";
10194            case ACCOUNT: return "Account";
10195            case ACTIVITYDEFINITION: return "ActivityDefinition";
10196            case ADMINISTRABLEPRODUCTDEFINITION: return "AdministrableProductDefinition";
10197            case ADVERSEEVENT: return "AdverseEvent";
10198            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
10199            case APPOINTMENT: return "Appointment";
10200            case APPOINTMENTRESPONSE: return "AppointmentResponse";
10201            case AUDITEVENT: return "AuditEvent";
10202            case BASIC: return "Basic";
10203            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
10204            case BODYSTRUCTURE: return "BodyStructure";
10205            case CAPABILITYSTATEMENT: return "CapabilityStatement";
10206            case CAREPLAN: return "CarePlan";
10207            case CARETEAM: return "CareTeam";
10208            case CATALOGENTRY: return "CatalogEntry";
10209            case CHARGEITEM: return "ChargeItem";
10210            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
10211            case CITATION: return "Citation";
10212            case CLAIM: return "Claim";
10213            case CLAIMRESPONSE: return "ClaimResponse";
10214            case CLINICALIMPRESSION: return "ClinicalImpression";
10215            case CLINICALUSEDEFINITION: return "ClinicalUseDefinition";
10216            case CODESYSTEM: return "CodeSystem";
10217            case COMMUNICATION: return "Communication";
10218            case COMMUNICATIONREQUEST: return "CommunicationRequest";
10219            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
10220            case COMPOSITION: return "Composition";
10221            case CONCEPTMAP: return "ConceptMap";
10222            case CONDITION: return "Condition";
10223            case CONSENT: return "Consent";
10224            case CONTRACT: return "Contract";
10225            case COVERAGE: return "Coverage";
10226            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
10227            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
10228            case DETECTEDISSUE: return "DetectedIssue";
10229            case DEVICE: return "Device";
10230            case DEVICEDEFINITION: return "DeviceDefinition";
10231            case DEVICEMETRIC: return "DeviceMetric";
10232            case DEVICEREQUEST: return "DeviceRequest";
10233            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
10234            case DIAGNOSTICREPORT: return "DiagnosticReport";
10235            case DOCUMENTMANIFEST: return "DocumentManifest";
10236            case DOCUMENTREFERENCE: return "DocumentReference";
10237            case ENCOUNTER: return "Encounter";
10238            case ENDPOINT: return "Endpoint";
10239            case ENROLLMENTREQUEST: return "EnrollmentRequest";
10240            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
10241            case EPISODEOFCARE: return "EpisodeOfCare";
10242            case EVENTDEFINITION: return "EventDefinition";
10243            case EVIDENCE: return "Evidence";
10244            case EVIDENCEREPORT: return "EvidenceReport";
10245            case EVIDENCEVARIABLE: return "EvidenceVariable";
10246            case EXAMPLESCENARIO: return "ExampleScenario";
10247            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
10248            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
10249            case FLAG: return "Flag";
10250            case GOAL: return "Goal";
10251            case GRAPHDEFINITION: return "GraphDefinition";
10252            case GROUP: return "Group";
10253            case GUIDANCERESPONSE: return "GuidanceResponse";
10254            case HEALTHCARESERVICE: return "HealthcareService";
10255            case IMAGINGSTUDY: return "ImagingStudy";
10256            case IMMUNIZATION: return "Immunization";
10257            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
10258            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
10259            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
10260            case INGREDIENT: return "Ingredient";
10261            case INSURANCEPLAN: return "InsurancePlan";
10262            case INVOICE: return "Invoice";
10263            case LIBRARY: return "Library";
10264            case LINKAGE: return "Linkage";
10265            case LIST: return "List";
10266            case LOCATION: return "Location";
10267            case MANUFACTUREDITEMDEFINITION: return "ManufacturedItemDefinition";
10268            case MEASURE: return "Measure";
10269            case MEASUREREPORT: return "MeasureReport";
10270            case MEDIA: return "Media";
10271            case MEDICATION: return "Medication";
10272            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
10273            case MEDICATIONDISPENSE: return "MedicationDispense";
10274            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
10275            case MEDICATIONREQUEST: return "MedicationRequest";
10276            case MEDICATIONSTATEMENT: return "MedicationStatement";
10277            case MEDICINALPRODUCTDEFINITION: return "MedicinalProductDefinition";
10278            case MESSAGEDEFINITION: return "MessageDefinition";
10279            case MESSAGEHEADER: return "MessageHeader";
10280            case MOLECULARSEQUENCE: return "MolecularSequence";
10281            case NAMINGSYSTEM: return "NamingSystem";
10282            case NUTRITIONORDER: return "NutritionOrder";
10283            case NUTRITIONPRODUCT: return "NutritionProduct";
10284            case OBSERVATION: return "Observation";
10285            case OBSERVATIONDEFINITION: return "ObservationDefinition";
10286            case OPERATIONDEFINITION: return "OperationDefinition";
10287            case OPERATIONOUTCOME: return "OperationOutcome";
10288            case ORGANIZATION: return "Organization";
10289            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
10290            case PACKAGEDPRODUCTDEFINITION: return "PackagedProductDefinition";
10291            case PATIENT: return "Patient";
10292            case PAYMENTNOTICE: return "PaymentNotice";
10293            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
10294            case PERSON: return "Person";
10295            case PLANDEFINITION: return "PlanDefinition";
10296            case PRACTITIONER: return "Practitioner";
10297            case PRACTITIONERROLE: return "PractitionerRole";
10298            case PROCEDURE: return "Procedure";
10299            case PROVENANCE: return "Provenance";
10300            case QUESTIONNAIRE: return "Questionnaire";
10301            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
10302            case REGULATEDAUTHORIZATION: return "RegulatedAuthorization";
10303            case RELATEDPERSON: return "RelatedPerson";
10304            case REQUESTGROUP: return "RequestGroup";
10305            case RESEARCHDEFINITION: return "ResearchDefinition";
10306            case RESEARCHELEMENTDEFINITION: return "ResearchElementDefinition";
10307            case RESEARCHSTUDY: return "ResearchStudy";
10308            case RESEARCHSUBJECT: return "ResearchSubject";
10309            case RISKASSESSMENT: return "RiskAssessment";
10310            case SCHEDULE: return "Schedule";
10311            case SEARCHPARAMETER: return "SearchParameter";
10312            case SERVICEREQUEST: return "ServiceRequest";
10313            case SLOT: return "Slot";
10314            case SPECIMEN: return "Specimen";
10315            case SPECIMENDEFINITION: return "SpecimenDefinition";
10316            case STRUCTUREDEFINITION: return "StructureDefinition";
10317            case STRUCTUREMAP: return "StructureMap";
10318            case SUBSCRIPTION: return "Subscription";
10319            case SUBSCRIPTIONSTATUS: return "SubscriptionStatus";
10320            case SUBSCRIPTIONTOPIC: return "SubscriptionTopic";
10321            case SUBSTANCE: return "Substance";
10322            case SUBSTANCEDEFINITION: return "SubstanceDefinition";
10323            case SUPPLYDELIVERY: return "SupplyDelivery";
10324            case SUPPLYREQUEST: return "SupplyRequest";
10325            case TASK: return "Task";
10326            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
10327            case TESTREPORT: return "TestReport";
10328            case TESTSCRIPT: return "TestScript";
10329            case VALUESET: return "ValueSet";
10330            case VERIFICATIONRESULT: return "VerificationResult";
10331            case VISIONPRESCRIPTION: return "VisionPrescription";
10332            case PARAMETERS: return "Parameters";
10333            case NULL: return null;
10334            default: return "?";
10335          }
10336        }
10337    }
10338
10339  public static class ResourceTypeEnumEnumFactory implements EnumFactory<ResourceTypeEnum> {
10340    public ResourceTypeEnum fromCode(String codeString) throws IllegalArgumentException {
10341      if (codeString == null || "".equals(codeString))
10342            if (codeString == null || "".equals(codeString))
10343                return null;
10344        if ("Resource".equals(codeString))
10345          return ResourceTypeEnum.RESOURCE;
10346        if ("Binary".equals(codeString))
10347          return ResourceTypeEnum.BINARY;
10348        if ("Bundle".equals(codeString))
10349          return ResourceTypeEnum.BUNDLE;
10350        if ("DomainResource".equals(codeString))
10351          return ResourceTypeEnum.DOMAINRESOURCE;
10352        if ("Account".equals(codeString))
10353          return ResourceTypeEnum.ACCOUNT;
10354        if ("ActivityDefinition".equals(codeString))
10355          return ResourceTypeEnum.ACTIVITYDEFINITION;
10356        if ("AdministrableProductDefinition".equals(codeString))
10357          return ResourceTypeEnum.ADMINISTRABLEPRODUCTDEFINITION;
10358        if ("AdverseEvent".equals(codeString))
10359          return ResourceTypeEnum.ADVERSEEVENT;
10360        if ("AllergyIntolerance".equals(codeString))
10361          return ResourceTypeEnum.ALLERGYINTOLERANCE;
10362        if ("Appointment".equals(codeString))
10363          return ResourceTypeEnum.APPOINTMENT;
10364        if ("AppointmentResponse".equals(codeString))
10365          return ResourceTypeEnum.APPOINTMENTRESPONSE;
10366        if ("AuditEvent".equals(codeString))
10367          return ResourceTypeEnum.AUDITEVENT;
10368        if ("Basic".equals(codeString))
10369          return ResourceTypeEnum.BASIC;
10370        if ("BiologicallyDerivedProduct".equals(codeString))
10371          return ResourceTypeEnum.BIOLOGICALLYDERIVEDPRODUCT;
10372        if ("BodyStructure".equals(codeString))
10373          return ResourceTypeEnum.BODYSTRUCTURE;
10374        if ("CapabilityStatement".equals(codeString))
10375          return ResourceTypeEnum.CAPABILITYSTATEMENT;
10376        if ("CarePlan".equals(codeString))
10377          return ResourceTypeEnum.CAREPLAN;
10378        if ("CareTeam".equals(codeString))
10379          return ResourceTypeEnum.CARETEAM;
10380        if ("CatalogEntry".equals(codeString))
10381          return ResourceTypeEnum.CATALOGENTRY;
10382        if ("ChargeItem".equals(codeString))
10383          return ResourceTypeEnum.CHARGEITEM;
10384        if ("ChargeItemDefinition".equals(codeString))
10385          return ResourceTypeEnum.CHARGEITEMDEFINITION;
10386        if ("Citation".equals(codeString))
10387          return ResourceTypeEnum.CITATION;
10388        if ("Claim".equals(codeString))
10389          return ResourceTypeEnum.CLAIM;
10390        if ("ClaimResponse".equals(codeString))
10391          return ResourceTypeEnum.CLAIMRESPONSE;
10392        if ("ClinicalImpression".equals(codeString))
10393          return ResourceTypeEnum.CLINICALIMPRESSION;
10394        if ("ClinicalUseDefinition".equals(codeString))
10395          return ResourceTypeEnum.CLINICALUSEDEFINITION;
10396        if ("CodeSystem".equals(codeString))
10397          return ResourceTypeEnum.CODESYSTEM;
10398        if ("Communication".equals(codeString))
10399          return ResourceTypeEnum.COMMUNICATION;
10400        if ("CommunicationRequest".equals(codeString))
10401          return ResourceTypeEnum.COMMUNICATIONREQUEST;
10402        if ("CompartmentDefinition".equals(codeString))
10403          return ResourceTypeEnum.COMPARTMENTDEFINITION;
10404        if ("Composition".equals(codeString))
10405          return ResourceTypeEnum.COMPOSITION;
10406        if ("ConceptMap".equals(codeString))
10407          return ResourceTypeEnum.CONCEPTMAP;
10408        if ("Condition".equals(codeString))
10409          return ResourceTypeEnum.CONDITION;
10410        if ("Consent".equals(codeString))
10411          return ResourceTypeEnum.CONSENT;
10412        if ("Contract".equals(codeString))
10413          return ResourceTypeEnum.CONTRACT;
10414        if ("Coverage".equals(codeString))
10415          return ResourceTypeEnum.COVERAGE;
10416        if ("CoverageEligibilityRequest".equals(codeString))
10417          return ResourceTypeEnum.COVERAGEELIGIBILITYREQUEST;
10418        if ("CoverageEligibilityResponse".equals(codeString))
10419          return ResourceTypeEnum.COVERAGEELIGIBILITYRESPONSE;
10420        if ("DetectedIssue".equals(codeString))
10421          return ResourceTypeEnum.DETECTEDISSUE;
10422        if ("Device".equals(codeString))
10423          return ResourceTypeEnum.DEVICE;
10424        if ("DeviceDefinition".equals(codeString))
10425          return ResourceTypeEnum.DEVICEDEFINITION;
10426        if ("DeviceMetric".equals(codeString))
10427          return ResourceTypeEnum.DEVICEMETRIC;
10428        if ("DeviceRequest".equals(codeString))
10429          return ResourceTypeEnum.DEVICEREQUEST;
10430        if ("DeviceUseStatement".equals(codeString))
10431          return ResourceTypeEnum.DEVICEUSESTATEMENT;
10432        if ("DiagnosticReport".equals(codeString))
10433          return ResourceTypeEnum.DIAGNOSTICREPORT;
10434        if ("DocumentManifest".equals(codeString))
10435          return ResourceTypeEnum.DOCUMENTMANIFEST;
10436        if ("DocumentReference".equals(codeString))
10437          return ResourceTypeEnum.DOCUMENTREFERENCE;
10438        if ("Encounter".equals(codeString))
10439          return ResourceTypeEnum.ENCOUNTER;
10440        if ("Endpoint".equals(codeString))
10441          return ResourceTypeEnum.ENDPOINT;
10442        if ("EnrollmentRequest".equals(codeString))
10443          return ResourceTypeEnum.ENROLLMENTREQUEST;
10444        if ("EnrollmentResponse".equals(codeString))
10445          return ResourceTypeEnum.ENROLLMENTRESPONSE;
10446        if ("EpisodeOfCare".equals(codeString))
10447          return ResourceTypeEnum.EPISODEOFCARE;
10448        if ("EventDefinition".equals(codeString))
10449          return ResourceTypeEnum.EVENTDEFINITION;
10450        if ("Evidence".equals(codeString))
10451          return ResourceTypeEnum.EVIDENCE;
10452        if ("EvidenceReport".equals(codeString))
10453          return ResourceTypeEnum.EVIDENCEREPORT;
10454        if ("EvidenceVariable".equals(codeString))
10455          return ResourceTypeEnum.EVIDENCEVARIABLE;
10456        if ("ExampleScenario".equals(codeString))
10457          return ResourceTypeEnum.EXAMPLESCENARIO;
10458        if ("ExplanationOfBenefit".equals(codeString))
10459          return ResourceTypeEnum.EXPLANATIONOFBENEFIT;
10460        if ("FamilyMemberHistory".equals(codeString))
10461          return ResourceTypeEnum.FAMILYMEMBERHISTORY;
10462        if ("Flag".equals(codeString))
10463          return ResourceTypeEnum.FLAG;
10464        if ("Goal".equals(codeString))
10465          return ResourceTypeEnum.GOAL;
10466        if ("GraphDefinition".equals(codeString))
10467          return ResourceTypeEnum.GRAPHDEFINITION;
10468        if ("Group".equals(codeString))
10469          return ResourceTypeEnum.GROUP;
10470        if ("GuidanceResponse".equals(codeString))
10471          return ResourceTypeEnum.GUIDANCERESPONSE;
10472        if ("HealthcareService".equals(codeString))
10473          return ResourceTypeEnum.HEALTHCARESERVICE;
10474        if ("ImagingStudy".equals(codeString))
10475          return ResourceTypeEnum.IMAGINGSTUDY;
10476        if ("Immunization".equals(codeString))
10477          return ResourceTypeEnum.IMMUNIZATION;
10478        if ("ImmunizationEvaluation".equals(codeString))
10479          return ResourceTypeEnum.IMMUNIZATIONEVALUATION;
10480        if ("ImmunizationRecommendation".equals(codeString))
10481          return ResourceTypeEnum.IMMUNIZATIONRECOMMENDATION;
10482        if ("ImplementationGuide".equals(codeString))
10483          return ResourceTypeEnum.IMPLEMENTATIONGUIDE;
10484        if ("Ingredient".equals(codeString))
10485          return ResourceTypeEnum.INGREDIENT;
10486        if ("InsurancePlan".equals(codeString))
10487          return ResourceTypeEnum.INSURANCEPLAN;
10488        if ("Invoice".equals(codeString))
10489          return ResourceTypeEnum.INVOICE;
10490        if ("Library".equals(codeString))
10491          return ResourceTypeEnum.LIBRARY;
10492        if ("Linkage".equals(codeString))
10493          return ResourceTypeEnum.LINKAGE;
10494        if ("List".equals(codeString))
10495          return ResourceTypeEnum.LIST;
10496        if ("Location".equals(codeString))
10497          return ResourceTypeEnum.LOCATION;
10498        if ("ManufacturedItemDefinition".equals(codeString))
10499          return ResourceTypeEnum.MANUFACTUREDITEMDEFINITION;
10500        if ("Measure".equals(codeString))
10501          return ResourceTypeEnum.MEASURE;
10502        if ("MeasureReport".equals(codeString))
10503          return ResourceTypeEnum.MEASUREREPORT;
10504        if ("Media".equals(codeString))
10505          return ResourceTypeEnum.MEDIA;
10506        if ("Medication".equals(codeString))
10507          return ResourceTypeEnum.MEDICATION;
10508        if ("MedicationAdministration".equals(codeString))
10509          return ResourceTypeEnum.MEDICATIONADMINISTRATION;
10510        if ("MedicationDispense".equals(codeString))
10511          return ResourceTypeEnum.MEDICATIONDISPENSE;
10512        if ("MedicationKnowledge".equals(codeString))
10513          return ResourceTypeEnum.MEDICATIONKNOWLEDGE;
10514        if ("MedicationRequest".equals(codeString))
10515          return ResourceTypeEnum.MEDICATIONREQUEST;
10516        if ("MedicationStatement".equals(codeString))
10517          return ResourceTypeEnum.MEDICATIONSTATEMENT;
10518        if ("MedicinalProductDefinition".equals(codeString))
10519          return ResourceTypeEnum.MEDICINALPRODUCTDEFINITION;
10520        if ("MessageDefinition".equals(codeString))
10521          return ResourceTypeEnum.MESSAGEDEFINITION;
10522        if ("MessageHeader".equals(codeString))
10523          return ResourceTypeEnum.MESSAGEHEADER;
10524        if ("MolecularSequence".equals(codeString))
10525          return ResourceTypeEnum.MOLECULARSEQUENCE;
10526        if ("NamingSystem".equals(codeString))
10527          return ResourceTypeEnum.NAMINGSYSTEM;
10528        if ("NutritionOrder".equals(codeString))
10529          return ResourceTypeEnum.NUTRITIONORDER;
10530        if ("NutritionProduct".equals(codeString))
10531          return ResourceTypeEnum.NUTRITIONPRODUCT;
10532        if ("Observation".equals(codeString))
10533          return ResourceTypeEnum.OBSERVATION;
10534        if ("ObservationDefinition".equals(codeString))
10535          return ResourceTypeEnum.OBSERVATIONDEFINITION;
10536        if ("OperationDefinition".equals(codeString))
10537          return ResourceTypeEnum.OPERATIONDEFINITION;
10538        if ("OperationOutcome".equals(codeString))
10539          return ResourceTypeEnum.OPERATIONOUTCOME;
10540        if ("Organization".equals(codeString))
10541          return ResourceTypeEnum.ORGANIZATION;
10542        if ("OrganizationAffiliation".equals(codeString))
10543          return ResourceTypeEnum.ORGANIZATIONAFFILIATION;
10544        if ("PackagedProductDefinition".equals(codeString))
10545          return ResourceTypeEnum.PACKAGEDPRODUCTDEFINITION;
10546        if ("Patient".equals(codeString))
10547          return ResourceTypeEnum.PATIENT;
10548        if ("PaymentNotice".equals(codeString))
10549          return ResourceTypeEnum.PAYMENTNOTICE;
10550        if ("PaymentReconciliation".equals(codeString))
10551          return ResourceTypeEnum.PAYMENTRECONCILIATION;
10552        if ("Person".equals(codeString))
10553          return ResourceTypeEnum.PERSON;
10554        if ("PlanDefinition".equals(codeString))
10555          return ResourceTypeEnum.PLANDEFINITION;
10556        if ("Practitioner".equals(codeString))
10557          return ResourceTypeEnum.PRACTITIONER;
10558        if ("PractitionerRole".equals(codeString))
10559          return ResourceTypeEnum.PRACTITIONERROLE;
10560        if ("Procedure".equals(codeString))
10561          return ResourceTypeEnum.PROCEDURE;
10562        if ("Provenance".equals(codeString))
10563          return ResourceTypeEnum.PROVENANCE;
10564        if ("Questionnaire".equals(codeString))
10565          return ResourceTypeEnum.QUESTIONNAIRE;
10566        if ("QuestionnaireResponse".equals(codeString))
10567          return ResourceTypeEnum.QUESTIONNAIRERESPONSE;
10568        if ("RegulatedAuthorization".equals(codeString))
10569          return ResourceTypeEnum.REGULATEDAUTHORIZATION;
10570        if ("RelatedPerson".equals(codeString))
10571          return ResourceTypeEnum.RELATEDPERSON;
10572        if ("RequestGroup".equals(codeString))
10573          return ResourceTypeEnum.REQUESTGROUP;
10574        if ("ResearchDefinition".equals(codeString))
10575          return ResourceTypeEnum.RESEARCHDEFINITION;
10576        if ("ResearchElementDefinition".equals(codeString))
10577          return ResourceTypeEnum.RESEARCHELEMENTDEFINITION;
10578        if ("ResearchStudy".equals(codeString))
10579          return ResourceTypeEnum.RESEARCHSTUDY;
10580        if ("ResearchSubject".equals(codeString))
10581          return ResourceTypeEnum.RESEARCHSUBJECT;
10582        if ("RiskAssessment".equals(codeString))
10583          return ResourceTypeEnum.RISKASSESSMENT;
10584        if ("Schedule".equals(codeString))
10585          return ResourceTypeEnum.SCHEDULE;
10586        if ("SearchParameter".equals(codeString))
10587          return ResourceTypeEnum.SEARCHPARAMETER;
10588        if ("ServiceRequest".equals(codeString))
10589          return ResourceTypeEnum.SERVICEREQUEST;
10590        if ("Slot".equals(codeString))
10591          return ResourceTypeEnum.SLOT;
10592        if ("Specimen".equals(codeString))
10593          return ResourceTypeEnum.SPECIMEN;
10594        if ("SpecimenDefinition".equals(codeString))
10595          return ResourceTypeEnum.SPECIMENDEFINITION;
10596        if ("StructureDefinition".equals(codeString))
10597          return ResourceTypeEnum.STRUCTUREDEFINITION;
10598        if ("StructureMap".equals(codeString))
10599          return ResourceTypeEnum.STRUCTUREMAP;
10600        if ("Subscription".equals(codeString))
10601          return ResourceTypeEnum.SUBSCRIPTION;
10602        if ("SubscriptionStatus".equals(codeString))
10603          return ResourceTypeEnum.SUBSCRIPTIONSTATUS;
10604        if ("SubscriptionTopic".equals(codeString))
10605          return ResourceTypeEnum.SUBSCRIPTIONTOPIC;
10606        if ("Substance".equals(codeString))
10607          return ResourceTypeEnum.SUBSTANCE;
10608        if ("SubstanceDefinition".equals(codeString))
10609          return ResourceTypeEnum.SUBSTANCEDEFINITION;
10610        if ("SupplyDelivery".equals(codeString))
10611          return ResourceTypeEnum.SUPPLYDELIVERY;
10612        if ("SupplyRequest".equals(codeString))
10613          return ResourceTypeEnum.SUPPLYREQUEST;
10614        if ("Task".equals(codeString))
10615          return ResourceTypeEnum.TASK;
10616        if ("TerminologyCapabilities".equals(codeString))
10617          return ResourceTypeEnum.TERMINOLOGYCAPABILITIES;
10618        if ("TestReport".equals(codeString))
10619          return ResourceTypeEnum.TESTREPORT;
10620        if ("TestScript".equals(codeString))
10621          return ResourceTypeEnum.TESTSCRIPT;
10622        if ("ValueSet".equals(codeString))
10623          return ResourceTypeEnum.VALUESET;
10624        if ("VerificationResult".equals(codeString))
10625          return ResourceTypeEnum.VERIFICATIONRESULT;
10626        if ("VisionPrescription".equals(codeString))
10627          return ResourceTypeEnum.VISIONPRESCRIPTION;
10628        if ("Parameters".equals(codeString))
10629          return ResourceTypeEnum.PARAMETERS;
10630        throw new IllegalArgumentException("Unknown ResourceTypeEnum code '"+codeString+"'");
10631        }
10632        public Enumeration<ResourceTypeEnum> fromType(Base code) throws FHIRException {
10633          if (code == null)
10634            return null;
10635          if (code.isEmpty())
10636            return new Enumeration<ResourceTypeEnum>(this);
10637          String codeString = ((PrimitiveType) code).asStringValue();
10638          if (codeString == null || "".equals(codeString))
10639            return null;
10640        if ("Resource".equals(codeString))
10641          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.RESOURCE);
10642        if ("Binary".equals(codeString))
10643          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.BINARY);
10644        if ("Bundle".equals(codeString))
10645          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.BUNDLE);
10646        if ("DomainResource".equals(codeString))
10647          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DOMAINRESOURCE);
10648        if ("Account".equals(codeString))
10649          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ACCOUNT);
10650        if ("ActivityDefinition".equals(codeString))
10651          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ACTIVITYDEFINITION);
10652        if ("AdministrableProductDefinition".equals(codeString))
10653          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ADMINISTRABLEPRODUCTDEFINITION);
10654        if ("AdverseEvent".equals(codeString))
10655          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ADVERSEEVENT);
10656        if ("AllergyIntolerance".equals(codeString))
10657          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ALLERGYINTOLERANCE);
10658        if ("Appointment".equals(codeString))
10659          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.APPOINTMENT);
10660        if ("AppointmentResponse".equals(codeString))
10661          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.APPOINTMENTRESPONSE);
10662        if ("AuditEvent".equals(codeString))
10663          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.AUDITEVENT);
10664        if ("Basic".equals(codeString))
10665          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.BASIC);
10666        if ("BiologicallyDerivedProduct".equals(codeString))
10667          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.BIOLOGICALLYDERIVEDPRODUCT);
10668        if ("BodyStructure".equals(codeString))
10669          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.BODYSTRUCTURE);
10670        if ("CapabilityStatement".equals(codeString))
10671          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CAPABILITYSTATEMENT);
10672        if ("CarePlan".equals(codeString))
10673          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CAREPLAN);
10674        if ("CareTeam".equals(codeString))
10675          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CARETEAM);
10676        if ("CatalogEntry".equals(codeString))
10677          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CATALOGENTRY);
10678        if ("ChargeItem".equals(codeString))
10679          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CHARGEITEM);
10680        if ("ChargeItemDefinition".equals(codeString))
10681          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CHARGEITEMDEFINITION);
10682        if ("Citation".equals(codeString))
10683          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CITATION);
10684        if ("Claim".equals(codeString))
10685          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CLAIM);
10686        if ("ClaimResponse".equals(codeString))
10687          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CLAIMRESPONSE);
10688        if ("ClinicalImpression".equals(codeString))
10689          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CLINICALIMPRESSION);
10690        if ("ClinicalUseDefinition".equals(codeString))
10691          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CLINICALUSEDEFINITION);
10692        if ("CodeSystem".equals(codeString))
10693          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CODESYSTEM);
10694        if ("Communication".equals(codeString))
10695          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COMMUNICATION);
10696        if ("CommunicationRequest".equals(codeString))
10697          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COMMUNICATIONREQUEST);
10698        if ("CompartmentDefinition".equals(codeString))
10699          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COMPARTMENTDEFINITION);
10700        if ("Composition".equals(codeString))
10701          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COMPOSITION);
10702        if ("ConceptMap".equals(codeString))
10703          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CONCEPTMAP);
10704        if ("Condition".equals(codeString))
10705          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CONDITION);
10706        if ("Consent".equals(codeString))
10707          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CONSENT);
10708        if ("Contract".equals(codeString))
10709          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CONTRACT);
10710        if ("Coverage".equals(codeString))
10711          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COVERAGE);
10712        if ("CoverageEligibilityRequest".equals(codeString))
10713          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COVERAGEELIGIBILITYREQUEST);
10714        if ("CoverageEligibilityResponse".equals(codeString))
10715          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COVERAGEELIGIBILITYRESPONSE);
10716        if ("DetectedIssue".equals(codeString))
10717          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DETECTEDISSUE);
10718        if ("Device".equals(codeString))
10719          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DEVICE);
10720        if ("DeviceDefinition".equals(codeString))
10721          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DEVICEDEFINITION);
10722        if ("DeviceMetric".equals(codeString))
10723          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DEVICEMETRIC);
10724        if ("DeviceRequest".equals(codeString))
10725          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DEVICEREQUEST);
10726        if ("DeviceUseStatement".equals(codeString))
10727          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DEVICEUSESTATEMENT);
10728        if ("DiagnosticReport".equals(codeString))
10729          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DIAGNOSTICREPORT);
10730        if ("DocumentManifest".equals(codeString))
10731          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DOCUMENTMANIFEST);
10732        if ("DocumentReference".equals(codeString))
10733          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DOCUMENTREFERENCE);
10734        if ("Encounter".equals(codeString))
10735          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ENCOUNTER);
10736        if ("Endpoint".equals(codeString))
10737          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ENDPOINT);
10738        if ("EnrollmentRequest".equals(codeString))
10739          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ENROLLMENTREQUEST);
10740        if ("EnrollmentResponse".equals(codeString))
10741          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ENROLLMENTRESPONSE);
10742        if ("EpisodeOfCare".equals(codeString))
10743          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EPISODEOFCARE);
10744        if ("EventDefinition".equals(codeString))
10745          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EVENTDEFINITION);
10746        if ("Evidence".equals(codeString))
10747          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EVIDENCE);
10748        if ("EvidenceReport".equals(codeString))
10749          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EVIDENCEREPORT);
10750        if ("EvidenceVariable".equals(codeString))
10751          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EVIDENCEVARIABLE);
10752        if ("ExampleScenario".equals(codeString))
10753          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EXAMPLESCENARIO);
10754        if ("ExplanationOfBenefit".equals(codeString))
10755          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EXPLANATIONOFBENEFIT);
10756        if ("FamilyMemberHistory".equals(codeString))
10757          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.FAMILYMEMBERHISTORY);
10758        if ("Flag".equals(codeString))
10759          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.FLAG);
10760        if ("Goal".equals(codeString))
10761          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.GOAL);
10762        if ("GraphDefinition".equals(codeString))
10763          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.GRAPHDEFINITION);
10764        if ("Group".equals(codeString))
10765          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.GROUP);
10766        if ("GuidanceResponse".equals(codeString))
10767          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.GUIDANCERESPONSE);
10768        if ("HealthcareService".equals(codeString))
10769          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.HEALTHCARESERVICE);
10770        if ("ImagingStudy".equals(codeString))
10771          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.IMAGINGSTUDY);
10772        if ("Immunization".equals(codeString))
10773          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.IMMUNIZATION);
10774        if ("ImmunizationEvaluation".equals(codeString))
10775          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.IMMUNIZATIONEVALUATION);
10776        if ("ImmunizationRecommendation".equals(codeString))
10777          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.IMMUNIZATIONRECOMMENDATION);
10778        if ("ImplementationGuide".equals(codeString))
10779          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.IMPLEMENTATIONGUIDE);
10780        if ("Ingredient".equals(codeString))
10781          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.INGREDIENT);
10782        if ("InsurancePlan".equals(codeString))
10783          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.INSURANCEPLAN);
10784        if ("Invoice".equals(codeString))
10785          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.INVOICE);
10786        if ("Library".equals(codeString))
10787          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.LIBRARY);
10788        if ("Linkage".equals(codeString))
10789          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.LINKAGE);
10790        if ("List".equals(codeString))
10791          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.LIST);
10792        if ("Location".equals(codeString))
10793          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.LOCATION);
10794        if ("ManufacturedItemDefinition".equals(codeString))
10795          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MANUFACTUREDITEMDEFINITION);
10796        if ("Measure".equals(codeString))
10797          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEASURE);
10798        if ("MeasureReport".equals(codeString))
10799          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEASUREREPORT);
10800        if ("Media".equals(codeString))
10801          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDIA);
10802        if ("Medication".equals(codeString))
10803          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATION);
10804        if ("MedicationAdministration".equals(codeString))
10805          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONADMINISTRATION);
10806        if ("MedicationDispense".equals(codeString))
10807          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONDISPENSE);
10808        if ("MedicationKnowledge".equals(codeString))
10809          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONKNOWLEDGE);
10810        if ("MedicationRequest".equals(codeString))
10811          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONREQUEST);
10812        if ("MedicationStatement".equals(codeString))
10813          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONSTATEMENT);
10814        if ("MedicinalProductDefinition".equals(codeString))
10815          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICINALPRODUCTDEFINITION);
10816        if ("MessageDefinition".equals(codeString))
10817          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MESSAGEDEFINITION);
10818        if ("MessageHeader".equals(codeString))
10819          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MESSAGEHEADER);
10820        if ("MolecularSequence".equals(codeString))
10821          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MOLECULARSEQUENCE);
10822        if ("NamingSystem".equals(codeString))
10823          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.NAMINGSYSTEM);
10824        if ("NutritionOrder".equals(codeString))
10825          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.NUTRITIONORDER);
10826        if ("NutritionProduct".equals(codeString))
10827          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.NUTRITIONPRODUCT);
10828        if ("Observation".equals(codeString))
10829          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.OBSERVATION);
10830        if ("ObservationDefinition".equals(codeString))
10831          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.OBSERVATIONDEFINITION);
10832        if ("OperationDefinition".equals(codeString))
10833          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.OPERATIONDEFINITION);
10834        if ("OperationOutcome".equals(codeString))
10835          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.OPERATIONOUTCOME);
10836        if ("Organization".equals(codeString))
10837          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ORGANIZATION);
10838        if ("OrganizationAffiliation".equals(codeString))
10839          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ORGANIZATIONAFFILIATION);
10840        if ("PackagedProductDefinition".equals(codeString))
10841          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PACKAGEDPRODUCTDEFINITION);
10842        if ("Patient".equals(codeString))
10843          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PATIENT);
10844        if ("PaymentNotice".equals(codeString))
10845          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PAYMENTNOTICE);
10846        if ("PaymentReconciliation".equals(codeString))
10847          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PAYMENTRECONCILIATION);
10848        if ("Person".equals(codeString))
10849          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PERSON);
10850        if ("PlanDefinition".equals(codeString))
10851          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PLANDEFINITION);
10852        if ("Practitioner".equals(codeString))
10853          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PRACTITIONER);
10854        if ("PractitionerRole".equals(codeString))
10855          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PRACTITIONERROLE);
10856        if ("Procedure".equals(codeString))
10857          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PROCEDURE);
10858        if ("Provenance".equals(codeString))
10859          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PROVENANCE);
10860        if ("Questionnaire".equals(codeString))
10861          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.QUESTIONNAIRE);
10862        if ("QuestionnaireResponse".equals(codeString))
10863          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.QUESTIONNAIRERESPONSE);
10864        if ("RegulatedAuthorization".equals(codeString))
10865          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.REGULATEDAUTHORIZATION);
10866        if ("RelatedPerson".equals(codeString))
10867          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.RELATEDPERSON);
10868        if ("RequestGroup".equals(codeString))
10869          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.REQUESTGROUP);
10870        if ("ResearchDefinition".equals(codeString))
10871          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.RESEARCHDEFINITION);
10872        if ("ResearchElementDefinition".equals(codeString))
10873          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.RESEARCHELEMENTDEFINITION);
10874        if ("ResearchStudy".equals(codeString))
10875          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.RESEARCHSTUDY);
10876        if ("ResearchSubject".equals(codeString))
10877          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.RESEARCHSUBJECT);
10878        if ("RiskAssessment".equals(codeString))
10879          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.RISKASSESSMENT);
10880        if ("Schedule".equals(codeString))
10881          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SCHEDULE);
10882        if ("SearchParameter".equals(codeString))
10883          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SEARCHPARAMETER);
10884        if ("ServiceRequest".equals(codeString))
10885          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SERVICEREQUEST);
10886        if ("Slot".equals(codeString))
10887          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SLOT);
10888        if ("Specimen".equals(codeString))
10889          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SPECIMEN);
10890        if ("SpecimenDefinition".equals(codeString))
10891          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SPECIMENDEFINITION);
10892        if ("StructureDefinition".equals(codeString))
10893          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.STRUCTUREDEFINITION);
10894        if ("StructureMap".equals(codeString))
10895          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.STRUCTUREMAP);
10896        if ("Subscription".equals(codeString))
10897          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSCRIPTION);
10898        if ("SubscriptionStatus".equals(codeString))
10899          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSCRIPTIONSTATUS);
10900        if ("SubscriptionTopic".equals(codeString))
10901          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSCRIPTIONTOPIC);
10902        if ("Substance".equals(codeString))
10903          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSTANCE);
10904        if ("SubstanceDefinition".equals(codeString))
10905          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSTANCEDEFINITION);
10906        if ("SupplyDelivery".equals(codeString))
10907          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUPPLYDELIVERY);
10908        if ("SupplyRequest".equals(codeString))
10909          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUPPLYREQUEST);
10910        if ("Task".equals(codeString))
10911          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.TASK);
10912        if ("TerminologyCapabilities".equals(codeString))
10913          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.TERMINOLOGYCAPABILITIES);
10914        if ("TestReport".equals(codeString))
10915          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.TESTREPORT);
10916        if ("TestScript".equals(codeString))
10917          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.TESTSCRIPT);
10918        if ("ValueSet".equals(codeString))
10919          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.VALUESET);
10920        if ("VerificationResult".equals(codeString))
10921          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.VERIFICATIONRESULT);
10922        if ("VisionPrescription".equals(codeString))
10923          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.VISIONPRESCRIPTION);
10924        if ("Parameters".equals(codeString))
10925          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PARAMETERS);
10926        throw new FHIRException("Unknown ResourceTypeEnum code '"+codeString+"'");
10927        }
10928    public String toCode(ResourceTypeEnum code) {
10929      if (code == ResourceTypeEnum.RESOURCE)
10930        return "Resource";
10931      if (code == ResourceTypeEnum.BINARY)
10932        return "Binary";
10933      if (code == ResourceTypeEnum.BUNDLE)
10934        return "Bundle";
10935      if (code == ResourceTypeEnum.DOMAINRESOURCE)
10936        return "DomainResource";
10937      if (code == ResourceTypeEnum.ACCOUNT)
10938        return "Account";
10939      if (code == ResourceTypeEnum.ACTIVITYDEFINITION)
10940        return "ActivityDefinition";
10941      if (code == ResourceTypeEnum.ADMINISTRABLEPRODUCTDEFINITION)
10942        return "AdministrableProductDefinition";
10943      if (code == ResourceTypeEnum.ADVERSEEVENT)
10944        return "AdverseEvent";
10945      if (code == ResourceTypeEnum.ALLERGYINTOLERANCE)
10946        return "AllergyIntolerance";
10947      if (code == ResourceTypeEnum.APPOINTMENT)
10948        return "Appointment";
10949      if (code == ResourceTypeEnum.APPOINTMENTRESPONSE)
10950        return "AppointmentResponse";
10951      if (code == ResourceTypeEnum.AUDITEVENT)
10952        return "AuditEvent";
10953      if (code == ResourceTypeEnum.BASIC)
10954        return "Basic";
10955      if (code == ResourceTypeEnum.BIOLOGICALLYDERIVEDPRODUCT)
10956        return "BiologicallyDerivedProduct";
10957      if (code == ResourceTypeEnum.BODYSTRUCTURE)
10958        return "BodyStructure";
10959      if (code == ResourceTypeEnum.CAPABILITYSTATEMENT)
10960        return "CapabilityStatement";
10961      if (code == ResourceTypeEnum.CAREPLAN)
10962        return "CarePlan";
10963      if (code == ResourceTypeEnum.CARETEAM)
10964        return "CareTeam";
10965      if (code == ResourceTypeEnum.CATALOGENTRY)
10966        return "CatalogEntry";
10967      if (code == ResourceTypeEnum.CHARGEITEM)
10968        return "ChargeItem";
10969      if (code == ResourceTypeEnum.CHARGEITEMDEFINITION)
10970        return "ChargeItemDefinition";
10971      if (code == ResourceTypeEnum.CITATION)
10972        return "Citation";
10973      if (code == ResourceTypeEnum.CLAIM)
10974        return "Claim";
10975      if (code == ResourceTypeEnum.CLAIMRESPONSE)
10976        return "ClaimResponse";
10977      if (code == ResourceTypeEnum.CLINICALIMPRESSION)
10978        return "ClinicalImpression";
10979      if (code == ResourceTypeEnum.CLINICALUSEDEFINITION)
10980        return "ClinicalUseDefinition";
10981      if (code == ResourceTypeEnum.CODESYSTEM)
10982        return "CodeSystem";
10983      if (code == ResourceTypeEnum.COMMUNICATION)
10984        return "Communication";
10985      if (code == ResourceTypeEnum.COMMUNICATIONREQUEST)
10986        return "CommunicationRequest";
10987      if (code == ResourceTypeEnum.COMPARTMENTDEFINITION)
10988        return "CompartmentDefinition";
10989      if (code == ResourceTypeEnum.COMPOSITION)
10990        return "Composition";
10991      if (code == ResourceTypeEnum.CONCEPTMAP)
10992        return "ConceptMap";
10993      if (code == ResourceTypeEnum.CONDITION)
10994        return "Condition";
10995      if (code == ResourceTypeEnum.CONSENT)
10996        return "Consent";
10997      if (code == ResourceTypeEnum.CONTRACT)
10998        return "Contract";
10999      if (code == ResourceTypeEnum.COVERAGE)
11000        return "Coverage";
11001      if (code == ResourceTypeEnum.COVERAGEELIGIBILITYREQUEST)
11002        return "CoverageEligibilityRequest";
11003      if (code == ResourceTypeEnum.COVERAGEELIGIBILITYRESPONSE)
11004        return "CoverageEligibilityResponse";
11005      if (code == ResourceTypeEnum.DETECTEDISSUE)
11006        return "DetectedIssue";
11007      if (code == ResourceTypeEnum.DEVICE)
11008        return "Device";
11009      if (code == ResourceTypeEnum.DEVICEDEFINITION)
11010        return "DeviceDefinition";
11011      if (code == ResourceTypeEnum.DEVICEMETRIC)
11012        return "DeviceMetric";
11013      if (code == ResourceTypeEnum.DEVICEREQUEST)
11014        return "DeviceRequest";
11015      if (code == ResourceTypeEnum.DEVICEUSESTATEMENT)
11016        return "DeviceUseStatement";
11017      if (code == ResourceTypeEnum.DIAGNOSTICREPORT)
11018        return "DiagnosticReport";
11019      if (code == ResourceTypeEnum.DOCUMENTMANIFEST)
11020        return "DocumentManifest";
11021      if (code == ResourceTypeEnum.DOCUMENTREFERENCE)
11022        return "DocumentReference";
11023      if (code == ResourceTypeEnum.ENCOUNTER)
11024        return "Encounter";
11025      if (code == ResourceTypeEnum.ENDPOINT)
11026        return "Endpoint";
11027      if (code == ResourceTypeEnum.ENROLLMENTREQUEST)
11028        return "EnrollmentRequest";
11029      if (code == ResourceTypeEnum.ENROLLMENTRESPONSE)
11030        return "EnrollmentResponse";
11031      if (code == ResourceTypeEnum.EPISODEOFCARE)
11032        return "EpisodeOfCare";
11033      if (code == ResourceTypeEnum.EVENTDEFINITION)
11034        return "EventDefinition";
11035      if (code == ResourceTypeEnum.EVIDENCE)
11036        return "Evidence";
11037      if (code == ResourceTypeEnum.EVIDENCEREPORT)
11038        return "EvidenceReport";
11039      if (code == ResourceTypeEnum.EVIDENCEVARIABLE)
11040        return "EvidenceVariable";
11041      if (code == ResourceTypeEnum.EXAMPLESCENARIO)
11042        return "ExampleScenario";
11043      if (code == ResourceTypeEnum.EXPLANATIONOFBENEFIT)
11044        return "ExplanationOfBenefit";
11045      if (code == ResourceTypeEnum.FAMILYMEMBERHISTORY)
11046        return "FamilyMemberHistory";
11047      if (code == ResourceTypeEnum.FLAG)
11048        return "Flag";
11049      if (code == ResourceTypeEnum.GOAL)
11050        return "Goal";
11051      if (code == ResourceTypeEnum.GRAPHDEFINITION)
11052        return "GraphDefinition";
11053      if (code == ResourceTypeEnum.GROUP)
11054        return "Group";
11055      if (code == ResourceTypeEnum.GUIDANCERESPONSE)
11056        return "GuidanceResponse";
11057      if (code == ResourceTypeEnum.HEALTHCARESERVICE)
11058        return "HealthcareService";
11059      if (code == ResourceTypeEnum.IMAGINGSTUDY)
11060        return "ImagingStudy";
11061      if (code == ResourceTypeEnum.IMMUNIZATION)
11062        return "Immunization";
11063      if (code == ResourceTypeEnum.IMMUNIZATIONEVALUATION)
11064        return "ImmunizationEvaluation";
11065      if (code == ResourceTypeEnum.IMMUNIZATIONRECOMMENDATION)
11066        return "ImmunizationRecommendation";
11067      if (code == ResourceTypeEnum.IMPLEMENTATIONGUIDE)
11068        return "ImplementationGuide";
11069      if (code == ResourceTypeEnum.INGREDIENT)
11070        return "Ingredient";
11071      if (code == ResourceTypeEnum.INSURANCEPLAN)
11072        return "InsurancePlan";
11073      if (code == ResourceTypeEnum.INVOICE)
11074        return "Invoice";
11075      if (code == ResourceTypeEnum.LIBRARY)
11076        return "Library";
11077      if (code == ResourceTypeEnum.LINKAGE)
11078        return "Linkage";
11079      if (code == ResourceTypeEnum.LIST)
11080        return "List";
11081      if (code == ResourceTypeEnum.LOCATION)
11082        return "Location";
11083      if (code == ResourceTypeEnum.MANUFACTUREDITEMDEFINITION)
11084        return "ManufacturedItemDefinition";
11085      if (code == ResourceTypeEnum.MEASURE)
11086        return "Measure";
11087      if (code == ResourceTypeEnum.MEASUREREPORT)
11088        return "MeasureReport";
11089      if (code == ResourceTypeEnum.MEDIA)
11090        return "Media";
11091      if (code == ResourceTypeEnum.MEDICATION)
11092        return "Medication";
11093      if (code == ResourceTypeEnum.MEDICATIONADMINISTRATION)
11094        return "MedicationAdministration";
11095      if (code == ResourceTypeEnum.MEDICATIONDISPENSE)
11096        return "MedicationDispense";
11097      if (code == ResourceTypeEnum.MEDICATIONKNOWLEDGE)
11098        return "MedicationKnowledge";
11099      if (code == ResourceTypeEnum.MEDICATIONREQUEST)
11100        return "MedicationRequest";
11101      if (code == ResourceTypeEnum.MEDICATIONSTATEMENT)
11102        return "MedicationStatement";
11103      if (code == ResourceTypeEnum.MEDICINALPRODUCTDEFINITION)
11104        return "MedicinalProductDefinition";
11105      if (code == ResourceTypeEnum.MESSAGEDEFINITION)
11106        return "MessageDefinition";
11107      if (code == ResourceTypeEnum.MESSAGEHEADER)
11108        return "MessageHeader";
11109      if (code == ResourceTypeEnum.MOLECULARSEQUENCE)
11110        return "MolecularSequence";
11111      if (code == ResourceTypeEnum.NAMINGSYSTEM)
11112        return "NamingSystem";
11113      if (code == ResourceTypeEnum.NUTRITIONORDER)
11114        return "NutritionOrder";
11115      if (code == ResourceTypeEnum.NUTRITIONPRODUCT)
11116        return "NutritionProduct";
11117      if (code == ResourceTypeEnum.OBSERVATION)
11118        return "Observation";
11119      if (code == ResourceTypeEnum.OBSERVATIONDEFINITION)
11120        return "ObservationDefinition";
11121      if (code == ResourceTypeEnum.OPERATIONDEFINITION)
11122        return "OperationDefinition";
11123      if (code == ResourceTypeEnum.OPERATIONOUTCOME)
11124        return "OperationOutcome";
11125      if (code == ResourceTypeEnum.ORGANIZATION)
11126        return "Organization";
11127      if (code == ResourceTypeEnum.ORGANIZATIONAFFILIATION)
11128        return "OrganizationAffiliation";
11129      if (code == ResourceTypeEnum.PACKAGEDPRODUCTDEFINITION)
11130        return "PackagedProductDefinition";
11131      if (code == ResourceTypeEnum.PATIENT)
11132        return "Patient";
11133      if (code == ResourceTypeEnum.PAYMENTNOTICE)
11134        return "PaymentNotice";
11135      if (code == ResourceTypeEnum.PAYMENTRECONCILIATION)
11136        return "PaymentReconciliation";
11137      if (code == ResourceTypeEnum.PERSON)
11138        return "Person";
11139      if (code == ResourceTypeEnum.PLANDEFINITION)
11140        return "PlanDefinition";
11141      if (code == ResourceTypeEnum.PRACTITIONER)
11142        return "Practitioner";
11143      if (code == ResourceTypeEnum.PRACTITIONERROLE)
11144        return "PractitionerRole";
11145      if (code == ResourceTypeEnum.PROCEDURE)
11146        return "Procedure";
11147      if (code == ResourceTypeEnum.PROVENANCE)
11148        return "Provenance";
11149      if (code == ResourceTypeEnum.QUESTIONNAIRE)
11150        return "Questionnaire";
11151      if (code == ResourceTypeEnum.QUESTIONNAIRERESPONSE)
11152        return "QuestionnaireResponse";
11153      if (code == ResourceTypeEnum.REGULATEDAUTHORIZATION)
11154        return "RegulatedAuthorization";
11155      if (code == ResourceTypeEnum.RELATEDPERSON)
11156        return "RelatedPerson";
11157      if (code == ResourceTypeEnum.REQUESTGROUP)
11158        return "RequestGroup";
11159      if (code == ResourceTypeEnum.RESEARCHDEFINITION)
11160        return "ResearchDefinition";
11161      if (code == ResourceTypeEnum.RESEARCHELEMENTDEFINITION)
11162        return "ResearchElementDefinition";
11163      if (code == ResourceTypeEnum.RESEARCHSTUDY)
11164        return "ResearchStudy";
11165      if (code == ResourceTypeEnum.RESEARCHSUBJECT)
11166        return "ResearchSubject";
11167      if (code == ResourceTypeEnum.RISKASSESSMENT)
11168        return "RiskAssessment";
11169      if (code == ResourceTypeEnum.SCHEDULE)
11170        return "Schedule";
11171      if (code == ResourceTypeEnum.SEARCHPARAMETER)
11172        return "SearchParameter";
11173      if (code == ResourceTypeEnum.SERVICEREQUEST)
11174        return "ServiceRequest";
11175      if (code == ResourceTypeEnum.SLOT)
11176        return "Slot";
11177      if (code == ResourceTypeEnum.SPECIMEN)
11178        return "Specimen";
11179      if (code == ResourceTypeEnum.SPECIMENDEFINITION)
11180        return "SpecimenDefinition";
11181      if (code == ResourceTypeEnum.STRUCTUREDEFINITION)
11182        return "StructureDefinition";
11183      if (code == ResourceTypeEnum.STRUCTUREMAP)
11184        return "StructureMap";
11185      if (code == ResourceTypeEnum.SUBSCRIPTION)
11186        return "Subscription";
11187      if (code == ResourceTypeEnum.SUBSCRIPTIONSTATUS)
11188        return "SubscriptionStatus";
11189      if (code == ResourceTypeEnum.SUBSCRIPTIONTOPIC)
11190        return "SubscriptionTopic";
11191      if (code == ResourceTypeEnum.SUBSTANCE)
11192        return "Substance";
11193      if (code == ResourceTypeEnum.SUBSTANCEDEFINITION)
11194        return "SubstanceDefinition";
11195      if (code == ResourceTypeEnum.SUPPLYDELIVERY)
11196        return "SupplyDelivery";
11197      if (code == ResourceTypeEnum.SUPPLYREQUEST)
11198        return "SupplyRequest";
11199      if (code == ResourceTypeEnum.TASK)
11200        return "Task";
11201      if (code == ResourceTypeEnum.TERMINOLOGYCAPABILITIES)
11202        return "TerminologyCapabilities";
11203      if (code == ResourceTypeEnum.TESTREPORT)
11204        return "TestReport";
11205      if (code == ResourceTypeEnum.TESTSCRIPT)
11206        return "TestScript";
11207      if (code == ResourceTypeEnum.VALUESET)
11208        return "ValueSet";
11209      if (code == ResourceTypeEnum.VERIFICATIONRESULT)
11210        return "VerificationResult";
11211      if (code == ResourceTypeEnum.VISIONPRESCRIPTION)
11212        return "VisionPrescription";
11213      if (code == ResourceTypeEnum.PARAMETERS)
11214        return "Parameters";
11215      return "?";
11216      }
11217    public String toSystem(ResourceTypeEnum code) {
11218      return code.getSystem();
11219      }
11220    }
11221
11222    public enum SearchParamType {
11223        /**
11224         * Search parameter SHALL be a number (a whole number, or a decimal).
11225         */
11226        NUMBER, 
11227        /**
11228         * Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported.
11229         */
11230        DATE, 
11231        /**
11232         * Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces.
11233         */
11234        STRING, 
11235        /**
11236         * Search parameter on a coded element or identifier. May be used to search through the text, display, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a "|", depending on the modifier used.
11237         */
11238        TOKEN, 
11239        /**
11240         * A reference to another resource (Reference or canonical).
11241         */
11242        REFERENCE, 
11243        /**
11244         * A composite search parameter that combines a search on two values together.
11245         */
11246        COMPOSITE, 
11247        /**
11248         * A search parameter that searches on a quantity.
11249         */
11250        QUANTITY, 
11251        /**
11252         * A search parameter that searches on a URI (RFC 3986).
11253         */
11254        URI, 
11255        /**
11256         * Special logic applies to this parameter per the description of the search parameter.
11257         */
11258        SPECIAL, 
11259        /**
11260         * added to help the parsers
11261         */
11262        NULL;
11263        public static SearchParamType fromCode(String codeString) throws FHIRException {
11264            if (codeString == null || "".equals(codeString))
11265                return null;
11266        if ("number".equals(codeString))
11267          return NUMBER;
11268        if ("date".equals(codeString))
11269          return DATE;
11270        if ("string".equals(codeString))
11271          return STRING;
11272        if ("token".equals(codeString))
11273          return TOKEN;
11274        if ("reference".equals(codeString))
11275          return REFERENCE;
11276        if ("composite".equals(codeString))
11277          return COMPOSITE;
11278        if ("quantity".equals(codeString))
11279          return QUANTITY;
11280        if ("uri".equals(codeString))
11281          return URI;
11282        if ("special".equals(codeString))
11283          return SPECIAL;
11284        throw new FHIRException("Unknown SearchParamType code '"+codeString+"'");
11285        }
11286        public String toCode() {
11287          switch (this) {
11288            case NUMBER: return "number";
11289            case DATE: return "date";
11290            case STRING: return "string";
11291            case TOKEN: return "token";
11292            case REFERENCE: return "reference";
11293            case COMPOSITE: return "composite";
11294            case QUANTITY: return "quantity";
11295            case URI: return "uri";
11296            case SPECIAL: return "special";
11297            case NULL: return null;
11298            default: return "?";
11299          }
11300        }
11301        public String getSystem() {
11302          switch (this) {
11303            case NUMBER: return "http://hl7.org/fhir/search-param-type";
11304            case DATE: return "http://hl7.org/fhir/search-param-type";
11305            case STRING: return "http://hl7.org/fhir/search-param-type";
11306            case TOKEN: return "http://hl7.org/fhir/search-param-type";
11307            case REFERENCE: return "http://hl7.org/fhir/search-param-type";
11308            case COMPOSITE: return "http://hl7.org/fhir/search-param-type";
11309            case QUANTITY: return "http://hl7.org/fhir/search-param-type";
11310            case URI: return "http://hl7.org/fhir/search-param-type";
11311            case SPECIAL: return "http://hl7.org/fhir/search-param-type";
11312            case NULL: return null;
11313            default: return "?";
11314          }
11315        }
11316        public String getDefinition() {
11317          switch (this) {
11318            case NUMBER: return "Search parameter SHALL be a number (a whole number, or a decimal).";
11319            case DATE: return "Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported.";
11320            case STRING: return "Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces.";
11321            case TOKEN: return "Search parameter on a coded element or identifier. May be used to search through the text, display, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a \"|\", depending on the modifier used.";
11322            case REFERENCE: return "A reference to another resource (Reference or canonical).";
11323            case COMPOSITE: return "A composite search parameter that combines a search on two values together.";
11324            case QUANTITY: return "A search parameter that searches on a quantity.";
11325            case URI: return "A search parameter that searches on a URI (RFC 3986).";
11326            case SPECIAL: return "Special logic applies to this parameter per the description of the search parameter.";
11327            case NULL: return null;
11328            default: return "?";
11329          }
11330        }
11331        public String getDisplay() {
11332          switch (this) {
11333            case NUMBER: return "Number";
11334            case DATE: return "Date/DateTime";
11335            case STRING: return "String";
11336            case TOKEN: return "Token";
11337            case REFERENCE: return "Reference";
11338            case COMPOSITE: return "Composite";
11339            case QUANTITY: return "Quantity";
11340            case URI: return "URI";
11341            case SPECIAL: return "Special";
11342            case NULL: return null;
11343            default: return "?";
11344          }
11345        }
11346    }
11347
11348  public static class SearchParamTypeEnumFactory implements EnumFactory<SearchParamType> {
11349    public SearchParamType fromCode(String codeString) throws IllegalArgumentException {
11350      if (codeString == null || "".equals(codeString))
11351            if (codeString == null || "".equals(codeString))
11352                return null;
11353        if ("number".equals(codeString))
11354          return SearchParamType.NUMBER;
11355        if ("date".equals(codeString))
11356          return SearchParamType.DATE;
11357        if ("string".equals(codeString))
11358          return SearchParamType.STRING;
11359        if ("token".equals(codeString))
11360          return SearchParamType.TOKEN;
11361        if ("reference".equals(codeString))
11362          return SearchParamType.REFERENCE;
11363        if ("composite".equals(codeString))
11364          return SearchParamType.COMPOSITE;
11365        if ("quantity".equals(codeString))
11366          return SearchParamType.QUANTITY;
11367        if ("uri".equals(codeString))
11368          return SearchParamType.URI;
11369        if ("special".equals(codeString))
11370          return SearchParamType.SPECIAL;
11371        throw new IllegalArgumentException("Unknown SearchParamType code '"+codeString+"'");
11372        }
11373        public Enumeration<SearchParamType> fromType(Base code) throws FHIRException {
11374          if (code == null)
11375            return null;
11376          if (code.isEmpty())
11377            return new Enumeration<SearchParamType>(this);
11378          String codeString = ((PrimitiveType) code).asStringValue();
11379          if (codeString == null || "".equals(codeString))
11380            return null;
11381        if ("number".equals(codeString))
11382          return new Enumeration<SearchParamType>(this, SearchParamType.NUMBER);
11383        if ("date".equals(codeString))
11384          return new Enumeration<SearchParamType>(this, SearchParamType.DATE);
11385        if ("string".equals(codeString))
11386          return new Enumeration<SearchParamType>(this, SearchParamType.STRING);
11387        if ("token".equals(codeString))
11388          return new Enumeration<SearchParamType>(this, SearchParamType.TOKEN);
11389        if ("reference".equals(codeString))
11390          return new Enumeration<SearchParamType>(this, SearchParamType.REFERENCE);
11391        if ("composite".equals(codeString))
11392          return new Enumeration<SearchParamType>(this, SearchParamType.COMPOSITE);
11393        if ("quantity".equals(codeString))
11394          return new Enumeration<SearchParamType>(this, SearchParamType.QUANTITY);
11395        if ("uri".equals(codeString))
11396          return new Enumeration<SearchParamType>(this, SearchParamType.URI);
11397        if ("special".equals(codeString))
11398          return new Enumeration<SearchParamType>(this, SearchParamType.SPECIAL);
11399        throw new FHIRException("Unknown SearchParamType code '"+codeString+"'");
11400        }
11401    public String toCode(SearchParamType code) {
11402      if (code == SearchParamType.NUMBER)
11403        return "number";
11404      if (code == SearchParamType.DATE)
11405        return "date";
11406      if (code == SearchParamType.STRING)
11407        return "string";
11408      if (code == SearchParamType.TOKEN)
11409        return "token";
11410      if (code == SearchParamType.REFERENCE)
11411        return "reference";
11412      if (code == SearchParamType.COMPOSITE)
11413        return "composite";
11414      if (code == SearchParamType.QUANTITY)
11415        return "quantity";
11416      if (code == SearchParamType.URI)
11417        return "uri";
11418      if (code == SearchParamType.SPECIAL)
11419        return "special";
11420      return "?";
11421      }
11422    public String toSystem(SearchParamType code) {
11423      return code.getSystem();
11424      }
11425    }
11426
11427    public enum SubscriptionStatus {
11428        /**
11429         * The client has requested the subscription, and the server has not yet set it up.
11430         */
11431        REQUESTED, 
11432        /**
11433         * The subscription is active.
11434         */
11435        ACTIVE, 
11436        /**
11437         * The server has an error executing the notification.
11438         */
11439        ERROR, 
11440        /**
11441         * Too many errors have occurred or the subscription has expired.
11442         */
11443        OFF, 
11444        /**
11445         * added to help the parsers
11446         */
11447        NULL;
11448        public static SubscriptionStatus fromCode(String codeString) throws FHIRException {
11449            if (codeString == null || "".equals(codeString))
11450                return null;
11451        if ("requested".equals(codeString))
11452          return REQUESTED;
11453        if ("active".equals(codeString))
11454          return ACTIVE;
11455        if ("error".equals(codeString))
11456          return ERROR;
11457        if ("off".equals(codeString))
11458          return OFF;
11459        throw new FHIRException("Unknown SubscriptionStatus code '"+codeString+"'");
11460        }
11461        public String toCode() {
11462          switch (this) {
11463            case REQUESTED: return "requested";
11464            case ACTIVE: return "active";
11465            case ERROR: return "error";
11466            case OFF: return "off";
11467            case NULL: return null;
11468            default: return "?";
11469          }
11470        }
11471        public String getSystem() {
11472          switch (this) {
11473            case REQUESTED: return "http://hl7.org/fhir/subscription-status";
11474            case ACTIVE: return "http://hl7.org/fhir/subscription-status";
11475            case ERROR: return "http://hl7.org/fhir/subscription-status";
11476            case OFF: return "http://hl7.org/fhir/subscription-status";
11477            case NULL: return null;
11478            default: return "?";
11479          }
11480        }
11481        public String getDefinition() {
11482          switch (this) {
11483            case REQUESTED: return "The client has requested the subscription, and the server has not yet set it up.";
11484            case ACTIVE: return "The subscription is active.";
11485            case ERROR: return "The server has an error executing the notification.";
11486            case OFF: return "Too many errors have occurred or the subscription has expired.";
11487            case NULL: return null;
11488            default: return "?";
11489          }
11490        }
11491        public String getDisplay() {
11492          switch (this) {
11493            case REQUESTED: return "Requested";
11494            case ACTIVE: return "Active";
11495            case ERROR: return "Error";
11496            case OFF: return "Off";
11497            case NULL: return null;
11498            default: return "?";
11499          }
11500        }
11501    }
11502
11503  public static class SubscriptionStatusEnumFactory implements EnumFactory<SubscriptionStatus> {
11504    public SubscriptionStatus fromCode(String codeString) throws IllegalArgumentException {
11505      if (codeString == null || "".equals(codeString))
11506            if (codeString == null || "".equals(codeString))
11507                return null;
11508        if ("requested".equals(codeString))
11509          return SubscriptionStatus.REQUESTED;
11510        if ("active".equals(codeString))
11511          return SubscriptionStatus.ACTIVE;
11512        if ("error".equals(codeString))
11513          return SubscriptionStatus.ERROR;
11514        if ("off".equals(codeString))
11515          return SubscriptionStatus.OFF;
11516        throw new IllegalArgumentException("Unknown SubscriptionStatus code '"+codeString+"'");
11517        }
11518        public Enumeration<SubscriptionStatus> fromType(Base code) throws FHIRException {
11519          if (code == null)
11520            return null;
11521          if (code.isEmpty())
11522            return new Enumeration<SubscriptionStatus>(this);
11523          String codeString = ((PrimitiveType) code).asStringValue();
11524          if (codeString == null || "".equals(codeString))
11525            return null;
11526        if ("requested".equals(codeString))
11527          return new Enumeration<SubscriptionStatus>(this, SubscriptionStatus.REQUESTED);
11528        if ("active".equals(codeString))
11529          return new Enumeration<SubscriptionStatus>(this, SubscriptionStatus.ACTIVE);
11530        if ("error".equals(codeString))
11531          return new Enumeration<SubscriptionStatus>(this, SubscriptionStatus.ERROR);
11532        if ("off".equals(codeString))
11533          return new Enumeration<SubscriptionStatus>(this, SubscriptionStatus.OFF);
11534        throw new FHIRException("Unknown SubscriptionStatus code '"+codeString+"'");
11535        }
11536    public String toCode(SubscriptionStatus code) {
11537      if (code == SubscriptionStatus.REQUESTED)
11538        return "requested";
11539      if (code == SubscriptionStatus.ACTIVE)
11540        return "active";
11541      if (code == SubscriptionStatus.ERROR)
11542        return "error";
11543      if (code == SubscriptionStatus.OFF)
11544        return "off";
11545      return "?";
11546      }
11547    public String toSystem(SubscriptionStatus code) {
11548      return code.getSystem();
11549      }
11550    }
11551
11552    public enum Use {
11553        /**
11554         * The treatment is complete and this represents a Claim for the services.
11555         */
11556        CLAIM, 
11557        /**
11558         * The treatment is proposed and this represents a Pre-authorization for the services.
11559         */
11560        PREAUTHORIZATION, 
11561        /**
11562         * The treatment is proposed and this represents a Pre-determination for the services.
11563         */
11564        PREDETERMINATION, 
11565        /**
11566         * added to help the parsers
11567         */
11568        NULL;
11569        public static Use fromCode(String codeString) throws FHIRException {
11570            if (codeString == null || "".equals(codeString))
11571                return null;
11572        if ("claim".equals(codeString))
11573          return CLAIM;
11574        if ("preauthorization".equals(codeString))
11575          return PREAUTHORIZATION;
11576        if ("predetermination".equals(codeString))
11577          return PREDETERMINATION;
11578        throw new FHIRException("Unknown Use code '"+codeString+"'");
11579        }
11580        public String toCode() {
11581          switch (this) {
11582            case CLAIM: return "claim";
11583            case PREAUTHORIZATION: return "preauthorization";
11584            case PREDETERMINATION: return "predetermination";
11585            case NULL: return null;
11586            default: return "?";
11587          }
11588        }
11589        public String getSystem() {
11590          switch (this) {
11591            case CLAIM: return "http://hl7.org/fhir/claim-use";
11592            case PREAUTHORIZATION: return "http://hl7.org/fhir/claim-use";
11593            case PREDETERMINATION: return "http://hl7.org/fhir/claim-use";
11594            case NULL: return null;
11595            default: return "?";
11596          }
11597        }
11598        public String getDefinition() {
11599          switch (this) {
11600            case CLAIM: return "The treatment is complete and this represents a Claim for the services.";
11601            case PREAUTHORIZATION: return "The treatment is proposed and this represents a Pre-authorization for the services.";
11602            case PREDETERMINATION: return "The treatment is proposed and this represents a Pre-determination for the services.";
11603            case NULL: return null;
11604            default: return "?";
11605          }
11606        }
11607        public String getDisplay() {
11608          switch (this) {
11609            case CLAIM: return "Claim";
11610            case PREAUTHORIZATION: return "Preauthorization";
11611            case PREDETERMINATION: return "Predetermination";
11612            case NULL: return null;
11613            default: return "?";
11614          }
11615        }
11616    }
11617
11618  public static class UseEnumFactory implements EnumFactory<Use> {
11619    public Use fromCode(String codeString) throws IllegalArgumentException {
11620      if (codeString == null || "".equals(codeString))
11621            if (codeString == null || "".equals(codeString))
11622                return null;
11623        if ("claim".equals(codeString))
11624          return Use.CLAIM;
11625        if ("preauthorization".equals(codeString))
11626          return Use.PREAUTHORIZATION;
11627        if ("predetermination".equals(codeString))
11628          return Use.PREDETERMINATION;
11629        throw new IllegalArgumentException("Unknown Use code '"+codeString+"'");
11630        }
11631        public Enumeration<Use> fromType(Base code) throws FHIRException {
11632          if (code == null)
11633            return null;
11634          if (code.isEmpty())
11635            return new Enumeration<Use>(this);
11636          String codeString = ((PrimitiveType) code).asStringValue();
11637          if (codeString == null || "".equals(codeString))
11638            return null;
11639        if ("claim".equals(codeString))
11640          return new Enumeration<Use>(this, Use.CLAIM);
11641        if ("preauthorization".equals(codeString))
11642          return new Enumeration<Use>(this, Use.PREAUTHORIZATION);
11643        if ("predetermination".equals(codeString))
11644          return new Enumeration<Use>(this, Use.PREDETERMINATION);
11645        throw new FHIRException("Unknown Use code '"+codeString+"'");
11646        }
11647    public String toCode(Use code) {
11648      if (code == Use.CLAIM)
11649        return "claim";
11650      if (code == Use.PREAUTHORIZATION)
11651        return "preauthorization";
11652      if (code == Use.PREDETERMINATION)
11653        return "predetermination";
11654      return "?";
11655      }
11656    public String toSystem(Use code) {
11657      return code.getSystem();
11658      }
11659    }
11660
11661
11662}
11663