001package org.hl7.fhir.r5.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 Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.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, RequestGroup]
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, CapabilityStatement2, TerminologyCapabilities]
052//   ClaimProcessingCodes: This value set includes Claim Processing Outcome codes.[ClaimResponse, ExplanationOfBenefit]
053//   ClinicalUseIssueType: Overall defining type of this clinical use issue.[ClinicalUseDefinition, ClinicalUseIssue]
054//   CompartmentType: Which type a compartment definition describes.[CompartmentDefinition, GraphDefinition]
055//   CompositionStatus: The workflow/clinical status of the composition.[Composition, DocumentReference]
056//   ConceptMapGroupUnmappedMode: Defines which action to take if there is no match in the group.[ConceptMap, ConceptMap2]
057//   ConceptMapRelationship: The relationship between concepts.[ConceptMap, ConceptMap2]
058//   DaysOfWeek: The days of the week.[HealthcareService, Location, PractitionerRole, Timing]
059//   DeviceNameType: The type of name the device is referred by.[Device, DeviceDefinition]
060//   DocumentReferenceStatus: The status of the document reference.[DocumentManifest, DocumentReference]
061//   EventStatus: Codes identifying the lifecycle stage of an event.[ClinicalImpression, Communication, NutritionIntake, Procedure]
062//   EvidenceVariableHandling: The handling of the variable in statistical analysis for exposures or outcomes (E.g. Dichotomous, Continuous, Descriptive).[Evidence, EvidenceVariable]
063//   FHIRAllTypes: A list of all the concrete types defined in this version of the FHIR specification - Abstract Types, Data Types and Resource Types.[DataRequirement, Measure, OperationDefinition, ParameterDefinition]
064//   FHIRVersion: All published FHIR Versions.[CapabilityStatement, CapabilityStatement2, ImplementationGuide, StructureDefinition]
065//   FilterOperator: The kind of operation to perform as a part of a property based filter.[CodeSystem, ValueSet]
066//   FinancialResourceStatusCodes: This value set includes Status codes.[Claim, ClaimResponse, Coverage, CoverageEligibilityRequest, CoverageEligibilityResponse, EnrollmentRequest, EnrollmentResponse, PaymentNotice, PaymentReconciliation, VisionPrescription]
067//   InvoicePriceComponentType: Codes indicating the kind of the price component.[ChargeItemDefinition, Invoice]
068//   ListMode: The processing mode that applies to this list.[Composition, EvidenceReport, List]
069//   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]
070//   MimeTypes: This value set includes all possible codes from BCP-13 (http://tools.ietf.org/html/bcp13)[Attachment, Binary, CapabilityStatement, CapabilityStatement2, ElementDefinition, Endpoint, Signature, Subscription, TestScript]
071//   NoteType: The presentation types of notes.[ClaimResponse, ExplanationOfBenefit, PaymentReconciliation]
072//   ObservationStatus: Codes providing the status of an observation.[DetectedIssue, Observation, RiskAssessment]
073//   OperationParameterUse: Whether an operation parameter is an input or an output parameter.[OperationDefinition, ParameterDefinition]
074//   ParticipationStatus: The Participation status of an appointment.[Appointment, AppointmentResponse]
075//   PublicationStatus: The lifecycle status of an artifact.[ActivityDefinition, AdministrableProductDefinition, CanonicalResource, CapabilityStatement, CapabilityStatement2, ChargeItemDefinition, Citation, CodeSystem, CompartmentDefinition, ConceptMap, ConceptMap2, ConditionDefinition, EventDefinition, Evidence, EvidenceReport, EvidenceVariable, ExampleScenario, GraphDefinition, ImplementationGuide, Ingredient, InsurancePlan, Library, ManufacturedItemDefinition, Measure, MessageDefinition, NamingSystem, ObservationDefinition, OperationDefinition, PlanDefinition, Questionnaire, ResearchStudy, ResearchSubject, SearchParameter, SpecimenDefinition, StructureDefinition, StructureMap, SubscriptionTopic, TerminologyCapabilities, TestScript, ValueSet]
076//   QuantityComparator: How the Quantity should be understood and represented.[Age, Count, Distance, Duration, Quantity]
077//   RequestIntent: Codes indicating the degree of authority/intentionality associated with a request.[ActivityDefinition, CommunicationRequest, DeviceRequest, NutritionOrder, RequestGroup, ServiceRequest]
078//   RequestPriority: Identifies the level of importance to be assigned to actioning the request.[ActivityDefinition, Communication, CommunicationRequest, DeviceRequest, MedicationRequest, PlanDefinition, RequestGroup, ServiceRequest, SupplyRequest, Task]
079//   RequestStatus: Codes identifying the lifecycle stage of a request.[CarePlan, CommunicationRequest, DeviceRequest, NutritionOrder, RequestGroup, ServiceRequest]
080//   ResourceTypeEnum: One of the resource types defined as part of this version of FHIR.[CapabilityStatement, CapabilityStatement2, CompartmentDefinition, ExampleScenario, GraphDefinition, ImplementationGuide, MessageDefinition, OperationDefinition, Questionnaire, SearchParameter]
081//   RestfulCapabilityMode: The mode of a RESTful capability statement.[CapabilityStatement, CapabilityStatement2]
082//   SearchParamType: Data types allowed to be used for search parameters.[CapabilityStatement, CapabilityStatement2, OperationDefinition, SearchParameter]
083//   SubscriptionSearchModifier: FHIR search modifiers allowed for use in Subscriptions and SubscriptionTopics.[Subscription, SubscriptionTopic]
084//   SubscriptionState: State values for FHIR Subscriptions.[Subscription, SubscriptionStatus]
085//   Use: The purpose of the Claim: predetermination, preauthorization, claim.[Claim, ClaimResponse, ExplanationOfBenefit]
086
087
088    public enum ActionCardinalityBehavior {
089        /**
090         * The action may only be selected one time.
091         */
092        SINGLE, 
093        /**
094         * The action may be selected multiple times.
095         */
096        MULTIPLE, 
097        /**
098         * added to help the parsers
099         */
100        NULL;
101        public static ActionCardinalityBehavior fromCode(String codeString) throws FHIRException {
102            if (codeString == null || "".equals(codeString))
103                return null;
104        if ("single".equals(codeString))
105          return SINGLE;
106        if ("multiple".equals(codeString))
107          return MULTIPLE;
108        throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
109        }
110        public String toCode() {
111          switch (this) {
112            case SINGLE: return "single";
113            case MULTIPLE: return "multiple";
114            case NULL: return null;
115            default: return "?";
116          }
117        }
118        public String getSystem() {
119          switch (this) {
120            case SINGLE: return "http://hl7.org/fhir/action-cardinality-behavior";
121            case MULTIPLE: return "http://hl7.org/fhir/action-cardinality-behavior";
122            case NULL: return null;
123            default: return "?";
124          }
125        }
126        public String getDefinition() {
127          switch (this) {
128            case SINGLE: return "The action may only be selected one time.";
129            case MULTIPLE: return "The action may be selected multiple times.";
130            case NULL: return null;
131            default: return "?";
132          }
133        }
134        public String getDisplay() {
135          switch (this) {
136            case SINGLE: return "Single";
137            case MULTIPLE: return "Multiple";
138            case NULL: return null;
139            default: return "?";
140          }
141        }
142    }
143
144  public static class ActionCardinalityBehaviorEnumFactory implements EnumFactory<ActionCardinalityBehavior> {
145    public ActionCardinalityBehavior fromCode(String codeString) throws IllegalArgumentException {
146      if (codeString == null || "".equals(codeString))
147            if (codeString == null || "".equals(codeString))
148                return null;
149        if ("single".equals(codeString))
150          return ActionCardinalityBehavior.SINGLE;
151        if ("multiple".equals(codeString))
152          return ActionCardinalityBehavior.MULTIPLE;
153        throw new IllegalArgumentException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
154        }
155        public Enumeration<ActionCardinalityBehavior> fromType(Base code) throws FHIRException {
156          if (code == null)
157            return null;
158          if (code.isEmpty())
159            return new Enumeration<ActionCardinalityBehavior>(this);
160          String codeString = ((PrimitiveType) code).asStringValue();
161          if (codeString == null || "".equals(codeString))
162            return null;
163        if ("single".equals(codeString))
164          return new Enumeration<ActionCardinalityBehavior>(this, ActionCardinalityBehavior.SINGLE);
165        if ("multiple".equals(codeString))
166          return new Enumeration<ActionCardinalityBehavior>(this, ActionCardinalityBehavior.MULTIPLE);
167        throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
168        }
169    public String toCode(ActionCardinalityBehavior code) {
170      if (code == ActionCardinalityBehavior.SINGLE)
171        return "single";
172      if (code == ActionCardinalityBehavior.MULTIPLE)
173        return "multiple";
174      return "?";
175      }
176    public String toSystem(ActionCardinalityBehavior code) {
177      return code.getSystem();
178      }
179    }
180
181    public enum ActionConditionKind {
182        /**
183         * The condition describes whether or not a given action is applicable.
184         */
185        APPLICABILITY, 
186        /**
187         * The condition is a starting condition for the action.
188         */
189        START, 
190        /**
191         * The condition is a stop, or exit condition for the action.
192         */
193        STOP, 
194        /**
195         * added to help the parsers
196         */
197        NULL;
198        public static ActionConditionKind fromCode(String codeString) throws FHIRException {
199            if (codeString == null || "".equals(codeString))
200                return null;
201        if ("applicability".equals(codeString))
202          return APPLICABILITY;
203        if ("start".equals(codeString))
204          return START;
205        if ("stop".equals(codeString))
206          return STOP;
207        throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'");
208        }
209        public String toCode() {
210          switch (this) {
211            case APPLICABILITY: return "applicability";
212            case START: return "start";
213            case STOP: return "stop";
214            case NULL: return null;
215            default: return "?";
216          }
217        }
218        public String getSystem() {
219          switch (this) {
220            case APPLICABILITY: return "http://hl7.org/fhir/action-condition-kind";
221            case START: return "http://hl7.org/fhir/action-condition-kind";
222            case STOP: return "http://hl7.org/fhir/action-condition-kind";
223            case NULL: return null;
224            default: return "?";
225          }
226        }
227        public String getDefinition() {
228          switch (this) {
229            case APPLICABILITY: return "The condition describes whether or not a given action is applicable.";
230            case START: return "The condition is a starting condition for the action.";
231            case STOP: return "The condition is a stop, or exit condition for the action.";
232            case NULL: return null;
233            default: return "?";
234          }
235        }
236        public String getDisplay() {
237          switch (this) {
238            case APPLICABILITY: return "Applicability";
239            case START: return "Start";
240            case STOP: return "Stop";
241            case NULL: return null;
242            default: return "?";
243          }
244        }
245    }
246
247  public static class ActionConditionKindEnumFactory implements EnumFactory<ActionConditionKind> {
248    public ActionConditionKind fromCode(String codeString) throws IllegalArgumentException {
249      if (codeString == null || "".equals(codeString))
250            if (codeString == null || "".equals(codeString))
251                return null;
252        if ("applicability".equals(codeString))
253          return ActionConditionKind.APPLICABILITY;
254        if ("start".equals(codeString))
255          return ActionConditionKind.START;
256        if ("stop".equals(codeString))
257          return ActionConditionKind.STOP;
258        throw new IllegalArgumentException("Unknown ActionConditionKind code '"+codeString+"'");
259        }
260        public Enumeration<ActionConditionKind> fromType(Base code) throws FHIRException {
261          if (code == null)
262            return null;
263          if (code.isEmpty())
264            return new Enumeration<ActionConditionKind>(this);
265          String codeString = ((PrimitiveType) code).asStringValue();
266          if (codeString == null || "".equals(codeString))
267            return null;
268        if ("applicability".equals(codeString))
269          return new Enumeration<ActionConditionKind>(this, ActionConditionKind.APPLICABILITY);
270        if ("start".equals(codeString))
271          return new Enumeration<ActionConditionKind>(this, ActionConditionKind.START);
272        if ("stop".equals(codeString))
273          return new Enumeration<ActionConditionKind>(this, ActionConditionKind.STOP);
274        throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'");
275        }
276    public String toCode(ActionConditionKind code) {
277      if (code == ActionConditionKind.APPLICABILITY)
278        return "applicability";
279      if (code == ActionConditionKind.START)
280        return "start";
281      if (code == ActionConditionKind.STOP)
282        return "stop";
283      return "?";
284      }
285    public String toSystem(ActionConditionKind code) {
286      return code.getSystem();
287      }
288    }
289
290    public enum ActionGroupingBehavior {
291        /**
292         * Any group marked with this behavior should be displayed as a visual group to the end user.
293         */
294        VISUALGROUP, 
295        /**
296         * 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.
297         */
298        LOGICALGROUP, 
299        /**
300         * 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".
301         */
302        SENTENCEGROUP, 
303        /**
304         * added to help the parsers
305         */
306        NULL;
307        public static ActionGroupingBehavior fromCode(String codeString) throws FHIRException {
308            if (codeString == null || "".equals(codeString))
309                return null;
310        if ("visual-group".equals(codeString))
311          return VISUALGROUP;
312        if ("logical-group".equals(codeString))
313          return LOGICALGROUP;
314        if ("sentence-group".equals(codeString))
315          return SENTENCEGROUP;
316        throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'");
317        }
318        public String toCode() {
319          switch (this) {
320            case VISUALGROUP: return "visual-group";
321            case LOGICALGROUP: return "logical-group";
322            case SENTENCEGROUP: return "sentence-group";
323            case NULL: return null;
324            default: return "?";
325          }
326        }
327        public String getSystem() {
328          switch (this) {
329            case VISUALGROUP: return "http://hl7.org/fhir/action-grouping-behavior";
330            case LOGICALGROUP: return "http://hl7.org/fhir/action-grouping-behavior";
331            case SENTENCEGROUP: return "http://hl7.org/fhir/action-grouping-behavior";
332            case NULL: return null;
333            default: return "?";
334          }
335        }
336        public String getDefinition() {
337          switch (this) {
338            case VISUALGROUP: return "Any group marked with this behavior should be displayed as a visual group to the end user.";
339            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.";
340            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\".";
341            case NULL: return null;
342            default: return "?";
343          }
344        }
345        public String getDisplay() {
346          switch (this) {
347            case VISUALGROUP: return "Visual Group";
348            case LOGICALGROUP: return "Logical Group";
349            case SENTENCEGROUP: return "Sentence Group";
350            case NULL: return null;
351            default: return "?";
352          }
353        }
354    }
355
356  public static class ActionGroupingBehaviorEnumFactory implements EnumFactory<ActionGroupingBehavior> {
357    public ActionGroupingBehavior fromCode(String codeString) throws IllegalArgumentException {
358      if (codeString == null || "".equals(codeString))
359            if (codeString == null || "".equals(codeString))
360                return null;
361        if ("visual-group".equals(codeString))
362          return ActionGroupingBehavior.VISUALGROUP;
363        if ("logical-group".equals(codeString))
364          return ActionGroupingBehavior.LOGICALGROUP;
365        if ("sentence-group".equals(codeString))
366          return ActionGroupingBehavior.SENTENCEGROUP;
367        throw new IllegalArgumentException("Unknown ActionGroupingBehavior code '"+codeString+"'");
368        }
369        public Enumeration<ActionGroupingBehavior> fromType(Base code) throws FHIRException {
370          if (code == null)
371            return null;
372          if (code.isEmpty())
373            return new Enumeration<ActionGroupingBehavior>(this);
374          String codeString = ((PrimitiveType) code).asStringValue();
375          if (codeString == null || "".equals(codeString))
376            return null;
377        if ("visual-group".equals(codeString))
378          return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.VISUALGROUP);
379        if ("logical-group".equals(codeString))
380          return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.LOGICALGROUP);
381        if ("sentence-group".equals(codeString))
382          return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.SENTENCEGROUP);
383        throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'");
384        }
385    public String toCode(ActionGroupingBehavior code) {
386      if (code == ActionGroupingBehavior.VISUALGROUP)
387        return "visual-group";
388      if (code == ActionGroupingBehavior.LOGICALGROUP)
389        return "logical-group";
390      if (code == ActionGroupingBehavior.SENTENCEGROUP)
391        return "sentence-group";
392      return "?";
393      }
394    public String toSystem(ActionGroupingBehavior code) {
395      return code.getSystem();
396      }
397    }
398
399    public enum ActionParticipantType {
400        /**
401         * The participant is a care team caring for the patient under evaluation.
402         */
403        CARETEAM, 
404        /**
405         * The participant is a system or device used in the care of the patient.
406         */
407        DEVICE, 
408        /**
409         * The participant is a group of participants involved in the care of the patient.
410         */
411        GROUP, 
412        /**
413         * The participant is an institution that can provide the given healthcare service used in the care of the patient.
414         */
415        HEALTHCARESERVICE, 
416        /**
417         * The participant is a location involved in the care of the patient.
418         */
419        LOCATION, 
420        /**
421         * The participant is an organization involved in the care of the patient.
422         */
423        ORGANIZATION, 
424        /**
425         * The participant is the patient under evaluation.
426         */
427        PATIENT, 
428        /**
429         * The participant is a practitioner involved in the patient's care.
430         */
431        PRACTITIONER, 
432        /**
433         * The participant is a particular practitioner role involved in the patient's care.
434         */
435        PRACTITIONERROLE, 
436        /**
437         * The participant is a person related to the patient.
438         */
439        RELATEDPERSON, 
440        /**
441         * added to help the parsers
442         */
443        NULL;
444        public static ActionParticipantType fromCode(String codeString) throws FHIRException {
445            if (codeString == null || "".equals(codeString))
446                return null;
447        if ("careteam".equals(codeString))
448          return CARETEAM;
449        if ("device".equals(codeString))
450          return DEVICE;
451        if ("group".equals(codeString))
452          return GROUP;
453        if ("healthcareservice".equals(codeString))
454          return HEALTHCARESERVICE;
455        if ("location".equals(codeString))
456          return LOCATION;
457        if ("organization".equals(codeString))
458          return ORGANIZATION;
459        if ("patient".equals(codeString))
460          return PATIENT;
461        if ("practitioner".equals(codeString))
462          return PRACTITIONER;
463        if ("practitionerrole".equals(codeString))
464          return PRACTITIONERROLE;
465        if ("relatedperson".equals(codeString))
466          return RELATEDPERSON;
467        throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'");
468        }
469        public String toCode() {
470          switch (this) {
471            case CARETEAM: return "careteam";
472            case DEVICE: return "device";
473            case GROUP: return "group";
474            case HEALTHCARESERVICE: return "healthcareservice";
475            case LOCATION: return "location";
476            case ORGANIZATION: return "organization";
477            case PATIENT: return "patient";
478            case PRACTITIONER: return "practitioner";
479            case PRACTITIONERROLE: return "practitionerrole";
480            case RELATEDPERSON: return "relatedperson";
481            case NULL: return null;
482            default: return "?";
483          }
484        }
485        public String getSystem() {
486          switch (this) {
487            case CARETEAM: return "http://hl7.org/fhir/action-participant-type";
488            case DEVICE: return "http://hl7.org/fhir/action-participant-type";
489            case GROUP: return "http://hl7.org/fhir/action-participant-type";
490            case HEALTHCARESERVICE: return "http://hl7.org/fhir/action-participant-type";
491            case LOCATION: return "http://hl7.org/fhir/action-participant-type";
492            case ORGANIZATION: return "http://hl7.org/fhir/action-participant-type";
493            case PATIENT: return "http://hl7.org/fhir/action-participant-type";
494            case PRACTITIONER: return "http://hl7.org/fhir/action-participant-type";
495            case PRACTITIONERROLE: return "http://hl7.org/fhir/action-participant-type";
496            case RELATEDPERSON: return "http://hl7.org/fhir/action-participant-type";
497            case NULL: return null;
498            default: return "?";
499          }
500        }
501        public String getDefinition() {
502          switch (this) {
503            case CARETEAM: return "The participant is a care team caring for the patient under evaluation.";
504            case DEVICE: return "The participant is a system or device used in the care of the patient.";
505            case GROUP: return "The participant is a group of participants involved in the care of the patient.";
506            case HEALTHCARESERVICE: return "The participant is an institution that can provide the given healthcare service used in the care of the patient.";
507            case LOCATION: return "The participant is a location involved in the care of the patient.";
508            case ORGANIZATION: return "The participant is an organization involved in the care of the patient.";
509            case PATIENT: return "The participant is the patient under evaluation.";
510            case PRACTITIONER: return "The participant is a practitioner involved in the patient's care.";
511            case PRACTITIONERROLE: return "The participant is a particular practitioner role involved in the patient's care.";
512            case RELATEDPERSON: return "The participant is a person related to the patient.";
513            case NULL: return null;
514            default: return "?";
515          }
516        }
517        public String getDisplay() {
518          switch (this) {
519            case CARETEAM: return "CareTeam";
520            case DEVICE: return "Device";
521            case GROUP: return "Group";
522            case HEALTHCARESERVICE: return "HealthcareService";
523            case LOCATION: return "Location";
524            case ORGANIZATION: return "Organization";
525            case PATIENT: return "Patient";
526            case PRACTITIONER: return "Practitioner";
527            case PRACTITIONERROLE: return "PractitionerRole";
528            case RELATEDPERSON: return "RelatedPerson";
529            case NULL: return null;
530            default: return "?";
531          }
532        }
533    }
534
535  public static class ActionParticipantTypeEnumFactory implements EnumFactory<ActionParticipantType> {
536    public ActionParticipantType fromCode(String codeString) throws IllegalArgumentException {
537      if (codeString == null || "".equals(codeString))
538            if (codeString == null || "".equals(codeString))
539                return null;
540        if ("careteam".equals(codeString))
541          return ActionParticipantType.CARETEAM;
542        if ("device".equals(codeString))
543          return ActionParticipantType.DEVICE;
544        if ("group".equals(codeString))
545          return ActionParticipantType.GROUP;
546        if ("healthcareservice".equals(codeString))
547          return ActionParticipantType.HEALTHCARESERVICE;
548        if ("location".equals(codeString))
549          return ActionParticipantType.LOCATION;
550        if ("organization".equals(codeString))
551          return ActionParticipantType.ORGANIZATION;
552        if ("patient".equals(codeString))
553          return ActionParticipantType.PATIENT;
554        if ("practitioner".equals(codeString))
555          return ActionParticipantType.PRACTITIONER;
556        if ("practitionerrole".equals(codeString))
557          return ActionParticipantType.PRACTITIONERROLE;
558        if ("relatedperson".equals(codeString))
559          return ActionParticipantType.RELATEDPERSON;
560        throw new IllegalArgumentException("Unknown ActionParticipantType code '"+codeString+"'");
561        }
562        public Enumeration<ActionParticipantType> fromType(Base code) throws FHIRException {
563          if (code == null)
564            return null;
565          if (code.isEmpty())
566            return new Enumeration<ActionParticipantType>(this);
567          String codeString = ((PrimitiveType) code).asStringValue();
568          if (codeString == null || "".equals(codeString))
569            return null;
570        if ("careteam".equals(codeString))
571          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.CARETEAM);
572        if ("device".equals(codeString))
573          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.DEVICE);
574        if ("group".equals(codeString))
575          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.GROUP);
576        if ("healthcareservice".equals(codeString))
577          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.HEALTHCARESERVICE);
578        if ("location".equals(codeString))
579          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.LOCATION);
580        if ("organization".equals(codeString))
581          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.ORGANIZATION);
582        if ("patient".equals(codeString))
583          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.PATIENT);
584        if ("practitioner".equals(codeString))
585          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.PRACTITIONER);
586        if ("practitionerrole".equals(codeString))
587          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.PRACTITIONERROLE);
588        if ("relatedperson".equals(codeString))
589          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.RELATEDPERSON);
590        throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'");
591        }
592    public String toCode(ActionParticipantType code) {
593      if (code == ActionParticipantType.CARETEAM)
594        return "careteam";
595      if (code == ActionParticipantType.DEVICE)
596        return "device";
597      if (code == ActionParticipantType.GROUP)
598        return "group";
599      if (code == ActionParticipantType.HEALTHCARESERVICE)
600        return "healthcareservice";
601      if (code == ActionParticipantType.LOCATION)
602        return "location";
603      if (code == ActionParticipantType.ORGANIZATION)
604        return "organization";
605      if (code == ActionParticipantType.PATIENT)
606        return "patient";
607      if (code == ActionParticipantType.PRACTITIONER)
608        return "practitioner";
609      if (code == ActionParticipantType.PRACTITIONERROLE)
610        return "practitionerrole";
611      if (code == ActionParticipantType.RELATEDPERSON)
612        return "relatedperson";
613      return "?";
614      }
615    public String toSystem(ActionParticipantType code) {
616      return code.getSystem();
617      }
618    }
619
620    public enum ActionPrecheckBehavior {
621        /**
622         * 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.
623         */
624        YES, 
625        /**
626         * 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.
627         */
628        NO, 
629        /**
630         * added to help the parsers
631         */
632        NULL;
633        public static ActionPrecheckBehavior fromCode(String codeString) throws FHIRException {
634            if (codeString == null || "".equals(codeString))
635                return null;
636        if ("yes".equals(codeString))
637          return YES;
638        if ("no".equals(codeString))
639          return NO;
640        throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
641        }
642        public String toCode() {
643          switch (this) {
644            case YES: return "yes";
645            case NO: return "no";
646            case NULL: return null;
647            default: return "?";
648          }
649        }
650        public String getSystem() {
651          switch (this) {
652            case YES: return "http://hl7.org/fhir/action-precheck-behavior";
653            case NO: return "http://hl7.org/fhir/action-precheck-behavior";
654            case NULL: return null;
655            default: return "?";
656          }
657        }
658        public String getDefinition() {
659          switch (this) {
660            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.";
661            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.";
662            case NULL: return null;
663            default: return "?";
664          }
665        }
666        public String getDisplay() {
667          switch (this) {
668            case YES: return "Yes";
669            case NO: return "No";
670            case NULL: return null;
671            default: return "?";
672          }
673        }
674    }
675
676  public static class ActionPrecheckBehaviorEnumFactory implements EnumFactory<ActionPrecheckBehavior> {
677    public ActionPrecheckBehavior fromCode(String codeString) throws IllegalArgumentException {
678      if (codeString == null || "".equals(codeString))
679            if (codeString == null || "".equals(codeString))
680                return null;
681        if ("yes".equals(codeString))
682          return ActionPrecheckBehavior.YES;
683        if ("no".equals(codeString))
684          return ActionPrecheckBehavior.NO;
685        throw new IllegalArgumentException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
686        }
687        public Enumeration<ActionPrecheckBehavior> fromType(Base code) throws FHIRException {
688          if (code == null)
689            return null;
690          if (code.isEmpty())
691            return new Enumeration<ActionPrecheckBehavior>(this);
692          String codeString = ((PrimitiveType) code).asStringValue();
693          if (codeString == null || "".equals(codeString))
694            return null;
695        if ("yes".equals(codeString))
696          return new Enumeration<ActionPrecheckBehavior>(this, ActionPrecheckBehavior.YES);
697        if ("no".equals(codeString))
698          return new Enumeration<ActionPrecheckBehavior>(this, ActionPrecheckBehavior.NO);
699        throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
700        }
701    public String toCode(ActionPrecheckBehavior code) {
702      if (code == ActionPrecheckBehavior.YES)
703        return "yes";
704      if (code == ActionPrecheckBehavior.NO)
705        return "no";
706      return "?";
707      }
708    public String toSystem(ActionPrecheckBehavior code) {
709      return code.getSystem();
710      }
711    }
712
713    public enum ActionRelationshipType {
714        /**
715         * The action must be performed before the start of the related action.
716         */
717        BEFORESTART, 
718        /**
719         * The action must be performed before the related action.
720         */
721        BEFORE, 
722        /**
723         * The action must be performed before the end of the related action.
724         */
725        BEFOREEND, 
726        /**
727         * The action must be performed concurrent with the start of the related action.
728         */
729        CONCURRENTWITHSTART, 
730        /**
731         * The action must be performed concurrent with the related action.
732         */
733        CONCURRENT, 
734        /**
735         * The action must be performed concurrent with the end of the related action.
736         */
737        CONCURRENTWITHEND, 
738        /**
739         * The action must be performed after the start of the related action.
740         */
741        AFTERSTART, 
742        /**
743         * The action must be performed after the related action.
744         */
745        AFTER, 
746        /**
747         * The action must be performed after the end of the related action.
748         */
749        AFTEREND, 
750        /**
751         * added to help the parsers
752         */
753        NULL;
754        public static ActionRelationshipType fromCode(String codeString) throws FHIRException {
755            if (codeString == null || "".equals(codeString))
756                return null;
757        if ("before-start".equals(codeString))
758          return BEFORESTART;
759        if ("before".equals(codeString))
760          return BEFORE;
761        if ("before-end".equals(codeString))
762          return BEFOREEND;
763        if ("concurrent-with-start".equals(codeString))
764          return CONCURRENTWITHSTART;
765        if ("concurrent".equals(codeString))
766          return CONCURRENT;
767        if ("concurrent-with-end".equals(codeString))
768          return CONCURRENTWITHEND;
769        if ("after-start".equals(codeString))
770          return AFTERSTART;
771        if ("after".equals(codeString))
772          return AFTER;
773        if ("after-end".equals(codeString))
774          return AFTEREND;
775        throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'");
776        }
777        public String toCode() {
778          switch (this) {
779            case BEFORESTART: return "before-start";
780            case BEFORE: return "before";
781            case BEFOREEND: return "before-end";
782            case CONCURRENTWITHSTART: return "concurrent-with-start";
783            case CONCURRENT: return "concurrent";
784            case CONCURRENTWITHEND: return "concurrent-with-end";
785            case AFTERSTART: return "after-start";
786            case AFTER: return "after";
787            case AFTEREND: return "after-end";
788            case NULL: return null;
789            default: return "?";
790          }
791        }
792        public String getSystem() {
793          switch (this) {
794            case BEFORESTART: return "http://hl7.org/fhir/action-relationship-type";
795            case BEFORE: return "http://hl7.org/fhir/action-relationship-type";
796            case BEFOREEND: return "http://hl7.org/fhir/action-relationship-type";
797            case CONCURRENTWITHSTART: return "http://hl7.org/fhir/action-relationship-type";
798            case CONCURRENT: return "http://hl7.org/fhir/action-relationship-type";
799            case CONCURRENTWITHEND: return "http://hl7.org/fhir/action-relationship-type";
800            case AFTERSTART: return "http://hl7.org/fhir/action-relationship-type";
801            case AFTER: return "http://hl7.org/fhir/action-relationship-type";
802            case AFTEREND: return "http://hl7.org/fhir/action-relationship-type";
803            case NULL: return null;
804            default: return "?";
805          }
806        }
807        public String getDefinition() {
808          switch (this) {
809            case BEFORESTART: return "The action must be performed before the start of the related action.";
810            case BEFORE: return "The action must be performed before the related action.";
811            case BEFOREEND: return "The action must be performed before the end of the related action.";
812            case CONCURRENTWITHSTART: return "The action must be performed concurrent with the start of the related action.";
813            case CONCURRENT: return "The action must be performed concurrent with the related action.";
814            case CONCURRENTWITHEND: return "The action must be performed concurrent with the end of the related action.";
815            case AFTERSTART: return "The action must be performed after the start of the related action.";
816            case AFTER: return "The action must be performed after the related action.";
817            case AFTEREND: return "The action must be performed after the end of the related action.";
818            case NULL: return null;
819            default: return "?";
820          }
821        }
822        public String getDisplay() {
823          switch (this) {
824            case BEFORESTART: return "Before Start";
825            case BEFORE: return "Before";
826            case BEFOREEND: return "Before End";
827            case CONCURRENTWITHSTART: return "Concurrent With Start";
828            case CONCURRENT: return "Concurrent";
829            case CONCURRENTWITHEND: return "Concurrent With End";
830            case AFTERSTART: return "After Start";
831            case AFTER: return "After";
832            case AFTEREND: return "After End";
833            case NULL: return null;
834            default: return "?";
835          }
836        }
837    }
838
839  public static class ActionRelationshipTypeEnumFactory implements EnumFactory<ActionRelationshipType> {
840    public ActionRelationshipType fromCode(String codeString) throws IllegalArgumentException {
841      if (codeString == null || "".equals(codeString))
842            if (codeString == null || "".equals(codeString))
843                return null;
844        if ("before-start".equals(codeString))
845          return ActionRelationshipType.BEFORESTART;
846        if ("before".equals(codeString))
847          return ActionRelationshipType.BEFORE;
848        if ("before-end".equals(codeString))
849          return ActionRelationshipType.BEFOREEND;
850        if ("concurrent-with-start".equals(codeString))
851          return ActionRelationshipType.CONCURRENTWITHSTART;
852        if ("concurrent".equals(codeString))
853          return ActionRelationshipType.CONCURRENT;
854        if ("concurrent-with-end".equals(codeString))
855          return ActionRelationshipType.CONCURRENTWITHEND;
856        if ("after-start".equals(codeString))
857          return ActionRelationshipType.AFTERSTART;
858        if ("after".equals(codeString))
859          return ActionRelationshipType.AFTER;
860        if ("after-end".equals(codeString))
861          return ActionRelationshipType.AFTEREND;
862        throw new IllegalArgumentException("Unknown ActionRelationshipType code '"+codeString+"'");
863        }
864        public Enumeration<ActionRelationshipType> fromType(Base code) throws FHIRException {
865          if (code == null)
866            return null;
867          if (code.isEmpty())
868            return new Enumeration<ActionRelationshipType>(this);
869          String codeString = ((PrimitiveType) code).asStringValue();
870          if (codeString == null || "".equals(codeString))
871            return null;
872        if ("before-start".equals(codeString))
873          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFORESTART);
874        if ("before".equals(codeString))
875          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFORE);
876        if ("before-end".equals(codeString))
877          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFOREEND);
878        if ("concurrent-with-start".equals(codeString))
879          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENTWITHSTART);
880        if ("concurrent".equals(codeString))
881          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENT);
882        if ("concurrent-with-end".equals(codeString))
883          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENTWITHEND);
884        if ("after-start".equals(codeString))
885          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTERSTART);
886        if ("after".equals(codeString))
887          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTER);
888        if ("after-end".equals(codeString))
889          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTEREND);
890        throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'");
891        }
892    public String toCode(ActionRelationshipType code) {
893      if (code == ActionRelationshipType.BEFORESTART)
894        return "before-start";
895      if (code == ActionRelationshipType.BEFORE)
896        return "before";
897      if (code == ActionRelationshipType.BEFOREEND)
898        return "before-end";
899      if (code == ActionRelationshipType.CONCURRENTWITHSTART)
900        return "concurrent-with-start";
901      if (code == ActionRelationshipType.CONCURRENT)
902        return "concurrent";
903      if (code == ActionRelationshipType.CONCURRENTWITHEND)
904        return "concurrent-with-end";
905      if (code == ActionRelationshipType.AFTERSTART)
906        return "after-start";
907      if (code == ActionRelationshipType.AFTER)
908        return "after";
909      if (code == ActionRelationshipType.AFTEREND)
910        return "after-end";
911      return "?";
912      }
913    public String toSystem(ActionRelationshipType code) {
914      return code.getSystem();
915      }
916    }
917
918    public enum ActionRequiredBehavior {
919        /**
920         * 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.
921         */
922        MUST, 
923        /**
924         * An action with this behavior may be included in the set of actions processed by the end user.
925         */
926        COULD, 
927        /**
928         * 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.
929         */
930        MUSTUNLESSDOCUMENTED, 
931        /**
932         * added to help the parsers
933         */
934        NULL;
935        public static ActionRequiredBehavior fromCode(String codeString) throws FHIRException {
936            if (codeString == null || "".equals(codeString))
937                return null;
938        if ("must".equals(codeString))
939          return MUST;
940        if ("could".equals(codeString))
941          return COULD;
942        if ("must-unless-documented".equals(codeString))
943          return MUSTUNLESSDOCUMENTED;
944        throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'");
945        }
946        public String toCode() {
947          switch (this) {
948            case MUST: return "must";
949            case COULD: return "could";
950            case MUSTUNLESSDOCUMENTED: return "must-unless-documented";
951            case NULL: return null;
952            default: return "?";
953          }
954        }
955        public String getSystem() {
956          switch (this) {
957            case MUST: return "http://hl7.org/fhir/action-required-behavior";
958            case COULD: return "http://hl7.org/fhir/action-required-behavior";
959            case MUSTUNLESSDOCUMENTED: return "http://hl7.org/fhir/action-required-behavior";
960            case NULL: return null;
961            default: return "?";
962          }
963        }
964        public String getDefinition() {
965          switch (this) {
966            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.";
967            case COULD: return "An action with this behavior may be included in the set of actions processed by the end user.";
968            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.";
969            case NULL: return null;
970            default: return "?";
971          }
972        }
973        public String getDisplay() {
974          switch (this) {
975            case MUST: return "Must";
976            case COULD: return "Could";
977            case MUSTUNLESSDOCUMENTED: return "Must Unless Documented";
978            case NULL: return null;
979            default: return "?";
980          }
981        }
982    }
983
984  public static class ActionRequiredBehaviorEnumFactory implements EnumFactory<ActionRequiredBehavior> {
985    public ActionRequiredBehavior fromCode(String codeString) throws IllegalArgumentException {
986      if (codeString == null || "".equals(codeString))
987            if (codeString == null || "".equals(codeString))
988                return null;
989        if ("must".equals(codeString))
990          return ActionRequiredBehavior.MUST;
991        if ("could".equals(codeString))
992          return ActionRequiredBehavior.COULD;
993        if ("must-unless-documented".equals(codeString))
994          return ActionRequiredBehavior.MUSTUNLESSDOCUMENTED;
995        throw new IllegalArgumentException("Unknown ActionRequiredBehavior code '"+codeString+"'");
996        }
997        public Enumeration<ActionRequiredBehavior> fromType(Base code) throws FHIRException {
998          if (code == null)
999            return null;
1000          if (code.isEmpty())
1001            return new Enumeration<ActionRequiredBehavior>(this);
1002          String codeString = ((PrimitiveType) code).asStringValue();
1003          if (codeString == null || "".equals(codeString))
1004            return null;
1005        if ("must".equals(codeString))
1006          return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.MUST);
1007        if ("could".equals(codeString))
1008          return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.COULD);
1009        if ("must-unless-documented".equals(codeString))
1010          return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.MUSTUNLESSDOCUMENTED);
1011        throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'");
1012        }
1013    public String toCode(ActionRequiredBehavior code) {
1014      if (code == ActionRequiredBehavior.MUST)
1015        return "must";
1016      if (code == ActionRequiredBehavior.COULD)
1017        return "could";
1018      if (code == ActionRequiredBehavior.MUSTUNLESSDOCUMENTED)
1019        return "must-unless-documented";
1020      return "?";
1021      }
1022    public String toSystem(ActionRequiredBehavior code) {
1023      return code.getSystem();
1024      }
1025    }
1026
1027    public enum ActionSelectionBehavior {
1028        /**
1029         * Any number of the actions in the group may be chosen, from zero to all.
1030         */
1031        ANY, 
1032        /**
1033         * All the actions in the group must be selected as a single unit.
1034         */
1035        ALL, 
1036        /**
1037         * 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.
1038         */
1039        ALLORNONE, 
1040        /**
1041         * 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.
1042         */
1043        EXACTLYONE, 
1044        /**
1045         * The end user may choose zero or at most one of the actions in the group.
1046         */
1047        ATMOSTONE, 
1048        /**
1049         * The end user must choose a minimum of one, and as many additional as desired.
1050         */
1051        ONEORMORE, 
1052        /**
1053         * added to help the parsers
1054         */
1055        NULL;
1056        public static ActionSelectionBehavior fromCode(String codeString) throws FHIRException {
1057            if (codeString == null || "".equals(codeString))
1058                return null;
1059        if ("any".equals(codeString))
1060          return ANY;
1061        if ("all".equals(codeString))
1062          return ALL;
1063        if ("all-or-none".equals(codeString))
1064          return ALLORNONE;
1065        if ("exactly-one".equals(codeString))
1066          return EXACTLYONE;
1067        if ("at-most-one".equals(codeString))
1068          return ATMOSTONE;
1069        if ("one-or-more".equals(codeString))
1070          return ONEORMORE;
1071        throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'");
1072        }
1073        public String toCode() {
1074          switch (this) {
1075            case ANY: return "any";
1076            case ALL: return "all";
1077            case ALLORNONE: return "all-or-none";
1078            case EXACTLYONE: return "exactly-one";
1079            case ATMOSTONE: return "at-most-one";
1080            case ONEORMORE: return "one-or-more";
1081            case NULL: return null;
1082            default: return "?";
1083          }
1084        }
1085        public String getSystem() {
1086          switch (this) {
1087            case ANY: return "http://hl7.org/fhir/action-selection-behavior";
1088            case ALL: return "http://hl7.org/fhir/action-selection-behavior";
1089            case ALLORNONE: return "http://hl7.org/fhir/action-selection-behavior";
1090            case EXACTLYONE: return "http://hl7.org/fhir/action-selection-behavior";
1091            case ATMOSTONE: return "http://hl7.org/fhir/action-selection-behavior";
1092            case ONEORMORE: return "http://hl7.org/fhir/action-selection-behavior";
1093            case NULL: return null;
1094            default: return "?";
1095          }
1096        }
1097        public String getDefinition() {
1098          switch (this) {
1099            case ANY: return "Any number of the actions in the group may be chosen, from zero to all.";
1100            case ALL: return "All the actions in the group must be selected as a single unit.";
1101            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.";
1102            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.";
1103            case ATMOSTONE: return "The end user may choose zero or at most one of the actions in the group.";
1104            case ONEORMORE: return "The end user must choose a minimum of one, and as many additional as desired.";
1105            case NULL: return null;
1106            default: return "?";
1107          }
1108        }
1109        public String getDisplay() {
1110          switch (this) {
1111            case ANY: return "Any";
1112            case ALL: return "All";
1113            case ALLORNONE: return "All Or None";
1114            case EXACTLYONE: return "Exactly One";
1115            case ATMOSTONE: return "At Most One";
1116            case ONEORMORE: return "One Or More";
1117            case NULL: return null;
1118            default: return "?";
1119          }
1120        }
1121    }
1122
1123  public static class ActionSelectionBehaviorEnumFactory implements EnumFactory<ActionSelectionBehavior> {
1124    public ActionSelectionBehavior fromCode(String codeString) throws IllegalArgumentException {
1125      if (codeString == null || "".equals(codeString))
1126            if (codeString == null || "".equals(codeString))
1127                return null;
1128        if ("any".equals(codeString))
1129          return ActionSelectionBehavior.ANY;
1130        if ("all".equals(codeString))
1131          return ActionSelectionBehavior.ALL;
1132        if ("all-or-none".equals(codeString))
1133          return ActionSelectionBehavior.ALLORNONE;
1134        if ("exactly-one".equals(codeString))
1135          return ActionSelectionBehavior.EXACTLYONE;
1136        if ("at-most-one".equals(codeString))
1137          return ActionSelectionBehavior.ATMOSTONE;
1138        if ("one-or-more".equals(codeString))
1139          return ActionSelectionBehavior.ONEORMORE;
1140        throw new IllegalArgumentException("Unknown ActionSelectionBehavior code '"+codeString+"'");
1141        }
1142        public Enumeration<ActionSelectionBehavior> fromType(Base code) throws FHIRException {
1143          if (code == null)
1144            return null;
1145          if (code.isEmpty())
1146            return new Enumeration<ActionSelectionBehavior>(this);
1147          String codeString = ((PrimitiveType) code).asStringValue();
1148          if (codeString == null || "".equals(codeString))
1149            return null;
1150        if ("any".equals(codeString))
1151          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ANY);
1152        if ("all".equals(codeString))
1153          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ALL);
1154        if ("all-or-none".equals(codeString))
1155          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ALLORNONE);
1156        if ("exactly-one".equals(codeString))
1157          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.EXACTLYONE);
1158        if ("at-most-one".equals(codeString))
1159          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ATMOSTONE);
1160        if ("one-or-more".equals(codeString))
1161          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ONEORMORE);
1162        throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'");
1163        }
1164    public String toCode(ActionSelectionBehavior code) {
1165      if (code == ActionSelectionBehavior.ANY)
1166        return "any";
1167      if (code == ActionSelectionBehavior.ALL)
1168        return "all";
1169      if (code == ActionSelectionBehavior.ALLORNONE)
1170        return "all-or-none";
1171      if (code == ActionSelectionBehavior.EXACTLYONE)
1172        return "exactly-one";
1173      if (code == ActionSelectionBehavior.ATMOSTONE)
1174        return "at-most-one";
1175      if (code == ActionSelectionBehavior.ONEORMORE)
1176        return "one-or-more";
1177      return "?";
1178      }
1179    public String toSystem(ActionSelectionBehavior code) {
1180      return code.getSystem();
1181      }
1182    }
1183
1184    public enum AdministrativeGender {
1185        /**
1186         * Male.
1187         */
1188        MALE, 
1189        /**
1190         * Female.
1191         */
1192        FEMALE, 
1193        /**
1194         * Other.
1195         */
1196        OTHER, 
1197        /**
1198         * Unknown.
1199         */
1200        UNKNOWN, 
1201        /**
1202         * added to help the parsers
1203         */
1204        NULL;
1205        public static AdministrativeGender fromCode(String codeString) throws FHIRException {
1206            if (codeString == null || "".equals(codeString))
1207                return null;
1208        if ("male".equals(codeString))
1209          return MALE;
1210        if ("female".equals(codeString))
1211          return FEMALE;
1212        if ("other".equals(codeString))
1213          return OTHER;
1214        if ("unknown".equals(codeString))
1215          return UNKNOWN;
1216        throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'");
1217        }
1218        public String toCode() {
1219          switch (this) {
1220            case MALE: return "male";
1221            case FEMALE: return "female";
1222            case OTHER: return "other";
1223            case UNKNOWN: return "unknown";
1224            case NULL: return null;
1225            default: return "?";
1226          }
1227        }
1228        public String getSystem() {
1229          switch (this) {
1230            case MALE: return "http://hl7.org/fhir/administrative-gender";
1231            case FEMALE: return "http://hl7.org/fhir/administrative-gender";
1232            case OTHER: return "http://hl7.org/fhir/administrative-gender";
1233            case UNKNOWN: return "http://hl7.org/fhir/administrative-gender";
1234            case NULL: return null;
1235            default: return "?";
1236          }
1237        }
1238        public String getDefinition() {
1239          switch (this) {
1240            case MALE: return "Male.";
1241            case FEMALE: return "Female.";
1242            case OTHER: return "Other.";
1243            case UNKNOWN: return "Unknown.";
1244            case NULL: return null;
1245            default: return "?";
1246          }
1247        }
1248        public String getDisplay() {
1249          switch (this) {
1250            case MALE: return "Male";
1251            case FEMALE: return "Female";
1252            case OTHER: return "Other";
1253            case UNKNOWN: return "Unknown";
1254            case NULL: return null;
1255            default: return "?";
1256          }
1257        }
1258    }
1259
1260  public static class AdministrativeGenderEnumFactory implements EnumFactory<AdministrativeGender> {
1261    public AdministrativeGender fromCode(String codeString) throws IllegalArgumentException {
1262      if (codeString == null || "".equals(codeString))
1263            if (codeString == null || "".equals(codeString))
1264                return null;
1265        if ("male".equals(codeString))
1266          return AdministrativeGender.MALE;
1267        if ("female".equals(codeString))
1268          return AdministrativeGender.FEMALE;
1269        if ("other".equals(codeString))
1270          return AdministrativeGender.OTHER;
1271        if ("unknown".equals(codeString))
1272          return AdministrativeGender.UNKNOWN;
1273        throw new IllegalArgumentException("Unknown AdministrativeGender code '"+codeString+"'");
1274        }
1275        public Enumeration<AdministrativeGender> fromType(Base code) throws FHIRException {
1276          if (code == null)
1277            return null;
1278          if (code.isEmpty())
1279            return new Enumeration<AdministrativeGender>(this);
1280          String codeString = ((PrimitiveType) code).asStringValue();
1281          if (codeString == null || "".equals(codeString))
1282            return null;
1283        if ("male".equals(codeString))
1284          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.MALE);
1285        if ("female".equals(codeString))
1286          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.FEMALE);
1287        if ("other".equals(codeString))
1288          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.OTHER);
1289        if ("unknown".equals(codeString))
1290          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.UNKNOWN);
1291        throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'");
1292        }
1293    public String toCode(AdministrativeGender code) {
1294      if (code == AdministrativeGender.MALE)
1295        return "male";
1296      if (code == AdministrativeGender.FEMALE)
1297        return "female";
1298      if (code == AdministrativeGender.OTHER)
1299        return "other";
1300      if (code == AdministrativeGender.UNKNOWN)
1301        return "unknown";
1302      return "?";
1303      }
1304    public String toSystem(AdministrativeGender code) {
1305      return code.getSystem();
1306      }
1307    }
1308
1309    public enum BindingStrength {
1310        /**
1311         * To be conformant, the concept in this element SHALL be from the specified value set.
1312         */
1313        REQUIRED, 
1314        /**
1315         * 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.
1316         */
1317        EXTENSIBLE, 
1318        /**
1319         * Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant.
1320         */
1321        PREFERRED, 
1322        /**
1323         * 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.
1324         */
1325        EXAMPLE, 
1326        /**
1327         * added to help the parsers
1328         */
1329        NULL;
1330        public static BindingStrength fromCode(String codeString) throws FHIRException {
1331            if (codeString == null || "".equals(codeString))
1332                return null;
1333        if ("required".equals(codeString))
1334          return REQUIRED;
1335        if ("extensible".equals(codeString))
1336          return EXTENSIBLE;
1337        if ("preferred".equals(codeString))
1338          return PREFERRED;
1339        if ("example".equals(codeString))
1340          return EXAMPLE;
1341        throw new FHIRException("Unknown BindingStrength code '"+codeString+"'");
1342        }
1343        public String toCode() {
1344          switch (this) {
1345            case REQUIRED: return "required";
1346            case EXTENSIBLE: return "extensible";
1347            case PREFERRED: return "preferred";
1348            case EXAMPLE: return "example";
1349            case NULL: return null;
1350            default: return "?";
1351          }
1352        }
1353        public String getSystem() {
1354          switch (this) {
1355            case REQUIRED: return "http://hl7.org/fhir/binding-strength";
1356            case EXTENSIBLE: return "http://hl7.org/fhir/binding-strength";
1357            case PREFERRED: return "http://hl7.org/fhir/binding-strength";
1358            case EXAMPLE: return "http://hl7.org/fhir/binding-strength";
1359            case NULL: return null;
1360            default: return "?";
1361          }
1362        }
1363        public String getDefinition() {
1364          switch (this) {
1365            case REQUIRED: return "To be conformant, the concept in this element SHALL be from the specified value set.";
1366            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.";
1367            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.";
1368            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.";
1369            case NULL: return null;
1370            default: return "?";
1371          }
1372        }
1373        public String getDisplay() {
1374          switch (this) {
1375            case REQUIRED: return "Required";
1376            case EXTENSIBLE: return "Extensible";
1377            case PREFERRED: return "Preferred";
1378            case EXAMPLE: return "Example";
1379            case NULL: return null;
1380            default: return "?";
1381          }
1382        }
1383    }
1384
1385  public static class BindingStrengthEnumFactory implements EnumFactory<BindingStrength> {
1386    public BindingStrength fromCode(String codeString) throws IllegalArgumentException {
1387      if (codeString == null || "".equals(codeString))
1388            if (codeString == null || "".equals(codeString))
1389                return null;
1390        if ("required".equals(codeString))
1391          return BindingStrength.REQUIRED;
1392        if ("extensible".equals(codeString))
1393          return BindingStrength.EXTENSIBLE;
1394        if ("preferred".equals(codeString))
1395          return BindingStrength.PREFERRED;
1396        if ("example".equals(codeString))
1397          return BindingStrength.EXAMPLE;
1398        throw new IllegalArgumentException("Unknown BindingStrength code '"+codeString+"'");
1399        }
1400        public Enumeration<BindingStrength> fromType(Base code) throws FHIRException {
1401          if (code == null)
1402            return null;
1403          if (code.isEmpty())
1404            return new Enumeration<BindingStrength>(this);
1405          String codeString = ((PrimitiveType) code).asStringValue();
1406          if (codeString == null || "".equals(codeString))
1407            return null;
1408        if ("required".equals(codeString))
1409          return new Enumeration<BindingStrength>(this, BindingStrength.REQUIRED);
1410        if ("extensible".equals(codeString))
1411          return new Enumeration<BindingStrength>(this, BindingStrength.EXTENSIBLE);
1412        if ("preferred".equals(codeString))
1413          return new Enumeration<BindingStrength>(this, BindingStrength.PREFERRED);
1414        if ("example".equals(codeString))
1415          return new Enumeration<BindingStrength>(this, BindingStrength.EXAMPLE);
1416        throw new FHIRException("Unknown BindingStrength code '"+codeString+"'");
1417        }
1418    public String toCode(BindingStrength code) {
1419      if (code == BindingStrength.REQUIRED)
1420        return "required";
1421      if (code == BindingStrength.EXTENSIBLE)
1422        return "extensible";
1423      if (code == BindingStrength.PREFERRED)
1424        return "preferred";
1425      if (code == BindingStrength.EXAMPLE)
1426        return "example";
1427      return "?";
1428      }
1429    public String toSystem(BindingStrength code) {
1430      return code.getSystem();
1431      }
1432    }
1433
1434    public enum CapabilityStatementKind {
1435        /**
1436         * 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.
1437         */
1438        INSTANCE, 
1439        /**
1440         * The CapabilityStatement instance represents the capabilities of a system or piece of software, independent of a particular installation.
1441         */
1442        CAPABILITY, 
1443        /**
1444         * 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'.
1445         */
1446        REQUIREMENTS, 
1447        /**
1448         * added to help the parsers
1449         */
1450        NULL;
1451        public static CapabilityStatementKind fromCode(String codeString) throws FHIRException {
1452            if (codeString == null || "".equals(codeString))
1453                return null;
1454        if ("instance".equals(codeString))
1455          return INSTANCE;
1456        if ("capability".equals(codeString))
1457          return CAPABILITY;
1458        if ("requirements".equals(codeString))
1459          return REQUIREMENTS;
1460        throw new FHIRException("Unknown CapabilityStatementKind code '"+codeString+"'");
1461        }
1462        public String toCode() {
1463          switch (this) {
1464            case INSTANCE: return "instance";
1465            case CAPABILITY: return "capability";
1466            case REQUIREMENTS: return "requirements";
1467            case NULL: return null;
1468            default: return "?";
1469          }
1470        }
1471        public String getSystem() {
1472          switch (this) {
1473            case INSTANCE: return "http://hl7.org/fhir/capability-statement-kind";
1474            case CAPABILITY: return "http://hl7.org/fhir/capability-statement-kind";
1475            case REQUIREMENTS: return "http://hl7.org/fhir/capability-statement-kind";
1476            case NULL: return null;
1477            default: return "?";
1478          }
1479        }
1480        public String getDefinition() {
1481          switch (this) {
1482            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.";
1483            case CAPABILITY: return "The CapabilityStatement instance represents the capabilities of a system or piece of software, independent of a particular installation.";
1484            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'.";
1485            case NULL: return null;
1486            default: return "?";
1487          }
1488        }
1489        public String getDisplay() {
1490          switch (this) {
1491            case INSTANCE: return "Instance";
1492            case CAPABILITY: return "Capability";
1493            case REQUIREMENTS: return "Requirements";
1494            case NULL: return null;
1495            default: return "?";
1496          }
1497        }
1498    }
1499
1500  public static class CapabilityStatementKindEnumFactory implements EnumFactory<CapabilityStatementKind> {
1501    public CapabilityStatementKind fromCode(String codeString) throws IllegalArgumentException {
1502      if (codeString == null || "".equals(codeString))
1503            if (codeString == null || "".equals(codeString))
1504                return null;
1505        if ("instance".equals(codeString))
1506          return CapabilityStatementKind.INSTANCE;
1507        if ("capability".equals(codeString))
1508          return CapabilityStatementKind.CAPABILITY;
1509        if ("requirements".equals(codeString))
1510          return CapabilityStatementKind.REQUIREMENTS;
1511        throw new IllegalArgumentException("Unknown CapabilityStatementKind code '"+codeString+"'");
1512        }
1513        public Enumeration<CapabilityStatementKind> fromType(Base code) throws FHIRException {
1514          if (code == null)
1515            return null;
1516          if (code.isEmpty())
1517            return new Enumeration<CapabilityStatementKind>(this);
1518          String codeString = ((PrimitiveType) code).asStringValue();
1519          if (codeString == null || "".equals(codeString))
1520            return null;
1521        if ("instance".equals(codeString))
1522          return new Enumeration<CapabilityStatementKind>(this, CapabilityStatementKind.INSTANCE);
1523        if ("capability".equals(codeString))
1524          return new Enumeration<CapabilityStatementKind>(this, CapabilityStatementKind.CAPABILITY);
1525        if ("requirements".equals(codeString))
1526          return new Enumeration<CapabilityStatementKind>(this, CapabilityStatementKind.REQUIREMENTS);
1527        throw new FHIRException("Unknown CapabilityStatementKind code '"+codeString+"'");
1528        }
1529    public String toCode(CapabilityStatementKind code) {
1530      if (code == CapabilityStatementKind.INSTANCE)
1531        return "instance";
1532      if (code == CapabilityStatementKind.CAPABILITY)
1533        return "capability";
1534      if (code == CapabilityStatementKind.REQUIREMENTS)
1535        return "requirements";
1536      return "?";
1537      }
1538    public String toSystem(CapabilityStatementKind code) {
1539      return code.getSystem();
1540      }
1541    }
1542
1543    public enum ClaimProcessingCodes {
1544        /**
1545         * The Claim/Pre-authorization/Pre-determination has been received but processing has not begun.
1546         */
1547        QUEUED, 
1548        /**
1549         * The processing has completed without errors
1550         */
1551        COMPLETE, 
1552        /**
1553         * One or more errors have been detected in the Claim
1554         */
1555        ERROR, 
1556        /**
1557         * No errors have been detected in the Claim and some of the adjudication has been performed.
1558         */
1559        PARTIAL, 
1560        /**
1561         * added to help the parsers
1562         */
1563        NULL;
1564        public static ClaimProcessingCodes fromCode(String codeString) throws FHIRException {
1565            if (codeString == null || "".equals(codeString))
1566                return null;
1567        if ("queued".equals(codeString))
1568          return QUEUED;
1569        if ("complete".equals(codeString))
1570          return COMPLETE;
1571        if ("error".equals(codeString))
1572          return ERROR;
1573        if ("partial".equals(codeString))
1574          return PARTIAL;
1575        throw new FHIRException("Unknown ClaimProcessingCodes code '"+codeString+"'");
1576        }
1577        public String toCode() {
1578          switch (this) {
1579            case QUEUED: return "queued";
1580            case COMPLETE: return "complete";
1581            case ERROR: return "error";
1582            case PARTIAL: return "partial";
1583            case NULL: return null;
1584            default: return "?";
1585          }
1586        }
1587        public String getSystem() {
1588          switch (this) {
1589            case QUEUED: return "http://hl7.org/fhir/claim-outcome";
1590            case COMPLETE: return "http://hl7.org/fhir/claim-outcome";
1591            case ERROR: return "http://hl7.org/fhir/claim-outcome";
1592            case PARTIAL: return "http://hl7.org/fhir/claim-outcome";
1593            case NULL: return null;
1594            default: return "?";
1595          }
1596        }
1597        public String getDefinition() {
1598          switch (this) {
1599            case QUEUED: return "The Claim/Pre-authorization/Pre-determination has been received but processing has not begun.";
1600            case COMPLETE: return "The processing has completed without errors";
1601            case ERROR: return "One or more errors have been detected in the Claim";
1602            case PARTIAL: return "No errors have been detected in the Claim and some of the adjudication has been performed.";
1603            case NULL: return null;
1604            default: return "?";
1605          }
1606        }
1607        public String getDisplay() {
1608          switch (this) {
1609            case QUEUED: return "Queued";
1610            case COMPLETE: return "Processing Complete";
1611            case ERROR: return "Error";
1612            case PARTIAL: return "Partial Processing";
1613            case NULL: return null;
1614            default: return "?";
1615          }
1616        }
1617    }
1618
1619  public static class ClaimProcessingCodesEnumFactory implements EnumFactory<ClaimProcessingCodes> {
1620    public ClaimProcessingCodes fromCode(String codeString) throws IllegalArgumentException {
1621      if (codeString == null || "".equals(codeString))
1622            if (codeString == null || "".equals(codeString))
1623                return null;
1624        if ("queued".equals(codeString))
1625          return ClaimProcessingCodes.QUEUED;
1626        if ("complete".equals(codeString))
1627          return ClaimProcessingCodes.COMPLETE;
1628        if ("error".equals(codeString))
1629          return ClaimProcessingCodes.ERROR;
1630        if ("partial".equals(codeString))
1631          return ClaimProcessingCodes.PARTIAL;
1632        throw new IllegalArgumentException("Unknown ClaimProcessingCodes code '"+codeString+"'");
1633        }
1634        public Enumeration<ClaimProcessingCodes> fromType(Base code) throws FHIRException {
1635          if (code == null)
1636            return null;
1637          if (code.isEmpty())
1638            return new Enumeration<ClaimProcessingCodes>(this);
1639          String codeString = ((PrimitiveType) code).asStringValue();
1640          if (codeString == null || "".equals(codeString))
1641            return null;
1642        if ("queued".equals(codeString))
1643          return new Enumeration<ClaimProcessingCodes>(this, ClaimProcessingCodes.QUEUED);
1644        if ("complete".equals(codeString))
1645          return new Enumeration<ClaimProcessingCodes>(this, ClaimProcessingCodes.COMPLETE);
1646        if ("error".equals(codeString))
1647          return new Enumeration<ClaimProcessingCodes>(this, ClaimProcessingCodes.ERROR);
1648        if ("partial".equals(codeString))
1649          return new Enumeration<ClaimProcessingCodes>(this, ClaimProcessingCodes.PARTIAL);
1650        throw new FHIRException("Unknown ClaimProcessingCodes code '"+codeString+"'");
1651        }
1652    public String toCode(ClaimProcessingCodes code) {
1653      if (code == ClaimProcessingCodes.QUEUED)
1654        return "queued";
1655      if (code == ClaimProcessingCodes.COMPLETE)
1656        return "complete";
1657      if (code == ClaimProcessingCodes.ERROR)
1658        return "error";
1659      if (code == ClaimProcessingCodes.PARTIAL)
1660        return "partial";
1661      return "?";
1662      }
1663    public String toSystem(ClaimProcessingCodes code) {
1664      return code.getSystem();
1665      }
1666    }
1667
1668    public enum ClinicalUseIssueType {
1669        /**
1670         * A reason for giving the medicaton.
1671         */
1672        INDICATION, 
1673        /**
1674         * A reason for not giving the medicaition.
1675         */
1676        CONTRAINDICATION, 
1677        /**
1678         * Interactions between the medication and other substances.
1679         */
1680        INTERACTION, 
1681        /**
1682         * Side effects or adverse effects associated with the medication.
1683         */
1684        UNDESIRABLEEFFECT, 
1685        /**
1686         * A general warning or issue that is not specifically one of the other types.
1687         */
1688        WARNING, 
1689        /**
1690         * added to help the parsers
1691         */
1692        NULL;
1693        public static ClinicalUseIssueType fromCode(String codeString) throws FHIRException {
1694            if (codeString == null || "".equals(codeString))
1695                return null;
1696        if ("indication".equals(codeString))
1697          return INDICATION;
1698        if ("contraindication".equals(codeString))
1699          return CONTRAINDICATION;
1700        if ("interaction".equals(codeString))
1701          return INTERACTION;
1702        if ("undesirable-effect".equals(codeString))
1703          return UNDESIRABLEEFFECT;
1704        if ("warning".equals(codeString))
1705          return WARNING;
1706        throw new FHIRException("Unknown ClinicalUseIssueType code '"+codeString+"'");
1707        }
1708        public String toCode() {
1709          switch (this) {
1710            case INDICATION: return "indication";
1711            case CONTRAINDICATION: return "contraindication";
1712            case INTERACTION: return "interaction";
1713            case UNDESIRABLEEFFECT: return "undesirable-effect";
1714            case WARNING: return "warning";
1715            case NULL: return null;
1716            default: return "?";
1717          }
1718        }
1719        public String getSystem() {
1720          switch (this) {
1721            case INDICATION: return "http://hl7.org/fhir/clinical-use-issue-type";
1722            case CONTRAINDICATION: return "http://hl7.org/fhir/clinical-use-issue-type";
1723            case INTERACTION: return "http://hl7.org/fhir/clinical-use-issue-type";
1724            case UNDESIRABLEEFFECT: return "http://hl7.org/fhir/clinical-use-issue-type";
1725            case WARNING: return "http://hl7.org/fhir/clinical-use-issue-type";
1726            case NULL: return null;
1727            default: return "?";
1728          }
1729        }
1730        public String getDefinition() {
1731          switch (this) {
1732            case INDICATION: return "A reason for giving the medicaton.";
1733            case CONTRAINDICATION: return "A reason for not giving the medicaition.";
1734            case INTERACTION: return "Interactions between the medication and other substances.";
1735            case UNDESIRABLEEFFECT: return "Side effects or adverse effects associated with the medication.";
1736            case WARNING: return "A general warning or issue that is not specifically one of the other types.";
1737            case NULL: return null;
1738            default: return "?";
1739          }
1740        }
1741        public String getDisplay() {
1742          switch (this) {
1743            case INDICATION: return "Indication";
1744            case CONTRAINDICATION: return "Contraindication";
1745            case INTERACTION: return "Interaction";
1746            case UNDESIRABLEEFFECT: return "Undesirable Effect";
1747            case WARNING: return "Warning";
1748            case NULL: return null;
1749            default: return "?";
1750          }
1751        }
1752    }
1753
1754  public static class ClinicalUseIssueTypeEnumFactory implements EnumFactory<ClinicalUseIssueType> {
1755    public ClinicalUseIssueType fromCode(String codeString) throws IllegalArgumentException {
1756      if (codeString == null || "".equals(codeString))
1757            if (codeString == null || "".equals(codeString))
1758                return null;
1759        if ("indication".equals(codeString))
1760          return ClinicalUseIssueType.INDICATION;
1761        if ("contraindication".equals(codeString))
1762          return ClinicalUseIssueType.CONTRAINDICATION;
1763        if ("interaction".equals(codeString))
1764          return ClinicalUseIssueType.INTERACTION;
1765        if ("undesirable-effect".equals(codeString))
1766          return ClinicalUseIssueType.UNDESIRABLEEFFECT;
1767        if ("warning".equals(codeString))
1768          return ClinicalUseIssueType.WARNING;
1769        throw new IllegalArgumentException("Unknown ClinicalUseIssueType code '"+codeString+"'");
1770        }
1771        public Enumeration<ClinicalUseIssueType> fromType(Base code) throws FHIRException {
1772          if (code == null)
1773            return null;
1774          if (code.isEmpty())
1775            return new Enumeration<ClinicalUseIssueType>(this);
1776          String codeString = ((PrimitiveType) code).asStringValue();
1777          if (codeString == null || "".equals(codeString))
1778            return null;
1779        if ("indication".equals(codeString))
1780          return new Enumeration<ClinicalUseIssueType>(this, ClinicalUseIssueType.INDICATION);
1781        if ("contraindication".equals(codeString))
1782          return new Enumeration<ClinicalUseIssueType>(this, ClinicalUseIssueType.CONTRAINDICATION);
1783        if ("interaction".equals(codeString))
1784          return new Enumeration<ClinicalUseIssueType>(this, ClinicalUseIssueType.INTERACTION);
1785        if ("undesirable-effect".equals(codeString))
1786          return new Enumeration<ClinicalUseIssueType>(this, ClinicalUseIssueType.UNDESIRABLEEFFECT);
1787        if ("warning".equals(codeString))
1788          return new Enumeration<ClinicalUseIssueType>(this, ClinicalUseIssueType.WARNING);
1789        throw new FHIRException("Unknown ClinicalUseIssueType code '"+codeString+"'");
1790        }
1791    public String toCode(ClinicalUseIssueType code) {
1792      if (code == ClinicalUseIssueType.INDICATION)
1793        return "indication";
1794      if (code == ClinicalUseIssueType.CONTRAINDICATION)
1795        return "contraindication";
1796      if (code == ClinicalUseIssueType.INTERACTION)
1797        return "interaction";
1798      if (code == ClinicalUseIssueType.UNDESIRABLEEFFECT)
1799        return "undesirable-effect";
1800      if (code == ClinicalUseIssueType.WARNING)
1801        return "warning";
1802      return "?";
1803      }
1804    public String toSystem(ClinicalUseIssueType code) {
1805      return code.getSystem();
1806      }
1807    }
1808
1809    public enum CompartmentType {
1810        /**
1811         * The compartment definition is for the patient compartment.
1812         */
1813        PATIENT, 
1814        /**
1815         * The compartment definition is for the encounter compartment.
1816         */
1817        ENCOUNTER, 
1818        /**
1819         * The compartment definition is for the related-person compartment.
1820         */
1821        RELATEDPERSON, 
1822        /**
1823         * The compartment definition is for the practitioner compartment.
1824         */
1825        PRACTITIONER, 
1826        /**
1827         * The compartment definition is for the device compartment.
1828         */
1829        DEVICE, 
1830        /**
1831         * added to help the parsers
1832         */
1833        NULL;
1834        public static CompartmentType fromCode(String codeString) throws FHIRException {
1835            if (codeString == null || "".equals(codeString))
1836                return null;
1837        if ("Patient".equals(codeString))
1838          return PATIENT;
1839        if ("Encounter".equals(codeString))
1840          return ENCOUNTER;
1841        if ("RelatedPerson".equals(codeString))
1842          return RELATEDPERSON;
1843        if ("Practitioner".equals(codeString))
1844          return PRACTITIONER;
1845        if ("Device".equals(codeString))
1846          return DEVICE;
1847        throw new FHIRException("Unknown CompartmentType code '"+codeString+"'");
1848        }
1849        public String toCode() {
1850          switch (this) {
1851            case PATIENT: return "Patient";
1852            case ENCOUNTER: return "Encounter";
1853            case RELATEDPERSON: return "RelatedPerson";
1854            case PRACTITIONER: return "Practitioner";
1855            case DEVICE: return "Device";
1856            case NULL: return null;
1857            default: return "?";
1858          }
1859        }
1860        public String getSystem() {
1861          switch (this) {
1862            case PATIENT: return "http://hl7.org/fhir/compartment-type";
1863            case ENCOUNTER: return "http://hl7.org/fhir/compartment-type";
1864            case RELATEDPERSON: return "http://hl7.org/fhir/compartment-type";
1865            case PRACTITIONER: return "http://hl7.org/fhir/compartment-type";
1866            case DEVICE: return "http://hl7.org/fhir/compartment-type";
1867            case NULL: return null;
1868            default: return "?";
1869          }
1870        }
1871        public String getDefinition() {
1872          switch (this) {
1873            case PATIENT: return "The compartment definition is for the patient compartment.";
1874            case ENCOUNTER: return "The compartment definition is for the encounter compartment.";
1875            case RELATEDPERSON: return "The compartment definition is for the related-person compartment.";
1876            case PRACTITIONER: return "The compartment definition is for the practitioner compartment.";
1877            case DEVICE: return "The compartment definition is for the device compartment.";
1878            case NULL: return null;
1879            default: return "?";
1880          }
1881        }
1882        public String getDisplay() {
1883          switch (this) {
1884            case PATIENT: return "Patient";
1885            case ENCOUNTER: return "Encounter";
1886            case RELATEDPERSON: return "RelatedPerson";
1887            case PRACTITIONER: return "Practitioner";
1888            case DEVICE: return "Device";
1889            case NULL: return null;
1890            default: return "?";
1891          }
1892        }
1893    }
1894
1895  public static class CompartmentTypeEnumFactory implements EnumFactory<CompartmentType> {
1896    public CompartmentType fromCode(String codeString) throws IllegalArgumentException {
1897      if (codeString == null || "".equals(codeString))
1898            if (codeString == null || "".equals(codeString))
1899                return null;
1900        if ("Patient".equals(codeString))
1901          return CompartmentType.PATIENT;
1902        if ("Encounter".equals(codeString))
1903          return CompartmentType.ENCOUNTER;
1904        if ("RelatedPerson".equals(codeString))
1905          return CompartmentType.RELATEDPERSON;
1906        if ("Practitioner".equals(codeString))
1907          return CompartmentType.PRACTITIONER;
1908        if ("Device".equals(codeString))
1909          return CompartmentType.DEVICE;
1910        throw new IllegalArgumentException("Unknown CompartmentType code '"+codeString+"'");
1911        }
1912        public Enumeration<CompartmentType> fromType(Base code) throws FHIRException {
1913          if (code == null)
1914            return null;
1915          if (code.isEmpty())
1916            return new Enumeration<CompartmentType>(this);
1917          String codeString = ((PrimitiveType) code).asStringValue();
1918          if (codeString == null || "".equals(codeString))
1919            return null;
1920        if ("Patient".equals(codeString))
1921          return new Enumeration<CompartmentType>(this, CompartmentType.PATIENT);
1922        if ("Encounter".equals(codeString))
1923          return new Enumeration<CompartmentType>(this, CompartmentType.ENCOUNTER);
1924        if ("RelatedPerson".equals(codeString))
1925          return new Enumeration<CompartmentType>(this, CompartmentType.RELATEDPERSON);
1926        if ("Practitioner".equals(codeString))
1927          return new Enumeration<CompartmentType>(this, CompartmentType.PRACTITIONER);
1928        if ("Device".equals(codeString))
1929          return new Enumeration<CompartmentType>(this, CompartmentType.DEVICE);
1930        throw new FHIRException("Unknown CompartmentType code '"+codeString+"'");
1931        }
1932    public String toCode(CompartmentType code) {
1933      if (code == CompartmentType.PATIENT)
1934        return "Patient";
1935      if (code == CompartmentType.ENCOUNTER)
1936        return "Encounter";
1937      if (code == CompartmentType.RELATEDPERSON)
1938        return "RelatedPerson";
1939      if (code == CompartmentType.PRACTITIONER)
1940        return "Practitioner";
1941      if (code == CompartmentType.DEVICE)
1942        return "Device";
1943      return "?";
1944      }
1945    public String toSystem(CompartmentType code) {
1946      return code.getSystem();
1947      }
1948    }
1949
1950    public enum CompositionStatus {
1951        /**
1952         * This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified.
1953         */
1954        PRELIMINARY, 
1955        /**
1956         * 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.
1957         */
1958        FINAL, 
1959        /**
1960         * 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.
1961         */
1962        AMENDED, 
1963        /**
1964         * 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.
1965         */
1966        ENTEREDINERROR, 
1967        /**
1968         * This composition has been withdrawn or superseded and should no longer be used.
1969         */
1970        DEPRECATED, 
1971        /**
1972         * added to help the parsers
1973         */
1974        NULL;
1975        public static CompositionStatus fromCode(String codeString) throws FHIRException {
1976            if (codeString == null || "".equals(codeString))
1977                return null;
1978        if ("preliminary".equals(codeString))
1979          return PRELIMINARY;
1980        if ("final".equals(codeString))
1981          return FINAL;
1982        if ("amended".equals(codeString))
1983          return AMENDED;
1984        if ("entered-in-error".equals(codeString))
1985          return ENTEREDINERROR;
1986        if ("deprecated".equals(codeString))
1987          return DEPRECATED;
1988        throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'");
1989        }
1990        public String toCode() {
1991          switch (this) {
1992            case PRELIMINARY: return "preliminary";
1993            case FINAL: return "final";
1994            case AMENDED: return "amended";
1995            case ENTEREDINERROR: return "entered-in-error";
1996            case DEPRECATED: return "deprecated";
1997            case NULL: return null;
1998            default: return "?";
1999          }
2000        }
2001        public String getSystem() {
2002          switch (this) {
2003            case PRELIMINARY: return "http://hl7.org/fhir/composition-status";
2004            case FINAL: return "http://hl7.org/fhir/composition-status";
2005            case AMENDED: return "http://hl7.org/fhir/composition-status";
2006            case ENTEREDINERROR: return "http://hl7.org/fhir/composition-status";
2007            case DEPRECATED: return "http://hl7.org/fhir/composition-status";
2008            case NULL: return null;
2009            default: return "?";
2010          }
2011        }
2012        public String getDefinition() {
2013          switch (this) {
2014            case PRELIMINARY: return "This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified.";
2015            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.";
2016            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.";
2017            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.";
2018            case DEPRECATED: return "This composition has been withdrawn or superseded and should no longer be used.";
2019            case NULL: return null;
2020            default: return "?";
2021          }
2022        }
2023        public String getDisplay() {
2024          switch (this) {
2025            case PRELIMINARY: return "Preliminary";
2026            case FINAL: return "Final";
2027            case AMENDED: return "Amended";
2028            case ENTEREDINERROR: return "Entered in Error";
2029            case DEPRECATED: return "Deprecated";
2030            case NULL: return null;
2031            default: return "?";
2032          }
2033        }
2034    }
2035
2036  public static class CompositionStatusEnumFactory implements EnumFactory<CompositionStatus> {
2037    public CompositionStatus fromCode(String codeString) throws IllegalArgumentException {
2038      if (codeString == null || "".equals(codeString))
2039            if (codeString == null || "".equals(codeString))
2040                return null;
2041        if ("preliminary".equals(codeString))
2042          return CompositionStatus.PRELIMINARY;
2043        if ("final".equals(codeString))
2044          return CompositionStatus.FINAL;
2045        if ("amended".equals(codeString))
2046          return CompositionStatus.AMENDED;
2047        if ("entered-in-error".equals(codeString))
2048          return CompositionStatus.ENTEREDINERROR;
2049        if ("deprecated".equals(codeString))
2050          return CompositionStatus.DEPRECATED;
2051        throw new IllegalArgumentException("Unknown CompositionStatus code '"+codeString+"'");
2052        }
2053        public Enumeration<CompositionStatus> fromType(Base code) throws FHIRException {
2054          if (code == null)
2055            return null;
2056          if (code.isEmpty())
2057            return new Enumeration<CompositionStatus>(this);
2058          String codeString = ((PrimitiveType) code).asStringValue();
2059          if (codeString == null || "".equals(codeString))
2060            return null;
2061        if ("preliminary".equals(codeString))
2062          return new Enumeration<CompositionStatus>(this, CompositionStatus.PRELIMINARY);
2063        if ("final".equals(codeString))
2064          return new Enumeration<CompositionStatus>(this, CompositionStatus.FINAL);
2065        if ("amended".equals(codeString))
2066          return new Enumeration<CompositionStatus>(this, CompositionStatus.AMENDED);
2067        if ("entered-in-error".equals(codeString))
2068          return new Enumeration<CompositionStatus>(this, CompositionStatus.ENTEREDINERROR);
2069        if ("deprecated".equals(codeString))
2070          return new Enumeration<CompositionStatus>(this, CompositionStatus.DEPRECATED);
2071        throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'");
2072        }
2073    public String toCode(CompositionStatus code) {
2074      if (code == CompositionStatus.PRELIMINARY)
2075        return "preliminary";
2076      if (code == CompositionStatus.FINAL)
2077        return "final";
2078      if (code == CompositionStatus.AMENDED)
2079        return "amended";
2080      if (code == CompositionStatus.ENTEREDINERROR)
2081        return "entered-in-error";
2082      if (code == CompositionStatus.DEPRECATED)
2083        return "deprecated";
2084      return "?";
2085      }
2086    public String toSystem(CompositionStatus code) {
2087      return code.getSystem();
2088      }
2089    }
2090
2091    public enum ConceptMapGroupUnmappedMode {
2092        /**
2093         * Use the code as provided in the $translate request.
2094         */
2095        PROVIDED, 
2096        /**
2097         * Use the code explicitly provided in the group.unmapped.
2098         */
2099        FIXED, 
2100        /**
2101         * Use the map identified by the canonical URL in the url element.
2102         */
2103        OTHERMAP, 
2104        /**
2105         * added to help the parsers
2106         */
2107        NULL;
2108        public static ConceptMapGroupUnmappedMode fromCode(String codeString) throws FHIRException {
2109            if (codeString == null || "".equals(codeString))
2110                return null;
2111        if ("provided".equals(codeString))
2112          return PROVIDED;
2113        if ("fixed".equals(codeString))
2114          return FIXED;
2115        if ("other-map".equals(codeString))
2116          return OTHERMAP;
2117        throw new FHIRException("Unknown ConceptMapGroupUnmappedMode code '"+codeString+"'");
2118        }
2119        public String toCode() {
2120          switch (this) {
2121            case PROVIDED: return "provided";
2122            case FIXED: return "fixed";
2123            case OTHERMAP: return "other-map";
2124            case NULL: return null;
2125            default: return "?";
2126          }
2127        }
2128        public String getSystem() {
2129          switch (this) {
2130            case PROVIDED: return "http://hl7.org/fhir/conceptmap-unmapped-mode";
2131            case FIXED: return "http://hl7.org/fhir/conceptmap-unmapped-mode";
2132            case OTHERMAP: return "http://hl7.org/fhir/conceptmap-unmapped-mode";
2133            case NULL: return null;
2134            default: return "?";
2135          }
2136        }
2137        public String getDefinition() {
2138          switch (this) {
2139            case PROVIDED: return "Use the code as provided in the $translate request.";
2140            case FIXED: return "Use the code explicitly provided in the group.unmapped.";
2141            case OTHERMAP: return "Use the map identified by the canonical URL in the url element.";
2142            case NULL: return null;
2143            default: return "?";
2144          }
2145        }
2146        public String getDisplay() {
2147          switch (this) {
2148            case PROVIDED: return "Provided Code";
2149            case FIXED: return "Fixed Code";
2150            case OTHERMAP: return "Other Map";
2151            case NULL: return null;
2152            default: return "?";
2153          }
2154        }
2155    }
2156
2157  public static class ConceptMapGroupUnmappedModeEnumFactory implements EnumFactory<ConceptMapGroupUnmappedMode> {
2158    public ConceptMapGroupUnmappedMode fromCode(String codeString) throws IllegalArgumentException {
2159      if (codeString == null || "".equals(codeString))
2160            if (codeString == null || "".equals(codeString))
2161                return null;
2162        if ("provided".equals(codeString))
2163          return ConceptMapGroupUnmappedMode.PROVIDED;
2164        if ("fixed".equals(codeString))
2165          return ConceptMapGroupUnmappedMode.FIXED;
2166        if ("other-map".equals(codeString))
2167          return ConceptMapGroupUnmappedMode.OTHERMAP;
2168        throw new IllegalArgumentException("Unknown ConceptMapGroupUnmappedMode code '"+codeString+"'");
2169        }
2170        public Enumeration<ConceptMapGroupUnmappedMode> fromType(Base code) throws FHIRException {
2171          if (code == null)
2172            return null;
2173          if (code.isEmpty())
2174            return new Enumeration<ConceptMapGroupUnmappedMode>(this);
2175          String codeString = ((PrimitiveType) code).asStringValue();
2176          if (codeString == null || "".equals(codeString))
2177            return null;
2178        if ("provided".equals(codeString))
2179          return new Enumeration<ConceptMapGroupUnmappedMode>(this, ConceptMapGroupUnmappedMode.PROVIDED);
2180        if ("fixed".equals(codeString))
2181          return new Enumeration<ConceptMapGroupUnmappedMode>(this, ConceptMapGroupUnmappedMode.FIXED);
2182        if ("other-map".equals(codeString))
2183          return new Enumeration<ConceptMapGroupUnmappedMode>(this, ConceptMapGroupUnmappedMode.OTHERMAP);
2184        throw new FHIRException("Unknown ConceptMapGroupUnmappedMode code '"+codeString+"'");
2185        }
2186    public String toCode(ConceptMapGroupUnmappedMode code) {
2187      if (code == ConceptMapGroupUnmappedMode.PROVIDED)
2188        return "provided";
2189      if (code == ConceptMapGroupUnmappedMode.FIXED)
2190        return "fixed";
2191      if (code == ConceptMapGroupUnmappedMode.OTHERMAP)
2192        return "other-map";
2193      return "?";
2194      }
2195    public String toSystem(ConceptMapGroupUnmappedMode code) {
2196      return code.getSystem();
2197      }
2198    }
2199
2200    public enum ConceptMapRelationship {
2201        /**
2202         * The concepts are related to each other, but the exact relationship is not known.
2203         */
2204        RELATEDTO, 
2205        /**
2206         * The definitions of the concepts mean the same thing.
2207         */
2208        EQUIVALENT, 
2209        /**
2210         * The source concept is narrower in meaning than the target concept.
2211         */
2212        SOURCEISNARROWERTHANTARGET, 
2213        /**
2214         * The source concept is broader in meaning than the target concept.
2215         */
2216        SOURCEISBROADERTHANTARGET, 
2217        /**
2218         * This is an explicit assertion that the target concept is not related to the source concept.
2219         */
2220        NOTRELATEDTO, 
2221        /**
2222         * added to help the parsers
2223         */
2224        NULL;
2225        public static ConceptMapRelationship fromCode(String codeString) throws FHIRException {
2226            if (codeString == null || "".equals(codeString))
2227                return null;
2228        if ("related-to".equals(codeString))
2229          return RELATEDTO;
2230        if ("equivalent".equals(codeString))
2231          return EQUIVALENT;
2232        if ("source-is-narrower-than-target".equals(codeString))
2233          return SOURCEISNARROWERTHANTARGET;
2234        if ("source-is-broader-than-target".equals(codeString))
2235          return SOURCEISBROADERTHANTARGET;
2236        if ("not-related-to".equals(codeString))
2237          return NOTRELATEDTO;
2238        throw new FHIRException("Unknown ConceptMapRelationship code '"+codeString+"'");
2239        }
2240        public String toCode() {
2241          switch (this) {
2242            case RELATEDTO: return "related-to";
2243            case EQUIVALENT: return "equivalent";
2244            case SOURCEISNARROWERTHANTARGET: return "source-is-narrower-than-target";
2245            case SOURCEISBROADERTHANTARGET: return "source-is-broader-than-target";
2246            case NOTRELATEDTO: return "not-related-to";
2247            case NULL: return null;
2248            default: return "?";
2249          }
2250        }
2251        public String getSystem() {
2252          switch (this) {
2253            case RELATEDTO: return "http://hl7.org/fhir/concept-map-relationship";
2254            case EQUIVALENT: return "http://hl7.org/fhir/concept-map-relationship";
2255            case SOURCEISNARROWERTHANTARGET: return "http://hl7.org/fhir/concept-map-relationship";
2256            case SOURCEISBROADERTHANTARGET: return "http://hl7.org/fhir/concept-map-relationship";
2257            case NOTRELATEDTO: return "http://hl7.org/fhir/concept-map-relationship";
2258            case NULL: return null;
2259            default: return "?";
2260          }
2261        }
2262        public String getDefinition() {
2263          switch (this) {
2264            case RELATEDTO: return "The concepts are related to each other, but the exact relationship is not known.";
2265            case EQUIVALENT: return "The definitions of the concepts mean the same thing.";
2266            case SOURCEISNARROWERTHANTARGET: return "The source concept is narrower in meaning than the target concept.";
2267            case SOURCEISBROADERTHANTARGET: return "The source concept is broader in meaning than the target concept.";
2268            case NOTRELATEDTO: return "This is an explicit assertion that the target concept is not related to the source concept.";
2269            case NULL: return null;
2270            default: return "?";
2271          }
2272        }
2273        public String getDisplay() {
2274          switch (this) {
2275            case RELATEDTO: return "Related To";
2276            case EQUIVALENT: return "Equivalent";
2277            case SOURCEISNARROWERTHANTARGET: return "Source Is Narrower Than Target";
2278            case SOURCEISBROADERTHANTARGET: return "Source Is Broader Than Target";
2279            case NOTRELATEDTO: return "Not Related To";
2280            case NULL: return null;
2281            default: return "?";
2282          }
2283        }
2284    }
2285
2286  public static class ConceptMapRelationshipEnumFactory implements EnumFactory<ConceptMapRelationship> {
2287    public ConceptMapRelationship fromCode(String codeString) throws IllegalArgumentException {
2288      if (codeString == null || "".equals(codeString))
2289            if (codeString == null || "".equals(codeString))
2290                return null;
2291        if ("related-to".equals(codeString))
2292          return ConceptMapRelationship.RELATEDTO;
2293        if ("equivalent".equals(codeString))
2294          return ConceptMapRelationship.EQUIVALENT;
2295        if ("source-is-narrower-than-target".equals(codeString))
2296          return ConceptMapRelationship.SOURCEISNARROWERTHANTARGET;
2297        if ("source-is-broader-than-target".equals(codeString))
2298          return ConceptMapRelationship.SOURCEISBROADERTHANTARGET;
2299        if ("not-related-to".equals(codeString))
2300          return ConceptMapRelationship.NOTRELATEDTO;
2301        throw new IllegalArgumentException("Unknown ConceptMapRelationship code '"+codeString+"'");
2302        }
2303        public Enumeration<ConceptMapRelationship> fromType(Base code) throws FHIRException {
2304          if (code == null)
2305            return null;
2306          if (code.isEmpty())
2307            return new Enumeration<ConceptMapRelationship>(this);
2308          String codeString = ((PrimitiveType) code).asStringValue();
2309          if (codeString == null || "".equals(codeString))
2310            return null;
2311        if ("related-to".equals(codeString))
2312          return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.RELATEDTO);
2313        if ("equivalent".equals(codeString))
2314          return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.EQUIVALENT);
2315        if ("source-is-narrower-than-target".equals(codeString))
2316          return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.SOURCEISNARROWERTHANTARGET);
2317        if ("source-is-broader-than-target".equals(codeString))
2318          return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.SOURCEISBROADERTHANTARGET);
2319        if ("not-related-to".equals(codeString))
2320          return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.NOTRELATEDTO);
2321        throw new FHIRException("Unknown ConceptMapRelationship code '"+codeString+"'");
2322        }
2323    public String toCode(ConceptMapRelationship code) {
2324      if (code == ConceptMapRelationship.RELATEDTO)
2325        return "related-to";
2326      if (code == ConceptMapRelationship.EQUIVALENT)
2327        return "equivalent";
2328      if (code == ConceptMapRelationship.SOURCEISNARROWERTHANTARGET)
2329        return "source-is-narrower-than-target";
2330      if (code == ConceptMapRelationship.SOURCEISBROADERTHANTARGET)
2331        return "source-is-broader-than-target";
2332      if (code == ConceptMapRelationship.NOTRELATEDTO)
2333        return "not-related-to";
2334      return "?";
2335      }
2336    public String toSystem(ConceptMapRelationship code) {
2337      return code.getSystem();
2338      }
2339    }
2340
2341    public enum DaysOfWeek {
2342        /**
2343         * Monday.
2344         */
2345        MON, 
2346        /**
2347         * Tuesday.
2348         */
2349        TUE, 
2350        /**
2351         * Wednesday.
2352         */
2353        WED, 
2354        /**
2355         * Thursday.
2356         */
2357        THU, 
2358        /**
2359         * Friday.
2360         */
2361        FRI, 
2362        /**
2363         * Saturday.
2364         */
2365        SAT, 
2366        /**
2367         * Sunday.
2368         */
2369        SUN, 
2370        /**
2371         * added to help the parsers
2372         */
2373        NULL;
2374        public static DaysOfWeek fromCode(String codeString) throws FHIRException {
2375            if (codeString == null || "".equals(codeString))
2376                return null;
2377        if ("mon".equals(codeString))
2378          return MON;
2379        if ("tue".equals(codeString))
2380          return TUE;
2381        if ("wed".equals(codeString))
2382          return WED;
2383        if ("thu".equals(codeString))
2384          return THU;
2385        if ("fri".equals(codeString))
2386          return FRI;
2387        if ("sat".equals(codeString))
2388          return SAT;
2389        if ("sun".equals(codeString))
2390          return SUN;
2391        throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'");
2392        }
2393        public String toCode() {
2394          switch (this) {
2395            case MON: return "mon";
2396            case TUE: return "tue";
2397            case WED: return "wed";
2398            case THU: return "thu";
2399            case FRI: return "fri";
2400            case SAT: return "sat";
2401            case SUN: return "sun";
2402            case NULL: return null;
2403            default: return "?";
2404          }
2405        }
2406        public String getSystem() {
2407          switch (this) {
2408            case MON: return "http://hl7.org/fhir/days-of-week";
2409            case TUE: return "http://hl7.org/fhir/days-of-week";
2410            case WED: return "http://hl7.org/fhir/days-of-week";
2411            case THU: return "http://hl7.org/fhir/days-of-week";
2412            case FRI: return "http://hl7.org/fhir/days-of-week";
2413            case SAT: return "http://hl7.org/fhir/days-of-week";
2414            case SUN: return "http://hl7.org/fhir/days-of-week";
2415            case NULL: return null;
2416            default: return "?";
2417          }
2418        }
2419        public String getDefinition() {
2420          switch (this) {
2421            case MON: return "Monday.";
2422            case TUE: return "Tuesday.";
2423            case WED: return "Wednesday.";
2424            case THU: return "Thursday.";
2425            case FRI: return "Friday.";
2426            case SAT: return "Saturday.";
2427            case SUN: return "Sunday.";
2428            case NULL: return null;
2429            default: return "?";
2430          }
2431        }
2432        public String getDisplay() {
2433          switch (this) {
2434            case MON: return "Monday";
2435            case TUE: return "Tuesday";
2436            case WED: return "Wednesday";
2437            case THU: return "Thursday";
2438            case FRI: return "Friday";
2439            case SAT: return "Saturday";
2440            case SUN: return "Sunday";
2441            case NULL: return null;
2442            default: return "?";
2443          }
2444        }
2445    }
2446
2447  public static class DaysOfWeekEnumFactory implements EnumFactory<DaysOfWeek> {
2448    public DaysOfWeek fromCode(String codeString) throws IllegalArgumentException {
2449      if (codeString == null || "".equals(codeString))
2450            if (codeString == null || "".equals(codeString))
2451                return null;
2452        if ("mon".equals(codeString))
2453          return DaysOfWeek.MON;
2454        if ("tue".equals(codeString))
2455          return DaysOfWeek.TUE;
2456        if ("wed".equals(codeString))
2457          return DaysOfWeek.WED;
2458        if ("thu".equals(codeString))
2459          return DaysOfWeek.THU;
2460        if ("fri".equals(codeString))
2461          return DaysOfWeek.FRI;
2462        if ("sat".equals(codeString))
2463          return DaysOfWeek.SAT;
2464        if ("sun".equals(codeString))
2465          return DaysOfWeek.SUN;
2466        throw new IllegalArgumentException("Unknown DaysOfWeek code '"+codeString+"'");
2467        }
2468        public Enumeration<DaysOfWeek> fromType(Base code) throws FHIRException {
2469          if (code == null)
2470            return null;
2471          if (code.isEmpty())
2472            return new Enumeration<DaysOfWeek>(this);
2473          String codeString = ((PrimitiveType) code).asStringValue();
2474          if (codeString == null || "".equals(codeString))
2475            return null;
2476        if ("mon".equals(codeString))
2477          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.MON);
2478        if ("tue".equals(codeString))
2479          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.TUE);
2480        if ("wed".equals(codeString))
2481          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.WED);
2482        if ("thu".equals(codeString))
2483          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.THU);
2484        if ("fri".equals(codeString))
2485          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.FRI);
2486        if ("sat".equals(codeString))
2487          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.SAT);
2488        if ("sun".equals(codeString))
2489          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.SUN);
2490        throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'");
2491        }
2492    public String toCode(DaysOfWeek code) {
2493      if (code == DaysOfWeek.MON)
2494        return "mon";
2495      if (code == DaysOfWeek.TUE)
2496        return "tue";
2497      if (code == DaysOfWeek.WED)
2498        return "wed";
2499      if (code == DaysOfWeek.THU)
2500        return "thu";
2501      if (code == DaysOfWeek.FRI)
2502        return "fri";
2503      if (code == DaysOfWeek.SAT)
2504        return "sat";
2505      if (code == DaysOfWeek.SUN)
2506        return "sun";
2507      return "?";
2508      }
2509    public String toSystem(DaysOfWeek code) {
2510      return code.getSystem();
2511      }
2512    }
2513
2514    public enum DeviceNameType {
2515        /**
2516         * The term assigned to a medical device by the entity who registers or submits information about it to a jurisdiction or its databases. This may be considered the manufacturer assigned name (e.g., brand name assigned by the labeler or manufacturer in US, or device name assigned by the manufacturer in EU) and may also be synonymous with proprietary name or trade name of the device.
2517         */
2518        REGISTEREDNAME, 
2519        /**
2520         * The term that generically describes the device by a name as assigned by the manufacturer that is recognized by lay person.  This common or generic name may be printed on the package it came in or some combination of that name with the model number, serial number, or other attribute that makes the name easy to understand for the user of that device. It is often exposed in communicating devices transport protocols. It is provided to help users identify the device when reported in discovery operations.
2521         */
2522        USERFRIENDLYNAME, 
2523        /**
2524         * the term used by the patient associated with the device when describing the device, for example 'knee implant', when documented as a self-reported device.
2525         */
2526        PATIENTREPORTEDNAME, 
2527        /**
2528         * added to help the parsers
2529         */
2530        NULL;
2531        public static DeviceNameType fromCode(String codeString) throws FHIRException {
2532            if (codeString == null || "".equals(codeString))
2533                return null;
2534        if ("registered-name".equals(codeString))
2535          return REGISTEREDNAME;
2536        if ("user-friendly-name".equals(codeString))
2537          return USERFRIENDLYNAME;
2538        if ("patient-reported-name".equals(codeString))
2539          return PATIENTREPORTEDNAME;
2540        throw new FHIRException("Unknown DeviceNameType code '"+codeString+"'");
2541        }
2542        public String toCode() {
2543          switch (this) {
2544            case REGISTEREDNAME: return "registered-name";
2545            case USERFRIENDLYNAME: return "user-friendly-name";
2546            case PATIENTREPORTEDNAME: return "patient-reported-name";
2547            case NULL: return null;
2548            default: return "?";
2549          }
2550        }
2551        public String getSystem() {
2552          switch (this) {
2553            case REGISTEREDNAME: return "http://hl7.org/fhir/device-nametype";
2554            case USERFRIENDLYNAME: return "http://hl7.org/fhir/device-nametype";
2555            case PATIENTREPORTEDNAME: return "http://hl7.org/fhir/device-nametype";
2556            case NULL: return null;
2557            default: return "?";
2558          }
2559        }
2560        public String getDefinition() {
2561          switch (this) {
2562            case REGISTEREDNAME: return "The term assigned to a medical device by the entity who registers or submits information about it to a jurisdiction or its databases. This may be considered the manufacturer assigned name (e.g., brand name assigned by the labeler or manufacturer in US, or device name assigned by the manufacturer in EU) and may also be synonymous with proprietary name or trade name of the device.";
2563            case USERFRIENDLYNAME: return "The term that generically describes the device by a name as assigned by the manufacturer that is recognized by lay person.  This common or generic name may be printed on the package it came in or some combination of that name with the model number, serial number, or other attribute that makes the name easy to understand for the user of that device. It is often exposed in communicating devices transport protocols. It is provided to help users identify the device when reported in discovery operations.";
2564            case PATIENTREPORTEDNAME: return "the term used by the patient associated with the device when describing the device, for example 'knee implant', when documented as a self-reported device.";
2565            case NULL: return null;
2566            default: return "?";
2567          }
2568        }
2569        public String getDisplay() {
2570          switch (this) {
2571            case REGISTEREDNAME: return "Registered name";
2572            case USERFRIENDLYNAME: return "User Friendly name";
2573            case PATIENTREPORTEDNAME: return "Patient Reported name";
2574            case NULL: return null;
2575            default: return "?";
2576          }
2577        }
2578    }
2579
2580  public static class DeviceNameTypeEnumFactory implements EnumFactory<DeviceNameType> {
2581    public DeviceNameType fromCode(String codeString) throws IllegalArgumentException {
2582      if (codeString == null || "".equals(codeString))
2583            if (codeString == null || "".equals(codeString))
2584                return null;
2585        if ("registered-name".equals(codeString))
2586          return DeviceNameType.REGISTEREDNAME;
2587        if ("user-friendly-name".equals(codeString))
2588          return DeviceNameType.USERFRIENDLYNAME;
2589        if ("patient-reported-name".equals(codeString))
2590          return DeviceNameType.PATIENTREPORTEDNAME;
2591        throw new IllegalArgumentException("Unknown DeviceNameType code '"+codeString+"'");
2592        }
2593        public Enumeration<DeviceNameType> fromType(Base code) throws FHIRException {
2594          if (code == null)
2595            return null;
2596          if (code.isEmpty())
2597            return new Enumeration<DeviceNameType>(this);
2598          String codeString = ((PrimitiveType) code).asStringValue();
2599          if (codeString == null || "".equals(codeString))
2600            return null;
2601        if ("registered-name".equals(codeString))
2602          return new Enumeration<DeviceNameType>(this, DeviceNameType.REGISTEREDNAME);
2603        if ("user-friendly-name".equals(codeString))
2604          return new Enumeration<DeviceNameType>(this, DeviceNameType.USERFRIENDLYNAME);
2605        if ("patient-reported-name".equals(codeString))
2606          return new Enumeration<DeviceNameType>(this, DeviceNameType.PATIENTREPORTEDNAME);
2607        throw new FHIRException("Unknown DeviceNameType code '"+codeString+"'");
2608        }
2609    public String toCode(DeviceNameType code) {
2610      if (code == DeviceNameType.REGISTEREDNAME)
2611        return "registered-name";
2612      if (code == DeviceNameType.USERFRIENDLYNAME)
2613        return "user-friendly-name";
2614      if (code == DeviceNameType.PATIENTREPORTEDNAME)
2615        return "patient-reported-name";
2616      return "?";
2617      }
2618    public String toSystem(DeviceNameType code) {
2619      return code.getSystem();
2620      }
2621    }
2622
2623    public enum DocumentReferenceStatus {
2624        /**
2625         * This is the current reference for this document.
2626         */
2627        CURRENT, 
2628        /**
2629         * This reference has been superseded by another reference.
2630         */
2631        SUPERSEDED, 
2632        /**
2633         * This reference was created in error.
2634         */
2635        ENTEREDINERROR, 
2636        /**
2637         * added to help the parsers
2638         */
2639        NULL;
2640        public static DocumentReferenceStatus fromCode(String codeString) throws FHIRException {
2641            if (codeString == null || "".equals(codeString))
2642                return null;
2643        if ("current".equals(codeString))
2644          return CURRENT;
2645        if ("superseded".equals(codeString))
2646          return SUPERSEDED;
2647        if ("entered-in-error".equals(codeString))
2648          return ENTEREDINERROR;
2649        throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'");
2650        }
2651        public String toCode() {
2652          switch (this) {
2653            case CURRENT: return "current";
2654            case SUPERSEDED: return "superseded";
2655            case ENTEREDINERROR: return "entered-in-error";
2656            case NULL: return null;
2657            default: return "?";
2658          }
2659        }
2660        public String getSystem() {
2661          switch (this) {
2662            case CURRENT: return "http://hl7.org/fhir/document-reference-status";
2663            case SUPERSEDED: return "http://hl7.org/fhir/document-reference-status";
2664            case ENTEREDINERROR: return "http://hl7.org/fhir/document-reference-status";
2665            case NULL: return null;
2666            default: return "?";
2667          }
2668        }
2669        public String getDefinition() {
2670          switch (this) {
2671            case CURRENT: return "This is the current reference for this document.";
2672            case SUPERSEDED: return "This reference has been superseded by another reference.";
2673            case ENTEREDINERROR: return "This reference was created in error.";
2674            case NULL: return null;
2675            default: return "?";
2676          }
2677        }
2678        public String getDisplay() {
2679          switch (this) {
2680            case CURRENT: return "Current";
2681            case SUPERSEDED: return "Superseded";
2682            case ENTEREDINERROR: return "Entered in Error";
2683            case NULL: return null;
2684            default: return "?";
2685          }
2686        }
2687    }
2688
2689  public static class DocumentReferenceStatusEnumFactory implements EnumFactory<DocumentReferenceStatus> {
2690    public DocumentReferenceStatus fromCode(String codeString) throws IllegalArgumentException {
2691      if (codeString == null || "".equals(codeString))
2692            if (codeString == null || "".equals(codeString))
2693                return null;
2694        if ("current".equals(codeString))
2695          return DocumentReferenceStatus.CURRENT;
2696        if ("superseded".equals(codeString))
2697          return DocumentReferenceStatus.SUPERSEDED;
2698        if ("entered-in-error".equals(codeString))
2699          return DocumentReferenceStatus.ENTEREDINERROR;
2700        throw new IllegalArgumentException("Unknown DocumentReferenceStatus code '"+codeString+"'");
2701        }
2702        public Enumeration<DocumentReferenceStatus> fromType(Base code) throws FHIRException {
2703          if (code == null)
2704            return null;
2705          if (code.isEmpty())
2706            return new Enumeration<DocumentReferenceStatus>(this);
2707          String codeString = ((PrimitiveType) code).asStringValue();
2708          if (codeString == null || "".equals(codeString))
2709            return null;
2710        if ("current".equals(codeString))
2711          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.CURRENT);
2712        if ("superseded".equals(codeString))
2713          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.SUPERSEDED);
2714        if ("entered-in-error".equals(codeString))
2715          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.ENTEREDINERROR);
2716        throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'");
2717        }
2718    public String toCode(DocumentReferenceStatus code) {
2719      if (code == DocumentReferenceStatus.CURRENT)
2720        return "current";
2721      if (code == DocumentReferenceStatus.SUPERSEDED)
2722        return "superseded";
2723      if (code == DocumentReferenceStatus.ENTEREDINERROR)
2724        return "entered-in-error";
2725      return "?";
2726      }
2727    public String toSystem(DocumentReferenceStatus code) {
2728      return code.getSystem();
2729      }
2730    }
2731
2732    public enum EventStatus {
2733        /**
2734         * 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.
2735         */
2736        PREPARATION, 
2737        /**
2738         * The event is currently occurring.
2739         */
2740        INPROGRESS, 
2741        /**
2742         * 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.
2743         */
2744        NOTDONE, 
2745        /**
2746         * The event has been temporarily stopped but is expected to resume in the future.
2747         */
2748        ONHOLD, 
2749        /**
2750         * 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.
2751         */
2752        STOPPED, 
2753        /**
2754         * The event has now concluded.
2755         */
2756        COMPLETED, 
2757        /**
2758         * 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".).
2759         */
2760        ENTEREDINERROR, 
2761        /**
2762         * 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.
2763         */
2764        UNKNOWN, 
2765        /**
2766         * added to help the parsers
2767         */
2768        NULL;
2769        public static EventStatus fromCode(String codeString) throws FHIRException {
2770            if (codeString == null || "".equals(codeString))
2771                return null;
2772        if ("preparation".equals(codeString))
2773          return PREPARATION;
2774        if ("in-progress".equals(codeString))
2775          return INPROGRESS;
2776        if ("not-done".equals(codeString))
2777          return NOTDONE;
2778        if ("on-hold".equals(codeString))
2779          return ONHOLD;
2780        if ("stopped".equals(codeString))
2781          return STOPPED;
2782        if ("completed".equals(codeString))
2783          return COMPLETED;
2784        if ("entered-in-error".equals(codeString))
2785          return ENTEREDINERROR;
2786        if ("unknown".equals(codeString))
2787          return UNKNOWN;
2788        throw new FHIRException("Unknown EventStatus code '"+codeString+"'");
2789        }
2790        public String toCode() {
2791          switch (this) {
2792            case PREPARATION: return "preparation";
2793            case INPROGRESS: return "in-progress";
2794            case NOTDONE: return "not-done";
2795            case ONHOLD: return "on-hold";
2796            case STOPPED: return "stopped";
2797            case COMPLETED: return "completed";
2798            case ENTEREDINERROR: return "entered-in-error";
2799            case UNKNOWN: return "unknown";
2800            case NULL: return null;
2801            default: return "?";
2802          }
2803        }
2804        public String getSystem() {
2805          switch (this) {
2806            case PREPARATION: return "http://hl7.org/fhir/event-status";
2807            case INPROGRESS: return "http://hl7.org/fhir/event-status";
2808            case NOTDONE: return "http://hl7.org/fhir/event-status";
2809            case ONHOLD: return "http://hl7.org/fhir/event-status";
2810            case STOPPED: return "http://hl7.org/fhir/event-status";
2811            case COMPLETED: return "http://hl7.org/fhir/event-status";
2812            case ENTEREDINERROR: return "http://hl7.org/fhir/event-status";
2813            case UNKNOWN: return "http://hl7.org/fhir/event-status";
2814            case NULL: return null;
2815            default: return "?";
2816          }
2817        }
2818        public String getDefinition() {
2819          switch (this) {
2820            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.";
2821            case INPROGRESS: return "The event is currently occurring.";
2822            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.";
2823            case ONHOLD: return "The event has been temporarily stopped but is expected to resume in the future.";
2824            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.";
2825            case COMPLETED: return "The event has now concluded.";
2826            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\".).";
2827            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.";
2828            case NULL: return null;
2829            default: return "?";
2830          }
2831        }
2832        public String getDisplay() {
2833          switch (this) {
2834            case PREPARATION: return "Preparation";
2835            case INPROGRESS: return "In Progress";
2836            case NOTDONE: return "Not Done";
2837            case ONHOLD: return "On Hold";
2838            case STOPPED: return "Stopped";
2839            case COMPLETED: return "Completed";
2840            case ENTEREDINERROR: return "Entered in Error";
2841            case UNKNOWN: return "Unknown";
2842            case NULL: return null;
2843            default: return "?";
2844          }
2845        }
2846    }
2847
2848  public static class EventStatusEnumFactory implements EnumFactory<EventStatus> {
2849    public EventStatus fromCode(String codeString) throws IllegalArgumentException {
2850      if (codeString == null || "".equals(codeString))
2851            if (codeString == null || "".equals(codeString))
2852                return null;
2853        if ("preparation".equals(codeString))
2854          return EventStatus.PREPARATION;
2855        if ("in-progress".equals(codeString))
2856          return EventStatus.INPROGRESS;
2857        if ("not-done".equals(codeString))
2858          return EventStatus.NOTDONE;
2859        if ("on-hold".equals(codeString))
2860          return EventStatus.ONHOLD;
2861        if ("stopped".equals(codeString))
2862          return EventStatus.STOPPED;
2863        if ("completed".equals(codeString))
2864          return EventStatus.COMPLETED;
2865        if ("entered-in-error".equals(codeString))
2866          return EventStatus.ENTEREDINERROR;
2867        if ("unknown".equals(codeString))
2868          return EventStatus.UNKNOWN;
2869        throw new IllegalArgumentException("Unknown EventStatus code '"+codeString+"'");
2870        }
2871        public Enumeration<EventStatus> fromType(Base code) throws FHIRException {
2872          if (code == null)
2873            return null;
2874          if (code.isEmpty())
2875            return new Enumeration<EventStatus>(this);
2876          String codeString = ((PrimitiveType) code).asStringValue();
2877          if (codeString == null || "".equals(codeString))
2878            return null;
2879        if ("preparation".equals(codeString))
2880          return new Enumeration<EventStatus>(this, EventStatus.PREPARATION);
2881        if ("in-progress".equals(codeString))
2882          return new Enumeration<EventStatus>(this, EventStatus.INPROGRESS);
2883        if ("not-done".equals(codeString))
2884          return new Enumeration<EventStatus>(this, EventStatus.NOTDONE);
2885        if ("on-hold".equals(codeString))
2886          return new Enumeration<EventStatus>(this, EventStatus.ONHOLD);
2887        if ("stopped".equals(codeString))
2888          return new Enumeration<EventStatus>(this, EventStatus.STOPPED);
2889        if ("completed".equals(codeString))
2890          return new Enumeration<EventStatus>(this, EventStatus.COMPLETED);
2891        if ("entered-in-error".equals(codeString))
2892          return new Enumeration<EventStatus>(this, EventStatus.ENTEREDINERROR);
2893        if ("unknown".equals(codeString))
2894          return new Enumeration<EventStatus>(this, EventStatus.UNKNOWN);
2895        throw new FHIRException("Unknown EventStatus code '"+codeString+"'");
2896        }
2897    public String toCode(EventStatus code) {
2898      if (code == EventStatus.PREPARATION)
2899        return "preparation";
2900      if (code == EventStatus.INPROGRESS)
2901        return "in-progress";
2902      if (code == EventStatus.NOTDONE)
2903        return "not-done";
2904      if (code == EventStatus.ONHOLD)
2905        return "on-hold";
2906      if (code == EventStatus.STOPPED)
2907        return "stopped";
2908      if (code == EventStatus.COMPLETED)
2909        return "completed";
2910      if (code == EventStatus.ENTEREDINERROR)
2911        return "entered-in-error";
2912      if (code == EventStatus.UNKNOWN)
2913        return "unknown";
2914      return "?";
2915      }
2916    public String toSystem(EventStatus code) {
2917      return code.getSystem();
2918      }
2919    }
2920
2921    public enum EvidenceVariableHandling {
2922        /**
2923         * 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).
2924         */
2925        CONTINUOUS, 
2926        /**
2927         * 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).
2928         */
2929        DICHOTOMOUS, 
2930        /**
2931         * 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).
2932         */
2933        ORDINAL, 
2934        /**
2935         * 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.
2936         */
2937        POLYCHOTOMOUS, 
2938        /**
2939         * added to help the parsers
2940         */
2941        NULL;
2942        public static EvidenceVariableHandling fromCode(String codeString) throws FHIRException {
2943            if (codeString == null || "".equals(codeString))
2944                return null;
2945        if ("continuous".equals(codeString))
2946          return CONTINUOUS;
2947        if ("dichotomous".equals(codeString))
2948          return DICHOTOMOUS;
2949        if ("ordinal".equals(codeString))
2950          return ORDINAL;
2951        if ("polychotomous".equals(codeString))
2952          return POLYCHOTOMOUS;
2953        throw new FHIRException("Unknown EvidenceVariableHandling code '"+codeString+"'");
2954        }
2955        public String toCode() {
2956          switch (this) {
2957            case CONTINUOUS: return "continuous";
2958            case DICHOTOMOUS: return "dichotomous";
2959            case ORDINAL: return "ordinal";
2960            case POLYCHOTOMOUS: return "polychotomous";
2961            case NULL: return null;
2962            default: return "?";
2963          }
2964        }
2965        public String getSystem() {
2966          switch (this) {
2967            case CONTINUOUS: return "http://hl7.org/fhir/variable-handling";
2968            case DICHOTOMOUS: return "http://hl7.org/fhir/variable-handling";
2969            case ORDINAL: return "http://hl7.org/fhir/variable-handling";
2970            case POLYCHOTOMOUS: return "http://hl7.org/fhir/variable-handling";
2971            case NULL: return null;
2972            default: return "?";
2973          }
2974        }
2975        public String getDefinition() {
2976          switch (this) {
2977            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).";
2978            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).";
2979            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).";
2980            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.";
2981            case NULL: return null;
2982            default: return "?";
2983          }
2984        }
2985        public String getDisplay() {
2986          switch (this) {
2987            case CONTINUOUS: return "continuous variable";
2988            case DICHOTOMOUS: return "dichotomous variable";
2989            case ORDINAL: return "ordinal variable";
2990            case POLYCHOTOMOUS: return "polychotomous variable";
2991            case NULL: return null;
2992            default: return "?";
2993          }
2994        }
2995    }
2996
2997  public static class EvidenceVariableHandlingEnumFactory implements EnumFactory<EvidenceVariableHandling> {
2998    public EvidenceVariableHandling fromCode(String codeString) throws IllegalArgumentException {
2999      if (codeString == null || "".equals(codeString))
3000            if (codeString == null || "".equals(codeString))
3001                return null;
3002        if ("continuous".equals(codeString))
3003          return EvidenceVariableHandling.CONTINUOUS;
3004        if ("dichotomous".equals(codeString))
3005          return EvidenceVariableHandling.DICHOTOMOUS;
3006        if ("ordinal".equals(codeString))
3007          return EvidenceVariableHandling.ORDINAL;
3008        if ("polychotomous".equals(codeString))
3009          return EvidenceVariableHandling.POLYCHOTOMOUS;
3010        throw new IllegalArgumentException("Unknown EvidenceVariableHandling code '"+codeString+"'");
3011        }
3012        public Enumeration<EvidenceVariableHandling> fromType(Base code) throws FHIRException {
3013          if (code == null)
3014            return null;
3015          if (code.isEmpty())
3016            return new Enumeration<EvidenceVariableHandling>(this);
3017          String codeString = ((PrimitiveType) code).asStringValue();
3018          if (codeString == null || "".equals(codeString))
3019            return null;
3020        if ("continuous".equals(codeString))
3021          return new Enumeration<EvidenceVariableHandling>(this, EvidenceVariableHandling.CONTINUOUS);
3022        if ("dichotomous".equals(codeString))
3023          return new Enumeration<EvidenceVariableHandling>(this, EvidenceVariableHandling.DICHOTOMOUS);
3024        if ("ordinal".equals(codeString))
3025          return new Enumeration<EvidenceVariableHandling>(this, EvidenceVariableHandling.ORDINAL);
3026        if ("polychotomous".equals(codeString))
3027          return new Enumeration<EvidenceVariableHandling>(this, EvidenceVariableHandling.POLYCHOTOMOUS);
3028        throw new FHIRException("Unknown EvidenceVariableHandling code '"+codeString+"'");
3029        }
3030    public String toCode(EvidenceVariableHandling code) {
3031      if (code == EvidenceVariableHandling.CONTINUOUS)
3032        return "continuous";
3033      if (code == EvidenceVariableHandling.DICHOTOMOUS)
3034        return "dichotomous";
3035      if (code == EvidenceVariableHandling.ORDINAL)
3036        return "ordinal";
3037      if (code == EvidenceVariableHandling.POLYCHOTOMOUS)
3038        return "polychotomous";
3039      return "?";
3040      }
3041    public String toSystem(EvidenceVariableHandling code) {
3042      return code.getSystem();
3043      }
3044    }
3045
3046    public enum FHIRAllTypes {
3047        /**
3048         * 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.
3049         */
3050        ADDRESS, 
3051        /**
3052         * A duration of time during which an organism (or a process) has existed.
3053         */
3054        AGE, 
3055        /**
3056         * A  text note which also  contains information about who made the statement and when.
3057         */
3058        ANNOTATION, 
3059        /**
3060         * For referring to data content defined in other formats.
3061         */
3062        ATTACHMENT, 
3063        /**
3064         * Base definition for all elements that are defined inside a resource - but not those in a data type.
3065         */
3066        BACKBONEELEMENT, 
3067        /**
3068         * Base definition for the few data types that are allowed to carry modifier extensions.
3069         */
3070        BACKBONETYPE, 
3071        /**
3072         * Base definition for all types defined in FHIR type system.
3073         */
3074        BASE, 
3075        /**
3076         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
3077         */
3078        CODEABLECONCEPT, 
3079        /**
3080         * A reference to a resource (by instance), or instead, a reference to a cencept defined in a terminology or ontology (by class).
3081         */
3082        CODEABLEREFERENCE, 
3083        /**
3084         * A reference to a code defined by a terminology system.
3085         */
3086        CODING, 
3087        /**
3088         * Specifies contact information for a person or organization.
3089         */
3090        CONTACTDETAIL, 
3091        /**
3092         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
3093         */
3094        CONTACTPOINT, 
3095        /**
3096         * A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.
3097         */
3098        CONTRIBUTOR, 
3099        /**
3100         * 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.
3101         */
3102        COUNT, 
3103        /**
3104         * Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.
3105         */
3106        DATAREQUIREMENT, 
3107        /**
3108         * The base class for all re-useable types defined as part of the FHIR Specification.
3109         */
3110        DATATYPE, 
3111        /**
3112         * A length - a value with a unit that is a physical distance.
3113         */
3114        DISTANCE, 
3115        /**
3116         * Indicates how the medication is/was taken or should be taken by the patient.
3117         */
3118        DOSAGE, 
3119        /**
3120         * A length of time.
3121         */
3122        DURATION, 
3123        /**
3124         * Base definition for all elements in a resource.
3125         */
3126        ELEMENT, 
3127        /**
3128         * Captures constraints on each element within the resource, profile, or extension.
3129         */
3130        ELEMENTDEFINITION, 
3131        /**
3132         * 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.
3133         */
3134        EXPRESSION, 
3135        /**
3136         * Optional Extension Element - found in all resources.
3137         */
3138        EXTENSION, 
3139        /**
3140         * A human's name with the ability to identify parts and usage.
3141         */
3142        HUMANNAME, 
3143        /**
3144         * An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.
3145         */
3146        IDENTIFIER, 
3147        /**
3148         * 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.
3149         */
3150        MARKETINGSTATUS, 
3151        /**
3152         * 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.
3153         */
3154        META, 
3155        /**
3156         * An amount of economic utility in some recognized currency.
3157         */
3158        MONEY, 
3159        /**
3160         * null
3161         */
3162        MONEYQUANTITY, 
3163        /**
3164         * A human-readable summary of the resource conveying the essential clinical and business information for the resource.
3165         */
3166        NARRATIVE, 
3167        /**
3168         * 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.
3169         */
3170        PARAMETERDEFINITION, 
3171        /**
3172         * A time period defined by a start and end date and optionally time.
3173         */
3174        PERIOD, 
3175        /**
3176         * A populatioof people with some set of grouping criteria.
3177         */
3178        POPULATION, 
3179        /**
3180         * The base type for all re-useable types defined that have a simple property.
3181         */
3182        PRIMITIVETYPE, 
3183        /**
3184         * 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.
3185         */
3186        PRODCHARACTERISTIC, 
3187        /**
3188         * The shelf-life and storage information for a medicinal product item or container can be described using this class.
3189         */
3190        PRODUCTSHELFLIFE, 
3191        /**
3192         * 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.
3193         */
3194        QUANTITY, 
3195        /**
3196         * A set of ordered Quantities defined by a low and high limit.
3197         */
3198        RANGE, 
3199        /**
3200         * A relationship of two Quantity values - expressed as a numerator and a denominator.
3201         */
3202        RATIO, 
3203        /**
3204         * A range of ratios expressed as a low and high numerator and a denominator.
3205         */
3206        RATIORANGE, 
3207        /**
3208         * A reference from one resource to another.
3209         */
3210        REFERENCE, 
3211        /**
3212         * Related artifacts such as additional documentation, justification, or bibliographic references.
3213         */
3214        RELATEDARTIFACT, 
3215        /**
3216         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
3217         */
3218        SAMPLEDDATA, 
3219        /**
3220         * 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.
3221         */
3222        SIGNATURE, 
3223        /**
3224         * null
3225         */
3226        SIMPLEQUANTITY, 
3227        /**
3228         * 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.
3229         */
3230        TIMING, 
3231        /**
3232         * A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.
3233         */
3234        TRIGGERDEFINITION, 
3235        /**
3236         * 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).
3237         */
3238        USAGECONTEXT, 
3239        /**
3240         * A stream of bytes
3241         */
3242        BASE64BINARY, 
3243        /**
3244         * Value of "true" or "false"
3245         */
3246        BOOLEAN, 
3247        /**
3248         * A URI that is a reference to a canonical URL on a FHIR resource
3249         */
3250        CANONICAL, 
3251        /**
3252         * 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
3253         */
3254        CODE, 
3255        /**
3256         * A date or partial date (e.g. just year or year + month). There is no UTC offset. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.
3257         */
3258        DATE, 
3259        /**
3260         * A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a UTC offset 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.
3261         */
3262        DATETIME, 
3263        /**
3264         * A rational number with implicit precision
3265         */
3266        DECIMAL, 
3267        /**
3268         * 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.
3269         */
3270        ID, 
3271        /**
3272         * An instant in time - known at least to the second
3273         */
3274        INSTANT, 
3275        /**
3276         * A whole number
3277         */
3278        INTEGER, 
3279        /**
3280         * A very large whole number
3281         */
3282        INTEGER64, 
3283        /**
3284         * A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine
3285         */
3286        MARKDOWN, 
3287        /**
3288         * An OID represented as a URI
3289         */
3290        OID, 
3291        /**
3292         * An integer with a value that is positive (e.g. >0)
3293         */
3294        POSITIVEINT, 
3295        /**
3296         * A sequence of Unicode characters
3297         */
3298        STRING, 
3299        /**
3300         * A time during the day, with no date specified
3301         */
3302        TIME, 
3303        /**
3304         * An integer with a value that is not negative (e.g. >= 0)
3305         */
3306        UNSIGNEDINT, 
3307        /**
3308         * String of characters used to identify a name or a resource
3309         */
3310        URI, 
3311        /**
3312         * A URI that is a literal reference
3313         */
3314        URL, 
3315        /**
3316         * A UUID, represented as a URI
3317         */
3318        UUID, 
3319        /**
3320         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
3321         */
3322        XHTML, 
3323        /**
3324         * --- Abstract Type! ---This is the base resource type for everything.
3325         */
3326        RESOURCE, 
3327        /**
3328         * 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.
3329         */
3330        BINARY, 
3331        /**
3332         * A container for a collection of resources.
3333         */
3334        BUNDLE, 
3335        /**
3336         * --- Abstract Type! ---A resource that includes narrative, extensions, and contained resources.
3337         */
3338        DOMAINRESOURCE, 
3339        /**
3340         * 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.
3341         */
3342        ACCOUNT, 
3343        /**
3344         * 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).
3345         */
3346        ADMINISTRABLEPRODUCTDEFINITION, 
3347        /**
3348         * An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research subject.  The unintended effects may require additional monitoring, treatment or hospitalization or may result in death.  The AdverseEvent resource also extends to potential or avoided events that could have had such effects.
3349         */
3350        ADVERSEEVENT, 
3351        /**
3352         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
3353         */
3354        ALLERGYINTOLERANCE, 
3355        /**
3356         * 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).
3357         */
3358        APPOINTMENT, 
3359        /**
3360         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
3361         */
3362        APPOINTMENTRESPONSE, 
3363        /**
3364         * A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.
3365         */
3366        AUDITEVENT, 
3367        /**
3368         * 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.
3369         */
3370        BASIC, 
3371        /**
3372         * A biological material originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity.
3373         */
3374        BIOLOGICALLYDERIVEDPRODUCT, 
3375        /**
3376         * 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.
3377         */
3378        BODYSTRUCTURE, 
3379        /**
3380         * --- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.
3381         */
3382        CANONICALRESOURCE, 
3383        /**
3384         * 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.
3385         */
3386        CAPABILITYSTATEMENT, 
3387        /**
3388         * 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.
3389         */
3390        CAPABILITYSTATEMENT2, 
3391        /**
3392         * 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.
3393         */
3394        CODESYSTEM, 
3395        /**
3396         * A compartment definition that defines how resources are accessed on a server.
3397         */
3398        COMPARTMENTDEFINITION, 
3399        /**
3400         * 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.
3401         */
3402        CONCEPTMAP, 
3403        /**
3404         * 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.
3405         */
3406        CONCEPTMAP2, 
3407        /**
3408         * Example of workflow instance.
3409         */
3410        EXAMPLESCENARIO, 
3411        /**
3412         * 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.
3413         */
3414        GRAPHDEFINITION, 
3415        /**
3416         * 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.
3417         */
3418        IMPLEMENTATIONGUIDE, 
3419        /**
3420         * 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.
3421         */
3422        MESSAGEDEFINITION, 
3423        /**
3424         * --- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.
3425         */
3426        METADATARESOURCE, 
3427        /**
3428         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
3429         */
3430        ACTIVITYDEFINITION, 
3431        /**
3432         * This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content.
3433         */
3434        ARTIFACTASSESSMENT, 
3435        /**
3436         * 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.
3437         */
3438        CHARGEITEMDEFINITION, 
3439        /**
3440         * 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.
3441         */
3442        CITATION, 
3443        /**
3444         * A definition of a condition and information relevant to managing it.
3445         */
3446        CONDITIONDEFINITION, 
3447        /**
3448         * The EventDefinition resource provides a reusable description of when a particular event can occur.
3449         */
3450        EVENTDEFINITION, 
3451        /**
3452         * The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.
3453         */
3454        EVIDENCE, 
3455        /**
3456         * The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.
3457         */
3458        EVIDENCEREPORT, 
3459        /**
3460         * The EvidenceVariable resource describes an element that knowledge (Evidence) is about.
3461         */
3462        EVIDENCEVARIABLE, 
3463        /**
3464         * 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.
3465         */
3466        LIBRARY, 
3467        /**
3468         * The Measure resource provides the definition of a quality measure.
3469         */
3470        MEASURE, 
3471        /**
3472         * 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.
3473         */
3474        PLANDEFINITION, 
3475        /**
3476         * 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.
3477         */
3478        QUESTIONNAIRE, 
3479        /**
3480         * 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.
3481         */
3482        NAMINGSYSTEM, 
3483        /**
3484         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
3485         */
3486        OPERATIONDEFINITION, 
3487        /**
3488         * A search parameter that defines a named search item that can be used to search/filter on a resource.
3489         */
3490        SEARCHPARAMETER, 
3491        /**
3492         * 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.
3493         */
3494        STRUCTUREDEFINITION, 
3495        /**
3496         * A Map of relationships between 2 structures that can be used to transform data.
3497         */
3498        STRUCTUREMAP, 
3499        /**
3500         * 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.
3501         */
3502        TERMINOLOGYCAPABILITIES, 
3503        /**
3504         * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
3505         */
3506        TESTSCRIPT, 
3507        /**
3508         * 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).
3509         */
3510        VALUESET, 
3511        /**
3512         * 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.
3513         */
3514        CAREPLAN, 
3515        /**
3516         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care.
3517         */
3518        CARETEAM, 
3519        /**
3520         * 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.
3521         */
3522        CHARGEITEM, 
3523        /**
3524         * 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.
3525         */
3526        CLAIM, 
3527        /**
3528         * This resource provides the adjudication details from the processing of a Claim resource.
3529         */
3530        CLAIMRESPONSE, 
3531        /**
3532         * 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.
3533         */
3534        CLINICALIMPRESSION, 
3535        /**
3536         * A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.
3537         */
3538        CLINICALUSEDEFINITION, 
3539        /**
3540         * A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.
3541         */
3542        CLINICALUSEISSUE, 
3543        /**
3544         * A clinical or business level record of information being transmitted or shared; e.g. an alert that was sent to a responsible provider, a public health agency communication to a provider/reporter in response to a case report for a reportable condition.
3545         */
3546        COMMUNICATION, 
3547        /**
3548         * 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.
3549         */
3550        COMMUNICATIONREQUEST, 
3551        /**
3552         * 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.).
3553         */
3554        COMPOSITION, 
3555        /**
3556         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
3557         */
3558        CONDITION, 
3559        /**
3560         * A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, 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.
3561         */
3562        CONSENT, 
3563        /**
3564         * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.
3565         */
3566        CONTRACT, 
3567        /**
3568         * Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.
3569         */
3570        COVERAGE, 
3571        /**
3572         * 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.
3573         */
3574        COVERAGEELIGIBILITYREQUEST, 
3575        /**
3576         * This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.
3577         */
3578        COVERAGEELIGIBILITYRESPONSE, 
3579        /**
3580         * 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.
3581         */
3582        DETECTEDISSUE, 
3583        /**
3584         * This resource describes the properties (regulated, has real time clock, etc.), adminstrative (manufacturer name, model number, serial number, firmware, etc), and type (knee replacement, blood pressure cuff, MRI, etc.) of a physical unit (these values do not change much within a given module, for example the serail number, manufacturer name, and model number). An actual unit may consist of several modules in a distinct hierarchy and these are represented by multiple Device resources and bound through the 'parent' element.
3585         */
3586        DEVICE, 
3587        /**
3588         * This is a specialized resource that defines the characteristics and capabilities of a device.
3589         */
3590        DEVICEDEFINITION, 
3591        /**
3592         * Indicates that a device is to be or has been dispensed for a named person/patient.  This includes a description of the product (supply) provided and the instructions for using the device.
3593         */
3594        DEVICEDISPENSE, 
3595        /**
3596         * Describes a measurement, calculation or setting capability of a medical device.
3597         */
3598        DEVICEMETRIC, 
3599        /**
3600         * Represents a request a device to be provided to a specific patient. The device may be an implantable device to be subsequently implanted, or an external assistive device, such as a walker, to be delivered and subsequently be used.
3601         */
3602        DEVICEREQUEST, 
3603        /**
3604         * A record of a device being used by a patient where the record is the result of a report from the patient or a clinician.
3605         */
3606        DEVICEUSAGE, 
3607        /**
3608         * The findings and interpretation of diagnostic tests performed on patients, groups of patients, products, substances, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. The report also includes non-clinical context such as batch analysis and stability reporting of products and substances.
3609         */
3610        DIAGNOSTICREPORT, 
3611        /**
3612         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
3613         */
3614        DOCUMENTMANIFEST, 
3615        /**
3616         * A reference to a document of any kind for any purpose. While the term “document” implies a more narrow focus, for this resource this "document" encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference.
3617         */
3618        DOCUMENTREFERENCE, 
3619        /**
3620         * 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.
3621         */
3622        ENCOUNTER, 
3623        /**
3624         * 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.
3625         */
3626        ENDPOINT, 
3627        /**
3628         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
3629         */
3630        ENROLLMENTREQUEST, 
3631        /**
3632         * This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.
3633         */
3634        ENROLLMENTRESPONSE, 
3635        /**
3636         * 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.
3637         */
3638        EPISODEOFCARE, 
3639        /**
3640         * 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.
3641         */
3642        EXPLANATIONOFBENEFIT, 
3643        /**
3644         * Significant health conditions for a person related to the patient relevant in the context of care for the patient.
3645         */
3646        FAMILYMEMBERHISTORY, 
3647        /**
3648         * Prospective warnings of potential issues when providing care to the patient.
3649         */
3650        FLAG, 
3651        /**
3652         * 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.
3653         */
3654        GOAL, 
3655        /**
3656         * 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.
3657         */
3658        GROUP, 
3659        /**
3660         * 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.
3661         */
3662        GUIDANCERESPONSE, 
3663        /**
3664         * The details of a healthcare service available at a location.
3665         */
3666        HEALTHCARESERVICE, 
3667        /**
3668         * A selection of DICOM SOP instances and/or frames within a single Study and Series. This might include additional specifics such as an image region, an Observation UID or a Segmentation Number, allowing linkage to an Observation Resource or transferring this information along with the ImagingStudy Resource.
3669         */
3670        IMAGINGSELECTION, 
3671        /**
3672         * 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.
3673         */
3674        IMAGINGSTUDY, 
3675        /**
3676         * 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.
3677         */
3678        IMMUNIZATION, 
3679        /**
3680         * Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those  recommendations.
3681         */
3682        IMMUNIZATIONEVALUATION, 
3683        /**
3684         * A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.
3685         */
3686        IMMUNIZATIONRECOMMENDATION, 
3687        /**
3688         * An ingredient of a manufactured item or pharmaceutical product.
3689         */
3690        INGREDIENT, 
3691        /**
3692         * Details of a Health Insurance product/plan provided by an organization.
3693         */
3694        INSURANCEPLAN, 
3695        /**
3696         * A report of inventory or stock items.
3697         */
3698        INVENTORYREPORT, 
3699        /**
3700         * Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.
3701         */
3702        INVOICE, 
3703        /**
3704         * Identifies two or more records (resource instances) that refer to the same real-world "occurrence".
3705         */
3706        LINKAGE, 
3707        /**
3708         * A list is a curated collection of resources.
3709         */
3710        LIST, 
3711        /**
3712         * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.
3713         */
3714        LOCATION, 
3715        /**
3716         * The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.
3717         */
3718        MANUFACTUREDITEMDEFINITION, 
3719        /**
3720         * The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.
3721         */
3722        MEASUREREPORT, 
3723        /**
3724         * This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.
3725         */
3726        MEDICATION, 
3727        /**
3728         * 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.
3729         */
3730        MEDICATIONADMINISTRATION, 
3731        /**
3732         * 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.
3733         */
3734        MEDICATIONDISPENSE, 
3735        /**
3736         * Information about a medication that is used to support knowledge.
3737         */
3738        MEDICATIONKNOWLEDGE, 
3739        /**
3740         * 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.
3741         */
3742        MEDICATIONREQUEST, 
3743        /**
3744         * A record of a medication that is being consumed by a patient.   A MedicationUsage 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. 
3745
3746The primary difference between a medicationusage and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medicationusage 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 Usage 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.
3747         */
3748        MEDICATIONUSAGE, 
3749        /**
3750         * Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use, drug catalogs).
3751         */
3752        MEDICINALPRODUCTDEFINITION, 
3753        /**
3754         * 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.
3755         */
3756        MESSAGEHEADER, 
3757        /**
3758         * Raw data describing a biological sequence.
3759         */
3760        MOLECULARSEQUENCE, 
3761        /**
3762         * A record of food or fluid that is being consumed by a patient.   A NutritionIntake may indicate that the patient may be consuming the food or fluid now or has consumed the food or fluid in the past.  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 or through an app that tracks food or fluids consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label,  or from a clinician documenting observed intake.
3763         */
3764        NUTRITIONINTAKE, 
3765        /**
3766         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
3767         */
3768        NUTRITIONORDER, 
3769        /**
3770         * A food or fluid product that is consumed by patients.
3771         */
3772        NUTRITIONPRODUCT, 
3773        /**
3774         * Measurements and simple assertions made about a patient, device or other subject.
3775         */
3776        OBSERVATION, 
3777        /**
3778         * Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.
3779         */
3780        OBSERVATIONDEFINITION, 
3781        /**
3782         * A collection of error, warning, or information messages that result from a system action.
3783         */
3784        OPERATIONOUTCOME, 
3785        /**
3786         * 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.
3787         */
3788        ORGANIZATION, 
3789        /**
3790         * Defines an affiliation/assotiation/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship.
3791         */
3792        ORGANIZATIONAFFILIATION, 
3793        /**
3794         * A medically related item or items, in a container or package.
3795         */
3796        PACKAGEDPRODUCTDEFINITION, 
3797        /**
3798         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
3799         */
3800        PATIENT, 
3801        /**
3802         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
3803         */
3804        PAYMENTNOTICE, 
3805        /**
3806         * This resource provides the details including amount of a payment and allocates the payment items being paid.
3807         */
3808        PAYMENTRECONCILIATION, 
3809        /**
3810         * Permission.
3811         */
3812        PERMISSION, 
3813        /**
3814         * Demographics and administrative information about a person independent of a specific health-related context.
3815         */
3816        PERSON, 
3817        /**
3818         * A person who is directly or indirectly involved in the provisioning of healthcare.
3819         */
3820        PRACTITIONER, 
3821        /**
3822         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
3823         */
3824        PRACTITIONERROLE, 
3825        /**
3826         * An action that is or was performed on or for a patient, practitioner, device, organization, or location. For example, this can be a physical intervention on a patient like an operation, or less invasive like long term services, counseling, or hypnotherapy.  This can be a quality or safety inspection for a location, organization, or device.  This can be an accreditation procedure on a practitioner for licensing.
3827         */
3828        PROCEDURE, 
3829        /**
3830         * 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.
3831         */
3832        PROVENANCE, 
3833        /**
3834         * 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.
3835         */
3836        QUESTIONNAIRERESPONSE, 
3837        /**
3838         * 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.
3839         */
3840        REGULATEDAUTHORIZATION, 
3841        /**
3842         * 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.
3843         */
3844        RELATEDPERSON, 
3845        /**
3846         * 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".
3847         */
3848        REQUESTGROUP, 
3849        /**
3850         * 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.
3851         */
3852        RESEARCHSTUDY, 
3853        /**
3854         * A physical entity which is the primary unit of operational and/or administrative interest in a study.
3855         */
3856        RESEARCHSUBJECT, 
3857        /**
3858         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
3859         */
3860        RISKASSESSMENT, 
3861        /**
3862         * A container for slots of time that may be available for booking appointments.
3863         */
3864        SCHEDULE, 
3865        /**
3866         * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.
3867         */
3868        SERVICEREQUEST, 
3869        /**
3870         * A slot of time on a schedule that may be available for booking appointments.
3871         */
3872        SLOT, 
3873        /**
3874         * A sample to be used for analysis.
3875         */
3876        SPECIMEN, 
3877        /**
3878         * A kind of specimen with associated set of requirements.
3879         */
3880        SPECIMENDEFINITION, 
3881        /**
3882         * The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.
3883         */
3884        SUBSCRIPTION, 
3885        /**
3886         * The SubscriptionStatus resource describes the state of a Subscription during notifications.
3887         */
3888        SUBSCRIPTIONSTATUS, 
3889        /**
3890         * Describes a stream of resource state changes identified by trigger criteria and annotated with labels useful to filter projections from this topic.
3891         */
3892        SUBSCRIPTIONTOPIC, 
3893        /**
3894         * A homogeneous material with a definite composition.
3895         */
3896        SUBSTANCE, 
3897        /**
3898         * The detailed description of a substance, typically at a level beyond what is used for prescribing.
3899         */
3900        SUBSTANCEDEFINITION, 
3901        /**
3902         * Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction.
3903         */
3904        SUBSTANCENUCLEICACID, 
3905        /**
3906         * Properties of a substance specific to it being a polymer.
3907         */
3908        SUBSTANCEPOLYMER, 
3909        /**
3910         * A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators.
3911         */
3912        SUBSTANCEPROTEIN, 
3913        /**
3914         * Todo.
3915         */
3916        SUBSTANCEREFERENCEINFORMATION, 
3917        /**
3918         * Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex.
3919         */
3920        SUBSTANCESOURCEMATERIAL, 
3921        /**
3922         * Record of delivery of what is supplied.
3923         */
3924        SUPPLYDELIVERY, 
3925        /**
3926         * A record of a non-patient specific request for a medication, substance, device, certain types of biologically derived product, and nutrition product used in the healthcare setting.
3927         */
3928        SUPPLYREQUEST, 
3929        /**
3930         * A task to be performed.
3931         */
3932        TASK, 
3933        /**
3934         * A summary of information based on the results of executing a TestScript.
3935         */
3936        TESTREPORT, 
3937        /**
3938         * Describes validation requirements, source(s), status and dates for one or more elements.
3939         */
3940        VERIFICATIONRESULT, 
3941        /**
3942         * An authorization for the provision of glasses and/or contact lenses to a patient.
3943         */
3944        VISIONPRESCRIPTION, 
3945        /**
3946         * 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.
3947         */
3948        PARAMETERS, 
3949        /**
3950         * A place holder that means any kind of data type
3951         */
3952        TYPE, 
3953        /**
3954         * A place holder that means any kind of resource
3955         */
3956        ANY, 
3957        /**
3958         * added to help the parsers
3959         */
3960        NULL;
3961        public static FHIRAllTypes fromCode(String codeString) throws FHIRException {
3962            if (codeString == null || "".equals(codeString))
3963                return null;
3964        if ("Address".equals(codeString))
3965          return ADDRESS;
3966        if ("Age".equals(codeString))
3967          return AGE;
3968        if ("Annotation".equals(codeString))
3969          return ANNOTATION;
3970        if ("Attachment".equals(codeString))
3971          return ATTACHMENT;
3972        if ("BackboneElement".equals(codeString))
3973          return BACKBONEELEMENT;
3974        if ("BackboneType".equals(codeString))
3975          return BACKBONETYPE;
3976        if ("Base".equals(codeString))
3977          return BASE;
3978        if ("CodeableConcept".equals(codeString))
3979          return CODEABLECONCEPT;
3980        if ("CodeableReference".equals(codeString))
3981          return CODEABLEREFERENCE;
3982        if ("Coding".equals(codeString))
3983          return CODING;
3984        if ("ContactDetail".equals(codeString))
3985          return CONTACTDETAIL;
3986        if ("ContactPoint".equals(codeString))
3987          return CONTACTPOINT;
3988        if ("Contributor".equals(codeString))
3989          return CONTRIBUTOR;
3990        if ("Count".equals(codeString))
3991          return COUNT;
3992        if ("DataRequirement".equals(codeString))
3993          return DATAREQUIREMENT;
3994        if ("DataType".equals(codeString))
3995          return DATATYPE;
3996        if ("Distance".equals(codeString))
3997          return DISTANCE;
3998        if ("Dosage".equals(codeString))
3999          return DOSAGE;
4000        if ("Duration".equals(codeString))
4001          return DURATION;
4002        if ("Element".equals(codeString))
4003          return ELEMENT;
4004        if ("ElementDefinition".equals(codeString))
4005          return ELEMENTDEFINITION;
4006        if ("Expression".equals(codeString))
4007          return EXPRESSION;
4008        if ("Extension".equals(codeString))
4009          return EXTENSION;
4010        if ("HumanName".equals(codeString))
4011          return HUMANNAME;
4012        if ("Identifier".equals(codeString))
4013          return IDENTIFIER;
4014        if ("MarketingStatus".equals(codeString))
4015          return MARKETINGSTATUS;
4016        if ("Meta".equals(codeString))
4017          return META;
4018        if ("Money".equals(codeString))
4019          return MONEY;
4020        if ("MoneyQuantity".equals(codeString))
4021          return MONEYQUANTITY;
4022        if ("Narrative".equals(codeString))
4023          return NARRATIVE;
4024        if ("ParameterDefinition".equals(codeString))
4025          return PARAMETERDEFINITION;
4026        if ("Period".equals(codeString))
4027          return PERIOD;
4028        if ("Population".equals(codeString))
4029          return POPULATION;
4030        if ("PrimitiveType".equals(codeString))
4031          return PRIMITIVETYPE;
4032        if ("ProdCharacteristic".equals(codeString))
4033          return PRODCHARACTERISTIC;
4034        if ("ProductShelfLife".equals(codeString))
4035          return PRODUCTSHELFLIFE;
4036        if ("Quantity".equals(codeString))
4037          return QUANTITY;
4038        if ("Range".equals(codeString))
4039          return RANGE;
4040        if ("Ratio".equals(codeString))
4041          return RATIO;
4042        if ("RatioRange".equals(codeString))
4043          return RATIORANGE;
4044        if ("Reference".equals(codeString))
4045          return REFERENCE;
4046        if ("RelatedArtifact".equals(codeString))
4047          return RELATEDARTIFACT;
4048        if ("SampledData".equals(codeString))
4049          return SAMPLEDDATA;
4050        if ("Signature".equals(codeString))
4051          return SIGNATURE;
4052        if ("SimpleQuantity".equals(codeString))
4053          return SIMPLEQUANTITY;
4054        if ("Timing".equals(codeString))
4055          return TIMING;
4056        if ("TriggerDefinition".equals(codeString))
4057          return TRIGGERDEFINITION;
4058        if ("UsageContext".equals(codeString))
4059          return USAGECONTEXT;
4060        if ("base64Binary".equals(codeString))
4061          return BASE64BINARY;
4062        if ("boolean".equals(codeString))
4063          return BOOLEAN;
4064        if ("canonical".equals(codeString))
4065          return CANONICAL;
4066        if ("code".equals(codeString))
4067          return CODE;
4068        if ("date".equals(codeString))
4069          return DATE;
4070        if ("dateTime".equals(codeString))
4071          return DATETIME;
4072        if ("decimal".equals(codeString))
4073          return DECIMAL;
4074        if ("id".equals(codeString))
4075          return ID;
4076        if ("instant".equals(codeString))
4077          return INSTANT;
4078        if ("integer".equals(codeString))
4079          return INTEGER;
4080        if ("integer64".equals(codeString))
4081          return INTEGER64;
4082        if ("markdown".equals(codeString))
4083          return MARKDOWN;
4084        if ("oid".equals(codeString))
4085          return OID;
4086        if ("positiveInt".equals(codeString))
4087          return POSITIVEINT;
4088        if ("string".equals(codeString))
4089          return STRING;
4090        if ("time".equals(codeString))
4091          return TIME;
4092        if ("unsignedInt".equals(codeString))
4093          return UNSIGNEDINT;
4094        if ("uri".equals(codeString))
4095          return URI;
4096        if ("url".equals(codeString))
4097          return URL;
4098        if ("uuid".equals(codeString))
4099          return UUID;
4100        if ("xhtml".equals(codeString))
4101          return XHTML;
4102        if ("Resource".equals(codeString))
4103          return RESOURCE;
4104        if ("Binary".equals(codeString))
4105          return BINARY;
4106        if ("Bundle".equals(codeString))
4107          return BUNDLE;
4108        if ("DomainResource".equals(codeString))
4109          return DOMAINRESOURCE;
4110        if ("Account".equals(codeString))
4111          return ACCOUNT;
4112        if ("AdministrableProductDefinition".equals(codeString))
4113          return ADMINISTRABLEPRODUCTDEFINITION;
4114        if ("AdverseEvent".equals(codeString))
4115          return ADVERSEEVENT;
4116        if ("AllergyIntolerance".equals(codeString))
4117          return ALLERGYINTOLERANCE;
4118        if ("Appointment".equals(codeString))
4119          return APPOINTMENT;
4120        if ("AppointmentResponse".equals(codeString))
4121          return APPOINTMENTRESPONSE;
4122        if ("AuditEvent".equals(codeString))
4123          return AUDITEVENT;
4124        if ("Basic".equals(codeString))
4125          return BASIC;
4126        if ("BiologicallyDerivedProduct".equals(codeString))
4127          return BIOLOGICALLYDERIVEDPRODUCT;
4128        if ("BodyStructure".equals(codeString))
4129          return BODYSTRUCTURE;
4130        if ("CanonicalResource".equals(codeString))
4131          return CANONICALRESOURCE;
4132        if ("CapabilityStatement".equals(codeString))
4133          return CAPABILITYSTATEMENT;
4134        if ("CapabilityStatement2".equals(codeString))
4135          return CAPABILITYSTATEMENT2;
4136        if ("CodeSystem".equals(codeString))
4137          return CODESYSTEM;
4138        if ("CompartmentDefinition".equals(codeString))
4139          return COMPARTMENTDEFINITION;
4140        if ("ConceptMap".equals(codeString))
4141          return CONCEPTMAP;
4142        if ("ConceptMap2".equals(codeString))
4143          return CONCEPTMAP2;
4144        if ("ExampleScenario".equals(codeString))
4145          return EXAMPLESCENARIO;
4146        if ("GraphDefinition".equals(codeString))
4147          return GRAPHDEFINITION;
4148        if ("ImplementationGuide".equals(codeString))
4149          return IMPLEMENTATIONGUIDE;
4150        if ("MessageDefinition".equals(codeString))
4151          return MESSAGEDEFINITION;
4152        if ("MetadataResource".equals(codeString))
4153          return METADATARESOURCE;
4154        if ("ActivityDefinition".equals(codeString))
4155          return ACTIVITYDEFINITION;
4156        if ("ArtifactAssessment".equals(codeString))
4157          return ARTIFACTASSESSMENT;
4158        if ("ChargeItemDefinition".equals(codeString))
4159          return CHARGEITEMDEFINITION;
4160        if ("Citation".equals(codeString))
4161          return CITATION;
4162        if ("ConditionDefinition".equals(codeString))
4163          return CONDITIONDEFINITION;
4164        if ("EventDefinition".equals(codeString))
4165          return EVENTDEFINITION;
4166        if ("Evidence".equals(codeString))
4167          return EVIDENCE;
4168        if ("EvidenceReport".equals(codeString))
4169          return EVIDENCEREPORT;
4170        if ("EvidenceVariable".equals(codeString))
4171          return EVIDENCEVARIABLE;
4172        if ("Library".equals(codeString))
4173          return LIBRARY;
4174        if ("Measure".equals(codeString))
4175          return MEASURE;
4176        if ("PlanDefinition".equals(codeString))
4177          return PLANDEFINITION;
4178        if ("Questionnaire".equals(codeString))
4179          return QUESTIONNAIRE;
4180        if ("NamingSystem".equals(codeString))
4181          return NAMINGSYSTEM;
4182        if ("OperationDefinition".equals(codeString))
4183          return OPERATIONDEFINITION;
4184        if ("SearchParameter".equals(codeString))
4185          return SEARCHPARAMETER;
4186        if ("StructureDefinition".equals(codeString))
4187          return STRUCTUREDEFINITION;
4188        if ("StructureMap".equals(codeString))
4189          return STRUCTUREMAP;
4190        if ("TerminologyCapabilities".equals(codeString))
4191          return TERMINOLOGYCAPABILITIES;
4192        if ("TestScript".equals(codeString))
4193          return TESTSCRIPT;
4194        if ("ValueSet".equals(codeString))
4195          return VALUESET;
4196        if ("CarePlan".equals(codeString))
4197          return CAREPLAN;
4198        if ("CareTeam".equals(codeString))
4199          return CARETEAM;
4200        if ("ChargeItem".equals(codeString))
4201          return CHARGEITEM;
4202        if ("Claim".equals(codeString))
4203          return CLAIM;
4204        if ("ClaimResponse".equals(codeString))
4205          return CLAIMRESPONSE;
4206        if ("ClinicalImpression".equals(codeString))
4207          return CLINICALIMPRESSION;
4208        if ("ClinicalUseDefinition".equals(codeString))
4209          return CLINICALUSEDEFINITION;
4210        if ("ClinicalUseIssue".equals(codeString))
4211          return CLINICALUSEISSUE;
4212        if ("Communication".equals(codeString))
4213          return COMMUNICATION;
4214        if ("CommunicationRequest".equals(codeString))
4215          return COMMUNICATIONREQUEST;
4216        if ("Composition".equals(codeString))
4217          return COMPOSITION;
4218        if ("Condition".equals(codeString))
4219          return CONDITION;
4220        if ("Consent".equals(codeString))
4221          return CONSENT;
4222        if ("Contract".equals(codeString))
4223          return CONTRACT;
4224        if ("Coverage".equals(codeString))
4225          return COVERAGE;
4226        if ("CoverageEligibilityRequest".equals(codeString))
4227          return COVERAGEELIGIBILITYREQUEST;
4228        if ("CoverageEligibilityResponse".equals(codeString))
4229          return COVERAGEELIGIBILITYRESPONSE;
4230        if ("DetectedIssue".equals(codeString))
4231          return DETECTEDISSUE;
4232        if ("Device".equals(codeString))
4233          return DEVICE;
4234        if ("DeviceDefinition".equals(codeString))
4235          return DEVICEDEFINITION;
4236        if ("DeviceDispense".equals(codeString))
4237          return DEVICEDISPENSE;
4238        if ("DeviceMetric".equals(codeString))
4239          return DEVICEMETRIC;
4240        if ("DeviceRequest".equals(codeString))
4241          return DEVICEREQUEST;
4242        if ("DeviceUsage".equals(codeString))
4243          return DEVICEUSAGE;
4244        if ("DiagnosticReport".equals(codeString))
4245          return DIAGNOSTICREPORT;
4246        if ("DocumentManifest".equals(codeString))
4247          return DOCUMENTMANIFEST;
4248        if ("DocumentReference".equals(codeString))
4249          return DOCUMENTREFERENCE;
4250        if ("Encounter".equals(codeString))
4251          return ENCOUNTER;
4252        if ("Endpoint".equals(codeString))
4253          return ENDPOINT;
4254        if ("EnrollmentRequest".equals(codeString))
4255          return ENROLLMENTREQUEST;
4256        if ("EnrollmentResponse".equals(codeString))
4257          return ENROLLMENTRESPONSE;
4258        if ("EpisodeOfCare".equals(codeString))
4259          return EPISODEOFCARE;
4260        if ("ExplanationOfBenefit".equals(codeString))
4261          return EXPLANATIONOFBENEFIT;
4262        if ("FamilyMemberHistory".equals(codeString))
4263          return FAMILYMEMBERHISTORY;
4264        if ("Flag".equals(codeString))
4265          return FLAG;
4266        if ("Goal".equals(codeString))
4267          return GOAL;
4268        if ("Group".equals(codeString))
4269          return GROUP;
4270        if ("GuidanceResponse".equals(codeString))
4271          return GUIDANCERESPONSE;
4272        if ("HealthcareService".equals(codeString))
4273          return HEALTHCARESERVICE;
4274        if ("ImagingSelection".equals(codeString))
4275          return IMAGINGSELECTION;
4276        if ("ImagingStudy".equals(codeString))
4277          return IMAGINGSTUDY;
4278        if ("Immunization".equals(codeString))
4279          return IMMUNIZATION;
4280        if ("ImmunizationEvaluation".equals(codeString))
4281          return IMMUNIZATIONEVALUATION;
4282        if ("ImmunizationRecommendation".equals(codeString))
4283          return IMMUNIZATIONRECOMMENDATION;
4284        if ("Ingredient".equals(codeString))
4285          return INGREDIENT;
4286        if ("InsurancePlan".equals(codeString))
4287          return INSURANCEPLAN;
4288        if ("InventoryReport".equals(codeString))
4289          return INVENTORYREPORT;
4290        if ("Invoice".equals(codeString))
4291          return INVOICE;
4292        if ("Linkage".equals(codeString))
4293          return LINKAGE;
4294        if ("List".equals(codeString))
4295          return LIST;
4296        if ("Location".equals(codeString))
4297          return LOCATION;
4298        if ("ManufacturedItemDefinition".equals(codeString))
4299          return MANUFACTUREDITEMDEFINITION;
4300        if ("MeasureReport".equals(codeString))
4301          return MEASUREREPORT;
4302        if ("Medication".equals(codeString))
4303          return MEDICATION;
4304        if ("MedicationAdministration".equals(codeString))
4305          return MEDICATIONADMINISTRATION;
4306        if ("MedicationDispense".equals(codeString))
4307          return MEDICATIONDISPENSE;
4308        if ("MedicationKnowledge".equals(codeString))
4309          return MEDICATIONKNOWLEDGE;
4310        if ("MedicationRequest".equals(codeString))
4311          return MEDICATIONREQUEST;
4312        if ("MedicationUsage".equals(codeString))
4313          return MEDICATIONUSAGE;
4314        if ("MedicinalProductDefinition".equals(codeString))
4315          return MEDICINALPRODUCTDEFINITION;
4316        if ("MessageHeader".equals(codeString))
4317          return MESSAGEHEADER;
4318        if ("MolecularSequence".equals(codeString))
4319          return MOLECULARSEQUENCE;
4320        if ("NutritionIntake".equals(codeString))
4321          return NUTRITIONINTAKE;
4322        if ("NutritionOrder".equals(codeString))
4323          return NUTRITIONORDER;
4324        if ("NutritionProduct".equals(codeString))
4325          return NUTRITIONPRODUCT;
4326        if ("Observation".equals(codeString))
4327          return OBSERVATION;
4328        if ("ObservationDefinition".equals(codeString))
4329          return OBSERVATIONDEFINITION;
4330        if ("OperationOutcome".equals(codeString))
4331          return OPERATIONOUTCOME;
4332        if ("Organization".equals(codeString))
4333          return ORGANIZATION;
4334        if ("OrganizationAffiliation".equals(codeString))
4335          return ORGANIZATIONAFFILIATION;
4336        if ("PackagedProductDefinition".equals(codeString))
4337          return PACKAGEDPRODUCTDEFINITION;
4338        if ("Patient".equals(codeString))
4339          return PATIENT;
4340        if ("PaymentNotice".equals(codeString))
4341          return PAYMENTNOTICE;
4342        if ("PaymentReconciliation".equals(codeString))
4343          return PAYMENTRECONCILIATION;
4344        if ("Permission".equals(codeString))
4345          return PERMISSION;
4346        if ("Person".equals(codeString))
4347          return PERSON;
4348        if ("Practitioner".equals(codeString))
4349          return PRACTITIONER;
4350        if ("PractitionerRole".equals(codeString))
4351          return PRACTITIONERROLE;
4352        if ("Procedure".equals(codeString))
4353          return PROCEDURE;
4354        if ("Provenance".equals(codeString))
4355          return PROVENANCE;
4356        if ("QuestionnaireResponse".equals(codeString))
4357          return QUESTIONNAIRERESPONSE;
4358        if ("RegulatedAuthorization".equals(codeString))
4359          return REGULATEDAUTHORIZATION;
4360        if ("RelatedPerson".equals(codeString))
4361          return RELATEDPERSON;
4362        if ("RequestGroup".equals(codeString))
4363          return REQUESTGROUP;
4364        if ("ResearchStudy".equals(codeString))
4365          return RESEARCHSTUDY;
4366        if ("ResearchSubject".equals(codeString))
4367          return RESEARCHSUBJECT;
4368        if ("RiskAssessment".equals(codeString))
4369          return RISKASSESSMENT;
4370        if ("Schedule".equals(codeString))
4371          return SCHEDULE;
4372        if ("ServiceRequest".equals(codeString))
4373          return SERVICEREQUEST;
4374        if ("Slot".equals(codeString))
4375          return SLOT;
4376        if ("Specimen".equals(codeString))
4377          return SPECIMEN;
4378        if ("SpecimenDefinition".equals(codeString))
4379          return SPECIMENDEFINITION;
4380        if ("Subscription".equals(codeString))
4381          return SUBSCRIPTION;
4382        if ("SubscriptionStatus".equals(codeString))
4383          return SUBSCRIPTIONSTATUS;
4384        if ("SubscriptionTopic".equals(codeString))
4385          return SUBSCRIPTIONTOPIC;
4386        if ("Substance".equals(codeString))
4387          return SUBSTANCE;
4388        if ("SubstanceDefinition".equals(codeString))
4389          return SUBSTANCEDEFINITION;
4390        if ("SubstanceNucleicAcid".equals(codeString))
4391          return SUBSTANCENUCLEICACID;
4392        if ("SubstancePolymer".equals(codeString))
4393          return SUBSTANCEPOLYMER;
4394        if ("SubstanceProtein".equals(codeString))
4395          return SUBSTANCEPROTEIN;
4396        if ("SubstanceReferenceInformation".equals(codeString))
4397          return SUBSTANCEREFERENCEINFORMATION;
4398        if ("SubstanceSourceMaterial".equals(codeString))
4399          return SUBSTANCESOURCEMATERIAL;
4400        if ("SupplyDelivery".equals(codeString))
4401          return SUPPLYDELIVERY;
4402        if ("SupplyRequest".equals(codeString))
4403          return SUPPLYREQUEST;
4404        if ("Task".equals(codeString))
4405          return TASK;
4406        if ("TestReport".equals(codeString))
4407          return TESTREPORT;
4408        if ("VerificationResult".equals(codeString))
4409          return VERIFICATIONRESULT;
4410        if ("VisionPrescription".equals(codeString))
4411          return VISIONPRESCRIPTION;
4412        if ("Parameters".equals(codeString))
4413          return PARAMETERS;
4414        if ("Type".equals(codeString))
4415          return TYPE;
4416        if ("Any".equals(codeString))
4417          return ANY;
4418        throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'");
4419        }
4420        public String toCode() {
4421          switch (this) {
4422            case ADDRESS: return "Address";
4423            case AGE: return "Age";
4424            case ANNOTATION: return "Annotation";
4425            case ATTACHMENT: return "Attachment";
4426            case BACKBONEELEMENT: return "BackboneElement";
4427            case BACKBONETYPE: return "BackboneType";
4428            case BASE: return "Base";
4429            case CODEABLECONCEPT: return "CodeableConcept";
4430            case CODEABLEREFERENCE: return "CodeableReference";
4431            case CODING: return "Coding";
4432            case CONTACTDETAIL: return "ContactDetail";
4433            case CONTACTPOINT: return "ContactPoint";
4434            case CONTRIBUTOR: return "Contributor";
4435            case COUNT: return "Count";
4436            case DATAREQUIREMENT: return "DataRequirement";
4437            case DATATYPE: return "DataType";
4438            case DISTANCE: return "Distance";
4439            case DOSAGE: return "Dosage";
4440            case DURATION: return "Duration";
4441            case ELEMENT: return "Element";
4442            case ELEMENTDEFINITION: return "ElementDefinition";
4443            case EXPRESSION: return "Expression";
4444            case EXTENSION: return "Extension";
4445            case HUMANNAME: return "HumanName";
4446            case IDENTIFIER: return "Identifier";
4447            case MARKETINGSTATUS: return "MarketingStatus";
4448            case META: return "Meta";
4449            case MONEY: return "Money";
4450            case MONEYQUANTITY: return "MoneyQuantity";
4451            case NARRATIVE: return "Narrative";
4452            case PARAMETERDEFINITION: return "ParameterDefinition";
4453            case PERIOD: return "Period";
4454            case POPULATION: return "Population";
4455            case PRIMITIVETYPE: return "PrimitiveType";
4456            case PRODCHARACTERISTIC: return "ProdCharacteristic";
4457            case PRODUCTSHELFLIFE: return "ProductShelfLife";
4458            case QUANTITY: return "Quantity";
4459            case RANGE: return "Range";
4460            case RATIO: return "Ratio";
4461            case RATIORANGE: return "RatioRange";
4462            case REFERENCE: return "Reference";
4463            case RELATEDARTIFACT: return "RelatedArtifact";
4464            case SAMPLEDDATA: return "SampledData";
4465            case SIGNATURE: return "Signature";
4466            case SIMPLEQUANTITY: return "SimpleQuantity";
4467            case TIMING: return "Timing";
4468            case TRIGGERDEFINITION: return "TriggerDefinition";
4469            case USAGECONTEXT: return "UsageContext";
4470            case BASE64BINARY: return "base64Binary";
4471            case BOOLEAN: return "boolean";
4472            case CANONICAL: return "canonical";
4473            case CODE: return "code";
4474            case DATE: return "date";
4475            case DATETIME: return "dateTime";
4476            case DECIMAL: return "decimal";
4477            case ID: return "id";
4478            case INSTANT: return "instant";
4479            case INTEGER: return "integer";
4480            case INTEGER64: return "integer64";
4481            case MARKDOWN: return "markdown";
4482            case OID: return "oid";
4483            case POSITIVEINT: return "positiveInt";
4484            case STRING: return "string";
4485            case TIME: return "time";
4486            case UNSIGNEDINT: return "unsignedInt";
4487            case URI: return "uri";
4488            case URL: return "url";
4489            case UUID: return "uuid";
4490            case XHTML: return "xhtml";
4491            case RESOURCE: return "Resource";
4492            case BINARY: return "Binary";
4493            case BUNDLE: return "Bundle";
4494            case DOMAINRESOURCE: return "DomainResource";
4495            case ACCOUNT: return "Account";
4496            case ADMINISTRABLEPRODUCTDEFINITION: return "AdministrableProductDefinition";
4497            case ADVERSEEVENT: return "AdverseEvent";
4498            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
4499            case APPOINTMENT: return "Appointment";
4500            case APPOINTMENTRESPONSE: return "AppointmentResponse";
4501            case AUDITEVENT: return "AuditEvent";
4502            case BASIC: return "Basic";
4503            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
4504            case BODYSTRUCTURE: return "BodyStructure";
4505            case CANONICALRESOURCE: return "CanonicalResource";
4506            case CAPABILITYSTATEMENT: return "CapabilityStatement";
4507            case CAPABILITYSTATEMENT2: return "CapabilityStatement2";
4508            case CODESYSTEM: return "CodeSystem";
4509            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
4510            case CONCEPTMAP: return "ConceptMap";
4511            case CONCEPTMAP2: return "ConceptMap2";
4512            case EXAMPLESCENARIO: return "ExampleScenario";
4513            case GRAPHDEFINITION: return "GraphDefinition";
4514            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
4515            case MESSAGEDEFINITION: return "MessageDefinition";
4516            case METADATARESOURCE: return "MetadataResource";
4517            case ACTIVITYDEFINITION: return "ActivityDefinition";
4518            case ARTIFACTASSESSMENT: return "ArtifactAssessment";
4519            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
4520            case CITATION: return "Citation";
4521            case CONDITIONDEFINITION: return "ConditionDefinition";
4522            case EVENTDEFINITION: return "EventDefinition";
4523            case EVIDENCE: return "Evidence";
4524            case EVIDENCEREPORT: return "EvidenceReport";
4525            case EVIDENCEVARIABLE: return "EvidenceVariable";
4526            case LIBRARY: return "Library";
4527            case MEASURE: return "Measure";
4528            case PLANDEFINITION: return "PlanDefinition";
4529            case QUESTIONNAIRE: return "Questionnaire";
4530            case NAMINGSYSTEM: return "NamingSystem";
4531            case OPERATIONDEFINITION: return "OperationDefinition";
4532            case SEARCHPARAMETER: return "SearchParameter";
4533            case STRUCTUREDEFINITION: return "StructureDefinition";
4534            case STRUCTUREMAP: return "StructureMap";
4535            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
4536            case TESTSCRIPT: return "TestScript";
4537            case VALUESET: return "ValueSet";
4538            case CAREPLAN: return "CarePlan";
4539            case CARETEAM: return "CareTeam";
4540            case CHARGEITEM: return "ChargeItem";
4541            case CLAIM: return "Claim";
4542            case CLAIMRESPONSE: return "ClaimResponse";
4543            case CLINICALIMPRESSION: return "ClinicalImpression";
4544            case CLINICALUSEDEFINITION: return "ClinicalUseDefinition";
4545            case CLINICALUSEISSUE: return "ClinicalUseIssue";
4546            case COMMUNICATION: return "Communication";
4547            case COMMUNICATIONREQUEST: return "CommunicationRequest";
4548            case COMPOSITION: return "Composition";
4549            case CONDITION: return "Condition";
4550            case CONSENT: return "Consent";
4551            case CONTRACT: return "Contract";
4552            case COVERAGE: return "Coverage";
4553            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
4554            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
4555            case DETECTEDISSUE: return "DetectedIssue";
4556            case DEVICE: return "Device";
4557            case DEVICEDEFINITION: return "DeviceDefinition";
4558            case DEVICEDISPENSE: return "DeviceDispense";
4559            case DEVICEMETRIC: return "DeviceMetric";
4560            case DEVICEREQUEST: return "DeviceRequest";
4561            case DEVICEUSAGE: return "DeviceUsage";
4562            case DIAGNOSTICREPORT: return "DiagnosticReport";
4563            case DOCUMENTMANIFEST: return "DocumentManifest";
4564            case DOCUMENTREFERENCE: return "DocumentReference";
4565            case ENCOUNTER: return "Encounter";
4566            case ENDPOINT: return "Endpoint";
4567            case ENROLLMENTREQUEST: return "EnrollmentRequest";
4568            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
4569            case EPISODEOFCARE: return "EpisodeOfCare";
4570            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
4571            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
4572            case FLAG: return "Flag";
4573            case GOAL: return "Goal";
4574            case GROUP: return "Group";
4575            case GUIDANCERESPONSE: return "GuidanceResponse";
4576            case HEALTHCARESERVICE: return "HealthcareService";
4577            case IMAGINGSELECTION: return "ImagingSelection";
4578            case IMAGINGSTUDY: return "ImagingStudy";
4579            case IMMUNIZATION: return "Immunization";
4580            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
4581            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
4582            case INGREDIENT: return "Ingredient";
4583            case INSURANCEPLAN: return "InsurancePlan";
4584            case INVENTORYREPORT: return "InventoryReport";
4585            case INVOICE: return "Invoice";
4586            case LINKAGE: return "Linkage";
4587            case LIST: return "List";
4588            case LOCATION: return "Location";
4589            case MANUFACTUREDITEMDEFINITION: return "ManufacturedItemDefinition";
4590            case MEASUREREPORT: return "MeasureReport";
4591            case MEDICATION: return "Medication";
4592            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
4593            case MEDICATIONDISPENSE: return "MedicationDispense";
4594            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
4595            case MEDICATIONREQUEST: return "MedicationRequest";
4596            case MEDICATIONUSAGE: return "MedicationUsage";
4597            case MEDICINALPRODUCTDEFINITION: return "MedicinalProductDefinition";
4598            case MESSAGEHEADER: return "MessageHeader";
4599            case MOLECULARSEQUENCE: return "MolecularSequence";
4600            case NUTRITIONINTAKE: return "NutritionIntake";
4601            case NUTRITIONORDER: return "NutritionOrder";
4602            case NUTRITIONPRODUCT: return "NutritionProduct";
4603            case OBSERVATION: return "Observation";
4604            case OBSERVATIONDEFINITION: return "ObservationDefinition";
4605            case OPERATIONOUTCOME: return "OperationOutcome";
4606            case ORGANIZATION: return "Organization";
4607            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
4608            case PACKAGEDPRODUCTDEFINITION: return "PackagedProductDefinition";
4609            case PATIENT: return "Patient";
4610            case PAYMENTNOTICE: return "PaymentNotice";
4611            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
4612            case PERMISSION: return "Permission";
4613            case PERSON: return "Person";
4614            case PRACTITIONER: return "Practitioner";
4615            case PRACTITIONERROLE: return "PractitionerRole";
4616            case PROCEDURE: return "Procedure";
4617            case PROVENANCE: return "Provenance";
4618            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
4619            case REGULATEDAUTHORIZATION: return "RegulatedAuthorization";
4620            case RELATEDPERSON: return "RelatedPerson";
4621            case REQUESTGROUP: return "RequestGroup";
4622            case RESEARCHSTUDY: return "ResearchStudy";
4623            case RESEARCHSUBJECT: return "ResearchSubject";
4624            case RISKASSESSMENT: return "RiskAssessment";
4625            case SCHEDULE: return "Schedule";
4626            case SERVICEREQUEST: return "ServiceRequest";
4627            case SLOT: return "Slot";
4628            case SPECIMEN: return "Specimen";
4629            case SPECIMENDEFINITION: return "SpecimenDefinition";
4630            case SUBSCRIPTION: return "Subscription";
4631            case SUBSCRIPTIONSTATUS: return "SubscriptionStatus";
4632            case SUBSCRIPTIONTOPIC: return "SubscriptionTopic";
4633            case SUBSTANCE: return "Substance";
4634            case SUBSTANCEDEFINITION: return "SubstanceDefinition";
4635            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
4636            case SUBSTANCEPOLYMER: return "SubstancePolymer";
4637            case SUBSTANCEPROTEIN: return "SubstanceProtein";
4638            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
4639            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
4640            case SUPPLYDELIVERY: return "SupplyDelivery";
4641            case SUPPLYREQUEST: return "SupplyRequest";
4642            case TASK: return "Task";
4643            case TESTREPORT: return "TestReport";
4644            case VERIFICATIONRESULT: return "VerificationResult";
4645            case VISIONPRESCRIPTION: return "VisionPrescription";
4646            case PARAMETERS: return "Parameters";
4647            case TYPE: return "Type";
4648            case ANY: return "Any";
4649            case NULL: return null;
4650            default: return "?";
4651          }
4652        }
4653        public String getSystem() {
4654          switch (this) {
4655            case ADDRESS: return "http://hl7.org/fhir/data-types";
4656            case AGE: return "http://hl7.org/fhir/data-types";
4657            case ANNOTATION: return "http://hl7.org/fhir/data-types";
4658            case ATTACHMENT: return "http://hl7.org/fhir/data-types";
4659            case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types";
4660            case BACKBONETYPE: return "http://hl7.org/fhir/data-types";
4661            case BASE: return "http://hl7.org/fhir/data-types";
4662            case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types";
4663            case CODEABLEREFERENCE: return "http://hl7.org/fhir/data-types";
4664            case CODING: return "http://hl7.org/fhir/data-types";
4665            case CONTACTDETAIL: return "http://hl7.org/fhir/data-types";
4666            case CONTACTPOINT: return "http://hl7.org/fhir/data-types";
4667            case CONTRIBUTOR: return "http://hl7.org/fhir/data-types";
4668            case COUNT: return "http://hl7.org/fhir/data-types";
4669            case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types";
4670            case DATATYPE: return "http://hl7.org/fhir/data-types";
4671            case DISTANCE: return "http://hl7.org/fhir/data-types";
4672            case DOSAGE: return "http://hl7.org/fhir/data-types";
4673            case DURATION: return "http://hl7.org/fhir/data-types";
4674            case ELEMENT: return "http://hl7.org/fhir/data-types";
4675            case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types";
4676            case EXPRESSION: return "http://hl7.org/fhir/data-types";
4677            case EXTENSION: return "http://hl7.org/fhir/data-types";
4678            case HUMANNAME: return "http://hl7.org/fhir/data-types";
4679            case IDENTIFIER: return "http://hl7.org/fhir/data-types";
4680            case MARKETINGSTATUS: return "http://hl7.org/fhir/data-types";
4681            case META: return "http://hl7.org/fhir/data-types";
4682            case MONEY: return "http://hl7.org/fhir/data-types";
4683            case MONEYQUANTITY: return "http://hl7.org/fhir/data-types";
4684            case NARRATIVE: return "http://hl7.org/fhir/data-types";
4685            case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types";
4686            case PERIOD: return "http://hl7.org/fhir/data-types";
4687            case POPULATION: return "http://hl7.org/fhir/data-types";
4688            case PRIMITIVETYPE: return "http://hl7.org/fhir/data-types";
4689            case PRODCHARACTERISTIC: return "http://hl7.org/fhir/data-types";
4690            case PRODUCTSHELFLIFE: return "http://hl7.org/fhir/data-types";
4691            case QUANTITY: return "http://hl7.org/fhir/data-types";
4692            case RANGE: return "http://hl7.org/fhir/data-types";
4693            case RATIO: return "http://hl7.org/fhir/data-types";
4694            case RATIORANGE: return "http://hl7.org/fhir/data-types";
4695            case REFERENCE: return "http://hl7.org/fhir/data-types";
4696            case RELATEDARTIFACT: return "http://hl7.org/fhir/data-types";
4697            case SAMPLEDDATA: return "http://hl7.org/fhir/data-types";
4698            case SIGNATURE: return "http://hl7.org/fhir/data-types";
4699            case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types";
4700            case TIMING: return "http://hl7.org/fhir/data-types";
4701            case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types";
4702            case USAGECONTEXT: return "http://hl7.org/fhir/data-types";
4703            case BASE64BINARY: return "http://hl7.org/fhir/data-types";
4704            case BOOLEAN: return "http://hl7.org/fhir/data-types";
4705            case CANONICAL: return "http://hl7.org/fhir/data-types";
4706            case CODE: return "http://hl7.org/fhir/data-types";
4707            case DATE: return "http://hl7.org/fhir/data-types";
4708            case DATETIME: return "http://hl7.org/fhir/data-types";
4709            case DECIMAL: return "http://hl7.org/fhir/data-types";
4710            case ID: return "http://hl7.org/fhir/data-types";
4711            case INSTANT: return "http://hl7.org/fhir/data-types";
4712            case INTEGER: return "http://hl7.org/fhir/data-types";
4713            case INTEGER64: return "http://hl7.org/fhir/data-types";
4714            case MARKDOWN: return "http://hl7.org/fhir/data-types";
4715            case OID: return "http://hl7.org/fhir/data-types";
4716            case POSITIVEINT: return "http://hl7.org/fhir/data-types";
4717            case STRING: return "http://hl7.org/fhir/data-types";
4718            case TIME: return "http://hl7.org/fhir/data-types";
4719            case UNSIGNEDINT: return "http://hl7.org/fhir/data-types";
4720            case URI: return "http://hl7.org/fhir/data-types";
4721            case URL: return "http://hl7.org/fhir/data-types";
4722            case UUID: return "http://hl7.org/fhir/data-types";
4723            case XHTML: return "http://hl7.org/fhir/data-types";
4724            case RESOURCE: return "http://hl7.org/fhir/resource-types";
4725            case BINARY: return "http://hl7.org/fhir/resource-types";
4726            case BUNDLE: return "http://hl7.org/fhir/resource-types";
4727            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
4728            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
4729            case ADMINISTRABLEPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
4730            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
4731            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
4732            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
4733            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
4734            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
4735            case BASIC: return "http://hl7.org/fhir/resource-types";
4736            case BIOLOGICALLYDERIVEDPRODUCT: return "http://hl7.org/fhir/resource-types";
4737            case BODYSTRUCTURE: return "http://hl7.org/fhir/resource-types";
4738            case CANONICALRESOURCE: return "http://hl7.org/fhir/resource-types";
4739            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
4740            case CAPABILITYSTATEMENT2: return "http://hl7.org/fhir/resource-types";
4741            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
4742            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
4743            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
4744            case CONCEPTMAP2: return "http://hl7.org/fhir/resource-types";
4745            case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types";
4746            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
4747            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
4748            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
4749            case METADATARESOURCE: return "http://hl7.org/fhir/resource-types";
4750            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
4751            case ARTIFACTASSESSMENT: return "http://hl7.org/fhir/resource-types";
4752            case CHARGEITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
4753            case CITATION: return "http://hl7.org/fhir/resource-types";
4754            case CONDITIONDEFINITION: return "http://hl7.org/fhir/resource-types";
4755            case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types";
4756            case EVIDENCE: return "http://hl7.org/fhir/resource-types";
4757            case EVIDENCEREPORT: return "http://hl7.org/fhir/resource-types";
4758            case EVIDENCEVARIABLE: return "http://hl7.org/fhir/resource-types";
4759            case LIBRARY: return "http://hl7.org/fhir/resource-types";
4760            case MEASURE: return "http://hl7.org/fhir/resource-types";
4761            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
4762            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
4763            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
4764            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
4765            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
4766            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
4767            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
4768            case TERMINOLOGYCAPABILITIES: return "http://hl7.org/fhir/resource-types";
4769            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
4770            case VALUESET: return "http://hl7.org/fhir/resource-types";
4771            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
4772            case CARETEAM: return "http://hl7.org/fhir/resource-types";
4773            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
4774            case CLAIM: return "http://hl7.org/fhir/resource-types";
4775            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
4776            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
4777            case CLINICALUSEDEFINITION: return "http://hl7.org/fhir/resource-types";
4778            case CLINICALUSEISSUE: return "http://hl7.org/fhir/resource-types";
4779            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
4780            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
4781            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
4782            case CONDITION: return "http://hl7.org/fhir/resource-types";
4783            case CONSENT: return "http://hl7.org/fhir/resource-types";
4784            case CONTRACT: return "http://hl7.org/fhir/resource-types";
4785            case COVERAGE: return "http://hl7.org/fhir/resource-types";
4786            case COVERAGEELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
4787            case COVERAGEELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
4788            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
4789            case DEVICE: return "http://hl7.org/fhir/resource-types";
4790            case DEVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
4791            case DEVICEDISPENSE: return "http://hl7.org/fhir/resource-types";
4792            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
4793            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
4794            case DEVICEUSAGE: return "http://hl7.org/fhir/resource-types";
4795            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
4796            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
4797            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
4798            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
4799            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
4800            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
4801            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
4802            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
4803            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
4804            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
4805            case FLAG: return "http://hl7.org/fhir/resource-types";
4806            case GOAL: return "http://hl7.org/fhir/resource-types";
4807            case GROUP: return "http://hl7.org/fhir/resource-types";
4808            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
4809            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
4810            case IMAGINGSELECTION: return "http://hl7.org/fhir/resource-types";
4811            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
4812            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
4813            case IMMUNIZATIONEVALUATION: return "http://hl7.org/fhir/resource-types";
4814            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
4815            case INGREDIENT: return "http://hl7.org/fhir/resource-types";
4816            case INSURANCEPLAN: return "http://hl7.org/fhir/resource-types";
4817            case INVENTORYREPORT: return "http://hl7.org/fhir/resource-types";
4818            case INVOICE: return "http://hl7.org/fhir/resource-types";
4819            case LINKAGE: return "http://hl7.org/fhir/resource-types";
4820            case LIST: return "http://hl7.org/fhir/resource-types";
4821            case LOCATION: return "http://hl7.org/fhir/resource-types";
4822            case MANUFACTUREDITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
4823            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
4824            case MEDICATION: return "http://hl7.org/fhir/resource-types";
4825            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
4826            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
4827            case MEDICATIONKNOWLEDGE: return "http://hl7.org/fhir/resource-types";
4828            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
4829            case MEDICATIONUSAGE: return "http://hl7.org/fhir/resource-types";
4830            case MEDICINALPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
4831            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
4832            case MOLECULARSEQUENCE: return "http://hl7.org/fhir/resource-types";
4833            case NUTRITIONINTAKE: return "http://hl7.org/fhir/resource-types";
4834            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
4835            case NUTRITIONPRODUCT: return "http://hl7.org/fhir/resource-types";
4836            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
4837            case OBSERVATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
4838            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
4839            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
4840            case ORGANIZATIONAFFILIATION: return "http://hl7.org/fhir/resource-types";
4841            case PACKAGEDPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
4842            case PATIENT: return "http://hl7.org/fhir/resource-types";
4843            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
4844            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
4845            case PERMISSION: return "http://hl7.org/fhir/resource-types";
4846            case PERSON: return "http://hl7.org/fhir/resource-types";
4847            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
4848            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
4849            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
4850            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
4851            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
4852            case REGULATEDAUTHORIZATION: return "http://hl7.org/fhir/resource-types";
4853            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
4854            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
4855            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
4856            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
4857            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
4858            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
4859            case SERVICEREQUEST: return "http://hl7.org/fhir/resource-types";
4860            case SLOT: return "http://hl7.org/fhir/resource-types";
4861            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
4862            case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types";
4863            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
4864            case SUBSCRIPTIONSTATUS: return "http://hl7.org/fhir/resource-types";
4865            case SUBSCRIPTIONTOPIC: return "http://hl7.org/fhir/resource-types";
4866            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
4867            case SUBSTANCEDEFINITION: return "http://hl7.org/fhir/resource-types";
4868            case SUBSTANCENUCLEICACID: return "http://hl7.org/fhir/resource-types";
4869            case SUBSTANCEPOLYMER: return "http://hl7.org/fhir/resource-types";
4870            case SUBSTANCEPROTEIN: return "http://hl7.org/fhir/resource-types";
4871            case SUBSTANCEREFERENCEINFORMATION: return "http://hl7.org/fhir/resource-types";
4872            case SUBSTANCESOURCEMATERIAL: return "http://hl7.org/fhir/resource-types";
4873            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
4874            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
4875            case TASK: return "http://hl7.org/fhir/resource-types";
4876            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
4877            case VERIFICATIONRESULT: return "http://hl7.org/fhir/resource-types";
4878            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
4879            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
4880            case TYPE: return "http://hl7.org/fhir/abstract-types";
4881            case ANY: return "http://hl7.org/fhir/abstract-types";
4882            case NULL: return null;
4883            default: return "?";
4884          }
4885        }
4886        public String getDefinition() {
4887          switch (this) {
4888            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.";
4889            case AGE: return "A duration of time during which an organism (or a process) has existed.";
4890            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
4891            case ATTACHMENT: return "For referring to data content defined in other formats.";
4892            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
4893            case BACKBONETYPE: return "Base definition for the few data types that are allowed to carry modifier extensions.";
4894            case BASE: return "Base definition for all types defined in FHIR type system.";
4895            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
4896            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).";
4897            case CODING: return "A reference to a code defined by a terminology system.";
4898            case CONTACTDETAIL: return "Specifies contact information for a person or organization.";
4899            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
4900            case CONTRIBUTOR: return "A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.";
4901            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.";
4902            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.";
4903            case DATATYPE: return "The base class for all re-useable types defined as part of the FHIR Specification.";
4904            case DISTANCE: return "A length - a value with a unit that is a physical distance.";
4905            case DOSAGE: return "Indicates how the medication is/was taken or should be taken by the patient.";
4906            case DURATION: return "A length of time.";
4907            case ELEMENT: return "Base definition for all elements in a resource.";
4908            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
4909            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.";
4910            case EXTENSION: return "Optional Extension Element - found in all resources.";
4911            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
4912            case IDENTIFIER: return "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.";
4913            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.";
4914            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.";
4915            case MONEY: return "An amount of economic utility in some recognized currency.";
4916            case MONEYQUANTITY: return "";
4917            case NARRATIVE: return "A human-readable summary of the resource conveying the essential clinical and business information for the resource.";
4918            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.";
4919            case PERIOD: return "A time period defined by a start and end date and optionally time.";
4920            case POPULATION: return "A populatioof people with some set of grouping criteria.";
4921            case PRIMITIVETYPE: return "The base type for all re-useable types defined that have a simple property.";
4922            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.";
4923            case PRODUCTSHELFLIFE: return "The shelf-life and storage information for a medicinal product item or container can be described using this class.";
4924            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.";
4925            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
4926            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
4927            case RATIORANGE: return "A range of ratios expressed as a low and high numerator and a denominator.";
4928            case REFERENCE: return "A reference from one resource to another.";
4929            case RELATEDARTIFACT: return "Related artifacts such as additional documentation, justification, or bibliographic references.";
4930            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.";
4931            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.";
4932            case SIMPLEQUANTITY: return "";
4933            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.";
4934            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.";
4935            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).";
4936            case BASE64BINARY: return "A stream of bytes";
4937            case BOOLEAN: return "Value of \"true\" or \"false\"";
4938            case CANONICAL: return "A URI that is a reference to a canonical URL on a FHIR resource";
4939            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";
4940            case DATE: return "A date or partial date (e.g. just year or year + month). There is no UTC offset. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.";
4941            case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a UTC offset 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.";
4942            case DECIMAL: return "A rational number with implicit precision";
4943            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.";
4944            case INSTANT: return "An instant in time - known at least to the second";
4945            case INTEGER: return "A whole number";
4946            case INTEGER64: return "A very large whole number";
4947            case MARKDOWN: return "A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine";
4948            case OID: return "An OID represented as a URI";
4949            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
4950            case STRING: return "A sequence of Unicode characters";
4951            case TIME: return "A time during the day, with no date specified";
4952            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
4953            case URI: return "String of characters used to identify a name or a resource";
4954            case URL: return "A URI that is a literal reference";
4955            case UUID: return "A UUID, represented as a URI";
4956            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
4957            case RESOURCE: return "--- Abstract Type! ---This is the base resource type for everything.";
4958            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.";
4959            case BUNDLE: return "A container for a collection of resources.";
4960            case DOMAINRESOURCE: return "--- Abstract Type! ---A resource that includes narrative, extensions, and contained resources.";
4961            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.";
4962            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).";
4963            case ADVERSEEVENT: return "An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research subject.  The unintended effects may require additional monitoring, treatment or hospitalization or may result in death.  The AdverseEvent resource also extends to potential or avoided events that could have had such effects.";
4964            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
4965            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).";
4966            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
4967            case AUDITEVENT: return "A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.";
4968            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.";
4969            case BIOLOGICALLYDERIVEDPRODUCT: return "A biological material originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity.";
4970            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.";
4971            case CANONICALRESOURCE: return "--- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.";
4972            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.";
4973            case CAPABILITYSTATEMENT2: 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.";
4974            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.";
4975            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
4976            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.";
4977            case CONCEPTMAP2: 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.";
4978            case EXAMPLESCENARIO: return "Example of workflow instance.";
4979            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.";
4980            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.";
4981            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.";
4982            case METADATARESOURCE: return "--- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.";
4983            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.";
4984            case ARTIFACTASSESSMENT: return "This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content.";
4985            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.";
4986            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.";
4987            case CONDITIONDEFINITION: return "A definition of a condition and information relevant to managing it.";
4988            case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur.";
4989            case EVIDENCE: return "The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.";
4990            case EVIDENCEREPORT: return "The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.";
4991            case EVIDENCEVARIABLE: return "The EvidenceVariable resource describes an element that knowledge (Evidence) is about.";
4992            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.";
4993            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
4994            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.";
4995            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.";
4996            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.";
4997            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
4998            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
4999            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.";
5000            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
5001            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.";
5002            case TESTSCRIPT: return "A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.";
5003            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).";
5004            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.";
5005            case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care.";
5006            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.";
5007            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.";
5008            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
5009            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.";
5010            case CLINICALUSEDEFINITION: return "A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.";
5011            case CLINICALUSEISSUE: return "A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.";
5012            case COMMUNICATION: return "A clinical or business level record of information being transmitted or shared; e.g. an alert that was sent to a responsible provider, a public health agency communication to a provider/reporter in response to a case report for a reportable condition.";
5013            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.";
5014            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.).";
5015            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
5016            case CONSENT: return "A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, 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.";
5017            case CONTRACT: return "Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.";
5018            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.";
5019            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.";
5020            case COVERAGEELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.";
5021            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.";
5022            case DEVICE: return "This resource describes the properties (regulated, has real time clock, etc.), adminstrative (manufacturer name, model number, serial number, firmware, etc), and type (knee replacement, blood pressure cuff, MRI, etc.) of a physical unit (these values do not change much within a given module, for example the serail number, manufacturer name, and model number). An actual unit may consist of several modules in a distinct hierarchy and these are represented by multiple Device resources and bound through the 'parent' element.";
5023            case DEVICEDEFINITION: return "This is a specialized resource that defines the characteristics and capabilities of a device.";
5024            case DEVICEDISPENSE: return "Indicates that a device is to be or has been dispensed for a named person/patient.  This includes a description of the product (supply) provided and the instructions for using the device.";
5025            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
5026            case DEVICEREQUEST: return "Represents a request a device to be provided to a specific patient. The device may be an implantable device to be subsequently implanted, or an external assistive device, such as a walker, to be delivered and subsequently be used.";
5027            case DEVICEUSAGE: return "A record of a device being used by a patient where the record is the result of a report from the patient or a clinician.";
5028            case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic tests performed on patients, groups of patients, products, substances, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. The report also includes non-clinical context such as batch analysis and stability reporting of products and substances.";
5029            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
5030            case DOCUMENTREFERENCE: return "A reference to a document of any kind for any purpose. While the term “document” implies a more narrow focus, for this resource this \"document\" encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference.";
5031            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.";
5032            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.";
5033            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
5034            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.";
5035            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.";
5036            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.";
5037            case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient.";
5038            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
5039            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.";
5040            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.";
5041            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.";
5042            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
5043            case IMAGINGSELECTION: return "A selection of DICOM SOP instances and/or frames within a single Study and Series. This might include additional specifics such as an image region, an Observation UID or a Segmentation Number, allowing linkage to an Observation Resource or transferring this information along with the ImagingStudy Resource.";
5044            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.";
5045            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.";
5046            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.";
5047            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.";
5048            case INGREDIENT: return "An ingredient of a manufactured item or pharmaceutical product.";
5049            case INSURANCEPLAN: return "Details of a Health Insurance product/plan provided by an organization.";
5050            case INVENTORYREPORT: return "A report of inventory or stock items.";
5051            case INVOICE: return "Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.";
5052            case LINKAGE: return "Identifies two or more records (resource instances) that refer to the same real-world \"occurrence\".";
5053            case LIST: return "A list is a curated collection of resources.";
5054            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.";
5055            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.";
5056            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.";
5057            case MEDICATION: return "This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.";
5058            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.";
5059            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.";
5060            case MEDICATIONKNOWLEDGE: return "Information about a medication that is used to support knowledge.";
5061            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.";
5062            case MEDICATIONUSAGE: return "A record of a medication that is being consumed by a patient.   A MedicationUsage 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 medicationusage and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medicationusage 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 Usage 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.";
5063            case MEDICINALPRODUCTDEFINITION: return "Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use, drug catalogs).";
5064            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.";
5065            case MOLECULARSEQUENCE: return "Raw data describing a biological sequence.";
5066            case NUTRITIONINTAKE: return "A record of food or fluid that is being consumed by a patient.   A NutritionIntake may indicate that the patient may be consuming the food or fluid now or has consumed the food or fluid in the past.  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 or through an app that tracks food or fluids consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label,  or from a clinician documenting observed intake.";
5067            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
5068            case NUTRITIONPRODUCT: return "A food or fluid product that is consumed by patients.";
5069            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
5070            case OBSERVATIONDEFINITION: return "Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.";
5071            case OPERATIONOUTCOME: return "A collection of error, warning, or information messages that result from a system action.";
5072            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.";
5073            case ORGANIZATIONAFFILIATION: return "Defines an affiliation/assotiation/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship.";
5074            case PACKAGEDPRODUCTDEFINITION: return "A medically related item or items, in a container or package.";
5075            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
5076            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
5077            case PAYMENTRECONCILIATION: return "This resource provides the details including amount of a payment and allocates the payment items being paid.";
5078            case PERMISSION: return "Permission.";
5079            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
5080            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
5081            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
5082            case PROCEDURE: return "An action that is or was performed on or for a patient, practitioner, device, organization, or location. For example, this can be a physical intervention on a patient like an operation, or less invasive like long term services, counseling, or hypnotherapy.  This can be a quality or safety inspection for a location, organization, or device.  This can be an accreditation procedure on a practitioner for licensing.";
5083            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.";
5084            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.";
5085            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.";
5086            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.";
5087            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\".";
5088            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.";
5089            case RESEARCHSUBJECT: return "A physical entity which is the primary unit of operational and/or administrative interest in a study.";
5090            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
5091            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
5092            case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.";
5093            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
5094            case SPECIMEN: return "A sample to be used for analysis.";
5095            case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements.";
5096            case SUBSCRIPTION: return "The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.";
5097            case SUBSCRIPTIONSTATUS: return "The SubscriptionStatus resource describes the state of a Subscription during notifications.";
5098            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.";
5099            case SUBSTANCE: return "A homogeneous material with a definite composition.";
5100            case SUBSTANCEDEFINITION: return "The detailed description of a substance, typically at a level beyond what is used for prescribing.";
5101            case SUBSTANCENUCLEICACID: return "Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction.";
5102            case SUBSTANCEPOLYMER: return "Properties of a substance specific to it being a polymer.";
5103            case SUBSTANCEPROTEIN: return "A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators.";
5104            case SUBSTANCEREFERENCEINFORMATION: return "Todo.";
5105            case SUBSTANCESOURCEMATERIAL: return "Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex.";
5106            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
5107            case SUPPLYREQUEST: return "A record of a non-patient specific request for a medication, substance, device, certain types of biologically derived product, and nutrition product used in the healthcare setting.";
5108            case TASK: return "A task to be performed.";
5109            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
5110            case VERIFICATIONRESULT: return "Describes validation requirements, source(s), status and dates for one or more elements.";
5111            case VISIONPRESCRIPTION: return "An authorization for the provision of glasses and/or contact lenses to a patient.";
5112            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.";
5113            case TYPE: return "A place holder that means any kind of data type";
5114            case ANY: return "A place holder that means any kind of resource";
5115            case NULL: return null;
5116            default: return "?";
5117          }
5118        }
5119        public String getDisplay() {
5120          switch (this) {
5121            case ADDRESS: return "Address";
5122            case AGE: return "Age";
5123            case ANNOTATION: return "Annotation";
5124            case ATTACHMENT: return "Attachment";
5125            case BACKBONEELEMENT: return "BackboneElement";
5126            case BACKBONETYPE: return "BackboneType";
5127            case BASE: return "Base";
5128            case CODEABLECONCEPT: return "CodeableConcept";
5129            case CODEABLEREFERENCE: return "CodeableReference";
5130            case CODING: return "Coding";
5131            case CONTACTDETAIL: return "ContactDetail";
5132            case CONTACTPOINT: return "ContactPoint";
5133            case CONTRIBUTOR: return "Contributor";
5134            case COUNT: return "Count";
5135            case DATAREQUIREMENT: return "DataRequirement";
5136            case DATATYPE: return "DataType";
5137            case DISTANCE: return "Distance";
5138            case DOSAGE: return "Dosage";
5139            case DURATION: return "Duration";
5140            case ELEMENT: return "Element";
5141            case ELEMENTDEFINITION: return "ElementDefinition";
5142            case EXPRESSION: return "Expression";
5143            case EXTENSION: return "Extension";
5144            case HUMANNAME: return "HumanName";
5145            case IDENTIFIER: return "Identifier";
5146            case MARKETINGSTATUS: return "MarketingStatus";
5147            case META: return "Meta";
5148            case MONEY: return "Money";
5149            case MONEYQUANTITY: return "MoneyQuantity";
5150            case NARRATIVE: return "Narrative";
5151            case PARAMETERDEFINITION: return "ParameterDefinition";
5152            case PERIOD: return "Period";
5153            case POPULATION: return "Population";
5154            case PRIMITIVETYPE: return "PrimitiveType";
5155            case PRODCHARACTERISTIC: return "ProdCharacteristic";
5156            case PRODUCTSHELFLIFE: return "ProductShelfLife";
5157            case QUANTITY: return "Quantity";
5158            case RANGE: return "Range";
5159            case RATIO: return "Ratio";
5160            case RATIORANGE: return "RatioRange";
5161            case REFERENCE: return "Reference";
5162            case RELATEDARTIFACT: return "RelatedArtifact";
5163            case SAMPLEDDATA: return "SampledData";
5164            case SIGNATURE: return "Signature";
5165            case SIMPLEQUANTITY: return "SimpleQuantity";
5166            case TIMING: return "Timing";
5167            case TRIGGERDEFINITION: return "TriggerDefinition";
5168            case USAGECONTEXT: return "UsageContext";
5169            case BASE64BINARY: return "base64Binary";
5170            case BOOLEAN: return "boolean";
5171            case CANONICAL: return "canonical";
5172            case CODE: return "code";
5173            case DATE: return "date";
5174            case DATETIME: return "dateTime";
5175            case DECIMAL: return "decimal";
5176            case ID: return "id";
5177            case INSTANT: return "instant";
5178            case INTEGER: return "integer";
5179            case INTEGER64: return "integer64";
5180            case MARKDOWN: return "markdown";
5181            case OID: return "oid";
5182            case POSITIVEINT: return "positiveInt";
5183            case STRING: return "string";
5184            case TIME: return "time";
5185            case UNSIGNEDINT: return "unsignedInt";
5186            case URI: return "uri";
5187            case URL: return "url";
5188            case UUID: return "uuid";
5189            case XHTML: return "XHTML";
5190            case RESOURCE: return "Resource";
5191            case BINARY: return "Binary";
5192            case BUNDLE: return "Bundle";
5193            case DOMAINRESOURCE: return "DomainResource";
5194            case ACCOUNT: return "Account";
5195            case ADMINISTRABLEPRODUCTDEFINITION: return "AdministrableProductDefinition";
5196            case ADVERSEEVENT: return "AdverseEvent";
5197            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
5198            case APPOINTMENT: return "Appointment";
5199            case APPOINTMENTRESPONSE: return "AppointmentResponse";
5200            case AUDITEVENT: return "AuditEvent";
5201            case BASIC: return "Basic";
5202            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
5203            case BODYSTRUCTURE: return "BodyStructure";
5204            case CANONICALRESOURCE: return "CanonicalResource";
5205            case CAPABILITYSTATEMENT: return "CapabilityStatement";
5206            case CAPABILITYSTATEMENT2: return "CapabilityStatement2";
5207            case CODESYSTEM: return "CodeSystem";
5208            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
5209            case CONCEPTMAP: return "ConceptMap";
5210            case CONCEPTMAP2: return "ConceptMap2";
5211            case EXAMPLESCENARIO: return "ExampleScenario";
5212            case GRAPHDEFINITION: return "GraphDefinition";
5213            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
5214            case MESSAGEDEFINITION: return "MessageDefinition";
5215            case METADATARESOURCE: return "MetadataResource";
5216            case ACTIVITYDEFINITION: return "ActivityDefinition";
5217            case ARTIFACTASSESSMENT: return "ArtifactAssessment";
5218            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
5219            case CITATION: return "Citation";
5220            case CONDITIONDEFINITION: return "ConditionDefinition";
5221            case EVENTDEFINITION: return "EventDefinition";
5222            case EVIDENCE: return "Evidence";
5223            case EVIDENCEREPORT: return "EvidenceReport";
5224            case EVIDENCEVARIABLE: return "EvidenceVariable";
5225            case LIBRARY: return "Library";
5226            case MEASURE: return "Measure";
5227            case PLANDEFINITION: return "PlanDefinition";
5228            case QUESTIONNAIRE: return "Questionnaire";
5229            case NAMINGSYSTEM: return "NamingSystem";
5230            case OPERATIONDEFINITION: return "OperationDefinition";
5231            case SEARCHPARAMETER: return "SearchParameter";
5232            case STRUCTUREDEFINITION: return "StructureDefinition";
5233            case STRUCTUREMAP: return "StructureMap";
5234            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
5235            case TESTSCRIPT: return "TestScript";
5236            case VALUESET: return "ValueSet";
5237            case CAREPLAN: return "CarePlan";
5238            case CARETEAM: return "CareTeam";
5239            case CHARGEITEM: return "ChargeItem";
5240            case CLAIM: return "Claim";
5241            case CLAIMRESPONSE: return "ClaimResponse";
5242            case CLINICALIMPRESSION: return "ClinicalImpression";
5243            case CLINICALUSEDEFINITION: return "ClinicalUseDefinition";
5244            case CLINICALUSEISSUE: return "ClinicalUseIssue";
5245            case COMMUNICATION: return "Communication";
5246            case COMMUNICATIONREQUEST: return "CommunicationRequest";
5247            case COMPOSITION: return "Composition";
5248            case CONDITION: return "Condition";
5249            case CONSENT: return "Consent";
5250            case CONTRACT: return "Contract";
5251            case COVERAGE: return "Coverage";
5252            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
5253            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
5254            case DETECTEDISSUE: return "DetectedIssue";
5255            case DEVICE: return "Device";
5256            case DEVICEDEFINITION: return "DeviceDefinition";
5257            case DEVICEDISPENSE: return "DeviceDispense";
5258            case DEVICEMETRIC: return "DeviceMetric";
5259            case DEVICEREQUEST: return "DeviceRequest";
5260            case DEVICEUSAGE: return "DeviceUsage";
5261            case DIAGNOSTICREPORT: return "DiagnosticReport";
5262            case DOCUMENTMANIFEST: return "DocumentManifest";
5263            case DOCUMENTREFERENCE: return "DocumentReference";
5264            case ENCOUNTER: return "Encounter";
5265            case ENDPOINT: return "Endpoint";
5266            case ENROLLMENTREQUEST: return "EnrollmentRequest";
5267            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
5268            case EPISODEOFCARE: return "EpisodeOfCare";
5269            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
5270            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
5271            case FLAG: return "Flag";
5272            case GOAL: return "Goal";
5273            case GROUP: return "Group";
5274            case GUIDANCERESPONSE: return "GuidanceResponse";
5275            case HEALTHCARESERVICE: return "HealthcareService";
5276            case IMAGINGSELECTION: return "ImagingSelection";
5277            case IMAGINGSTUDY: return "ImagingStudy";
5278            case IMMUNIZATION: return "Immunization";
5279            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
5280            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
5281            case INGREDIENT: return "Ingredient";
5282            case INSURANCEPLAN: return "InsurancePlan";
5283            case INVENTORYREPORT: return "InventoryReport";
5284            case INVOICE: return "Invoice";
5285            case LINKAGE: return "Linkage";
5286            case LIST: return "List";
5287            case LOCATION: return "Location";
5288            case MANUFACTUREDITEMDEFINITION: return "ManufacturedItemDefinition";
5289            case MEASUREREPORT: return "MeasureReport";
5290            case MEDICATION: return "Medication";
5291            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
5292            case MEDICATIONDISPENSE: return "MedicationDispense";
5293            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
5294            case MEDICATIONREQUEST: return "MedicationRequest";
5295            case MEDICATIONUSAGE: return "MedicationUsage";
5296            case MEDICINALPRODUCTDEFINITION: return "MedicinalProductDefinition";
5297            case MESSAGEHEADER: return "MessageHeader";
5298            case MOLECULARSEQUENCE: return "MolecularSequence";
5299            case NUTRITIONINTAKE: return "NutritionIntake";
5300            case NUTRITIONORDER: return "NutritionOrder";
5301            case NUTRITIONPRODUCT: return "NutritionProduct";
5302            case OBSERVATION: return "Observation";
5303            case OBSERVATIONDEFINITION: return "ObservationDefinition";
5304            case OPERATIONOUTCOME: return "OperationOutcome";
5305            case ORGANIZATION: return "Organization";
5306            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
5307            case PACKAGEDPRODUCTDEFINITION: return "PackagedProductDefinition";
5308            case PATIENT: return "Patient";
5309            case PAYMENTNOTICE: return "PaymentNotice";
5310            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
5311            case PERMISSION: return "Permission";
5312            case PERSON: return "Person";
5313            case PRACTITIONER: return "Practitioner";
5314            case PRACTITIONERROLE: return "PractitionerRole";
5315            case PROCEDURE: return "Procedure";
5316            case PROVENANCE: return "Provenance";
5317            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
5318            case REGULATEDAUTHORIZATION: return "RegulatedAuthorization";
5319            case RELATEDPERSON: return "RelatedPerson";
5320            case REQUESTGROUP: return "RequestGroup";
5321            case RESEARCHSTUDY: return "ResearchStudy";
5322            case RESEARCHSUBJECT: return "ResearchSubject";
5323            case RISKASSESSMENT: return "RiskAssessment";
5324            case SCHEDULE: return "Schedule";
5325            case SERVICEREQUEST: return "ServiceRequest";
5326            case SLOT: return "Slot";
5327            case SPECIMEN: return "Specimen";
5328            case SPECIMENDEFINITION: return "SpecimenDefinition";
5329            case SUBSCRIPTION: return "Subscription";
5330            case SUBSCRIPTIONSTATUS: return "SubscriptionStatus";
5331            case SUBSCRIPTIONTOPIC: return "SubscriptionTopic";
5332            case SUBSTANCE: return "Substance";
5333            case SUBSTANCEDEFINITION: return "SubstanceDefinition";
5334            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
5335            case SUBSTANCEPOLYMER: return "SubstancePolymer";
5336            case SUBSTANCEPROTEIN: return "SubstanceProtein";
5337            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
5338            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
5339            case SUPPLYDELIVERY: return "SupplyDelivery";
5340            case SUPPLYREQUEST: return "SupplyRequest";
5341            case TASK: return "Task";
5342            case TESTREPORT: return "TestReport";
5343            case VERIFICATIONRESULT: return "VerificationResult";
5344            case VISIONPRESCRIPTION: return "VisionPrescription";
5345            case PARAMETERS: return "Parameters";
5346            case TYPE: return "Type";
5347            case ANY: return "Any";
5348            case NULL: return null;
5349            default: return "?";
5350          }
5351        }
5352    }
5353
5354  public static class FHIRAllTypesEnumFactory implements EnumFactory<FHIRAllTypes> {
5355    public FHIRAllTypes fromCode(String codeString) throws IllegalArgumentException {
5356      if (codeString == null || "".equals(codeString))
5357            if (codeString == null || "".equals(codeString))
5358                return null;
5359        if ("Address".equals(codeString))
5360          return FHIRAllTypes.ADDRESS;
5361        if ("Age".equals(codeString))
5362          return FHIRAllTypes.AGE;
5363        if ("Annotation".equals(codeString))
5364          return FHIRAllTypes.ANNOTATION;
5365        if ("Attachment".equals(codeString))
5366          return FHIRAllTypes.ATTACHMENT;
5367        if ("BackboneElement".equals(codeString))
5368          return FHIRAllTypes.BACKBONEELEMENT;
5369        if ("BackboneType".equals(codeString))
5370          return FHIRAllTypes.BACKBONETYPE;
5371        if ("Base".equals(codeString))
5372          return FHIRAllTypes.BASE;
5373        if ("CodeableConcept".equals(codeString))
5374          return FHIRAllTypes.CODEABLECONCEPT;
5375        if ("CodeableReference".equals(codeString))
5376          return FHIRAllTypes.CODEABLEREFERENCE;
5377        if ("Coding".equals(codeString))
5378          return FHIRAllTypes.CODING;
5379        if ("ContactDetail".equals(codeString))
5380          return FHIRAllTypes.CONTACTDETAIL;
5381        if ("ContactPoint".equals(codeString))
5382          return FHIRAllTypes.CONTACTPOINT;
5383        if ("Contributor".equals(codeString))
5384          return FHIRAllTypes.CONTRIBUTOR;
5385        if ("Count".equals(codeString))
5386          return FHIRAllTypes.COUNT;
5387        if ("DataRequirement".equals(codeString))
5388          return FHIRAllTypes.DATAREQUIREMENT;
5389        if ("DataType".equals(codeString))
5390          return FHIRAllTypes.DATATYPE;
5391        if ("Distance".equals(codeString))
5392          return FHIRAllTypes.DISTANCE;
5393        if ("Dosage".equals(codeString))
5394          return FHIRAllTypes.DOSAGE;
5395        if ("Duration".equals(codeString))
5396          return FHIRAllTypes.DURATION;
5397        if ("Element".equals(codeString))
5398          return FHIRAllTypes.ELEMENT;
5399        if ("ElementDefinition".equals(codeString))
5400          return FHIRAllTypes.ELEMENTDEFINITION;
5401        if ("Expression".equals(codeString))
5402          return FHIRAllTypes.EXPRESSION;
5403        if ("Extension".equals(codeString))
5404          return FHIRAllTypes.EXTENSION;
5405        if ("HumanName".equals(codeString))
5406          return FHIRAllTypes.HUMANNAME;
5407        if ("Identifier".equals(codeString))
5408          return FHIRAllTypes.IDENTIFIER;
5409        if ("MarketingStatus".equals(codeString))
5410          return FHIRAllTypes.MARKETINGSTATUS;
5411        if ("Meta".equals(codeString))
5412          return FHIRAllTypes.META;
5413        if ("Money".equals(codeString))
5414          return FHIRAllTypes.MONEY;
5415        if ("MoneyQuantity".equals(codeString))
5416          return FHIRAllTypes.MONEYQUANTITY;
5417        if ("Narrative".equals(codeString))
5418          return FHIRAllTypes.NARRATIVE;
5419        if ("ParameterDefinition".equals(codeString))
5420          return FHIRAllTypes.PARAMETERDEFINITION;
5421        if ("Period".equals(codeString))
5422          return FHIRAllTypes.PERIOD;
5423        if ("Population".equals(codeString))
5424          return FHIRAllTypes.POPULATION;
5425        if ("PrimitiveType".equals(codeString))
5426          return FHIRAllTypes.PRIMITIVETYPE;
5427        if ("ProdCharacteristic".equals(codeString))
5428          return FHIRAllTypes.PRODCHARACTERISTIC;
5429        if ("ProductShelfLife".equals(codeString))
5430          return FHIRAllTypes.PRODUCTSHELFLIFE;
5431        if ("Quantity".equals(codeString))
5432          return FHIRAllTypes.QUANTITY;
5433        if ("Range".equals(codeString))
5434          return FHIRAllTypes.RANGE;
5435        if ("Ratio".equals(codeString))
5436          return FHIRAllTypes.RATIO;
5437        if ("RatioRange".equals(codeString))
5438          return FHIRAllTypes.RATIORANGE;
5439        if ("Reference".equals(codeString))
5440          return FHIRAllTypes.REFERENCE;
5441        if ("RelatedArtifact".equals(codeString))
5442          return FHIRAllTypes.RELATEDARTIFACT;
5443        if ("SampledData".equals(codeString))
5444          return FHIRAllTypes.SAMPLEDDATA;
5445        if ("Signature".equals(codeString))
5446          return FHIRAllTypes.SIGNATURE;
5447        if ("SimpleQuantity".equals(codeString))
5448          return FHIRAllTypes.SIMPLEQUANTITY;
5449        if ("Timing".equals(codeString))
5450          return FHIRAllTypes.TIMING;
5451        if ("TriggerDefinition".equals(codeString))
5452          return FHIRAllTypes.TRIGGERDEFINITION;
5453        if ("UsageContext".equals(codeString))
5454          return FHIRAllTypes.USAGECONTEXT;
5455        if ("base64Binary".equals(codeString))
5456          return FHIRAllTypes.BASE64BINARY;
5457        if ("boolean".equals(codeString))
5458          return FHIRAllTypes.BOOLEAN;
5459        if ("canonical".equals(codeString))
5460          return FHIRAllTypes.CANONICAL;
5461        if ("code".equals(codeString))
5462          return FHIRAllTypes.CODE;
5463        if ("date".equals(codeString))
5464          return FHIRAllTypes.DATE;
5465        if ("dateTime".equals(codeString))
5466          return FHIRAllTypes.DATETIME;
5467        if ("decimal".equals(codeString))
5468          return FHIRAllTypes.DECIMAL;
5469        if ("id".equals(codeString))
5470          return FHIRAllTypes.ID;
5471        if ("instant".equals(codeString))
5472          return FHIRAllTypes.INSTANT;
5473        if ("integer".equals(codeString))
5474          return FHIRAllTypes.INTEGER;
5475        if ("integer64".equals(codeString))
5476          return FHIRAllTypes.INTEGER64;
5477        if ("markdown".equals(codeString))
5478          return FHIRAllTypes.MARKDOWN;
5479        if ("oid".equals(codeString))
5480          return FHIRAllTypes.OID;
5481        if ("positiveInt".equals(codeString))
5482          return FHIRAllTypes.POSITIVEINT;
5483        if ("string".equals(codeString))
5484          return FHIRAllTypes.STRING;
5485        if ("time".equals(codeString))
5486          return FHIRAllTypes.TIME;
5487        if ("unsignedInt".equals(codeString))
5488          return FHIRAllTypes.UNSIGNEDINT;
5489        if ("uri".equals(codeString))
5490          return FHIRAllTypes.URI;
5491        if ("url".equals(codeString))
5492          return FHIRAllTypes.URL;
5493        if ("uuid".equals(codeString))
5494          return FHIRAllTypes.UUID;
5495        if ("xhtml".equals(codeString))
5496          return FHIRAllTypes.XHTML;
5497        if ("Resource".equals(codeString))
5498          return FHIRAllTypes.RESOURCE;
5499        if ("Binary".equals(codeString))
5500          return FHIRAllTypes.BINARY;
5501        if ("Bundle".equals(codeString))
5502          return FHIRAllTypes.BUNDLE;
5503        if ("DomainResource".equals(codeString))
5504          return FHIRAllTypes.DOMAINRESOURCE;
5505        if ("Account".equals(codeString))
5506          return FHIRAllTypes.ACCOUNT;
5507        if ("AdministrableProductDefinition".equals(codeString))
5508          return FHIRAllTypes.ADMINISTRABLEPRODUCTDEFINITION;
5509        if ("AdverseEvent".equals(codeString))
5510          return FHIRAllTypes.ADVERSEEVENT;
5511        if ("AllergyIntolerance".equals(codeString))
5512          return FHIRAllTypes.ALLERGYINTOLERANCE;
5513        if ("Appointment".equals(codeString))
5514          return FHIRAllTypes.APPOINTMENT;
5515        if ("AppointmentResponse".equals(codeString))
5516          return FHIRAllTypes.APPOINTMENTRESPONSE;
5517        if ("AuditEvent".equals(codeString))
5518          return FHIRAllTypes.AUDITEVENT;
5519        if ("Basic".equals(codeString))
5520          return FHIRAllTypes.BASIC;
5521        if ("BiologicallyDerivedProduct".equals(codeString))
5522          return FHIRAllTypes.BIOLOGICALLYDERIVEDPRODUCT;
5523        if ("BodyStructure".equals(codeString))
5524          return FHIRAllTypes.BODYSTRUCTURE;
5525        if ("CanonicalResource".equals(codeString))
5526          return FHIRAllTypes.CANONICALRESOURCE;
5527        if ("CapabilityStatement".equals(codeString))
5528          return FHIRAllTypes.CAPABILITYSTATEMENT;
5529        if ("CapabilityStatement2".equals(codeString))
5530          return FHIRAllTypes.CAPABILITYSTATEMENT2;
5531        if ("CodeSystem".equals(codeString))
5532          return FHIRAllTypes.CODESYSTEM;
5533        if ("CompartmentDefinition".equals(codeString))
5534          return FHIRAllTypes.COMPARTMENTDEFINITION;
5535        if ("ConceptMap".equals(codeString))
5536          return FHIRAllTypes.CONCEPTMAP;
5537        if ("ConceptMap2".equals(codeString))
5538          return FHIRAllTypes.CONCEPTMAP2;
5539        if ("ExampleScenario".equals(codeString))
5540          return FHIRAllTypes.EXAMPLESCENARIO;
5541        if ("GraphDefinition".equals(codeString))
5542          return FHIRAllTypes.GRAPHDEFINITION;
5543        if ("ImplementationGuide".equals(codeString))
5544          return FHIRAllTypes.IMPLEMENTATIONGUIDE;
5545        if ("MessageDefinition".equals(codeString))
5546          return FHIRAllTypes.MESSAGEDEFINITION;
5547        if ("MetadataResource".equals(codeString))
5548          return FHIRAllTypes.METADATARESOURCE;
5549        if ("ActivityDefinition".equals(codeString))
5550          return FHIRAllTypes.ACTIVITYDEFINITION;
5551        if ("ArtifactAssessment".equals(codeString))
5552          return FHIRAllTypes.ARTIFACTASSESSMENT;
5553        if ("ChargeItemDefinition".equals(codeString))
5554          return FHIRAllTypes.CHARGEITEMDEFINITION;
5555        if ("Citation".equals(codeString))
5556          return FHIRAllTypes.CITATION;
5557        if ("ConditionDefinition".equals(codeString))
5558          return FHIRAllTypes.CONDITIONDEFINITION;
5559        if ("EventDefinition".equals(codeString))
5560          return FHIRAllTypes.EVENTDEFINITION;
5561        if ("Evidence".equals(codeString))
5562          return FHIRAllTypes.EVIDENCE;
5563        if ("EvidenceReport".equals(codeString))
5564          return FHIRAllTypes.EVIDENCEREPORT;
5565        if ("EvidenceVariable".equals(codeString))
5566          return FHIRAllTypes.EVIDENCEVARIABLE;
5567        if ("Library".equals(codeString))
5568          return FHIRAllTypes.LIBRARY;
5569        if ("Measure".equals(codeString))
5570          return FHIRAllTypes.MEASURE;
5571        if ("PlanDefinition".equals(codeString))
5572          return FHIRAllTypes.PLANDEFINITION;
5573        if ("Questionnaire".equals(codeString))
5574          return FHIRAllTypes.QUESTIONNAIRE;
5575        if ("NamingSystem".equals(codeString))
5576          return FHIRAllTypes.NAMINGSYSTEM;
5577        if ("OperationDefinition".equals(codeString))
5578          return FHIRAllTypes.OPERATIONDEFINITION;
5579        if ("SearchParameter".equals(codeString))
5580          return FHIRAllTypes.SEARCHPARAMETER;
5581        if ("StructureDefinition".equals(codeString))
5582          return FHIRAllTypes.STRUCTUREDEFINITION;
5583        if ("StructureMap".equals(codeString))
5584          return FHIRAllTypes.STRUCTUREMAP;
5585        if ("TerminologyCapabilities".equals(codeString))
5586          return FHIRAllTypes.TERMINOLOGYCAPABILITIES;
5587        if ("TestScript".equals(codeString))
5588          return FHIRAllTypes.TESTSCRIPT;
5589        if ("ValueSet".equals(codeString))
5590          return FHIRAllTypes.VALUESET;
5591        if ("CarePlan".equals(codeString))
5592          return FHIRAllTypes.CAREPLAN;
5593        if ("CareTeam".equals(codeString))
5594          return FHIRAllTypes.CARETEAM;
5595        if ("ChargeItem".equals(codeString))
5596          return FHIRAllTypes.CHARGEITEM;
5597        if ("Claim".equals(codeString))
5598          return FHIRAllTypes.CLAIM;
5599        if ("ClaimResponse".equals(codeString))
5600          return FHIRAllTypes.CLAIMRESPONSE;
5601        if ("ClinicalImpression".equals(codeString))
5602          return FHIRAllTypes.CLINICALIMPRESSION;
5603        if ("ClinicalUseDefinition".equals(codeString))
5604          return FHIRAllTypes.CLINICALUSEDEFINITION;
5605        if ("ClinicalUseIssue".equals(codeString))
5606          return FHIRAllTypes.CLINICALUSEISSUE;
5607        if ("Communication".equals(codeString))
5608          return FHIRAllTypes.COMMUNICATION;
5609        if ("CommunicationRequest".equals(codeString))
5610          return FHIRAllTypes.COMMUNICATIONREQUEST;
5611        if ("Composition".equals(codeString))
5612          return FHIRAllTypes.COMPOSITION;
5613        if ("Condition".equals(codeString))
5614          return FHIRAllTypes.CONDITION;
5615        if ("Consent".equals(codeString))
5616          return FHIRAllTypes.CONSENT;
5617        if ("Contract".equals(codeString))
5618          return FHIRAllTypes.CONTRACT;
5619        if ("Coverage".equals(codeString))
5620          return FHIRAllTypes.COVERAGE;
5621        if ("CoverageEligibilityRequest".equals(codeString))
5622          return FHIRAllTypes.COVERAGEELIGIBILITYREQUEST;
5623        if ("CoverageEligibilityResponse".equals(codeString))
5624          return FHIRAllTypes.COVERAGEELIGIBILITYRESPONSE;
5625        if ("DetectedIssue".equals(codeString))
5626          return FHIRAllTypes.DETECTEDISSUE;
5627        if ("Device".equals(codeString))
5628          return FHIRAllTypes.DEVICE;
5629        if ("DeviceDefinition".equals(codeString))
5630          return FHIRAllTypes.DEVICEDEFINITION;
5631        if ("DeviceDispense".equals(codeString))
5632          return FHIRAllTypes.DEVICEDISPENSE;
5633        if ("DeviceMetric".equals(codeString))
5634          return FHIRAllTypes.DEVICEMETRIC;
5635        if ("DeviceRequest".equals(codeString))
5636          return FHIRAllTypes.DEVICEREQUEST;
5637        if ("DeviceUsage".equals(codeString))
5638          return FHIRAllTypes.DEVICEUSAGE;
5639        if ("DiagnosticReport".equals(codeString))
5640          return FHIRAllTypes.DIAGNOSTICREPORT;
5641        if ("DocumentManifest".equals(codeString))
5642          return FHIRAllTypes.DOCUMENTMANIFEST;
5643        if ("DocumentReference".equals(codeString))
5644          return FHIRAllTypes.DOCUMENTREFERENCE;
5645        if ("Encounter".equals(codeString))
5646          return FHIRAllTypes.ENCOUNTER;
5647        if ("Endpoint".equals(codeString))
5648          return FHIRAllTypes.ENDPOINT;
5649        if ("EnrollmentRequest".equals(codeString))
5650          return FHIRAllTypes.ENROLLMENTREQUEST;
5651        if ("EnrollmentResponse".equals(codeString))
5652          return FHIRAllTypes.ENROLLMENTRESPONSE;
5653        if ("EpisodeOfCare".equals(codeString))
5654          return FHIRAllTypes.EPISODEOFCARE;
5655        if ("ExplanationOfBenefit".equals(codeString))
5656          return FHIRAllTypes.EXPLANATIONOFBENEFIT;
5657        if ("FamilyMemberHistory".equals(codeString))
5658          return FHIRAllTypes.FAMILYMEMBERHISTORY;
5659        if ("Flag".equals(codeString))
5660          return FHIRAllTypes.FLAG;
5661        if ("Goal".equals(codeString))
5662          return FHIRAllTypes.GOAL;
5663        if ("Group".equals(codeString))
5664          return FHIRAllTypes.GROUP;
5665        if ("GuidanceResponse".equals(codeString))
5666          return FHIRAllTypes.GUIDANCERESPONSE;
5667        if ("HealthcareService".equals(codeString))
5668          return FHIRAllTypes.HEALTHCARESERVICE;
5669        if ("ImagingSelection".equals(codeString))
5670          return FHIRAllTypes.IMAGINGSELECTION;
5671        if ("ImagingStudy".equals(codeString))
5672          return FHIRAllTypes.IMAGINGSTUDY;
5673        if ("Immunization".equals(codeString))
5674          return FHIRAllTypes.IMMUNIZATION;
5675        if ("ImmunizationEvaluation".equals(codeString))
5676          return FHIRAllTypes.IMMUNIZATIONEVALUATION;
5677        if ("ImmunizationRecommendation".equals(codeString))
5678          return FHIRAllTypes.IMMUNIZATIONRECOMMENDATION;
5679        if ("Ingredient".equals(codeString))
5680          return FHIRAllTypes.INGREDIENT;
5681        if ("InsurancePlan".equals(codeString))
5682          return FHIRAllTypes.INSURANCEPLAN;
5683        if ("InventoryReport".equals(codeString))
5684          return FHIRAllTypes.INVENTORYREPORT;
5685        if ("Invoice".equals(codeString))
5686          return FHIRAllTypes.INVOICE;
5687        if ("Linkage".equals(codeString))
5688          return FHIRAllTypes.LINKAGE;
5689        if ("List".equals(codeString))
5690          return FHIRAllTypes.LIST;
5691        if ("Location".equals(codeString))
5692          return FHIRAllTypes.LOCATION;
5693        if ("ManufacturedItemDefinition".equals(codeString))
5694          return FHIRAllTypes.MANUFACTUREDITEMDEFINITION;
5695        if ("MeasureReport".equals(codeString))
5696          return FHIRAllTypes.MEASUREREPORT;
5697        if ("Medication".equals(codeString))
5698          return FHIRAllTypes.MEDICATION;
5699        if ("MedicationAdministration".equals(codeString))
5700          return FHIRAllTypes.MEDICATIONADMINISTRATION;
5701        if ("MedicationDispense".equals(codeString))
5702          return FHIRAllTypes.MEDICATIONDISPENSE;
5703        if ("MedicationKnowledge".equals(codeString))
5704          return FHIRAllTypes.MEDICATIONKNOWLEDGE;
5705        if ("MedicationRequest".equals(codeString))
5706          return FHIRAllTypes.MEDICATIONREQUEST;
5707        if ("MedicationUsage".equals(codeString))
5708          return FHIRAllTypes.MEDICATIONUSAGE;
5709        if ("MedicinalProductDefinition".equals(codeString))
5710          return FHIRAllTypes.MEDICINALPRODUCTDEFINITION;
5711        if ("MessageHeader".equals(codeString))
5712          return FHIRAllTypes.MESSAGEHEADER;
5713        if ("MolecularSequence".equals(codeString))
5714          return FHIRAllTypes.MOLECULARSEQUENCE;
5715        if ("NutritionIntake".equals(codeString))
5716          return FHIRAllTypes.NUTRITIONINTAKE;
5717        if ("NutritionOrder".equals(codeString))
5718          return FHIRAllTypes.NUTRITIONORDER;
5719        if ("NutritionProduct".equals(codeString))
5720          return FHIRAllTypes.NUTRITIONPRODUCT;
5721        if ("Observation".equals(codeString))
5722          return FHIRAllTypes.OBSERVATION;
5723        if ("ObservationDefinition".equals(codeString))
5724          return FHIRAllTypes.OBSERVATIONDEFINITION;
5725        if ("OperationOutcome".equals(codeString))
5726          return FHIRAllTypes.OPERATIONOUTCOME;
5727        if ("Organization".equals(codeString))
5728          return FHIRAllTypes.ORGANIZATION;
5729        if ("OrganizationAffiliation".equals(codeString))
5730          return FHIRAllTypes.ORGANIZATIONAFFILIATION;
5731        if ("PackagedProductDefinition".equals(codeString))
5732          return FHIRAllTypes.PACKAGEDPRODUCTDEFINITION;
5733        if ("Patient".equals(codeString))
5734          return FHIRAllTypes.PATIENT;
5735        if ("PaymentNotice".equals(codeString))
5736          return FHIRAllTypes.PAYMENTNOTICE;
5737        if ("PaymentReconciliation".equals(codeString))
5738          return FHIRAllTypes.PAYMENTRECONCILIATION;
5739        if ("Permission".equals(codeString))
5740          return FHIRAllTypes.PERMISSION;
5741        if ("Person".equals(codeString))
5742          return FHIRAllTypes.PERSON;
5743        if ("Practitioner".equals(codeString))
5744          return FHIRAllTypes.PRACTITIONER;
5745        if ("PractitionerRole".equals(codeString))
5746          return FHIRAllTypes.PRACTITIONERROLE;
5747        if ("Procedure".equals(codeString))
5748          return FHIRAllTypes.PROCEDURE;
5749        if ("Provenance".equals(codeString))
5750          return FHIRAllTypes.PROVENANCE;
5751        if ("QuestionnaireResponse".equals(codeString))
5752          return FHIRAllTypes.QUESTIONNAIRERESPONSE;
5753        if ("RegulatedAuthorization".equals(codeString))
5754          return FHIRAllTypes.REGULATEDAUTHORIZATION;
5755        if ("RelatedPerson".equals(codeString))
5756          return FHIRAllTypes.RELATEDPERSON;
5757        if ("RequestGroup".equals(codeString))
5758          return FHIRAllTypes.REQUESTGROUP;
5759        if ("ResearchStudy".equals(codeString))
5760          return FHIRAllTypes.RESEARCHSTUDY;
5761        if ("ResearchSubject".equals(codeString))
5762          return FHIRAllTypes.RESEARCHSUBJECT;
5763        if ("RiskAssessment".equals(codeString))
5764          return FHIRAllTypes.RISKASSESSMENT;
5765        if ("Schedule".equals(codeString))
5766          return FHIRAllTypes.SCHEDULE;
5767        if ("ServiceRequest".equals(codeString))
5768          return FHIRAllTypes.SERVICEREQUEST;
5769        if ("Slot".equals(codeString))
5770          return FHIRAllTypes.SLOT;
5771        if ("Specimen".equals(codeString))
5772          return FHIRAllTypes.SPECIMEN;
5773        if ("SpecimenDefinition".equals(codeString))
5774          return FHIRAllTypes.SPECIMENDEFINITION;
5775        if ("Subscription".equals(codeString))
5776          return FHIRAllTypes.SUBSCRIPTION;
5777        if ("SubscriptionStatus".equals(codeString))
5778          return FHIRAllTypes.SUBSCRIPTIONSTATUS;
5779        if ("SubscriptionTopic".equals(codeString))
5780          return FHIRAllTypes.SUBSCRIPTIONTOPIC;
5781        if ("Substance".equals(codeString))
5782          return FHIRAllTypes.SUBSTANCE;
5783        if ("SubstanceDefinition".equals(codeString))
5784          return FHIRAllTypes.SUBSTANCEDEFINITION;
5785        if ("SubstanceNucleicAcid".equals(codeString))
5786          return FHIRAllTypes.SUBSTANCENUCLEICACID;
5787        if ("SubstancePolymer".equals(codeString))
5788          return FHIRAllTypes.SUBSTANCEPOLYMER;
5789        if ("SubstanceProtein".equals(codeString))
5790          return FHIRAllTypes.SUBSTANCEPROTEIN;
5791        if ("SubstanceReferenceInformation".equals(codeString))
5792          return FHIRAllTypes.SUBSTANCEREFERENCEINFORMATION;
5793        if ("SubstanceSourceMaterial".equals(codeString))
5794          return FHIRAllTypes.SUBSTANCESOURCEMATERIAL;
5795        if ("SupplyDelivery".equals(codeString))
5796          return FHIRAllTypes.SUPPLYDELIVERY;
5797        if ("SupplyRequest".equals(codeString))
5798          return FHIRAllTypes.SUPPLYREQUEST;
5799        if ("Task".equals(codeString))
5800          return FHIRAllTypes.TASK;
5801        if ("TestReport".equals(codeString))
5802          return FHIRAllTypes.TESTREPORT;
5803        if ("VerificationResult".equals(codeString))
5804          return FHIRAllTypes.VERIFICATIONRESULT;
5805        if ("VisionPrescription".equals(codeString))
5806          return FHIRAllTypes.VISIONPRESCRIPTION;
5807        if ("Parameters".equals(codeString))
5808          return FHIRAllTypes.PARAMETERS;
5809        if ("Type".equals(codeString))
5810          return FHIRAllTypes.TYPE;
5811        if ("Any".equals(codeString))
5812          return FHIRAllTypes.ANY;
5813        throw new IllegalArgumentException("Unknown FHIRAllTypes code '"+codeString+"'");
5814        }
5815        public Enumeration<FHIRAllTypes> fromType(Base code) throws FHIRException {
5816          if (code == null)
5817            return null;
5818          if (code.isEmpty())
5819            return new Enumeration<FHIRAllTypes>(this);
5820          String codeString = ((PrimitiveType) code).asStringValue();
5821          if (codeString == null || "".equals(codeString))
5822            return null;
5823        if ("Address".equals(codeString))
5824          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADDRESS);
5825        if ("Age".equals(codeString))
5826          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.AGE);
5827        if ("Annotation".equals(codeString))
5828          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ANNOTATION);
5829        if ("Attachment".equals(codeString))
5830          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ATTACHMENT);
5831        if ("BackboneElement".equals(codeString))
5832          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BACKBONEELEMENT);
5833        if ("BackboneType".equals(codeString))
5834          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BACKBONETYPE);
5835        if ("Base".equals(codeString))
5836          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASE);
5837        if ("CodeableConcept".equals(codeString))
5838          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODEABLECONCEPT);
5839        if ("CodeableReference".equals(codeString))
5840          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODEABLEREFERENCE);
5841        if ("Coding".equals(codeString))
5842          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODING);
5843        if ("ContactDetail".equals(codeString))
5844          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTACTDETAIL);
5845        if ("ContactPoint".equals(codeString))
5846          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTACTPOINT);
5847        if ("Contributor".equals(codeString))
5848          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTRIBUTOR);
5849        if ("Count".equals(codeString))
5850          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COUNT);
5851        if ("DataRequirement".equals(codeString))
5852          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATAREQUIREMENT);
5853        if ("DataType".equals(codeString))
5854          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATATYPE);
5855        if ("Distance".equals(codeString))
5856          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DISTANCE);
5857        if ("Dosage".equals(codeString))
5858          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOSAGE);
5859        if ("Duration".equals(codeString))
5860          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DURATION);
5861        if ("Element".equals(codeString))
5862          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELEMENT);
5863        if ("ElementDefinition".equals(codeString))
5864          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELEMENTDEFINITION);
5865        if ("Expression".equals(codeString))
5866          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXPRESSION);
5867        if ("Extension".equals(codeString))
5868          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXTENSION);
5869        if ("HumanName".equals(codeString))
5870          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.HUMANNAME);
5871        if ("Identifier".equals(codeString))
5872          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IDENTIFIER);
5873        if ("MarketingStatus".equals(codeString))
5874          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MARKETINGSTATUS);
5875        if ("Meta".equals(codeString))
5876          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.META);
5877        if ("Money".equals(codeString))
5878          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MONEY);
5879        if ("MoneyQuantity".equals(codeString))
5880          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MONEYQUANTITY);
5881        if ("Narrative".equals(codeString))
5882          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NARRATIVE);
5883        if ("ParameterDefinition".equals(codeString))
5884          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PARAMETERDEFINITION);
5885        if ("Period".equals(codeString))
5886          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERIOD);
5887        if ("Population".equals(codeString))
5888          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.POPULATION);
5889        if ("PrimitiveType".equals(codeString))
5890          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRIMITIVETYPE);
5891        if ("ProdCharacteristic".equals(codeString))
5892          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRODCHARACTERISTIC);
5893        if ("ProductShelfLife".equals(codeString))
5894          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRODUCTSHELFLIFE);
5895        if ("Quantity".equals(codeString))
5896          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUANTITY);
5897        if ("Range".equals(codeString))
5898          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RANGE);
5899        if ("Ratio".equals(codeString))
5900          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RATIO);
5901        if ("RatioRange".equals(codeString))
5902          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RATIORANGE);
5903        if ("Reference".equals(codeString))
5904          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REFERENCE);
5905        if ("RelatedArtifact".equals(codeString))
5906          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RELATEDARTIFACT);
5907        if ("SampledData".equals(codeString))
5908          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SAMPLEDDATA);
5909        if ("Signature".equals(codeString))
5910          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SIGNATURE);
5911        if ("SimpleQuantity".equals(codeString))
5912          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SIMPLEQUANTITY);
5913        if ("Timing".equals(codeString))
5914          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TIMING);
5915        if ("TriggerDefinition".equals(codeString))
5916          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TRIGGERDEFINITION);
5917        if ("UsageContext".equals(codeString))
5918          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.USAGECONTEXT);
5919        if ("base64Binary".equals(codeString))
5920          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASE64BINARY);
5921        if ("boolean".equals(codeString))
5922          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BOOLEAN);
5923        if ("canonical".equals(codeString))
5924          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CANONICAL);
5925        if ("code".equals(codeString))
5926          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODE);
5927        if ("date".equals(codeString))
5928          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATE);
5929        if ("dateTime".equals(codeString))
5930          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATETIME);
5931        if ("decimal".equals(codeString))
5932          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DECIMAL);
5933        if ("id".equals(codeString))
5934          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ID);
5935        if ("instant".equals(codeString))
5936          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INSTANT);
5937        if ("integer".equals(codeString))
5938          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INTEGER);
5939        if ("integer64".equals(codeString))
5940          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INTEGER64);
5941        if ("markdown".equals(codeString))
5942          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MARKDOWN);
5943        if ("oid".equals(codeString))
5944          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OID);
5945        if ("positiveInt".equals(codeString))
5946          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.POSITIVEINT);
5947        if ("string".equals(codeString))
5948          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRING);
5949        if ("time".equals(codeString))
5950          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TIME);
5951        if ("unsignedInt".equals(codeString))
5952          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.UNSIGNEDINT);
5953        if ("uri".equals(codeString))
5954          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.URI);
5955        if ("url".equals(codeString))
5956          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.URL);
5957        if ("uuid".equals(codeString))
5958          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.UUID);
5959        if ("xhtml".equals(codeString))
5960          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.XHTML);
5961        if ("Resource".equals(codeString))
5962          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESOURCE);
5963        if ("Binary".equals(codeString))
5964          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BINARY);
5965        if ("Bundle".equals(codeString))
5966          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BUNDLE);
5967        if ("DomainResource".equals(codeString))
5968          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOMAINRESOURCE);
5969        if ("Account".equals(codeString))
5970          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ACCOUNT);
5971        if ("AdministrableProductDefinition".equals(codeString))
5972          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADMINISTRABLEPRODUCTDEFINITION);
5973        if ("AdverseEvent".equals(codeString))
5974          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADVERSEEVENT);
5975        if ("AllergyIntolerance".equals(codeString))
5976          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ALLERGYINTOLERANCE);
5977        if ("Appointment".equals(codeString))
5978          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.APPOINTMENT);
5979        if ("AppointmentResponse".equals(codeString))
5980          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.APPOINTMENTRESPONSE);
5981        if ("AuditEvent".equals(codeString))
5982          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.AUDITEVENT);
5983        if ("Basic".equals(codeString))
5984          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASIC);
5985        if ("BiologicallyDerivedProduct".equals(codeString))
5986          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BIOLOGICALLYDERIVEDPRODUCT);
5987        if ("BodyStructure".equals(codeString))
5988          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BODYSTRUCTURE);
5989        if ("CanonicalResource".equals(codeString))
5990          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CANONICALRESOURCE);
5991        if ("CapabilityStatement".equals(codeString))
5992          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CAPABILITYSTATEMENT);
5993        if ("CapabilityStatement2".equals(codeString))
5994          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CAPABILITYSTATEMENT2);
5995        if ("CodeSystem".equals(codeString))
5996          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODESYSTEM);
5997        if ("CompartmentDefinition".equals(codeString))
5998          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMPARTMENTDEFINITION);
5999        if ("ConceptMap".equals(codeString))
6000          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONCEPTMAP);
6001        if ("ConceptMap2".equals(codeString))
6002          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONCEPTMAP2);
6003        if ("ExampleScenario".equals(codeString))
6004          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXAMPLESCENARIO);
6005        if ("GraphDefinition".equals(codeString))
6006          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GRAPHDEFINITION);
6007        if ("ImplementationGuide".equals(codeString))
6008          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMPLEMENTATIONGUIDE);
6009        if ("MessageDefinition".equals(codeString))
6010          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MESSAGEDEFINITION);
6011        if ("MetadataResource".equals(codeString))
6012          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.METADATARESOURCE);
6013        if ("ActivityDefinition".equals(codeString))
6014          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ACTIVITYDEFINITION);
6015        if ("ArtifactAssessment".equals(codeString))
6016          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ARTIFACTASSESSMENT);
6017        if ("ChargeItemDefinition".equals(codeString))
6018          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CHARGEITEMDEFINITION);
6019        if ("Citation".equals(codeString))
6020          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CITATION);
6021        if ("ConditionDefinition".equals(codeString))
6022          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONDITIONDEFINITION);
6023        if ("EventDefinition".equals(codeString))
6024          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVENTDEFINITION);
6025        if ("Evidence".equals(codeString))
6026          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVIDENCE);
6027        if ("EvidenceReport".equals(codeString))
6028          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVIDENCEREPORT);
6029        if ("EvidenceVariable".equals(codeString))
6030          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVIDENCEVARIABLE);
6031        if ("Library".equals(codeString))
6032          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LIBRARY);
6033        if ("Measure".equals(codeString))
6034          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEASURE);
6035        if ("PlanDefinition".equals(codeString))
6036          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PLANDEFINITION);
6037        if ("Questionnaire".equals(codeString))
6038          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUESTIONNAIRE);
6039        if ("NamingSystem".equals(codeString))
6040          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NAMINGSYSTEM);
6041        if ("OperationDefinition".equals(codeString))
6042          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OPERATIONDEFINITION);
6043        if ("SearchParameter".equals(codeString))
6044          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SEARCHPARAMETER);
6045        if ("StructureDefinition".equals(codeString))
6046          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRUCTUREDEFINITION);
6047        if ("StructureMap".equals(codeString))
6048          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRUCTUREMAP);
6049        if ("TerminologyCapabilities".equals(codeString))
6050          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TERMINOLOGYCAPABILITIES);
6051        if ("TestScript".equals(codeString))
6052          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TESTSCRIPT);
6053        if ("ValueSet".equals(codeString))
6054          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VALUESET);
6055        if ("CarePlan".equals(codeString))
6056          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CAREPLAN);
6057        if ("CareTeam".equals(codeString))
6058          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CARETEAM);
6059        if ("ChargeItem".equals(codeString))
6060          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CHARGEITEM);
6061        if ("Claim".equals(codeString))
6062          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLAIM);
6063        if ("ClaimResponse".equals(codeString))
6064          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLAIMRESPONSE);
6065        if ("ClinicalImpression".equals(codeString))
6066          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLINICALIMPRESSION);
6067        if ("ClinicalUseDefinition".equals(codeString))
6068          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLINICALUSEDEFINITION);
6069        if ("ClinicalUseIssue".equals(codeString))
6070          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLINICALUSEISSUE);
6071        if ("Communication".equals(codeString))
6072          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMMUNICATION);
6073        if ("CommunicationRequest".equals(codeString))
6074          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMMUNICATIONREQUEST);
6075        if ("Composition".equals(codeString))
6076          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMPOSITION);
6077        if ("Condition".equals(codeString))
6078          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONDITION);
6079        if ("Consent".equals(codeString))
6080          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONSENT);
6081        if ("Contract".equals(codeString))
6082          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTRACT);
6083        if ("Coverage".equals(codeString))
6084          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGE);
6085        if ("CoverageEligibilityRequest".equals(codeString))
6086          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGEELIGIBILITYREQUEST);
6087        if ("CoverageEligibilityResponse".equals(codeString))
6088          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGEELIGIBILITYRESPONSE);
6089        if ("DetectedIssue".equals(codeString))
6090          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DETECTEDISSUE);
6091        if ("Device".equals(codeString))
6092          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICE);
6093        if ("DeviceDefinition".equals(codeString))
6094          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEDEFINITION);
6095        if ("DeviceDispense".equals(codeString))
6096          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEDISPENSE);
6097        if ("DeviceMetric".equals(codeString))
6098          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEMETRIC);
6099        if ("DeviceRequest".equals(codeString))
6100          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEREQUEST);
6101        if ("DeviceUsage".equals(codeString))
6102          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEUSAGE);
6103        if ("DiagnosticReport".equals(codeString))
6104          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DIAGNOSTICREPORT);
6105        if ("DocumentManifest".equals(codeString))
6106          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOCUMENTMANIFEST);
6107        if ("DocumentReference".equals(codeString))
6108          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOCUMENTREFERENCE);
6109        if ("Encounter".equals(codeString))
6110          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENCOUNTER);
6111        if ("Endpoint".equals(codeString))
6112          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENDPOINT);
6113        if ("EnrollmentRequest".equals(codeString))
6114          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENROLLMENTREQUEST);
6115        if ("EnrollmentResponse".equals(codeString))
6116          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENROLLMENTRESPONSE);
6117        if ("EpisodeOfCare".equals(codeString))
6118          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EPISODEOFCARE);
6119        if ("ExplanationOfBenefit".equals(codeString))
6120          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXPLANATIONOFBENEFIT);
6121        if ("FamilyMemberHistory".equals(codeString))
6122          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.FAMILYMEMBERHISTORY);
6123        if ("Flag".equals(codeString))
6124          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.FLAG);
6125        if ("Goal".equals(codeString))
6126          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GOAL);
6127        if ("Group".equals(codeString))
6128          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GROUP);
6129        if ("GuidanceResponse".equals(codeString))
6130          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GUIDANCERESPONSE);
6131        if ("HealthcareService".equals(codeString))
6132          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.HEALTHCARESERVICE);
6133        if ("ImagingSelection".equals(codeString))
6134          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMAGINGSELECTION);
6135        if ("ImagingStudy".equals(codeString))
6136          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMAGINGSTUDY);
6137        if ("Immunization".equals(codeString))
6138          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATION);
6139        if ("ImmunizationEvaluation".equals(codeString))
6140          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATIONEVALUATION);
6141        if ("ImmunizationRecommendation".equals(codeString))
6142          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATIONRECOMMENDATION);
6143        if ("Ingredient".equals(codeString))
6144          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INGREDIENT);
6145        if ("InsurancePlan".equals(codeString))
6146          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INSURANCEPLAN);
6147        if ("InventoryReport".equals(codeString))
6148          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INVENTORYREPORT);
6149        if ("Invoice".equals(codeString))
6150          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INVOICE);
6151        if ("Linkage".equals(codeString))
6152          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LINKAGE);
6153        if ("List".equals(codeString))
6154          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LIST);
6155        if ("Location".equals(codeString))
6156          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LOCATION);
6157        if ("ManufacturedItemDefinition".equals(codeString))
6158          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MANUFACTUREDITEMDEFINITION);
6159        if ("MeasureReport".equals(codeString))
6160          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEASUREREPORT);
6161        if ("Medication".equals(codeString))
6162          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATION);
6163        if ("MedicationAdministration".equals(codeString))
6164          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONADMINISTRATION);
6165        if ("MedicationDispense".equals(codeString))
6166          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONDISPENSE);
6167        if ("MedicationKnowledge".equals(codeString))
6168          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONKNOWLEDGE);
6169        if ("MedicationRequest".equals(codeString))
6170          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONREQUEST);
6171        if ("MedicationUsage".equals(codeString))
6172          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONUSAGE);
6173        if ("MedicinalProductDefinition".equals(codeString))
6174          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICINALPRODUCTDEFINITION);
6175        if ("MessageHeader".equals(codeString))
6176          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MESSAGEHEADER);
6177        if ("MolecularSequence".equals(codeString))
6178          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MOLECULARSEQUENCE);
6179        if ("NutritionIntake".equals(codeString))
6180          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NUTRITIONINTAKE);
6181        if ("NutritionOrder".equals(codeString))
6182          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NUTRITIONORDER);
6183        if ("NutritionProduct".equals(codeString))
6184          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NUTRITIONPRODUCT);
6185        if ("Observation".equals(codeString))
6186          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OBSERVATION);
6187        if ("ObservationDefinition".equals(codeString))
6188          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OBSERVATIONDEFINITION);
6189        if ("OperationOutcome".equals(codeString))
6190          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OPERATIONOUTCOME);
6191        if ("Organization".equals(codeString))
6192          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ORGANIZATION);
6193        if ("OrganizationAffiliation".equals(codeString))
6194          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ORGANIZATIONAFFILIATION);
6195        if ("PackagedProductDefinition".equals(codeString))
6196          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PACKAGEDPRODUCTDEFINITION);
6197        if ("Patient".equals(codeString))
6198          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PATIENT);
6199        if ("PaymentNotice".equals(codeString))
6200          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PAYMENTNOTICE);
6201        if ("PaymentReconciliation".equals(codeString))
6202          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PAYMENTRECONCILIATION);
6203        if ("Permission".equals(codeString))
6204          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERMISSION);
6205        if ("Person".equals(codeString))
6206          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERSON);
6207        if ("Practitioner".equals(codeString))
6208          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRACTITIONER);
6209        if ("PractitionerRole".equals(codeString))
6210          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRACTITIONERROLE);
6211        if ("Procedure".equals(codeString))
6212          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROCEDURE);
6213        if ("Provenance".equals(codeString))
6214          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROVENANCE);
6215        if ("QuestionnaireResponse".equals(codeString))
6216          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUESTIONNAIRERESPONSE);
6217        if ("RegulatedAuthorization".equals(codeString))
6218          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REGULATEDAUTHORIZATION);
6219        if ("RelatedPerson".equals(codeString))
6220          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RELATEDPERSON);
6221        if ("RequestGroup".equals(codeString))
6222          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REQUESTGROUP);
6223        if ("ResearchStudy".equals(codeString))
6224          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHSTUDY);
6225        if ("ResearchSubject".equals(codeString))
6226          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHSUBJECT);
6227        if ("RiskAssessment".equals(codeString))
6228          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RISKASSESSMENT);
6229        if ("Schedule".equals(codeString))
6230          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SCHEDULE);
6231        if ("ServiceRequest".equals(codeString))
6232          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SERVICEREQUEST);
6233        if ("Slot".equals(codeString))
6234          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SLOT);
6235        if ("Specimen".equals(codeString))
6236          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SPECIMEN);
6237        if ("SpecimenDefinition".equals(codeString))
6238          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SPECIMENDEFINITION);
6239        if ("Subscription".equals(codeString))
6240          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSCRIPTION);
6241        if ("SubscriptionStatus".equals(codeString))
6242          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSCRIPTIONSTATUS);
6243        if ("SubscriptionTopic".equals(codeString))
6244          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSCRIPTIONTOPIC);
6245        if ("Substance".equals(codeString))
6246          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCE);
6247        if ("SubstanceDefinition".equals(codeString))
6248          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCEDEFINITION);
6249        if ("SubstanceNucleicAcid".equals(codeString))
6250          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCENUCLEICACID);
6251        if ("SubstancePolymer".equals(codeString))
6252          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCEPOLYMER);
6253        if ("SubstanceProtein".equals(codeString))
6254          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCEPROTEIN);
6255        if ("SubstanceReferenceInformation".equals(codeString))
6256          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCEREFERENCEINFORMATION);
6257        if ("SubstanceSourceMaterial".equals(codeString))
6258          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCESOURCEMATERIAL);
6259        if ("SupplyDelivery".equals(codeString))
6260          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUPPLYDELIVERY);
6261        if ("SupplyRequest".equals(codeString))
6262          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUPPLYREQUEST);
6263        if ("Task".equals(codeString))
6264          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TASK);
6265        if ("TestReport".equals(codeString))
6266          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TESTREPORT);
6267        if ("VerificationResult".equals(codeString))
6268          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VERIFICATIONRESULT);
6269        if ("VisionPrescription".equals(codeString))
6270          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VISIONPRESCRIPTION);
6271        if ("Parameters".equals(codeString))
6272          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PARAMETERS);
6273        if ("Type".equals(codeString))
6274          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TYPE);
6275        if ("Any".equals(codeString))
6276          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ANY);
6277        throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'");
6278        }
6279    public String toCode(FHIRAllTypes code) {
6280      if (code == FHIRAllTypes.ADDRESS)
6281        return "Address";
6282      if (code == FHIRAllTypes.AGE)
6283        return "Age";
6284      if (code == FHIRAllTypes.ANNOTATION)
6285        return "Annotation";
6286      if (code == FHIRAllTypes.ATTACHMENT)
6287        return "Attachment";
6288      if (code == FHIRAllTypes.BACKBONEELEMENT)
6289        return "BackboneElement";
6290      if (code == FHIRAllTypes.BACKBONETYPE)
6291        return "BackboneType";
6292      if (code == FHIRAllTypes.BASE)
6293        return "Base";
6294      if (code == FHIRAllTypes.CODEABLECONCEPT)
6295        return "CodeableConcept";
6296      if (code == FHIRAllTypes.CODEABLEREFERENCE)
6297        return "CodeableReference";
6298      if (code == FHIRAllTypes.CODING)
6299        return "Coding";
6300      if (code == FHIRAllTypes.CONTACTDETAIL)
6301        return "ContactDetail";
6302      if (code == FHIRAllTypes.CONTACTPOINT)
6303        return "ContactPoint";
6304      if (code == FHIRAllTypes.CONTRIBUTOR)
6305        return "Contributor";
6306      if (code == FHIRAllTypes.COUNT)
6307        return "Count";
6308      if (code == FHIRAllTypes.DATAREQUIREMENT)
6309        return "DataRequirement";
6310      if (code == FHIRAllTypes.DATATYPE)
6311        return "DataType";
6312      if (code == FHIRAllTypes.DISTANCE)
6313        return "Distance";
6314      if (code == FHIRAllTypes.DOSAGE)
6315        return "Dosage";
6316      if (code == FHIRAllTypes.DURATION)
6317        return "Duration";
6318      if (code == FHIRAllTypes.ELEMENT)
6319        return "Element";
6320      if (code == FHIRAllTypes.ELEMENTDEFINITION)
6321        return "ElementDefinition";
6322      if (code == FHIRAllTypes.EXPRESSION)
6323        return "Expression";
6324      if (code == FHIRAllTypes.EXTENSION)
6325        return "Extension";
6326      if (code == FHIRAllTypes.HUMANNAME)
6327        return "HumanName";
6328      if (code == FHIRAllTypes.IDENTIFIER)
6329        return "Identifier";
6330      if (code == FHIRAllTypes.MARKETINGSTATUS)
6331        return "MarketingStatus";
6332      if (code == FHIRAllTypes.META)
6333        return "Meta";
6334      if (code == FHIRAllTypes.MONEY)
6335        return "Money";
6336      if (code == FHIRAllTypes.MONEYQUANTITY)
6337        return "MoneyQuantity";
6338      if (code == FHIRAllTypes.NARRATIVE)
6339        return "Narrative";
6340      if (code == FHIRAllTypes.PARAMETERDEFINITION)
6341        return "ParameterDefinition";
6342      if (code == FHIRAllTypes.PERIOD)
6343        return "Period";
6344      if (code == FHIRAllTypes.POPULATION)
6345        return "Population";
6346      if (code == FHIRAllTypes.PRIMITIVETYPE)
6347        return "PrimitiveType";
6348      if (code == FHIRAllTypes.PRODCHARACTERISTIC)
6349        return "ProdCharacteristic";
6350      if (code == FHIRAllTypes.PRODUCTSHELFLIFE)
6351        return "ProductShelfLife";
6352      if (code == FHIRAllTypes.QUANTITY)
6353        return "Quantity";
6354      if (code == FHIRAllTypes.RANGE)
6355        return "Range";
6356      if (code == FHIRAllTypes.RATIO)
6357        return "Ratio";
6358      if (code == FHIRAllTypes.RATIORANGE)
6359        return "RatioRange";
6360      if (code == FHIRAllTypes.REFERENCE)
6361        return "Reference";
6362      if (code == FHIRAllTypes.RELATEDARTIFACT)
6363        return "RelatedArtifact";
6364      if (code == FHIRAllTypes.SAMPLEDDATA)
6365        return "SampledData";
6366      if (code == FHIRAllTypes.SIGNATURE)
6367        return "Signature";
6368      if (code == FHIRAllTypes.SIMPLEQUANTITY)
6369        return "SimpleQuantity";
6370      if (code == FHIRAllTypes.TIMING)
6371        return "Timing";
6372      if (code == FHIRAllTypes.TRIGGERDEFINITION)
6373        return "TriggerDefinition";
6374      if (code == FHIRAllTypes.USAGECONTEXT)
6375        return "UsageContext";
6376      if (code == FHIRAllTypes.BASE64BINARY)
6377        return "base64Binary";
6378      if (code == FHIRAllTypes.BOOLEAN)
6379        return "boolean";
6380      if (code == FHIRAllTypes.CANONICAL)
6381        return "canonical";
6382      if (code == FHIRAllTypes.CODE)
6383        return "code";
6384      if (code == FHIRAllTypes.DATE)
6385        return "date";
6386      if (code == FHIRAllTypes.DATETIME)
6387        return "dateTime";
6388      if (code == FHIRAllTypes.DECIMAL)
6389        return "decimal";
6390      if (code == FHIRAllTypes.ID)
6391        return "id";
6392      if (code == FHIRAllTypes.INSTANT)
6393        return "instant";
6394      if (code == FHIRAllTypes.INTEGER)
6395        return "integer";
6396      if (code == FHIRAllTypes.INTEGER64)
6397        return "integer64";
6398      if (code == FHIRAllTypes.MARKDOWN)
6399        return "markdown";
6400      if (code == FHIRAllTypes.OID)
6401        return "oid";
6402      if (code == FHIRAllTypes.POSITIVEINT)
6403        return "positiveInt";
6404      if (code == FHIRAllTypes.STRING)
6405        return "string";
6406      if (code == FHIRAllTypes.TIME)
6407        return "time";
6408      if (code == FHIRAllTypes.UNSIGNEDINT)
6409        return "unsignedInt";
6410      if (code == FHIRAllTypes.URI)
6411        return "uri";
6412      if (code == FHIRAllTypes.URL)
6413        return "url";
6414      if (code == FHIRAllTypes.UUID)
6415        return "uuid";
6416      if (code == FHIRAllTypes.XHTML)
6417        return "xhtml";
6418      if (code == FHIRAllTypes.RESOURCE)
6419        return "Resource";
6420      if (code == FHIRAllTypes.BINARY)
6421        return "Binary";
6422      if (code == FHIRAllTypes.BUNDLE)
6423        return "Bundle";
6424      if (code == FHIRAllTypes.DOMAINRESOURCE)
6425        return "DomainResource";
6426      if (code == FHIRAllTypes.ACCOUNT)
6427        return "Account";
6428      if (code == FHIRAllTypes.ADMINISTRABLEPRODUCTDEFINITION)
6429        return "AdministrableProductDefinition";
6430      if (code == FHIRAllTypes.ADVERSEEVENT)
6431        return "AdverseEvent";
6432      if (code == FHIRAllTypes.ALLERGYINTOLERANCE)
6433        return "AllergyIntolerance";
6434      if (code == FHIRAllTypes.APPOINTMENT)
6435        return "Appointment";
6436      if (code == FHIRAllTypes.APPOINTMENTRESPONSE)
6437        return "AppointmentResponse";
6438      if (code == FHIRAllTypes.AUDITEVENT)
6439        return "AuditEvent";
6440      if (code == FHIRAllTypes.BASIC)
6441        return "Basic";
6442      if (code == FHIRAllTypes.BIOLOGICALLYDERIVEDPRODUCT)
6443        return "BiologicallyDerivedProduct";
6444      if (code == FHIRAllTypes.BODYSTRUCTURE)
6445        return "BodyStructure";
6446      if (code == FHIRAllTypes.CANONICALRESOURCE)
6447        return "CanonicalResource";
6448      if (code == FHIRAllTypes.CAPABILITYSTATEMENT)
6449        return "CapabilityStatement";
6450      if (code == FHIRAllTypes.CAPABILITYSTATEMENT2)
6451        return "CapabilityStatement2";
6452      if (code == FHIRAllTypes.CODESYSTEM)
6453        return "CodeSystem";
6454      if (code == FHIRAllTypes.COMPARTMENTDEFINITION)
6455        return "CompartmentDefinition";
6456      if (code == FHIRAllTypes.CONCEPTMAP)
6457        return "ConceptMap";
6458      if (code == FHIRAllTypes.CONCEPTMAP2)
6459        return "ConceptMap2";
6460      if (code == FHIRAllTypes.EXAMPLESCENARIO)
6461        return "ExampleScenario";
6462      if (code == FHIRAllTypes.GRAPHDEFINITION)
6463        return "GraphDefinition";
6464      if (code == FHIRAllTypes.IMPLEMENTATIONGUIDE)
6465        return "ImplementationGuide";
6466      if (code == FHIRAllTypes.MESSAGEDEFINITION)
6467        return "MessageDefinition";
6468      if (code == FHIRAllTypes.METADATARESOURCE)
6469        return "MetadataResource";
6470      if (code == FHIRAllTypes.ACTIVITYDEFINITION)
6471        return "ActivityDefinition";
6472      if (code == FHIRAllTypes.ARTIFACTASSESSMENT)
6473        return "ArtifactAssessment";
6474      if (code == FHIRAllTypes.CHARGEITEMDEFINITION)
6475        return "ChargeItemDefinition";
6476      if (code == FHIRAllTypes.CITATION)
6477        return "Citation";
6478      if (code == FHIRAllTypes.CONDITIONDEFINITION)
6479        return "ConditionDefinition";
6480      if (code == FHIRAllTypes.EVENTDEFINITION)
6481        return "EventDefinition";
6482      if (code == FHIRAllTypes.EVIDENCE)
6483        return "Evidence";
6484      if (code == FHIRAllTypes.EVIDENCEREPORT)
6485        return "EvidenceReport";
6486      if (code == FHIRAllTypes.EVIDENCEVARIABLE)
6487        return "EvidenceVariable";
6488      if (code == FHIRAllTypes.LIBRARY)
6489        return "Library";
6490      if (code == FHIRAllTypes.MEASURE)
6491        return "Measure";
6492      if (code == FHIRAllTypes.PLANDEFINITION)
6493        return "PlanDefinition";
6494      if (code == FHIRAllTypes.QUESTIONNAIRE)
6495        return "Questionnaire";
6496      if (code == FHIRAllTypes.NAMINGSYSTEM)
6497        return "NamingSystem";
6498      if (code == FHIRAllTypes.OPERATIONDEFINITION)
6499        return "OperationDefinition";
6500      if (code == FHIRAllTypes.SEARCHPARAMETER)
6501        return "SearchParameter";
6502      if (code == FHIRAllTypes.STRUCTUREDEFINITION)
6503        return "StructureDefinition";
6504      if (code == FHIRAllTypes.STRUCTUREMAP)
6505        return "StructureMap";
6506      if (code == FHIRAllTypes.TERMINOLOGYCAPABILITIES)
6507        return "TerminologyCapabilities";
6508      if (code == FHIRAllTypes.TESTSCRIPT)
6509        return "TestScript";
6510      if (code == FHIRAllTypes.VALUESET)
6511        return "ValueSet";
6512      if (code == FHIRAllTypes.CAREPLAN)
6513        return "CarePlan";
6514      if (code == FHIRAllTypes.CARETEAM)
6515        return "CareTeam";
6516      if (code == FHIRAllTypes.CHARGEITEM)
6517        return "ChargeItem";
6518      if (code == FHIRAllTypes.CLAIM)
6519        return "Claim";
6520      if (code == FHIRAllTypes.CLAIMRESPONSE)
6521        return "ClaimResponse";
6522      if (code == FHIRAllTypes.CLINICALIMPRESSION)
6523        return "ClinicalImpression";
6524      if (code == FHIRAllTypes.CLINICALUSEDEFINITION)
6525        return "ClinicalUseDefinition";
6526      if (code == FHIRAllTypes.CLINICALUSEISSUE)
6527        return "ClinicalUseIssue";
6528      if (code == FHIRAllTypes.COMMUNICATION)
6529        return "Communication";
6530      if (code == FHIRAllTypes.COMMUNICATIONREQUEST)
6531        return "CommunicationRequest";
6532      if (code == FHIRAllTypes.COMPOSITION)
6533        return "Composition";
6534      if (code == FHIRAllTypes.CONDITION)
6535        return "Condition";
6536      if (code == FHIRAllTypes.CONSENT)
6537        return "Consent";
6538      if (code == FHIRAllTypes.CONTRACT)
6539        return "Contract";
6540      if (code == FHIRAllTypes.COVERAGE)
6541        return "Coverage";
6542      if (code == FHIRAllTypes.COVERAGEELIGIBILITYREQUEST)
6543        return "CoverageEligibilityRequest";
6544      if (code == FHIRAllTypes.COVERAGEELIGIBILITYRESPONSE)
6545        return "CoverageEligibilityResponse";
6546      if (code == FHIRAllTypes.DETECTEDISSUE)
6547        return "DetectedIssue";
6548      if (code == FHIRAllTypes.DEVICE)
6549        return "Device";
6550      if (code == FHIRAllTypes.DEVICEDEFINITION)
6551        return "DeviceDefinition";
6552      if (code == FHIRAllTypes.DEVICEDISPENSE)
6553        return "DeviceDispense";
6554      if (code == FHIRAllTypes.DEVICEMETRIC)
6555        return "DeviceMetric";
6556      if (code == FHIRAllTypes.DEVICEREQUEST)
6557        return "DeviceRequest";
6558      if (code == FHIRAllTypes.DEVICEUSAGE)
6559        return "DeviceUsage";
6560      if (code == FHIRAllTypes.DIAGNOSTICREPORT)
6561        return "DiagnosticReport";
6562      if (code == FHIRAllTypes.DOCUMENTMANIFEST)
6563        return "DocumentManifest";
6564      if (code == FHIRAllTypes.DOCUMENTREFERENCE)
6565        return "DocumentReference";
6566      if (code == FHIRAllTypes.ENCOUNTER)
6567        return "Encounter";
6568      if (code == FHIRAllTypes.ENDPOINT)
6569        return "Endpoint";
6570      if (code == FHIRAllTypes.ENROLLMENTREQUEST)
6571        return "EnrollmentRequest";
6572      if (code == FHIRAllTypes.ENROLLMENTRESPONSE)
6573        return "EnrollmentResponse";
6574      if (code == FHIRAllTypes.EPISODEOFCARE)
6575        return "EpisodeOfCare";
6576      if (code == FHIRAllTypes.EXPLANATIONOFBENEFIT)
6577        return "ExplanationOfBenefit";
6578      if (code == FHIRAllTypes.FAMILYMEMBERHISTORY)
6579        return "FamilyMemberHistory";
6580      if (code == FHIRAllTypes.FLAG)
6581        return "Flag";
6582      if (code == FHIRAllTypes.GOAL)
6583        return "Goal";
6584      if (code == FHIRAllTypes.GROUP)
6585        return "Group";
6586      if (code == FHIRAllTypes.GUIDANCERESPONSE)
6587        return "GuidanceResponse";
6588      if (code == FHIRAllTypes.HEALTHCARESERVICE)
6589        return "HealthcareService";
6590      if (code == FHIRAllTypes.IMAGINGSELECTION)
6591        return "ImagingSelection";
6592      if (code == FHIRAllTypes.IMAGINGSTUDY)
6593        return "ImagingStudy";
6594      if (code == FHIRAllTypes.IMMUNIZATION)
6595        return "Immunization";
6596      if (code == FHIRAllTypes.IMMUNIZATIONEVALUATION)
6597        return "ImmunizationEvaluation";
6598      if (code == FHIRAllTypes.IMMUNIZATIONRECOMMENDATION)
6599        return "ImmunizationRecommendation";
6600      if (code == FHIRAllTypes.INGREDIENT)
6601        return "Ingredient";
6602      if (code == FHIRAllTypes.INSURANCEPLAN)
6603        return "InsurancePlan";
6604      if (code == FHIRAllTypes.INVENTORYREPORT)
6605        return "InventoryReport";
6606      if (code == FHIRAllTypes.INVOICE)
6607        return "Invoice";
6608      if (code == FHIRAllTypes.LINKAGE)
6609        return "Linkage";
6610      if (code == FHIRAllTypes.LIST)
6611        return "List";
6612      if (code == FHIRAllTypes.LOCATION)
6613        return "Location";
6614      if (code == FHIRAllTypes.MANUFACTUREDITEMDEFINITION)
6615        return "ManufacturedItemDefinition";
6616      if (code == FHIRAllTypes.MEASUREREPORT)
6617        return "MeasureReport";
6618      if (code == FHIRAllTypes.MEDICATION)
6619        return "Medication";
6620      if (code == FHIRAllTypes.MEDICATIONADMINISTRATION)
6621        return "MedicationAdministration";
6622      if (code == FHIRAllTypes.MEDICATIONDISPENSE)
6623        return "MedicationDispense";
6624      if (code == FHIRAllTypes.MEDICATIONKNOWLEDGE)
6625        return "MedicationKnowledge";
6626      if (code == FHIRAllTypes.MEDICATIONREQUEST)
6627        return "MedicationRequest";
6628      if (code == FHIRAllTypes.MEDICATIONUSAGE)
6629        return "MedicationUsage";
6630      if (code == FHIRAllTypes.MEDICINALPRODUCTDEFINITION)
6631        return "MedicinalProductDefinition";
6632      if (code == FHIRAllTypes.MESSAGEHEADER)
6633        return "MessageHeader";
6634      if (code == FHIRAllTypes.MOLECULARSEQUENCE)
6635        return "MolecularSequence";
6636      if (code == FHIRAllTypes.NUTRITIONINTAKE)
6637        return "NutritionIntake";
6638      if (code == FHIRAllTypes.NUTRITIONORDER)
6639        return "NutritionOrder";
6640      if (code == FHIRAllTypes.NUTRITIONPRODUCT)
6641        return "NutritionProduct";
6642      if (code == FHIRAllTypes.OBSERVATION)
6643        return "Observation";
6644      if (code == FHIRAllTypes.OBSERVATIONDEFINITION)
6645        return "ObservationDefinition";
6646      if (code == FHIRAllTypes.OPERATIONOUTCOME)
6647        return "OperationOutcome";
6648      if (code == FHIRAllTypes.ORGANIZATION)
6649        return "Organization";
6650      if (code == FHIRAllTypes.ORGANIZATIONAFFILIATION)
6651        return "OrganizationAffiliation";
6652      if (code == FHIRAllTypes.PACKAGEDPRODUCTDEFINITION)
6653        return "PackagedProductDefinition";
6654      if (code == FHIRAllTypes.PATIENT)
6655        return "Patient";
6656      if (code == FHIRAllTypes.PAYMENTNOTICE)
6657        return "PaymentNotice";
6658      if (code == FHIRAllTypes.PAYMENTRECONCILIATION)
6659        return "PaymentReconciliation";
6660      if (code == FHIRAllTypes.PERMISSION)
6661        return "Permission";
6662      if (code == FHIRAllTypes.PERSON)
6663        return "Person";
6664      if (code == FHIRAllTypes.PRACTITIONER)
6665        return "Practitioner";
6666      if (code == FHIRAllTypes.PRACTITIONERROLE)
6667        return "PractitionerRole";
6668      if (code == FHIRAllTypes.PROCEDURE)
6669        return "Procedure";
6670      if (code == FHIRAllTypes.PROVENANCE)
6671        return "Provenance";
6672      if (code == FHIRAllTypes.QUESTIONNAIRERESPONSE)
6673        return "QuestionnaireResponse";
6674      if (code == FHIRAllTypes.REGULATEDAUTHORIZATION)
6675        return "RegulatedAuthorization";
6676      if (code == FHIRAllTypes.RELATEDPERSON)
6677        return "RelatedPerson";
6678      if (code == FHIRAllTypes.REQUESTGROUP)
6679        return "RequestGroup";
6680      if (code == FHIRAllTypes.RESEARCHSTUDY)
6681        return "ResearchStudy";
6682      if (code == FHIRAllTypes.RESEARCHSUBJECT)
6683        return "ResearchSubject";
6684      if (code == FHIRAllTypes.RISKASSESSMENT)
6685        return "RiskAssessment";
6686      if (code == FHIRAllTypes.SCHEDULE)
6687        return "Schedule";
6688      if (code == FHIRAllTypes.SERVICEREQUEST)
6689        return "ServiceRequest";
6690      if (code == FHIRAllTypes.SLOT)
6691        return "Slot";
6692      if (code == FHIRAllTypes.SPECIMEN)
6693        return "Specimen";
6694      if (code == FHIRAllTypes.SPECIMENDEFINITION)
6695        return "SpecimenDefinition";
6696      if (code == FHIRAllTypes.SUBSCRIPTION)
6697        return "Subscription";
6698      if (code == FHIRAllTypes.SUBSCRIPTIONSTATUS)
6699        return "SubscriptionStatus";
6700      if (code == FHIRAllTypes.SUBSCRIPTIONTOPIC)
6701        return "SubscriptionTopic";
6702      if (code == FHIRAllTypes.SUBSTANCE)
6703        return "Substance";
6704      if (code == FHIRAllTypes.SUBSTANCEDEFINITION)
6705        return "SubstanceDefinition";
6706      if (code == FHIRAllTypes.SUBSTANCENUCLEICACID)
6707        return "SubstanceNucleicAcid";
6708      if (code == FHIRAllTypes.SUBSTANCEPOLYMER)
6709        return "SubstancePolymer";
6710      if (code == FHIRAllTypes.SUBSTANCEPROTEIN)
6711        return "SubstanceProtein";
6712      if (code == FHIRAllTypes.SUBSTANCEREFERENCEINFORMATION)
6713        return "SubstanceReferenceInformation";
6714      if (code == FHIRAllTypes.SUBSTANCESOURCEMATERIAL)
6715        return "SubstanceSourceMaterial";
6716      if (code == FHIRAllTypes.SUPPLYDELIVERY)
6717        return "SupplyDelivery";
6718      if (code == FHIRAllTypes.SUPPLYREQUEST)
6719        return "SupplyRequest";
6720      if (code == FHIRAllTypes.TASK)
6721        return "Task";
6722      if (code == FHIRAllTypes.TESTREPORT)
6723        return "TestReport";
6724      if (code == FHIRAllTypes.VERIFICATIONRESULT)
6725        return "VerificationResult";
6726      if (code == FHIRAllTypes.VISIONPRESCRIPTION)
6727        return "VisionPrescription";
6728      if (code == FHIRAllTypes.PARAMETERS)
6729        return "Parameters";
6730      if (code == FHIRAllTypes.TYPE)
6731        return "Type";
6732      if (code == FHIRAllTypes.ANY)
6733        return "Any";
6734      return "?";
6735      }
6736    public String toSystem(FHIRAllTypes code) {
6737      return code.getSystem();
6738      }
6739    }
6740
6741    public enum FHIRVersion {
6742        /**
6743         * Oldest archived version of FHIR.
6744         */
6745        _0_01, 
6746        /**
6747         * 1st Draft for Comment (Sept 2012 Ballot).
6748         */
6749        _0_05, 
6750        /**
6751         * 2nd Draft for Comment (January 2013 Ballot).
6752         */
6753        _0_06, 
6754        /**
6755         * DSTU 1 Ballot version.
6756         */
6757        _0_11, 
6758        /**
6759         * DSTU 1 Official version.
6760         */
6761        _0_0_80, 
6762        /**
6763         * DSTU 1 Official version Technical Errata #1.
6764         */
6765        _0_0_81, 
6766        /**
6767         * DSTU 1 Official version Technical Errata #2.
6768         */
6769        _0_0_82, 
6770        /**
6771         * Draft For Comment (January 2015 Ballot).
6772         */
6773        _0_4_0, 
6774        /**
6775         * DSTU 2 Ballot version (May 2015 Ballot).
6776         */
6777        _0_5_0, 
6778        /**
6779         * DSTU 2 QA Preview + CQIF Ballot (Sep 2015).
6780         */
6781        _1_0_0, 
6782        /**
6783         * DSTU 2 (Official version).
6784         */
6785        _1_0_1, 
6786        /**
6787         * DSTU 2 (Official version) with 1 technical errata.
6788         */
6789        _1_0_2, 
6790        /**
6791         * GAO Ballot + draft changes to main FHIR standard.
6792         */
6793        _1_1_0, 
6794        /**
6795         * CQF on FHIR Ballot + Connectathon 12 (Montreal).
6796         */
6797        _1_4_0, 
6798        /**
6799         * FHIR STU3 Ballot + Connectathon 13 (Baltimore).
6800         */
6801        _1_6_0, 
6802        /**
6803         * FHIR STU3 Candidate + Connectathon 14 (San Antonio).
6804         */
6805        _1_8_0, 
6806        /**
6807         * FHIR Release 3 (STU).
6808         */
6809        _3_0_0, 
6810        /**
6811         * FHIR Release 3 (STU) with 1 technical errata.
6812         */
6813        _3_0_1, 
6814        /**
6815         * FHIR Release 3 (STU) with 2 technical errata.
6816         */
6817        _3_0_2, 
6818        /**
6819         * R4 Ballot #1.
6820         */
6821        _3_3_0, 
6822        /**
6823         * R4 Ballot #2.
6824         */
6825        _3_5_0, 
6826        /**
6827         * FHIR Release 4 (Normative + STU).
6828         */
6829        _4_0_0, 
6830        /**
6831         * FHIR Release 4 (Normative + STU) with 1 technical errata.
6832         */
6833        _4_0_1, 
6834        /**
6835         * Interim Version.
6836         */
6837        _4_1_0, 
6838        /**
6839         * R5 Preview #1.
6840         */
6841        _4_2_0, 
6842        /**
6843         * R4B Snapshot #1.
6844         */
6845        _4_3_0SNAPSHOT1, 
6846        /**
6847         * R4B Rolling CI-Build.
6848         */
6849        _4_3_0CIBUILD, 
6850        /**
6851         * R5 Preview #2.
6852         */
6853        _4_4_0, 
6854        /**
6855         * R5 Preview #3.
6856         */
6857        _4_5_0, 
6858        /**
6859         * R5 Draft Ballot.
6860         */
6861        _4_6_0, 
6862        /**
6863         * R5 Snapshot #1.
6864         */
6865        _5_0_0SNAPSHOT1, 
6866        /**
6867         * R5 Rolling CI-Build.
6868         */
6869        _5_0_0CIBUILD, 
6870        /**
6871         * added to help the parsers
6872         */
6873        NULL;
6874        public static FHIRVersion fromCode(String codeString) throws FHIRException {
6875            if (codeString == null || "".equals(codeString))
6876                return null;
6877        if ("0.01".equals(codeString))
6878          return _0_01;
6879        if ("0.05".equals(codeString))
6880          return _0_05;
6881        if ("0.06".equals(codeString))
6882          return _0_06;
6883        if ("0.11".equals(codeString))
6884          return _0_11;
6885        if ("0.0.80".equals(codeString))
6886          return _0_0_80;
6887        if ("0.0.81".equals(codeString))
6888          return _0_0_81;
6889        if ("0.0.82".equals(codeString))
6890          return _0_0_82;
6891        if ("0.4.0".equals(codeString))
6892          return _0_4_0;
6893        if ("0.5.0".equals(codeString))
6894          return _0_5_0;
6895        if ("1.0.0".equals(codeString))
6896          return _1_0_0;
6897        if ("1.0.1".equals(codeString))
6898          return _1_0_1;
6899        if ("1.0.2".equals(codeString))
6900          return _1_0_2;
6901        if ("1.1.0".equals(codeString))
6902          return _1_1_0;
6903        if ("1.4.0".equals(codeString))
6904          return _1_4_0;
6905        if ("1.6.0".equals(codeString))
6906          return _1_6_0;
6907        if ("1.8.0".equals(codeString))
6908          return _1_8_0;
6909        if ("3.0.0".equals(codeString))
6910          return _3_0_0;
6911        if ("3.0.1".equals(codeString))
6912          return _3_0_1;
6913        if ("3.0.2".equals(codeString))
6914          return _3_0_2;
6915        if ("3.3.0".equals(codeString))
6916          return _3_3_0;
6917        if ("3.5.0".equals(codeString))
6918          return _3_5_0;
6919        if ("4.0.0".equals(codeString))
6920          return _4_0_0;
6921        if ("4.0.1".equals(codeString))
6922          return _4_0_1;
6923        if ("4.1.0".equals(codeString))
6924          return _4_1_0;
6925        if ("4.2.0".equals(codeString))
6926          return _4_2_0;
6927        if ("4.3.0-snapshot1".equalsIgnoreCase(codeString))
6928          return _4_3_0SNAPSHOT1;
6929        if ("4.3.0-cibuild".equalsIgnoreCase(codeString))
6930          return _4_3_0CIBUILD;
6931        if ("4.4.0".equals(codeString))
6932          return _4_4_0;
6933        if ("4.5.0".equals(codeString))
6934          return _4_5_0;
6935        if ("4.6.0".equals(codeString))
6936          return _4_6_0;
6937        if ("5.0.0-snapshot1".equalsIgnoreCase(codeString))
6938          return _5_0_0SNAPSHOT1;
6939        if ("5.0.0-cibuild".equalsIgnoreCase(codeString))
6940          return _5_0_0CIBUILD;
6941        throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'");
6942        }
6943        public String toCode() {
6944          switch (this) {
6945            case _0_01: return "0.01";
6946            case _0_05: return "0.05";
6947            case _0_06: return "0.06";
6948            case _0_11: return "0.11";
6949            case _0_0_80: return "0.0.80";
6950            case _0_0_81: return "0.0.81";
6951            case _0_0_82: return "0.0.82";
6952            case _0_4_0: return "0.4.0";
6953            case _0_5_0: return "0.5.0";
6954            case _1_0_0: return "1.0.0";
6955            case _1_0_1: return "1.0.1";
6956            case _1_0_2: return "1.0.2";
6957            case _1_1_0: return "1.1.0";
6958            case _1_4_0: return "1.4.0";
6959            case _1_6_0: return "1.6.0";
6960            case _1_8_0: return "1.8.0";
6961            case _3_0_0: return "3.0.0";
6962            case _3_0_1: return "3.0.1";
6963            case _3_0_2: return "3.0.2";
6964            case _3_3_0: return "3.3.0";
6965            case _3_5_0: return "3.5.0";
6966            case _4_0_0: return "4.0.0";
6967            case _4_0_1: return "4.0.1";
6968            case _4_1_0: return "4.1.0";
6969            case _4_2_0: return "4.2.0";
6970            case _4_3_0SNAPSHOT1: return "4.3.0-snapshot1";
6971            case _4_3_0CIBUILD: return "4.3.0-cibuild";
6972            case _4_4_0: return "4.4.0";
6973            case _4_5_0: return "4.5.0";
6974            case _4_6_0: return "4.6.0";
6975            case _5_0_0SNAPSHOT1: return "5.0.0-snapshot1";
6976            case _5_0_0CIBUILD: return "5.0.0-cibuild";
6977            case NULL: return null;
6978            default: return "?";
6979          }
6980        }
6981        public String getSystem() {
6982          switch (this) {
6983            case _0_01: return "http://hl7.org/fhir/FHIR-version";
6984            case _0_05: return "http://hl7.org/fhir/FHIR-version";
6985            case _0_06: return "http://hl7.org/fhir/FHIR-version";
6986            case _0_11: return "http://hl7.org/fhir/FHIR-version";
6987            case _0_0_80: return "http://hl7.org/fhir/FHIR-version";
6988            case _0_0_81: return "http://hl7.org/fhir/FHIR-version";
6989            case _0_0_82: return "http://hl7.org/fhir/FHIR-version";
6990            case _0_4_0: return "http://hl7.org/fhir/FHIR-version";
6991            case _0_5_0: return "http://hl7.org/fhir/FHIR-version";
6992            case _1_0_0: return "http://hl7.org/fhir/FHIR-version";
6993            case _1_0_1: return "http://hl7.org/fhir/FHIR-version";
6994            case _1_0_2: return "http://hl7.org/fhir/FHIR-version";
6995            case _1_1_0: return "http://hl7.org/fhir/FHIR-version";
6996            case _1_4_0: return "http://hl7.org/fhir/FHIR-version";
6997            case _1_6_0: return "http://hl7.org/fhir/FHIR-version";
6998            case _1_8_0: return "http://hl7.org/fhir/FHIR-version";
6999            case _3_0_0: return "http://hl7.org/fhir/FHIR-version";
7000            case _3_0_1: return "http://hl7.org/fhir/FHIR-version";
7001            case _3_0_2: return "http://hl7.org/fhir/FHIR-version";
7002            case _3_3_0: return "http://hl7.org/fhir/FHIR-version";
7003            case _3_5_0: return "http://hl7.org/fhir/FHIR-version";
7004            case _4_0_0: return "http://hl7.org/fhir/FHIR-version";
7005            case _4_0_1: return "http://hl7.org/fhir/FHIR-version";
7006            case _4_1_0: return "http://hl7.org/fhir/FHIR-version";
7007            case _4_2_0: return "http://hl7.org/fhir/FHIR-version";
7008            case _4_3_0SNAPSHOT1: return "http://hl7.org/fhir/FHIR-version";
7009            case _4_3_0CIBUILD: return "http://hl7.org/fhir/FHIR-version";
7010            case _4_4_0: return "http://hl7.org/fhir/FHIR-version";
7011            case _4_5_0: return "http://hl7.org/fhir/FHIR-version";
7012            case _4_6_0: return "http://hl7.org/fhir/FHIR-version";
7013            case _5_0_0SNAPSHOT1: return "http://hl7.org/fhir/FHIR-version";
7014            case _5_0_0CIBUILD: return "http://hl7.org/fhir/FHIR-version";
7015            case NULL: return null;
7016            default: return "?";
7017          }
7018        }
7019        public String getDefinition() {
7020          switch (this) {
7021            case _0_01: return "Oldest archived version of FHIR.";
7022            case _0_05: return "1st Draft for Comment (Sept 2012 Ballot).";
7023            case _0_06: return "2nd Draft for Comment (January 2013 Ballot).";
7024            case _0_11: return "DSTU 1 Ballot version.";
7025            case _0_0_80: return "DSTU 1 Official version.";
7026            case _0_0_81: return "DSTU 1 Official version Technical Errata #1.";
7027            case _0_0_82: return "DSTU 1 Official version Technical Errata #2.";
7028            case _0_4_0: return "Draft For Comment (January 2015 Ballot).";
7029            case _0_5_0: return "DSTU 2 Ballot version (May 2015 Ballot).";
7030            case _1_0_0: return "DSTU 2 QA Preview + CQIF Ballot (Sep 2015).";
7031            case _1_0_1: return "DSTU 2 (Official version).";
7032            case _1_0_2: return "DSTU 2 (Official version) with 1 technical errata.";
7033            case _1_1_0: return "GAO Ballot + draft changes to main FHIR standard.";
7034            case _1_4_0: return "CQF on FHIR Ballot + Connectathon 12 (Montreal).";
7035            case _1_6_0: return "FHIR STU3 Ballot + Connectathon 13 (Baltimore).";
7036            case _1_8_0: return "FHIR STU3 Candidate + Connectathon 14 (San Antonio).";
7037            case _3_0_0: return "FHIR Release 3 (STU).";
7038            case _3_0_1: return "FHIR Release 3 (STU) with 1 technical errata.";
7039            case _3_0_2: return "FHIR Release 3 (STU) with 2 technical errata.";
7040            case _3_3_0: return "R4 Ballot #1.";
7041            case _3_5_0: return "R4 Ballot #2.";
7042            case _4_0_0: return "FHIR Release 4 (Normative + STU).";
7043            case _4_0_1: return "FHIR Release 4 (Normative + STU) with 1 technical errata.";
7044            case _4_1_0: return "Interim Version.";
7045            case _4_2_0: return "R5 Preview #1.";
7046            case _4_3_0SNAPSHOT1: return "R4B Snapshot #1.";
7047            case _4_3_0CIBUILD: return "R4B Rolling CI-Build.";
7048            case _4_4_0: return "R5 Preview #2.";
7049            case _4_5_0: return "R5 Preview #3.";
7050            case _4_6_0: return "R5 Draft Ballot.";
7051            case _5_0_0SNAPSHOT1: return "R5 Snapshot #1.";
7052            case _5_0_0CIBUILD: return "R5 Rolling CI-Build.";
7053            case NULL: return null;
7054            default: return "?";
7055          }
7056        }
7057        public String getDisplay() {
7058          switch (this) {
7059            case _0_01: return "0.01";
7060            case _0_05: return "0.05";
7061            case _0_06: return "0.06";
7062            case _0_11: return "0.11";
7063            case _0_0_80: return "0.0.80";
7064            case _0_0_81: return "0.0.81";
7065            case _0_0_82: return "0.0.82";
7066            case _0_4_0: return "0.4.0";
7067            case _0_5_0: return "0.5.0";
7068            case _1_0_0: return "1.0.0";
7069            case _1_0_1: return "1.0.1";
7070            case _1_0_2: return "1.0.2";
7071            case _1_1_0: return "1.1.0";
7072            case _1_4_0: return "1.4.0";
7073            case _1_6_0: return "1.6.0";
7074            case _1_8_0: return "1.8.0";
7075            case _3_0_0: return "3.0.0";
7076            case _3_0_1: return "3.0.1";
7077            case _3_0_2: return "3.0.2";
7078            case _3_3_0: return "3.3.0";
7079            case _3_5_0: return "3.5.0";
7080            case _4_0_0: return "4.0.0";
7081            case _4_0_1: return "4.0.1";
7082            case _4_1_0: return "4.1.0";
7083            case _4_2_0: return "4.2.0";
7084            case _4_3_0SNAPSHOT1: return "4.3.0-snapshot1";
7085            case _4_3_0CIBUILD: return "4.3.0-cibuild";
7086            case _4_4_0: return "4.4.0";
7087            case _4_5_0: return "4.5.0";
7088            case _4_6_0: return "4.6.0";
7089            case _5_0_0SNAPSHOT1: return "5.0.0-snapshot1";
7090            case _5_0_0CIBUILD: return "5.0.0-cibuild";
7091            case NULL: return null;
7092            default: return "?";
7093          }
7094        }
7095// manual code from configuration.txt:
7096public String toCode(int len) {
7097          return toCode().substring(0, len);
7098        }
7099
7100        public static boolean isR4Plus(String version) {
7101           return version != null && (version.startsWith("4.") || version.startsWith("5.") || "current".equals(version));
7102        }
7103        
7104       public static boolean isValidCode(String codeString) {
7105          if (codeString == null || "".equals(codeString))
7106              return false;
7107      if ("0.01".equals(codeString))
7108        return true;
7109      if ("0.05".equals(codeString))
7110        return true;
7111      if ("0.06".equals(codeString))
7112        return true;
7113      if ("0.11".equals(codeString))
7114        return true;
7115      if ("0.0.80".equals(codeString))
7116        return true;
7117      if ("0.0.81".equals(codeString))
7118        return true;
7119      if ("0.0.82".equals(codeString))
7120        return true;
7121      if ("0.4.0".equals(codeString))
7122        return true;
7123      if ("0.5.0".equals(codeString))
7124        return true;
7125      if ("1.0.0".equals(codeString))
7126        return true;
7127      if ("1.0.1".equals(codeString))
7128        return true;
7129      if ("1.0.2".equals(codeString))
7130        return true;
7131      if ("1.1.0".equals(codeString))
7132        return true;
7133      if ("1.4.0".equals(codeString))
7134        return true;
7135      if ("1.6.0".equals(codeString))
7136        return true;
7137      if ("1.8.0".equals(codeString))
7138        return true;
7139      if ("3.0.0".equals(codeString))
7140        return true;
7141      if ("3.0.1".equals(codeString))
7142        return true;
7143      if ("3.3.0".equals(codeString))
7144        return true;
7145      if ("3.5.0".equals(codeString))
7146        return true;
7147      if ("4.0.0".equals(codeString))
7148        return true;
7149      if ("4.2.0".equals(codeString))
7150        return true;
7151      return false;
7152      }
7153
7154        @Override
7155        public String toString() {
7156          return toCode();
7157        }
7158        
7159        
7160        public boolean isR4B() {
7161          return toCode().startsWith("4.1") ||toCode().startsWith("4.3");
7162        }
7163        
7164// end addition
7165    }
7166
7167  public static class FHIRVersionEnumFactory implements EnumFactory<FHIRVersion> {
7168    public FHIRVersion fromCode(String codeString) throws IllegalArgumentException {
7169      if (codeString == null || "".equals(codeString))
7170            if (codeString == null || "".equals(codeString))
7171                return null;
7172        if ("0.01".equals(codeString))
7173          return FHIRVersion._0_01;
7174        if ("0.05".equals(codeString))
7175          return FHIRVersion._0_05;
7176        if ("0.06".equals(codeString))
7177          return FHIRVersion._0_06;
7178        if ("0.11".equals(codeString))
7179          return FHIRVersion._0_11;
7180        if ("0.0.80".equals(codeString))
7181          return FHIRVersion._0_0_80;
7182        if ("0.0.81".equals(codeString))
7183          return FHIRVersion._0_0_81;
7184        if ("0.0.82".equals(codeString))
7185          return FHIRVersion._0_0_82;
7186        if ("0.4.0".equals(codeString))
7187          return FHIRVersion._0_4_0;
7188        if ("0.5.0".equals(codeString))
7189          return FHIRVersion._0_5_0;
7190        if ("1.0.0".equals(codeString))
7191          return FHIRVersion._1_0_0;
7192        if ("1.0.1".equals(codeString))
7193          return FHIRVersion._1_0_1;
7194        if ("1.0.2".equals(codeString))
7195          return FHIRVersion._1_0_2;
7196        if ("1.1.0".equals(codeString))
7197          return FHIRVersion._1_1_0;
7198        if ("1.4.0".equals(codeString))
7199          return FHIRVersion._1_4_0;
7200        if ("1.6.0".equals(codeString))
7201          return FHIRVersion._1_6_0;
7202        if ("1.8.0".equals(codeString))
7203          return FHIRVersion._1_8_0;
7204        if ("3.0.0".equals(codeString))
7205          return FHIRVersion._3_0_0;
7206        if ("3.0.1".equals(codeString))
7207          return FHIRVersion._3_0_1;
7208        if ("3.0.2".equals(codeString))
7209          return FHIRVersion._3_0_2;
7210        if ("3.3.0".equals(codeString))
7211          return FHIRVersion._3_3_0;
7212        if ("3.5.0".equals(codeString))
7213          return FHIRVersion._3_5_0;
7214        if ("4.0.0".equals(codeString))
7215          return FHIRVersion._4_0_0;
7216        if ("4.0.1".equals(codeString))
7217          return FHIRVersion._4_0_1;
7218        if ("4.1.0".equals(codeString))
7219          return FHIRVersion._4_1_0;
7220        if ("4.2.0".equals(codeString))
7221          return FHIRVersion._4_2_0;
7222        if ("4.3.0-snapshot1".equalsIgnoreCase(codeString))
7223          return FHIRVersion._4_3_0SNAPSHOT1;
7224        if ("4.3.0-cibuild".equalsIgnoreCase(codeString))
7225          return FHIRVersion._4_3_0CIBUILD;
7226        if ("4.4.0".equals(codeString))
7227          return FHIRVersion._4_4_0;
7228        if ("4.5.0".equals(codeString))
7229          return FHIRVersion._4_5_0;
7230        if ("4.6.0".equals(codeString))
7231          return FHIRVersion._4_6_0;
7232        if ("5.0.0-snapshot1".equalsIgnoreCase(codeString))
7233          return FHIRVersion._5_0_0SNAPSHOT1;
7234        if ("5.0.0-cibuild".equalsIgnoreCase(codeString))
7235          return FHIRVersion._5_0_0CIBUILD;
7236        throw new IllegalArgumentException("Unknown FHIRVersion code '"+codeString+"'");
7237        }
7238        public Enumeration<FHIRVersion> fromType(Base code) throws FHIRException {
7239          if (code == null)
7240            return null;
7241          if (code.isEmpty())
7242            return new Enumeration<FHIRVersion>(this);
7243          String codeString = ((PrimitiveType) code).asStringValue();
7244          if (codeString == null || "".equals(codeString))
7245            return null;
7246        if ("0.01".equals(codeString))
7247          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_01);
7248        if ("0.05".equals(codeString))
7249          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_05);
7250        if ("0.06".equals(codeString))
7251          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_06);
7252        if ("0.11".equals(codeString))
7253          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_11);
7254        if ("0.0.80".equals(codeString))
7255          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_80);
7256        if ("0.0.81".equals(codeString))
7257          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_81);
7258        if ("0.0.82".equals(codeString))
7259          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_82);
7260        if ("0.4.0".equals(codeString))
7261          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_4_0);
7262        if ("0.5.0".equals(codeString))
7263          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_5_0);
7264        if ("1.0.0".equals(codeString))
7265          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_0);
7266        if ("1.0.1".equals(codeString))
7267          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_1);
7268        if ("1.0.2".equals(codeString))
7269          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_2);
7270        if ("1.1.0".equals(codeString))
7271          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_1_0);
7272        if ("1.4.0".equals(codeString))
7273          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_4_0);
7274        if ("1.6.0".equals(codeString))
7275          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_6_0);
7276        if ("1.8.0".equals(codeString))
7277          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_8_0);
7278        if ("3.0.0".equals(codeString))
7279          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_0);
7280        if ("3.0.1".equals(codeString))
7281          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_1);
7282        if ("3.0.2".equals(codeString))
7283          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_2);
7284        if ("3.3.0".equals(codeString))
7285          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_3_0);
7286        if ("3.5.0".equals(codeString))
7287          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_5_0);
7288        if ("4.0.0".equals(codeString))
7289          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_0_0);
7290        if ("4.0.1".equals(codeString))
7291          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_0_1);
7292        if ("4.1.0".equals(codeString))
7293          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_1_0);
7294        if ("4.2.0".equals(codeString))
7295          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_2_0);
7296        if ("4.3.0-snapshot1".equals(codeString))
7297          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3_0SNAPSHOT1);
7298        if ("4.3.0-cibuild".equals(codeString))
7299          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3_0CIBUILD);
7300        if ("4.4.0".equals(codeString))
7301          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_4_0);
7302        if ("4.5.0".equals(codeString))
7303          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_5_0);
7304        if ("4.6.0".equals(codeString))
7305          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_6_0);
7306        if ("5.0.0-snapshot1".equals(codeString))
7307          return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0SNAPSHOT1);
7308        if ("5.0.0-cibuild".equals(codeString))
7309          return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0CIBUILD);
7310        throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'");
7311        }
7312    public String toCode(FHIRVersion code) {
7313      if (code == FHIRVersion._0_01)
7314        return "0.01";
7315      if (code == FHIRVersion._0_05)
7316        return "0.05";
7317      if (code == FHIRVersion._0_06)
7318        return "0.06";
7319      if (code == FHIRVersion._0_11)
7320        return "0.11";
7321      if (code == FHIRVersion._0_0_80)
7322        return "0.0.80";
7323      if (code == FHIRVersion._0_0_81)
7324        return "0.0.81";
7325      if (code == FHIRVersion._0_0_82)
7326        return "0.0.82";
7327      if (code == FHIRVersion._0_4_0)
7328        return "0.4.0";
7329      if (code == FHIRVersion._0_5_0)
7330        return "0.5.0";
7331      if (code == FHIRVersion._1_0_0)
7332        return "1.0.0";
7333      if (code == FHIRVersion._1_0_1)
7334        return "1.0.1";
7335      if (code == FHIRVersion._1_0_2)
7336        return "1.0.2";
7337      if (code == FHIRVersion._1_1_0)
7338        return "1.1.0";
7339      if (code == FHIRVersion._1_4_0)
7340        return "1.4.0";
7341      if (code == FHIRVersion._1_6_0)
7342        return "1.6.0";
7343      if (code == FHIRVersion._1_8_0)
7344        return "1.8.0";
7345      if (code == FHIRVersion._3_0_0)
7346        return "3.0.0";
7347      if (code == FHIRVersion._3_0_1)
7348        return "3.0.1";
7349      if (code == FHIRVersion._3_0_2)
7350        return "3.0.2";
7351      if (code == FHIRVersion._3_3_0)
7352        return "3.3.0";
7353      if (code == FHIRVersion._3_5_0)
7354        return "3.5.0";
7355      if (code == FHIRVersion._4_0_0)
7356        return "4.0.0";
7357      if (code == FHIRVersion._4_0_1)
7358        return "4.0.1";
7359      if (code == FHIRVersion._4_1_0)
7360        return "4.1.0";
7361      if (code == FHIRVersion._4_2_0)
7362        return "4.2.0";
7363      if (code == FHIRVersion._4_3_0SNAPSHOT1)
7364        return "4.3.0-snapshot1";
7365      if (code == FHIRVersion._4_3_0CIBUILD)
7366        return "4.3.0-cibuild";
7367      if (code == FHIRVersion._4_4_0)
7368        return "4.4.0";
7369      if (code == FHIRVersion._4_5_0)
7370        return "4.5.0";
7371      if (code == FHIRVersion._4_6_0)
7372        return "4.6.0";
7373      if (code == FHIRVersion._5_0_0SNAPSHOT1)
7374        return "5.0.0-snapshot1";
7375      if (code == FHIRVersion._5_0_0CIBUILD)
7376        return "5.0.0-cibuild";
7377      return "?";
7378      }
7379    public String toSystem(FHIRVersion code) {
7380      return code.getSystem();
7381      }
7382    }
7383
7384    public enum FilterOperator {
7385        /**
7386         * The specified property of the code equals the provided value.
7387         */
7388        EQUAL, 
7389        /**
7390         * 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).
7391         */
7392        ISA, 
7393        /**
7394         * 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).
7395         */
7396        DESCENDENTOF, 
7397        /**
7398         * The specified property of the code does not have an is-a relationship with the provided value.
7399         */
7400        ISNOTA, 
7401        /**
7402         * The specified property of the code  matches the regex specified in the provided value.
7403         */
7404        REGEX, 
7405        /**
7406         * The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list).
7407         */
7408        IN, 
7409        /**
7410         * The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list).
7411         */
7412        NOTIN, 
7413        /**
7414         * 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).
7415         */
7416        GENERALIZES, 
7417        /**
7418         * Only concepts with a direct hierarchical relationship to the index code and no other concepts. This does not include the index code in the output.
7419         */
7420        CHILDOF, 
7421        /**
7422         * Includes concept ids that have a transitive is-a relationship with the concept Id provided as the value, but which do not have any concept ids with transitive is-a relationships with themselves.
7423         */
7424        DESCENDENTLEAF, 
7425        /**
7426         * 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).
7427         */
7428        EXISTS, 
7429        /**
7430         * added to help the parsers
7431         */
7432        NULL;
7433        public static FilterOperator fromCode(String codeString) throws FHIRException {
7434            if (codeString == null || "".equals(codeString))
7435                return null;
7436        if ("=".equals(codeString))
7437          return EQUAL;
7438        if ("is-a".equals(codeString))
7439          return ISA;
7440        if ("descendent-of".equals(codeString))
7441          return DESCENDENTOF;
7442        if ("is-not-a".equals(codeString))
7443          return ISNOTA;
7444        if ("regex".equals(codeString))
7445          return REGEX;
7446        if ("in".equals(codeString))
7447          return IN;
7448        if ("not-in".equals(codeString))
7449          return NOTIN;
7450        if ("generalizes".equals(codeString))
7451          return GENERALIZES;
7452        if ("child-of".equals(codeString))
7453          return CHILDOF;
7454        if ("descendent-leaf".equals(codeString))
7455          return DESCENDENTLEAF;
7456        if ("exists".equals(codeString))
7457          return EXISTS;
7458        throw new FHIRException("Unknown FilterOperator code '"+codeString+"'");
7459        }
7460        public String toCode() {
7461          switch (this) {
7462            case EQUAL: return "=";
7463            case ISA: return "is-a";
7464            case DESCENDENTOF: return "descendent-of";
7465            case ISNOTA: return "is-not-a";
7466            case REGEX: return "regex";
7467            case IN: return "in";
7468            case NOTIN: return "not-in";
7469            case GENERALIZES: return "generalizes";
7470            case CHILDOF: return "child-of";
7471            case DESCENDENTLEAF: return "descendent-leaf";
7472            case EXISTS: return "exists";
7473            case NULL: return null;
7474            default: return "?";
7475          }
7476        }
7477        public String getSystem() {
7478          switch (this) {
7479            case EQUAL: return "http://hl7.org/fhir/filter-operator";
7480            case ISA: return "http://hl7.org/fhir/filter-operator";
7481            case DESCENDENTOF: return "http://hl7.org/fhir/filter-operator";
7482            case ISNOTA: return "http://hl7.org/fhir/filter-operator";
7483            case REGEX: return "http://hl7.org/fhir/filter-operator";
7484            case IN: return "http://hl7.org/fhir/filter-operator";
7485            case NOTIN: return "http://hl7.org/fhir/filter-operator";
7486            case GENERALIZES: return "http://hl7.org/fhir/filter-operator";
7487            case CHILDOF: return "http://hl7.org/fhir/filter-operator";
7488            case DESCENDENTLEAF: return "http://hl7.org/fhir/filter-operator";
7489            case EXISTS: return "http://hl7.org/fhir/filter-operator";
7490            case NULL: return null;
7491            default: return "?";
7492          }
7493        }
7494        public String getDefinition() {
7495          switch (this) {
7496            case EQUAL: return "The specified property of the code equals the provided value.";
7497            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).";
7498            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).";
7499            case ISNOTA: return "The specified property of the code does not have an is-a relationship with the provided value.";
7500            case REGEX: return "The specified property of the code  matches the regex specified in the provided value.";
7501            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).";
7502            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).";
7503            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).";
7504            case CHILDOF: return "Only concepts with a direct hierarchical relationship to the index code and no other concepts. This does not include the index code in the output.";
7505            case DESCENDENTLEAF: return "Includes concept ids that have a transitive is-a relationship with the concept Id provided as the value, but which do not have any concept ids with transitive is-a relationships with themselves.";
7506            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).";
7507            case NULL: return null;
7508            default: return "?";
7509          }
7510        }
7511        public String getDisplay() {
7512          switch (this) {
7513            case EQUAL: return "Equals";
7514            case ISA: return "Is A (by subsumption)";
7515            case DESCENDENTOF: return "Descendent Of (by subsumption)";
7516            case ISNOTA: return "Not (Is A) (by subsumption)";
7517            case REGEX: return "Regular Expression";
7518            case IN: return "In Set";
7519            case NOTIN: return "Not in Set";
7520            case GENERALIZES: return "Generalizes (by Subsumption)";
7521            case CHILDOF: return "Child Of";
7522            case DESCENDENTLEAF: return "Descendent Leaf";
7523            case EXISTS: return "Exists";
7524            case NULL: return null;
7525            default: return "?";
7526          }
7527        }
7528    }
7529
7530  public static class FilterOperatorEnumFactory implements EnumFactory<FilterOperator> {
7531    public FilterOperator fromCode(String codeString) throws IllegalArgumentException {
7532      if (codeString == null || "".equals(codeString))
7533            if (codeString == null || "".equals(codeString))
7534                return null;
7535        if ("=".equals(codeString))
7536          return FilterOperator.EQUAL;
7537        if ("is-a".equals(codeString))
7538          return FilterOperator.ISA;
7539        if ("descendent-of".equals(codeString))
7540          return FilterOperator.DESCENDENTOF;
7541        if ("is-not-a".equals(codeString))
7542          return FilterOperator.ISNOTA;
7543        if ("regex".equals(codeString))
7544          return FilterOperator.REGEX;
7545        if ("in".equals(codeString))
7546          return FilterOperator.IN;
7547        if ("not-in".equals(codeString))
7548          return FilterOperator.NOTIN;
7549        if ("generalizes".equals(codeString))
7550          return FilterOperator.GENERALIZES;
7551        if ("child-of".equals(codeString))
7552          return FilterOperator.CHILDOF;
7553        if ("descendent-leaf".equals(codeString))
7554          return FilterOperator.DESCENDENTLEAF;
7555        if ("exists".equals(codeString))
7556          return FilterOperator.EXISTS;
7557        throw new IllegalArgumentException("Unknown FilterOperator code '"+codeString+"'");
7558        }
7559        public Enumeration<FilterOperator> fromType(Base code) throws FHIRException {
7560          if (code == null)
7561            return null;
7562          if (code.isEmpty())
7563            return new Enumeration<FilterOperator>(this);
7564          String codeString = ((PrimitiveType) code).asStringValue();
7565          if (codeString == null || "".equals(codeString))
7566            return null;
7567        if ("=".equals(codeString))
7568          return new Enumeration<FilterOperator>(this, FilterOperator.EQUAL);
7569        if ("is-a".equals(codeString))
7570          return new Enumeration<FilterOperator>(this, FilterOperator.ISA);
7571        if ("descendent-of".equals(codeString))
7572          return new Enumeration<FilterOperator>(this, FilterOperator.DESCENDENTOF);
7573        if ("is-not-a".equals(codeString))
7574          return new Enumeration<FilterOperator>(this, FilterOperator.ISNOTA);
7575        if ("regex".equals(codeString))
7576          return new Enumeration<FilterOperator>(this, FilterOperator.REGEX);
7577        if ("in".equals(codeString))
7578          return new Enumeration<FilterOperator>(this, FilterOperator.IN);
7579        if ("not-in".equals(codeString))
7580          return new Enumeration<FilterOperator>(this, FilterOperator.NOTIN);
7581        if ("generalizes".equals(codeString))
7582          return new Enumeration<FilterOperator>(this, FilterOperator.GENERALIZES);
7583        if ("child-of".equals(codeString))
7584          return new Enumeration<FilterOperator>(this, FilterOperator.CHILDOF);
7585        if ("descendent-leaf".equals(codeString))
7586          return new Enumeration<FilterOperator>(this, FilterOperator.DESCENDENTLEAF);
7587        if ("exists".equals(codeString))
7588          return new Enumeration<FilterOperator>(this, FilterOperator.EXISTS);
7589        throw new FHIRException("Unknown FilterOperator code '"+codeString+"'");
7590        }
7591    public String toCode(FilterOperator code) {
7592      if (code == FilterOperator.EQUAL)
7593        return "=";
7594      if (code == FilterOperator.ISA)
7595        return "is-a";
7596      if (code == FilterOperator.DESCENDENTOF)
7597        return "descendent-of";
7598      if (code == FilterOperator.ISNOTA)
7599        return "is-not-a";
7600      if (code == FilterOperator.REGEX)
7601        return "regex";
7602      if (code == FilterOperator.IN)
7603        return "in";
7604      if (code == FilterOperator.NOTIN)
7605        return "not-in";
7606      if (code == FilterOperator.GENERALIZES)
7607        return "generalizes";
7608      if (code == FilterOperator.CHILDOF)
7609        return "child-of";
7610      if (code == FilterOperator.DESCENDENTLEAF)
7611        return "descendent-leaf";
7612      if (code == FilterOperator.EXISTS)
7613        return "exists";
7614      return "?";
7615      }
7616    public String toSystem(FilterOperator code) {
7617      return code.getSystem();
7618      }
7619    }
7620
7621    public enum FinancialResourceStatusCodes {
7622        /**
7623         * The instance is currently in-force.
7624         */
7625        ACTIVE, 
7626        /**
7627         * The instance is withdrawn, rescinded or reversed.
7628         */
7629        CANCELLED, 
7630        /**
7631         * A new instance the contents of which is not complete.
7632         */
7633        DRAFT, 
7634        /**
7635         * The instance was entered in error.
7636         */
7637        ENTEREDINERROR, 
7638        /**
7639         * added to help the parsers
7640         */
7641        NULL;
7642        public static FinancialResourceStatusCodes fromCode(String codeString) throws FHIRException {
7643            if (codeString == null || "".equals(codeString))
7644                return null;
7645        if ("active".equals(codeString))
7646          return ACTIVE;
7647        if ("cancelled".equals(codeString))
7648          return CANCELLED;
7649        if ("draft".equals(codeString))
7650          return DRAFT;
7651        if ("entered-in-error".equals(codeString))
7652          return ENTEREDINERROR;
7653        throw new FHIRException("Unknown FinancialResourceStatusCodes code '"+codeString+"'");
7654        }
7655        public String toCode() {
7656          switch (this) {
7657            case ACTIVE: return "active";
7658            case CANCELLED: return "cancelled";
7659            case DRAFT: return "draft";
7660            case ENTEREDINERROR: return "entered-in-error";
7661            case NULL: return null;
7662            default: return "?";
7663          }
7664        }
7665        public String getSystem() {
7666          switch (this) {
7667            case ACTIVE: return "http://hl7.org/fhir/fm-status";
7668            case CANCELLED: return "http://hl7.org/fhir/fm-status";
7669            case DRAFT: return "http://hl7.org/fhir/fm-status";
7670            case ENTEREDINERROR: return "http://hl7.org/fhir/fm-status";
7671            case NULL: return null;
7672            default: return "?";
7673          }
7674        }
7675        public String getDefinition() {
7676          switch (this) {
7677            case ACTIVE: return "The instance is currently in-force.";
7678            case CANCELLED: return "The instance is withdrawn, rescinded or reversed.";
7679            case DRAFT: return "A new instance the contents of which is not complete.";
7680            case ENTEREDINERROR: return "The instance was entered in error.";
7681            case NULL: return null;
7682            default: return "?";
7683          }
7684        }
7685        public String getDisplay() {
7686          switch (this) {
7687            case ACTIVE: return "Active";
7688            case CANCELLED: return "Cancelled";
7689            case DRAFT: return "Draft";
7690            case ENTEREDINERROR: return "Entered in Error";
7691            case NULL: return null;
7692            default: return "?";
7693          }
7694        }
7695    }
7696
7697  public static class FinancialResourceStatusCodesEnumFactory implements EnumFactory<FinancialResourceStatusCodes> {
7698    public FinancialResourceStatusCodes fromCode(String codeString) throws IllegalArgumentException {
7699      if (codeString == null || "".equals(codeString))
7700            if (codeString == null || "".equals(codeString))
7701                return null;
7702        if ("active".equals(codeString))
7703          return FinancialResourceStatusCodes.ACTIVE;
7704        if ("cancelled".equals(codeString))
7705          return FinancialResourceStatusCodes.CANCELLED;
7706        if ("draft".equals(codeString))
7707          return FinancialResourceStatusCodes.DRAFT;
7708        if ("entered-in-error".equals(codeString))
7709          return FinancialResourceStatusCodes.ENTEREDINERROR;
7710        throw new IllegalArgumentException("Unknown FinancialResourceStatusCodes code '"+codeString+"'");
7711        }
7712        public Enumeration<FinancialResourceStatusCodes> fromType(Base code) throws FHIRException {
7713          if (code == null)
7714            return null;
7715          if (code.isEmpty())
7716            return new Enumeration<FinancialResourceStatusCodes>(this);
7717          String codeString = ((PrimitiveType) code).asStringValue();
7718          if (codeString == null || "".equals(codeString))
7719            return null;
7720        if ("active".equals(codeString))
7721          return new Enumeration<FinancialResourceStatusCodes>(this, FinancialResourceStatusCodes.ACTIVE);
7722        if ("cancelled".equals(codeString))
7723          return new Enumeration<FinancialResourceStatusCodes>(this, FinancialResourceStatusCodes.CANCELLED);
7724        if ("draft".equals(codeString))
7725          return new Enumeration<FinancialResourceStatusCodes>(this, FinancialResourceStatusCodes.DRAFT);
7726        if ("entered-in-error".equals(codeString))
7727          return new Enumeration<FinancialResourceStatusCodes>(this, FinancialResourceStatusCodes.ENTEREDINERROR);
7728        throw new FHIRException("Unknown FinancialResourceStatusCodes code '"+codeString+"'");
7729        }
7730    public String toCode(FinancialResourceStatusCodes code) {
7731      if (code == FinancialResourceStatusCodes.ACTIVE)
7732        return "active";
7733      if (code == FinancialResourceStatusCodes.CANCELLED)
7734        return "cancelled";
7735      if (code == FinancialResourceStatusCodes.DRAFT)
7736        return "draft";
7737      if (code == FinancialResourceStatusCodes.ENTEREDINERROR)
7738        return "entered-in-error";
7739      return "?";
7740      }
7741    public String toSystem(FinancialResourceStatusCodes code) {
7742      return code.getSystem();
7743      }
7744    }
7745
7746    public enum InvoicePriceComponentType {
7747        /**
7748         * the amount is the base price used for calculating the total price before applying surcharges, discount or taxes.
7749         */
7750        BASE, 
7751        /**
7752         * the amount is a surcharge applied on the base price.
7753         */
7754        SURCHARGE, 
7755        /**
7756         * the amount is a deduction applied on the base price.
7757         */
7758        DEDUCTION, 
7759        /**
7760         * the amount is a discount applied on the base price.
7761         */
7762        DISCOUNT, 
7763        /**
7764         * the amount is the tax component of the total price.
7765         */
7766        TAX, 
7767        /**
7768         * the amount is of informational character, it has not been applied in the calculation of the total price.
7769         */
7770        INFORMATIONAL, 
7771        /**
7772         * added to help the parsers
7773         */
7774        NULL;
7775        public static InvoicePriceComponentType fromCode(String codeString) throws FHIRException {
7776            if (codeString == null || "".equals(codeString))
7777                return null;
7778        if ("base".equals(codeString))
7779          return BASE;
7780        if ("surcharge".equals(codeString))
7781          return SURCHARGE;
7782        if ("deduction".equals(codeString))
7783          return DEDUCTION;
7784        if ("discount".equals(codeString))
7785          return DISCOUNT;
7786        if ("tax".equals(codeString))
7787          return TAX;
7788        if ("informational".equals(codeString))
7789          return INFORMATIONAL;
7790        throw new FHIRException("Unknown InvoicePriceComponentType code '"+codeString+"'");
7791        }
7792        public String toCode() {
7793          switch (this) {
7794            case BASE: return "base";
7795            case SURCHARGE: return "surcharge";
7796            case DEDUCTION: return "deduction";
7797            case DISCOUNT: return "discount";
7798            case TAX: return "tax";
7799            case INFORMATIONAL: return "informational";
7800            case NULL: return null;
7801            default: return "?";
7802          }
7803        }
7804        public String getSystem() {
7805          switch (this) {
7806            case BASE: return "http://hl7.org/fhir/invoice-priceComponentType";
7807            case SURCHARGE: return "http://hl7.org/fhir/invoice-priceComponentType";
7808            case DEDUCTION: return "http://hl7.org/fhir/invoice-priceComponentType";
7809            case DISCOUNT: return "http://hl7.org/fhir/invoice-priceComponentType";
7810            case TAX: return "http://hl7.org/fhir/invoice-priceComponentType";
7811            case INFORMATIONAL: return "http://hl7.org/fhir/invoice-priceComponentType";
7812            case NULL: return null;
7813            default: return "?";
7814          }
7815        }
7816        public String getDefinition() {
7817          switch (this) {
7818            case BASE: return "the amount is the base price used for calculating the total price before applying surcharges, discount or taxes.";
7819            case SURCHARGE: return "the amount is a surcharge applied on the base price.";
7820            case DEDUCTION: return "the amount is a deduction applied on the base price.";
7821            case DISCOUNT: return "the amount is a discount applied on the base price.";
7822            case TAX: return "the amount is the tax component of the total price.";
7823            case INFORMATIONAL: return "the amount is of informational character, it has not been applied in the calculation of the total price.";
7824            case NULL: return null;
7825            default: return "?";
7826          }
7827        }
7828        public String getDisplay() {
7829          switch (this) {
7830            case BASE: return "base price";
7831            case SURCHARGE: return "surcharge";
7832            case DEDUCTION: return "deduction";
7833            case DISCOUNT: return "discount";
7834            case TAX: return "tax";
7835            case INFORMATIONAL: return "informational";
7836            case NULL: return null;
7837            default: return "?";
7838          }
7839        }
7840    }
7841
7842  public static class InvoicePriceComponentTypeEnumFactory implements EnumFactory<InvoicePriceComponentType> {
7843    public InvoicePriceComponentType fromCode(String codeString) throws IllegalArgumentException {
7844      if (codeString == null || "".equals(codeString))
7845            if (codeString == null || "".equals(codeString))
7846                return null;
7847        if ("base".equals(codeString))
7848          return InvoicePriceComponentType.BASE;
7849        if ("surcharge".equals(codeString))
7850          return InvoicePriceComponentType.SURCHARGE;
7851        if ("deduction".equals(codeString))
7852          return InvoicePriceComponentType.DEDUCTION;
7853        if ("discount".equals(codeString))
7854          return InvoicePriceComponentType.DISCOUNT;
7855        if ("tax".equals(codeString))
7856          return InvoicePriceComponentType.TAX;
7857        if ("informational".equals(codeString))
7858          return InvoicePriceComponentType.INFORMATIONAL;
7859        throw new IllegalArgumentException("Unknown InvoicePriceComponentType code '"+codeString+"'");
7860        }
7861        public Enumeration<InvoicePriceComponentType> fromType(Base code) throws FHIRException {
7862          if (code == null)
7863            return null;
7864          if (code.isEmpty())
7865            return new Enumeration<InvoicePriceComponentType>(this);
7866          String codeString = ((PrimitiveType) code).asStringValue();
7867          if (codeString == null || "".equals(codeString))
7868            return null;
7869        if ("base".equals(codeString))
7870          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.BASE);
7871        if ("surcharge".equals(codeString))
7872          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.SURCHARGE);
7873        if ("deduction".equals(codeString))
7874          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.DEDUCTION);
7875        if ("discount".equals(codeString))
7876          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.DISCOUNT);
7877        if ("tax".equals(codeString))
7878          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.TAX);
7879        if ("informational".equals(codeString))
7880          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.INFORMATIONAL);
7881        throw new FHIRException("Unknown InvoicePriceComponentType code '"+codeString+"'");
7882        }
7883    public String toCode(InvoicePriceComponentType code) {
7884      if (code == InvoicePriceComponentType.BASE)
7885        return "base";
7886      if (code == InvoicePriceComponentType.SURCHARGE)
7887        return "surcharge";
7888      if (code == InvoicePriceComponentType.DEDUCTION)
7889        return "deduction";
7890      if (code == InvoicePriceComponentType.DISCOUNT)
7891        return "discount";
7892      if (code == InvoicePriceComponentType.TAX)
7893        return "tax";
7894      if (code == InvoicePriceComponentType.INFORMATIONAL)
7895        return "informational";
7896      return "?";
7897      }
7898    public String toSystem(InvoicePriceComponentType code) {
7899      return code.getSystem();
7900      }
7901    }
7902
7903    public enum ListMode {
7904        /**
7905         * This list is the master list, maintained in an ongoing fashion with regular updates as the real world list it is tracking changes.
7906         */
7907        WORKING, 
7908        /**
7909         * This list was prepared as a snapshot. It should not be assumed to be current.
7910         */
7911        SNAPSHOT, 
7912        /**
7913         * 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.
7914         */
7915        CHANGES, 
7916        /**
7917         * added to help the parsers
7918         */
7919        NULL;
7920        public static ListMode fromCode(String codeString) throws FHIRException {
7921            if (codeString == null || "".equals(codeString))
7922                return null;
7923        if ("working".equals(codeString))
7924          return WORKING;
7925        if ("snapshot".equals(codeString))
7926          return SNAPSHOT;
7927        if ("changes".equals(codeString))
7928          return CHANGES;
7929        throw new FHIRException("Unknown ListMode code '"+codeString+"'");
7930        }
7931        public String toCode() {
7932          switch (this) {
7933            case WORKING: return "working";
7934            case SNAPSHOT: return "snapshot";
7935            case CHANGES: return "changes";
7936            case NULL: return null;
7937            default: return "?";
7938          }
7939        }
7940        public String getSystem() {
7941          switch (this) {
7942            case WORKING: return "http://hl7.org/fhir/list-mode";
7943            case SNAPSHOT: return "http://hl7.org/fhir/list-mode";
7944            case CHANGES: return "http://hl7.org/fhir/list-mode";
7945            case NULL: return null;
7946            default: return "?";
7947          }
7948        }
7949        public String getDefinition() {
7950          switch (this) {
7951            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.";
7952            case SNAPSHOT: return "This list was prepared as a snapshot. It should not be assumed to be current.";
7953            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.";
7954            case NULL: return null;
7955            default: return "?";
7956          }
7957        }
7958        public String getDisplay() {
7959          switch (this) {
7960            case WORKING: return "Working List";
7961            case SNAPSHOT: return "Snapshot List";
7962            case CHANGES: return "Change List";
7963            case NULL: return null;
7964            default: return "?";
7965          }
7966        }
7967    }
7968
7969  public static class ListModeEnumFactory implements EnumFactory<ListMode> {
7970    public ListMode fromCode(String codeString) throws IllegalArgumentException {
7971      if (codeString == null || "".equals(codeString))
7972            if (codeString == null || "".equals(codeString))
7973                return null;
7974        if ("working".equals(codeString))
7975          return ListMode.WORKING;
7976        if ("snapshot".equals(codeString))
7977          return ListMode.SNAPSHOT;
7978        if ("changes".equals(codeString))
7979          return ListMode.CHANGES;
7980        throw new IllegalArgumentException("Unknown ListMode code '"+codeString+"'");
7981        }
7982        public Enumeration<ListMode> fromType(Base code) throws FHIRException {
7983          if (code == null)
7984            return null;
7985          if (code.isEmpty())
7986            return new Enumeration<ListMode>(this);
7987          String codeString = ((PrimitiveType) code).asStringValue();
7988          if (codeString == null || "".equals(codeString))
7989            return null;
7990        if ("working".equals(codeString))
7991          return new Enumeration<ListMode>(this, ListMode.WORKING);
7992        if ("snapshot".equals(codeString))
7993          return new Enumeration<ListMode>(this, ListMode.SNAPSHOT);
7994        if ("changes".equals(codeString))
7995          return new Enumeration<ListMode>(this, ListMode.CHANGES);
7996        throw new FHIRException("Unknown ListMode code '"+codeString+"'");
7997        }
7998    public String toCode(ListMode code) {
7999      if (code == ListMode.WORKING)
8000        return "working";
8001      if (code == ListMode.SNAPSHOT)
8002        return "snapshot";
8003      if (code == ListMode.CHANGES)
8004        return "changes";
8005      return "?";
8006      }
8007    public String toSystem(ListMode code) {
8008      return code.getSystem();
8009      }
8010    }
8011
8012    public enum MeasureImprovementNotation {
8013        /**
8014         * Improvement is indicated as an increase in the score or measurement (e.g. Higher score indicates better quality).
8015         */
8016        INCREASE, 
8017        /**
8018         * Improvement is indicated as a decrease in the score or measurement (e.g. Lower score indicates better quality).
8019         */
8020        DECREASE, 
8021        /**
8022         * added to help the parsers
8023         */
8024        NULL;
8025        public static MeasureImprovementNotation fromCode(String codeString) throws FHIRException {
8026            if (codeString == null || "".equals(codeString))
8027                return null;
8028        if ("increase".equals(codeString))
8029          return INCREASE;
8030        if ("decrease".equals(codeString))
8031          return DECREASE;
8032        throw new FHIRException("Unknown MeasureImprovementNotation code '"+codeString+"'");
8033        }
8034        public String toCode() {
8035          switch (this) {
8036            case INCREASE: return "increase";
8037            case DECREASE: return "decrease";
8038            case NULL: return null;
8039            default: return "?";
8040          }
8041        }
8042        public String getSystem() {
8043          switch (this) {
8044            case INCREASE: return "http://terminology.hl7.org/CodeSystem/measure-improvement-notation";
8045            case DECREASE: return "http://terminology.hl7.org/CodeSystem/measure-improvement-notation";
8046            case NULL: return null;
8047            default: return "?";
8048          }
8049        }
8050        public String getDefinition() {
8051          switch (this) {
8052            case INCREASE: return "Improvement is indicated as an increase in the score or measurement (e.g. Higher score indicates better quality).";
8053            case DECREASE: return "Improvement is indicated as a decrease in the score or measurement (e.g. Lower score indicates better quality).";
8054            case NULL: return null;
8055            default: return "?";
8056          }
8057        }
8058        public String getDisplay() {
8059          switch (this) {
8060            case INCREASE: return "Increased score indicates improvement";
8061            case DECREASE: return "Decreased score indicates improvement";
8062            case NULL: return null;
8063            default: return "?";
8064          }
8065        }
8066    }
8067
8068  public static class MeasureImprovementNotationEnumFactory implements EnumFactory<MeasureImprovementNotation> {
8069    public MeasureImprovementNotation fromCode(String codeString) throws IllegalArgumentException {
8070      if (codeString == null || "".equals(codeString))
8071            if (codeString == null || "".equals(codeString))
8072                return null;
8073        if ("increase".equals(codeString))
8074          return MeasureImprovementNotation.INCREASE;
8075        if ("decrease".equals(codeString))
8076          return MeasureImprovementNotation.DECREASE;
8077        throw new IllegalArgumentException("Unknown MeasureImprovementNotation code '"+codeString+"'");
8078        }
8079        public Enumeration<MeasureImprovementNotation> fromType(Base code) throws FHIRException {
8080          if (code == null)
8081            return null;
8082          if (code.isEmpty())
8083            return new Enumeration<MeasureImprovementNotation>(this);
8084          String codeString = ((PrimitiveType) code).asStringValue();
8085          if (codeString == null || "".equals(codeString))
8086            return null;
8087        if ("increase".equals(codeString))
8088          return new Enumeration<MeasureImprovementNotation>(this, MeasureImprovementNotation.INCREASE);
8089        if ("decrease".equals(codeString))
8090          return new Enumeration<MeasureImprovementNotation>(this, MeasureImprovementNotation.DECREASE);
8091        throw new FHIRException("Unknown MeasureImprovementNotation code '"+codeString+"'");
8092        }
8093    public String toCode(MeasureImprovementNotation code) {
8094      if (code == MeasureImprovementNotation.INCREASE)
8095        return "increase";
8096      if (code == MeasureImprovementNotation.DECREASE)
8097        return "decrease";
8098      return "?";
8099      }
8100    public String toSystem(MeasureImprovementNotation code) {
8101      return code.getSystem();
8102      }
8103    }
8104
8105    public enum MimeTypes {
8106        /**
8107         * added to help the parsers
8108         */
8109        NULL;
8110        public static MimeTypes fromCode(String codeString) throws FHIRException {
8111            if (codeString == null || "".equals(codeString))
8112                return null;
8113        throw new FHIRException("Unknown MimeTypes code '"+codeString+"'");
8114        }
8115        public String toCode() {
8116          switch (this) {
8117            case NULL: return null;
8118            default: return "?";
8119          }
8120        }
8121        public String getSystem() {
8122          switch (this) {
8123            case NULL: return null;
8124            default: return "?";
8125          }
8126        }
8127        public String getDefinition() {
8128          switch (this) {
8129            case NULL: return null;
8130            default: return "?";
8131          }
8132        }
8133        public String getDisplay() {
8134          switch (this) {
8135            case NULL: return null;
8136            default: return "?";
8137          }
8138        }
8139    }
8140
8141  public static class MimeTypesEnumFactory implements EnumFactory<MimeTypes> {
8142    public MimeTypes fromCode(String codeString) throws IllegalArgumentException {
8143      if (codeString == null || "".equals(codeString))
8144            if (codeString == null || "".equals(codeString))
8145                return null;
8146        throw new IllegalArgumentException("Unknown MimeTypes code '"+codeString+"'");
8147        }
8148        public Enumeration<MimeTypes> fromType(Base code) throws FHIRException {
8149          if (code == null)
8150            return null;
8151          if (code.isEmpty())
8152            return new Enumeration<MimeTypes>(this);
8153          String codeString = ((PrimitiveType) code).asStringValue();
8154          if (codeString == null || "".equals(codeString))
8155            return null;
8156        throw new FHIRException("Unknown MimeTypes code '"+codeString+"'");
8157        }
8158    public String toCode(MimeTypes code) {
8159      return "?";
8160      }
8161    public String toSystem(MimeTypes code) {
8162      return code.getSystem();
8163      }
8164    }
8165
8166    public enum NoteType {
8167        /**
8168         * Display the note.
8169         */
8170        DISPLAY, 
8171        /**
8172         * Print the note on the form.
8173         */
8174        PRINT, 
8175        /**
8176         * Print the note for the operator.
8177         */
8178        PRINTOPER, 
8179        /**
8180         * added to help the parsers
8181         */
8182        NULL;
8183        public static NoteType fromCode(String codeString) throws FHIRException {
8184            if (codeString == null || "".equals(codeString))
8185                return null;
8186        if ("display".equals(codeString))
8187          return DISPLAY;
8188        if ("print".equals(codeString))
8189          return PRINT;
8190        if ("printoper".equals(codeString))
8191          return PRINTOPER;
8192        throw new FHIRException("Unknown NoteType code '"+codeString+"'");
8193        }
8194        public String toCode() {
8195          switch (this) {
8196            case DISPLAY: return "display";
8197            case PRINT: return "print";
8198            case PRINTOPER: return "printoper";
8199            case NULL: return null;
8200            default: return "?";
8201          }
8202        }
8203        public String getSystem() {
8204          switch (this) {
8205            case DISPLAY: return "http://hl7.org/fhir/note-type";
8206            case PRINT: return "http://hl7.org/fhir/note-type";
8207            case PRINTOPER: return "http://hl7.org/fhir/note-type";
8208            case NULL: return null;
8209            default: return "?";
8210          }
8211        }
8212        public String getDefinition() {
8213          switch (this) {
8214            case DISPLAY: return "Display the note.";
8215            case PRINT: return "Print the note on the form.";
8216            case PRINTOPER: return "Print the note for the operator.";
8217            case NULL: return null;
8218            default: return "?";
8219          }
8220        }
8221        public String getDisplay() {
8222          switch (this) {
8223            case DISPLAY: return "Display";
8224            case PRINT: return "Print (Form)";
8225            case PRINTOPER: return "Print (Operator)";
8226            case NULL: return null;
8227            default: return "?";
8228          }
8229        }
8230    }
8231
8232  public static class NoteTypeEnumFactory implements EnumFactory<NoteType> {
8233    public NoteType fromCode(String codeString) throws IllegalArgumentException {
8234      if (codeString == null || "".equals(codeString))
8235            if (codeString == null || "".equals(codeString))
8236                return null;
8237        if ("display".equals(codeString))
8238          return NoteType.DISPLAY;
8239        if ("print".equals(codeString))
8240          return NoteType.PRINT;
8241        if ("printoper".equals(codeString))
8242          return NoteType.PRINTOPER;
8243        throw new IllegalArgumentException("Unknown NoteType code '"+codeString+"'");
8244        }
8245        public Enumeration<NoteType> fromType(Base code) throws FHIRException {
8246          if (code == null)
8247            return null;
8248          if (code.isEmpty())
8249            return new Enumeration<NoteType>(this);
8250          String codeString = ((PrimitiveType) code).asStringValue();
8251          if (codeString == null || "".equals(codeString))
8252            return null;
8253        if ("display".equals(codeString))
8254          return new Enumeration<NoteType>(this, NoteType.DISPLAY);
8255        if ("print".equals(codeString))
8256          return new Enumeration<NoteType>(this, NoteType.PRINT);
8257        if ("printoper".equals(codeString))
8258          return new Enumeration<NoteType>(this, NoteType.PRINTOPER);
8259        throw new FHIRException("Unknown NoteType code '"+codeString+"'");
8260        }
8261    public String toCode(NoteType code) {
8262      if (code == NoteType.DISPLAY)
8263        return "display";
8264      if (code == NoteType.PRINT)
8265        return "print";
8266      if (code == NoteType.PRINTOPER)
8267        return "printoper";
8268      return "?";
8269      }
8270    public String toSystem(NoteType code) {
8271      return code.getSystem();
8272      }
8273    }
8274
8275    public enum ObservationStatus {
8276        /**
8277         * The existence of the observation is registered, but there is no result yet available.
8278         */
8279        REGISTERED, 
8280        /**
8281         * This is an initial or interim observation: data may be incomplete or unverified.
8282         */
8283        PRELIMINARY, 
8284        /**
8285         * 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.
8286         */
8287        FINAL, 
8288        /**
8289         * Subsequent to being Final, the observation has been modified subsequent.  This includes updates/new information and corrections.
8290         */
8291        AMENDED, 
8292        /**
8293         * Subsequent to being Final, the observation has been modified to correct an error in the test result.
8294         */
8295        CORRECTED, 
8296        /**
8297         * The observation is unavailable because the measurement was not started or not completed (also sometimes called "aborted").
8298         */
8299        CANCELLED, 
8300        /**
8301         * 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".).
8302         */
8303        ENTEREDINERROR, 
8304        /**
8305         * 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.
8306         */
8307        UNKNOWN, 
8308        /**
8309         * added to help the parsers
8310         */
8311        NULL;
8312        public static ObservationStatus fromCode(String codeString) throws FHIRException {
8313            if (codeString == null || "".equals(codeString))
8314                return null;
8315        if ("registered".equals(codeString))
8316          return REGISTERED;
8317        if ("preliminary".equals(codeString))
8318          return PRELIMINARY;
8319        if ("final".equals(codeString))
8320          return FINAL;
8321        if ("amended".equals(codeString))
8322          return AMENDED;
8323        if ("corrected".equals(codeString))
8324          return CORRECTED;
8325        if ("cancelled".equals(codeString))
8326          return CANCELLED;
8327        if ("entered-in-error".equals(codeString))
8328          return ENTEREDINERROR;
8329        if ("unknown".equals(codeString))
8330          return UNKNOWN;
8331        throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'");
8332        }
8333        public String toCode() {
8334          switch (this) {
8335            case REGISTERED: return "registered";
8336            case PRELIMINARY: return "preliminary";
8337            case FINAL: return "final";
8338            case AMENDED: return "amended";
8339            case CORRECTED: return "corrected";
8340            case CANCELLED: return "cancelled";
8341            case ENTEREDINERROR: return "entered-in-error";
8342            case UNKNOWN: return "unknown";
8343            case NULL: return null;
8344            default: return "?";
8345          }
8346        }
8347        public String getSystem() {
8348          switch (this) {
8349            case REGISTERED: return "http://hl7.org/fhir/observation-status";
8350            case PRELIMINARY: return "http://hl7.org/fhir/observation-status";
8351            case FINAL: return "http://hl7.org/fhir/observation-status";
8352            case AMENDED: return "http://hl7.org/fhir/observation-status";
8353            case CORRECTED: return "http://hl7.org/fhir/observation-status";
8354            case CANCELLED: return "http://hl7.org/fhir/observation-status";
8355            case ENTEREDINERROR: return "http://hl7.org/fhir/observation-status";
8356            case UNKNOWN: return "http://hl7.org/fhir/observation-status";
8357            case NULL: return null;
8358            default: return "?";
8359          }
8360        }
8361        public String getDefinition() {
8362          switch (this) {
8363            case REGISTERED: return "The existence of the observation is registered, but there is no result yet available.";
8364            case PRELIMINARY: return "This is an initial or interim observation: data may be incomplete or unverified.";
8365            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.";
8366            case AMENDED: return "Subsequent to being Final, the observation has been modified subsequent.  This includes updates/new information and corrections.";
8367            case CORRECTED: return "Subsequent to being Final, the observation has been modified to correct an error in the test result.";
8368            case CANCELLED: return "The observation is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\").";
8369            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\".).";
8370            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.";
8371            case NULL: return null;
8372            default: return "?";
8373          }
8374        }
8375        public String getDisplay() {
8376          switch (this) {
8377            case REGISTERED: return "Registered";
8378            case PRELIMINARY: return "Preliminary";
8379            case FINAL: return "Final";
8380            case AMENDED: return "Amended";
8381            case CORRECTED: return "Corrected";
8382            case CANCELLED: return "Cancelled";
8383            case ENTEREDINERROR: return "Entered in Error";
8384            case UNKNOWN: return "Unknown";
8385            case NULL: return null;
8386            default: return "?";
8387          }
8388        }
8389    }
8390
8391  public static class ObservationStatusEnumFactory implements EnumFactory<ObservationStatus> {
8392    public ObservationStatus fromCode(String codeString) throws IllegalArgumentException {
8393      if (codeString == null || "".equals(codeString))
8394            if (codeString == null || "".equals(codeString))
8395                return null;
8396        if ("registered".equals(codeString))
8397          return ObservationStatus.REGISTERED;
8398        if ("preliminary".equals(codeString))
8399          return ObservationStatus.PRELIMINARY;
8400        if ("final".equals(codeString))
8401          return ObservationStatus.FINAL;
8402        if ("amended".equals(codeString))
8403          return ObservationStatus.AMENDED;
8404        if ("corrected".equals(codeString))
8405          return ObservationStatus.CORRECTED;
8406        if ("cancelled".equals(codeString))
8407          return ObservationStatus.CANCELLED;
8408        if ("entered-in-error".equals(codeString))
8409          return ObservationStatus.ENTEREDINERROR;
8410        if ("unknown".equals(codeString))
8411          return ObservationStatus.UNKNOWN;
8412        throw new IllegalArgumentException("Unknown ObservationStatus code '"+codeString+"'");
8413        }
8414        public Enumeration<ObservationStatus> fromType(Base code) throws FHIRException {
8415          if (code == null)
8416            return null;
8417          if (code.isEmpty())
8418            return new Enumeration<ObservationStatus>(this);
8419          String codeString = ((PrimitiveType) code).asStringValue();
8420          if (codeString == null || "".equals(codeString))
8421            return null;
8422        if ("registered".equals(codeString))
8423          return new Enumeration<ObservationStatus>(this, ObservationStatus.REGISTERED);
8424        if ("preliminary".equals(codeString))
8425          return new Enumeration<ObservationStatus>(this, ObservationStatus.PRELIMINARY);
8426        if ("final".equals(codeString))
8427          return new Enumeration<ObservationStatus>(this, ObservationStatus.FINAL);
8428        if ("amended".equals(codeString))
8429          return new Enumeration<ObservationStatus>(this, ObservationStatus.AMENDED);
8430        if ("corrected".equals(codeString))
8431          return new Enumeration<ObservationStatus>(this, ObservationStatus.CORRECTED);
8432        if ("cancelled".equals(codeString))
8433          return new Enumeration<ObservationStatus>(this, ObservationStatus.CANCELLED);
8434        if ("entered-in-error".equals(codeString))
8435          return new Enumeration<ObservationStatus>(this, ObservationStatus.ENTEREDINERROR);
8436        if ("unknown".equals(codeString))
8437          return new Enumeration<ObservationStatus>(this, ObservationStatus.UNKNOWN);
8438        throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'");
8439        }
8440    public String toCode(ObservationStatus code) {
8441      if (code == ObservationStatus.REGISTERED)
8442        return "registered";
8443      if (code == ObservationStatus.PRELIMINARY)
8444        return "preliminary";
8445      if (code == ObservationStatus.FINAL)
8446        return "final";
8447      if (code == ObservationStatus.AMENDED)
8448        return "amended";
8449      if (code == ObservationStatus.CORRECTED)
8450        return "corrected";
8451      if (code == ObservationStatus.CANCELLED)
8452        return "cancelled";
8453      if (code == ObservationStatus.ENTEREDINERROR)
8454        return "entered-in-error";
8455      if (code == ObservationStatus.UNKNOWN)
8456        return "unknown";
8457      return "?";
8458      }
8459    public String toSystem(ObservationStatus code) {
8460      return code.getSystem();
8461      }
8462    }
8463
8464    public enum OperationParameterUse {
8465        /**
8466         * This is an input parameter.
8467         */
8468        IN, 
8469        /**
8470         * This is an output parameter.
8471         */
8472        OUT, 
8473        /**
8474         * added to help the parsers
8475         */
8476        NULL;
8477        public static OperationParameterUse fromCode(String codeString) throws FHIRException {
8478            if (codeString == null || "".equals(codeString))
8479                return null;
8480        if ("in".equals(codeString))
8481          return IN;
8482        if ("out".equals(codeString))
8483          return OUT;
8484        throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'");
8485        }
8486        public String toCode() {
8487          switch (this) {
8488            case IN: return "in";
8489            case OUT: return "out";
8490            case NULL: return null;
8491            default: return "?";
8492          }
8493        }
8494        public String getSystem() {
8495          switch (this) {
8496            case IN: return "http://hl7.org/fhir/operation-parameter-use";
8497            case OUT: return "http://hl7.org/fhir/operation-parameter-use";
8498            case NULL: return null;
8499            default: return "?";
8500          }
8501        }
8502        public String getDefinition() {
8503          switch (this) {
8504            case IN: return "This is an input parameter.";
8505            case OUT: return "This is an output parameter.";
8506            case NULL: return null;
8507            default: return "?";
8508          }
8509        }
8510        public String getDisplay() {
8511          switch (this) {
8512            case IN: return "In";
8513            case OUT: return "Out";
8514            case NULL: return null;
8515            default: return "?";
8516          }
8517        }
8518    }
8519
8520  public static class OperationParameterUseEnumFactory implements EnumFactory<OperationParameterUse> {
8521    public OperationParameterUse fromCode(String codeString) throws IllegalArgumentException {
8522      if (codeString == null || "".equals(codeString))
8523            if (codeString == null || "".equals(codeString))
8524                return null;
8525        if ("in".equals(codeString))
8526          return OperationParameterUse.IN;
8527        if ("out".equals(codeString))
8528          return OperationParameterUse.OUT;
8529        throw new IllegalArgumentException("Unknown OperationParameterUse code '"+codeString+"'");
8530        }
8531        public Enumeration<OperationParameterUse> fromType(Base code) throws FHIRException {
8532          if (code == null)
8533            return null;
8534          if (code.isEmpty())
8535            return new Enumeration<OperationParameterUse>(this);
8536          String codeString = ((PrimitiveType) code).asStringValue();
8537          if (codeString == null || "".equals(codeString))
8538            return null;
8539        if ("in".equals(codeString))
8540          return new Enumeration<OperationParameterUse>(this, OperationParameterUse.IN);
8541        if ("out".equals(codeString))
8542          return new Enumeration<OperationParameterUse>(this, OperationParameterUse.OUT);
8543        throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'");
8544        }
8545    public String toCode(OperationParameterUse code) {
8546      if (code == OperationParameterUse.IN)
8547        return "in";
8548      if (code == OperationParameterUse.OUT)
8549        return "out";
8550      return "?";
8551      }
8552    public String toSystem(OperationParameterUse code) {
8553      return code.getSystem();
8554      }
8555    }
8556
8557    public enum ParticipationStatus {
8558        /**
8559         * The participant has accepted the appointment.
8560         */
8561        ACCEPTED, 
8562        /**
8563         * The participant has declined the appointment and will not participate in the appointment.
8564         */
8565        DECLINED, 
8566        /**
8567         * 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.
8568         */
8569        TENTATIVE, 
8570        /**
8571         * The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses.
8572         */
8573        NEEDSACTION, 
8574        /**
8575         * added to help the parsers
8576         */
8577        NULL;
8578        public static ParticipationStatus fromCode(String codeString) throws FHIRException {
8579            if (codeString == null || "".equals(codeString))
8580                return null;
8581        if ("accepted".equals(codeString))
8582          return ACCEPTED;
8583        if ("declined".equals(codeString))
8584          return DECLINED;
8585        if ("tentative".equals(codeString))
8586          return TENTATIVE;
8587        if ("needs-action".equals(codeString))
8588          return NEEDSACTION;
8589        throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'");
8590        }
8591        public String toCode() {
8592          switch (this) {
8593            case ACCEPTED: return "accepted";
8594            case DECLINED: return "declined";
8595            case TENTATIVE: return "tentative";
8596            case NEEDSACTION: return "needs-action";
8597            case NULL: return null;
8598            default: return "?";
8599          }
8600        }
8601        public String getSystem() {
8602          switch (this) {
8603            case ACCEPTED: return "http://hl7.org/fhir/participationstatus";
8604            case DECLINED: return "http://hl7.org/fhir/participationstatus";
8605            case TENTATIVE: return "http://hl7.org/fhir/participationstatus";
8606            case NEEDSACTION: return "http://hl7.org/fhir/participationstatus";
8607            case NULL: return null;
8608            default: return "?";
8609          }
8610        }
8611        public String getDefinition() {
8612          switch (this) {
8613            case ACCEPTED: return "The participant has accepted the appointment.";
8614            case DECLINED: return "The participant has declined the appointment and will not participate in the appointment.";
8615            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.";
8616            case NEEDSACTION: return "The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses.";
8617            case NULL: return null;
8618            default: return "?";
8619          }
8620        }
8621        public String getDisplay() {
8622          switch (this) {
8623            case ACCEPTED: return "Accepted";
8624            case DECLINED: return "Declined";
8625            case TENTATIVE: return "Tentative";
8626            case NEEDSACTION: return "Needs Action";
8627            case NULL: return null;
8628            default: return "?";
8629          }
8630        }
8631    }
8632
8633  public static class ParticipationStatusEnumFactory implements EnumFactory<ParticipationStatus> {
8634    public ParticipationStatus fromCode(String codeString) throws IllegalArgumentException {
8635      if (codeString == null || "".equals(codeString))
8636            if (codeString == null || "".equals(codeString))
8637                return null;
8638        if ("accepted".equals(codeString))
8639          return ParticipationStatus.ACCEPTED;
8640        if ("declined".equals(codeString))
8641          return ParticipationStatus.DECLINED;
8642        if ("tentative".equals(codeString))
8643          return ParticipationStatus.TENTATIVE;
8644        if ("needs-action".equals(codeString))
8645          return ParticipationStatus.NEEDSACTION;
8646        throw new IllegalArgumentException("Unknown ParticipationStatus code '"+codeString+"'");
8647        }
8648        public Enumeration<ParticipationStatus> fromType(Base code) throws FHIRException {
8649          if (code == null)
8650            return null;
8651          if (code.isEmpty())
8652            return new Enumeration<ParticipationStatus>(this);
8653          String codeString = ((PrimitiveType) code).asStringValue();
8654          if (codeString == null || "".equals(codeString))
8655            return null;
8656        if ("accepted".equals(codeString))
8657          return new Enumeration<ParticipationStatus>(this, ParticipationStatus.ACCEPTED);
8658        if ("declined".equals(codeString))
8659          return new Enumeration<ParticipationStatus>(this, ParticipationStatus.DECLINED);
8660        if ("tentative".equals(codeString))
8661          return new Enumeration<ParticipationStatus>(this, ParticipationStatus.TENTATIVE);
8662        if ("needs-action".equals(codeString))
8663          return new Enumeration<ParticipationStatus>(this, ParticipationStatus.NEEDSACTION);
8664        throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'");
8665        }
8666    public String toCode(ParticipationStatus code) {
8667      if (code == ParticipationStatus.ACCEPTED)
8668        return "accepted";
8669      if (code == ParticipationStatus.DECLINED)
8670        return "declined";
8671      if (code == ParticipationStatus.TENTATIVE)
8672        return "tentative";
8673      if (code == ParticipationStatus.NEEDSACTION)
8674        return "needs-action";
8675      return "?";
8676      }
8677    public String toSystem(ParticipationStatus code) {
8678      return code.getSystem();
8679      }
8680    }
8681
8682    public enum PublicationStatus {
8683        /**
8684         * This resource is still under development and is not yet considered to be ready for normal use.
8685         */
8686        DRAFT, 
8687        /**
8688         * This resource is ready for normal use.
8689         */
8690        ACTIVE, 
8691        /**
8692         * This resource has been withdrawn or superseded and should no longer be used.
8693         */
8694        RETIRED, 
8695        /**
8696         * 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.
8697         */
8698        UNKNOWN, 
8699        /**
8700         * added to help the parsers
8701         */
8702        NULL;
8703        public static PublicationStatus fromCode(String codeString) throws FHIRException {
8704            if (codeString == null || "".equals(codeString))
8705                return null;
8706        if ("draft".equals(codeString))
8707          return DRAFT;
8708        if ("active".equals(codeString))
8709          return ACTIVE;
8710        if ("retired".equals(codeString))
8711          return RETIRED;
8712        if ("unknown".equals(codeString))
8713          return UNKNOWN;
8714        throw new FHIRException("Unknown PublicationStatus code '"+codeString+"'");
8715        }
8716        public String toCode() {
8717          switch (this) {
8718            case DRAFT: return "draft";
8719            case ACTIVE: return "active";
8720            case RETIRED: return "retired";
8721            case UNKNOWN: return "unknown";
8722            case NULL: return null;
8723            default: return "?";
8724          }
8725        }
8726        public String getSystem() {
8727          switch (this) {
8728            case DRAFT: return "http://hl7.org/fhir/publication-status";
8729            case ACTIVE: return "http://hl7.org/fhir/publication-status";
8730            case RETIRED: return "http://hl7.org/fhir/publication-status";
8731            case UNKNOWN: return "http://hl7.org/fhir/publication-status";
8732            case NULL: return null;
8733            default: return "?";
8734          }
8735        }
8736        public String getDefinition() {
8737          switch (this) {
8738            case DRAFT: return "This resource is still under development and is not yet considered to be ready for normal use.";
8739            case ACTIVE: return "This resource is ready for normal use.";
8740            case RETIRED: return "This resource has been withdrawn or superseded and should no longer be used.";
8741            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.";
8742            case NULL: return null;
8743            default: return "?";
8744          }
8745        }
8746        public String getDisplay() {
8747          switch (this) {
8748            case DRAFT: return "Draft";
8749            case ACTIVE: return "Active";
8750            case RETIRED: return "Retired";
8751            case UNKNOWN: return "Unknown";
8752            case NULL: return null;
8753            default: return "?";
8754          }
8755        }
8756    }
8757
8758  public static class PublicationStatusEnumFactory implements EnumFactory<PublicationStatus> {
8759    public PublicationStatus fromCode(String codeString) throws IllegalArgumentException {
8760      if (codeString == null || "".equals(codeString))
8761            if (codeString == null || "".equals(codeString))
8762                return null;
8763        if ("draft".equals(codeString))
8764          return PublicationStatus.DRAFT;
8765        if ("active".equals(codeString))
8766          return PublicationStatus.ACTIVE;
8767        if ("retired".equals(codeString))
8768          return PublicationStatus.RETIRED;
8769        if ("unknown".equals(codeString))
8770          return PublicationStatus.UNKNOWN;
8771        throw new IllegalArgumentException("Unknown PublicationStatus code '"+codeString+"'");
8772        }
8773        public Enumeration<PublicationStatus> fromType(Base code) throws FHIRException {
8774          if (code == null)
8775            return null;
8776          if (code.isEmpty())
8777            return new Enumeration<PublicationStatus>(this);
8778          String codeString = ((PrimitiveType) code).asStringValue();
8779          if (codeString == null || "".equals(codeString))
8780            return null;
8781        if ("draft".equals(codeString))
8782          return new Enumeration<PublicationStatus>(this, PublicationStatus.DRAFT);
8783        if ("active".equals(codeString))
8784          return new Enumeration<PublicationStatus>(this, PublicationStatus.ACTIVE);
8785        if ("retired".equals(codeString))
8786          return new Enumeration<PublicationStatus>(this, PublicationStatus.RETIRED);
8787        if ("unknown".equals(codeString))
8788          return new Enumeration<PublicationStatus>(this, PublicationStatus.UNKNOWN);
8789        throw new FHIRException("Unknown PublicationStatus code '"+codeString+"'");
8790        }
8791    public String toCode(PublicationStatus code) {
8792      if (code == PublicationStatus.DRAFT)
8793        return "draft";
8794      if (code == PublicationStatus.ACTIVE)
8795        return "active";
8796      if (code == PublicationStatus.RETIRED)
8797        return "retired";
8798      if (code == PublicationStatus.UNKNOWN)
8799        return "unknown";
8800      return "?";
8801      }
8802    public String toSystem(PublicationStatus code) {
8803      return code.getSystem();
8804      }
8805    }
8806
8807    public enum QuantityComparator {
8808        /**
8809         * The actual value is less than the given value.
8810         */
8811        LESS_THAN, 
8812        /**
8813         * The actual value is less than or equal to the given value.
8814         */
8815        LESS_OR_EQUAL, 
8816        /**
8817         * The actual value is greater than or equal to the given value.
8818         */
8819        GREATER_OR_EQUAL, 
8820        /**
8821         * The actual value is greater than the given value.
8822         */
8823        GREATER_THAN, 
8824        /**
8825         * The actual value is sufficient for the total quantity to equal the given value.
8826         */
8827        AD, 
8828        /**
8829         * added to help the parsers
8830         */
8831        NULL;
8832        public static QuantityComparator fromCode(String codeString) throws FHIRException {
8833            if (codeString == null || "".equals(codeString))
8834                return null;
8835        if ("<".equals(codeString))
8836          return LESS_THAN;
8837        if ("<=".equals(codeString))
8838          return LESS_OR_EQUAL;
8839        if (">=".equals(codeString))
8840          return GREATER_OR_EQUAL;
8841        if (">".equals(codeString))
8842          return GREATER_THAN;
8843        if ("ad".equals(codeString))
8844          return AD;
8845        throw new FHIRException("Unknown QuantityComparator code '"+codeString+"'");
8846        }
8847        public String toCode() {
8848          switch (this) {
8849            case LESS_THAN: return "<";
8850            case LESS_OR_EQUAL: return "<=";
8851            case GREATER_OR_EQUAL: return ">=";
8852            case GREATER_THAN: return ">";
8853            case AD: return "ad";
8854            case NULL: return null;
8855            default: return "?";
8856          }
8857        }
8858        public String getSystem() {
8859          switch (this) {
8860            case LESS_THAN: return "http://hl7.org/fhir/quantity-comparator";
8861            case LESS_OR_EQUAL: return "http://hl7.org/fhir/quantity-comparator";
8862            case GREATER_OR_EQUAL: return "http://hl7.org/fhir/quantity-comparator";
8863            case GREATER_THAN: return "http://hl7.org/fhir/quantity-comparator";
8864            case AD: return "http://hl7.org/fhir/quantity-comparator";
8865            case NULL: return null;
8866            default: return "?";
8867          }
8868        }
8869        public String getDefinition() {
8870          switch (this) {
8871            case LESS_THAN: return "The actual value is less than the given value.";
8872            case LESS_OR_EQUAL: return "The actual value is less than or equal to the given value.";
8873            case GREATER_OR_EQUAL: return "The actual value is greater than or equal to the given value.";
8874            case GREATER_THAN: return "The actual value is greater than the given value.";
8875            case AD: return "The actual value is sufficient for the total quantity to equal the given value.";
8876            case NULL: return null;
8877            default: return "?";
8878          }
8879        }
8880        public String getDisplay() {
8881          switch (this) {
8882            case LESS_THAN: return "Less than";
8883            case LESS_OR_EQUAL: return "Less or Equal to";
8884            case GREATER_OR_EQUAL: return "Greater or Equal to";
8885            case GREATER_THAN: return "Greater than";
8886            case AD: return "Sufficient to achieve this total quantity";
8887            case NULL: return null;
8888            default: return "?";
8889          }
8890        }
8891    }
8892
8893  public static class QuantityComparatorEnumFactory implements EnumFactory<QuantityComparator> {
8894    public QuantityComparator fromCode(String codeString) throws IllegalArgumentException {
8895      if (codeString == null || "".equals(codeString))
8896            if (codeString == null || "".equals(codeString))
8897                return null;
8898        if ("<".equals(codeString))
8899          return QuantityComparator.LESS_THAN;
8900        if ("<=".equals(codeString))
8901          return QuantityComparator.LESS_OR_EQUAL;
8902        if (">=".equals(codeString))
8903          return QuantityComparator.GREATER_OR_EQUAL;
8904        if (">".equals(codeString))
8905          return QuantityComparator.GREATER_THAN;
8906        if ("ad".equals(codeString))
8907          return QuantityComparator.AD;
8908        throw new IllegalArgumentException("Unknown QuantityComparator code '"+codeString+"'");
8909        }
8910        public Enumeration<QuantityComparator> fromType(Base code) throws FHIRException {
8911          if (code == null)
8912            return null;
8913          if (code.isEmpty())
8914            return new Enumeration<QuantityComparator>(this);
8915          String codeString = ((PrimitiveType) code).asStringValue();
8916          if (codeString == null || "".equals(codeString))
8917            return null;
8918        if ("<".equals(codeString))
8919          return new Enumeration<QuantityComparator>(this, QuantityComparator.LESS_THAN);
8920        if ("<=".equals(codeString))
8921          return new Enumeration<QuantityComparator>(this, QuantityComparator.LESS_OR_EQUAL);
8922        if (">=".equals(codeString))
8923          return new Enumeration<QuantityComparator>(this, QuantityComparator.GREATER_OR_EQUAL);
8924        if (">".equals(codeString))
8925          return new Enumeration<QuantityComparator>(this, QuantityComparator.GREATER_THAN);
8926        if ("ad".equals(codeString))
8927          return new Enumeration<QuantityComparator>(this, QuantityComparator.AD);
8928        throw new FHIRException("Unknown QuantityComparator code '"+codeString+"'");
8929        }
8930    public String toCode(QuantityComparator code) {
8931      if (code == QuantityComparator.LESS_THAN)
8932        return "<";
8933      if (code == QuantityComparator.LESS_OR_EQUAL)
8934        return "<=";
8935      if (code == QuantityComparator.GREATER_OR_EQUAL)
8936        return ">=";
8937      if (code == QuantityComparator.GREATER_THAN)
8938        return ">";
8939      if (code == QuantityComparator.AD)
8940        return "ad";
8941      return "?";
8942      }
8943    public String toSystem(QuantityComparator code) {
8944      return code.getSystem();
8945      }
8946    }
8947
8948    public enum RequestIntent {
8949        /**
8950         * 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.
8951         */
8952        PROPOSAL, 
8953        /**
8954         * The request represents an intention to ensure something occurs without providing an authorization for others to act.
8955         */
8956        PLAN, 
8957        /**
8958         * The request represents a legally binding instruction authored by a Patient or RelatedPerson.
8959         */
8960        DIRECTIVE, 
8961        /**
8962         * The request represents a request/demand and authorization for action by a Practitioner.
8963         */
8964        ORDER, 
8965        /**
8966         * The request represents an original authorization for action.
8967         */
8968        ORIGINALORDER, 
8969        /**
8970         * 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.
8971         */
8972        REFLEXORDER, 
8973        /**
8974         * 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.
8975         */
8976        FILLERORDER, 
8977        /**
8978         * 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.
8979         */
8980        INSTANCEORDER, 
8981        /**
8982         * 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.
8983         */
8984        OPTION, 
8985        /**
8986         * added to help the parsers
8987         */
8988        NULL;
8989        public static RequestIntent fromCode(String codeString) throws FHIRException {
8990            if (codeString == null || "".equals(codeString))
8991                return null;
8992        if ("proposal".equals(codeString))
8993          return PROPOSAL;
8994        if ("plan".equals(codeString))
8995          return PLAN;
8996        if ("directive".equals(codeString))
8997          return DIRECTIVE;
8998        if ("order".equals(codeString))
8999          return ORDER;
9000        if ("original-order".equals(codeString))
9001          return ORIGINALORDER;
9002        if ("reflex-order".equals(codeString))
9003          return REFLEXORDER;
9004        if ("filler-order".equals(codeString))
9005          return FILLERORDER;
9006        if ("instance-order".equals(codeString))
9007          return INSTANCEORDER;
9008        if ("option".equals(codeString))
9009          return OPTION;
9010        throw new FHIRException("Unknown RequestIntent code '"+codeString+"'");
9011        }
9012        public String toCode() {
9013          switch (this) {
9014            case PROPOSAL: return "proposal";
9015            case PLAN: return "plan";
9016            case DIRECTIVE: return "directive";
9017            case ORDER: return "order";
9018            case ORIGINALORDER: return "original-order";
9019            case REFLEXORDER: return "reflex-order";
9020            case FILLERORDER: return "filler-order";
9021            case INSTANCEORDER: return "instance-order";
9022            case OPTION: return "option";
9023            case NULL: return null;
9024            default: return "?";
9025          }
9026        }
9027        public String getSystem() {
9028          switch (this) {
9029            case PROPOSAL: return "http://hl7.org/fhir/request-intent";
9030            case PLAN: return "http://hl7.org/fhir/request-intent";
9031            case DIRECTIVE: return "http://hl7.org/fhir/request-intent";
9032            case ORDER: return "http://hl7.org/fhir/request-intent";
9033            case ORIGINALORDER: return "http://hl7.org/fhir/request-intent";
9034            case REFLEXORDER: return "http://hl7.org/fhir/request-intent";
9035            case FILLERORDER: return "http://hl7.org/fhir/request-intent";
9036            case INSTANCEORDER: return "http://hl7.org/fhir/request-intent";
9037            case OPTION: return "http://hl7.org/fhir/request-intent";
9038            case NULL: return null;
9039            default: return "?";
9040          }
9041        }
9042        public String getDefinition() {
9043          switch (this) {
9044            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.";
9045            case PLAN: return "The request represents an intention to ensure something occurs without providing an authorization for others to act.";
9046            case DIRECTIVE: return "The request represents a legally binding instruction authored by a Patient or RelatedPerson.";
9047            case ORDER: return "The request represents a request/demand and authorization for action by a Practitioner.";
9048            case ORIGINALORDER: return "The request represents an original authorization for action.";
9049            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.";
9050            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.";
9051            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.";
9052            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.";
9053            case NULL: return null;
9054            default: return "?";
9055          }
9056        }
9057        public String getDisplay() {
9058          switch (this) {
9059            case PROPOSAL: return "Proposal";
9060            case PLAN: return "Plan";
9061            case DIRECTIVE: return "Directive";
9062            case ORDER: return "Order";
9063            case ORIGINALORDER: return "Original Order";
9064            case REFLEXORDER: return "Reflex Order";
9065            case FILLERORDER: return "Filler Order";
9066            case INSTANCEORDER: return "Instance Order";
9067            case OPTION: return "Option";
9068            case NULL: return null;
9069            default: return "?";
9070          }
9071        }
9072    }
9073
9074  public static class RequestIntentEnumFactory implements EnumFactory<RequestIntent> {
9075    public RequestIntent fromCode(String codeString) throws IllegalArgumentException {
9076      if (codeString == null || "".equals(codeString))
9077            if (codeString == null || "".equals(codeString))
9078                return null;
9079        if ("proposal".equals(codeString))
9080          return RequestIntent.PROPOSAL;
9081        if ("plan".equals(codeString))
9082          return RequestIntent.PLAN;
9083        if ("directive".equals(codeString))
9084          return RequestIntent.DIRECTIVE;
9085        if ("order".equals(codeString))
9086          return RequestIntent.ORDER;
9087        if ("original-order".equals(codeString))
9088          return RequestIntent.ORIGINALORDER;
9089        if ("reflex-order".equals(codeString))
9090          return RequestIntent.REFLEXORDER;
9091        if ("filler-order".equals(codeString))
9092          return RequestIntent.FILLERORDER;
9093        if ("instance-order".equals(codeString))
9094          return RequestIntent.INSTANCEORDER;
9095        if ("option".equals(codeString))
9096          return RequestIntent.OPTION;
9097        throw new IllegalArgumentException("Unknown RequestIntent code '"+codeString+"'");
9098        }
9099        public Enumeration<RequestIntent> fromType(Base code) throws FHIRException {
9100          if (code == null)
9101            return null;
9102          if (code.isEmpty())
9103            return new Enumeration<RequestIntent>(this);
9104          String codeString = ((PrimitiveType) code).asStringValue();
9105          if (codeString == null || "".equals(codeString))
9106            return null;
9107        if ("proposal".equals(codeString))
9108          return new Enumeration<RequestIntent>(this, RequestIntent.PROPOSAL);
9109        if ("plan".equals(codeString))
9110          return new Enumeration<RequestIntent>(this, RequestIntent.PLAN);
9111        if ("directive".equals(codeString))
9112          return new Enumeration<RequestIntent>(this, RequestIntent.DIRECTIVE);
9113        if ("order".equals(codeString))
9114          return new Enumeration<RequestIntent>(this, RequestIntent.ORDER);
9115        if ("original-order".equals(codeString))
9116          return new Enumeration<RequestIntent>(this, RequestIntent.ORIGINALORDER);
9117        if ("reflex-order".equals(codeString))
9118          return new Enumeration<RequestIntent>(this, RequestIntent.REFLEXORDER);
9119        if ("filler-order".equals(codeString))
9120          return new Enumeration<RequestIntent>(this, RequestIntent.FILLERORDER);
9121        if ("instance-order".equals(codeString))
9122          return new Enumeration<RequestIntent>(this, RequestIntent.INSTANCEORDER);
9123        if ("option".equals(codeString))
9124          return new Enumeration<RequestIntent>(this, RequestIntent.OPTION);
9125        throw new FHIRException("Unknown RequestIntent code '"+codeString+"'");
9126        }
9127    public String toCode(RequestIntent code) {
9128      if (code == RequestIntent.PROPOSAL)
9129        return "proposal";
9130      if (code == RequestIntent.PLAN)
9131        return "plan";
9132      if (code == RequestIntent.DIRECTIVE)
9133        return "directive";
9134      if (code == RequestIntent.ORDER)
9135        return "order";
9136      if (code == RequestIntent.ORIGINALORDER)
9137        return "original-order";
9138      if (code == RequestIntent.REFLEXORDER)
9139        return "reflex-order";
9140      if (code == RequestIntent.FILLERORDER)
9141        return "filler-order";
9142      if (code == RequestIntent.INSTANCEORDER)
9143        return "instance-order";
9144      if (code == RequestIntent.OPTION)
9145        return "option";
9146      return "?";
9147      }
9148    public String toSystem(RequestIntent code) {
9149      return code.getSystem();
9150      }
9151    }
9152
9153    public enum RequestPriority {
9154        /**
9155         * The request has normal priority.
9156         */
9157        ROUTINE, 
9158        /**
9159         * The request should be actioned promptly - higher priority than routine.
9160         */
9161        URGENT, 
9162        /**
9163         * The request should be actioned as soon as possible - higher priority than urgent.
9164         */
9165        ASAP, 
9166        /**
9167         * The request should be actioned immediately - highest possible priority.  E.g. an emergency.
9168         */
9169        STAT, 
9170        /**
9171         * added to help the parsers
9172         */
9173        NULL;
9174        public static RequestPriority fromCode(String codeString) throws FHIRException {
9175            if (codeString == null || "".equals(codeString))
9176                return null;
9177        if ("routine".equals(codeString))
9178          return ROUTINE;
9179        if ("urgent".equals(codeString))
9180          return URGENT;
9181        if ("asap".equals(codeString))
9182          return ASAP;
9183        if ("stat".equals(codeString))
9184          return STAT;
9185        throw new FHIRException("Unknown RequestPriority code '"+codeString+"'");
9186        }
9187        public String toCode() {
9188          switch (this) {
9189            case ROUTINE: return "routine";
9190            case URGENT: return "urgent";
9191            case ASAP: return "asap";
9192            case STAT: return "stat";
9193            case NULL: return null;
9194            default: return "?";
9195          }
9196        }
9197        public String getSystem() {
9198          switch (this) {
9199            case ROUTINE: return "http://hl7.org/fhir/request-priority";
9200            case URGENT: return "http://hl7.org/fhir/request-priority";
9201            case ASAP: return "http://hl7.org/fhir/request-priority";
9202            case STAT: return "http://hl7.org/fhir/request-priority";
9203            case NULL: return null;
9204            default: return "?";
9205          }
9206        }
9207        public String getDefinition() {
9208          switch (this) {
9209            case ROUTINE: return "The request has normal priority.";
9210            case URGENT: return "The request should be actioned promptly - higher priority than routine.";
9211            case ASAP: return "The request should be actioned as soon as possible - higher priority than urgent.";
9212            case STAT: return "The request should be actioned immediately - highest possible priority.  E.g. an emergency.";
9213            case NULL: return null;
9214            default: return "?";
9215          }
9216        }
9217        public String getDisplay() {
9218          switch (this) {
9219            case ROUTINE: return "Routine";
9220            case URGENT: return "Urgent";
9221            case ASAP: return "ASAP";
9222            case STAT: return "STAT";
9223            case NULL: return null;
9224            default: return "?";
9225          }
9226        }
9227    }
9228
9229  public static class RequestPriorityEnumFactory implements EnumFactory<RequestPriority> {
9230    public RequestPriority fromCode(String codeString) throws IllegalArgumentException {
9231      if (codeString == null || "".equals(codeString))
9232            if (codeString == null || "".equals(codeString))
9233                return null;
9234        if ("routine".equals(codeString))
9235          return RequestPriority.ROUTINE;
9236        if ("urgent".equals(codeString))
9237          return RequestPriority.URGENT;
9238        if ("asap".equals(codeString))
9239          return RequestPriority.ASAP;
9240        if ("stat".equals(codeString))
9241          return RequestPriority.STAT;
9242        throw new IllegalArgumentException("Unknown RequestPriority code '"+codeString+"'");
9243        }
9244        public Enumeration<RequestPriority> fromType(Base code) throws FHIRException {
9245          if (code == null)
9246            return null;
9247          if (code.isEmpty())
9248            return new Enumeration<RequestPriority>(this);
9249          String codeString = ((PrimitiveType) code).asStringValue();
9250          if (codeString == null || "".equals(codeString))
9251            return null;
9252        if ("routine".equals(codeString))
9253          return new Enumeration<RequestPriority>(this, RequestPriority.ROUTINE);
9254        if ("urgent".equals(codeString))
9255          return new Enumeration<RequestPriority>(this, RequestPriority.URGENT);
9256        if ("asap".equals(codeString))
9257          return new Enumeration<RequestPriority>(this, RequestPriority.ASAP);
9258        if ("stat".equals(codeString))
9259          return new Enumeration<RequestPriority>(this, RequestPriority.STAT);
9260        throw new FHIRException("Unknown RequestPriority code '"+codeString+"'");
9261        }
9262    public String toCode(RequestPriority code) {
9263      if (code == RequestPriority.ROUTINE)
9264        return "routine";
9265      if (code == RequestPriority.URGENT)
9266        return "urgent";
9267      if (code == RequestPriority.ASAP)
9268        return "asap";
9269      if (code == RequestPriority.STAT)
9270        return "stat";
9271      return "?";
9272      }
9273    public String toSystem(RequestPriority code) {
9274      return code.getSystem();
9275      }
9276    }
9277
9278    public enum RequestStatus {
9279        /**
9280         * The request has been created but is not yet complete or ready for action.
9281         */
9282        DRAFT, 
9283        /**
9284         * The request is in force and ready to be acted upon.
9285         */
9286        ACTIVE, 
9287        /**
9288         * The request (and any implicit authorization to act) has been temporarily withdrawn but is expected to resume in the future.
9289         */
9290        ONHOLD, 
9291        /**
9292         * 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.
9293         */
9294        REVOKED, 
9295        /**
9296         * The activity described by the request has been fully performed.  No further activity will occur.
9297         */
9298        COMPLETED, 
9299        /**
9300         * 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".).
9301         */
9302        ENTEREDINERROR, 
9303        /**
9304         * 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.
9305         */
9306        UNKNOWN, 
9307        /**
9308         * added to help the parsers
9309         */
9310        NULL;
9311        public static RequestStatus fromCode(String codeString) throws FHIRException {
9312            if (codeString == null || "".equals(codeString))
9313                return null;
9314        if ("draft".equals(codeString))
9315          return DRAFT;
9316        if ("active".equals(codeString))
9317          return ACTIVE;
9318        if ("on-hold".equals(codeString))
9319          return ONHOLD;
9320        if ("revoked".equals(codeString))
9321          return REVOKED;
9322        if ("completed".equals(codeString))
9323          return COMPLETED;
9324        if ("entered-in-error".equals(codeString))
9325          return ENTEREDINERROR;
9326        if ("unknown".equals(codeString))
9327          return UNKNOWN;
9328        throw new FHIRException("Unknown RequestStatus code '"+codeString+"'");
9329        }
9330        public String toCode() {
9331          switch (this) {
9332            case DRAFT: return "draft";
9333            case ACTIVE: return "active";
9334            case ONHOLD: return "on-hold";
9335            case REVOKED: return "revoked";
9336            case COMPLETED: return "completed";
9337            case ENTEREDINERROR: return "entered-in-error";
9338            case UNKNOWN: return "unknown";
9339            case NULL: return null;
9340            default: return "?";
9341          }
9342        }
9343        public String getSystem() {
9344          switch (this) {
9345            case DRAFT: return "http://hl7.org/fhir/request-status";
9346            case ACTIVE: return "http://hl7.org/fhir/request-status";
9347            case ONHOLD: return "http://hl7.org/fhir/request-status";
9348            case REVOKED: return "http://hl7.org/fhir/request-status";
9349            case COMPLETED: return "http://hl7.org/fhir/request-status";
9350            case ENTEREDINERROR: return "http://hl7.org/fhir/request-status";
9351            case UNKNOWN: return "http://hl7.org/fhir/request-status";
9352            case NULL: return null;
9353            default: return "?";
9354          }
9355        }
9356        public String getDefinition() {
9357          switch (this) {
9358            case DRAFT: return "The request has been created but is not yet complete or ready for action.";
9359            case ACTIVE: return "The request is in force and ready to be acted upon.";
9360            case ONHOLD: return "The request (and any implicit authorization to act) has been temporarily withdrawn but is expected to resume in the future.";
9361            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.";
9362            case COMPLETED: return "The activity described by the request has been fully performed.  No further activity will occur.";
9363            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\".).";
9364            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.";
9365            case NULL: return null;
9366            default: return "?";
9367          }
9368        }
9369        public String getDisplay() {
9370          switch (this) {
9371            case DRAFT: return "Draft";
9372            case ACTIVE: return "Active";
9373            case ONHOLD: return "On Hold";
9374            case REVOKED: return "Revoked";
9375            case COMPLETED: return "Completed";
9376            case ENTEREDINERROR: return "Entered in Error";
9377            case UNKNOWN: return "Unknown";
9378            case NULL: return null;
9379            default: return "?";
9380          }
9381        }
9382    }
9383
9384  public static class RequestStatusEnumFactory implements EnumFactory<RequestStatus> {
9385    public RequestStatus fromCode(String codeString) throws IllegalArgumentException {
9386      if (codeString == null || "".equals(codeString))
9387            if (codeString == null || "".equals(codeString))
9388                return null;
9389        if ("draft".equals(codeString))
9390          return RequestStatus.DRAFT;
9391        if ("active".equals(codeString))
9392          return RequestStatus.ACTIVE;
9393        if ("on-hold".equals(codeString))
9394          return RequestStatus.ONHOLD;
9395        if ("revoked".equals(codeString))
9396          return RequestStatus.REVOKED;
9397        if ("completed".equals(codeString))
9398          return RequestStatus.COMPLETED;
9399        if ("entered-in-error".equals(codeString))
9400          return RequestStatus.ENTEREDINERROR;
9401        if ("unknown".equals(codeString))
9402          return RequestStatus.UNKNOWN;
9403        throw new IllegalArgumentException("Unknown RequestStatus code '"+codeString+"'");
9404        }
9405        public Enumeration<RequestStatus> fromType(Base code) throws FHIRException {
9406          if (code == null)
9407            return null;
9408          if (code.isEmpty())
9409            return new Enumeration<RequestStatus>(this);
9410          String codeString = ((PrimitiveType) code).asStringValue();
9411          if (codeString == null || "".equals(codeString))
9412            return null;
9413        if ("draft".equals(codeString))
9414          return new Enumeration<RequestStatus>(this, RequestStatus.DRAFT);
9415        if ("active".equals(codeString))
9416          return new Enumeration<RequestStatus>(this, RequestStatus.ACTIVE);
9417        if ("on-hold".equals(codeString))
9418          return new Enumeration<RequestStatus>(this, RequestStatus.ONHOLD);
9419        if ("revoked".equals(codeString))
9420          return new Enumeration<RequestStatus>(this, RequestStatus.REVOKED);
9421        if ("completed".equals(codeString))
9422          return new Enumeration<RequestStatus>(this, RequestStatus.COMPLETED);
9423        if ("entered-in-error".equals(codeString))
9424          return new Enumeration<RequestStatus>(this, RequestStatus.ENTEREDINERROR);
9425        if ("unknown".equals(codeString))
9426          return new Enumeration<RequestStatus>(this, RequestStatus.UNKNOWN);
9427        throw new FHIRException("Unknown RequestStatus code '"+codeString+"'");
9428        }
9429    public String toCode(RequestStatus code) {
9430      if (code == RequestStatus.DRAFT)
9431        return "draft";
9432      if (code == RequestStatus.ACTIVE)
9433        return "active";
9434      if (code == RequestStatus.ONHOLD)
9435        return "on-hold";
9436      if (code == RequestStatus.REVOKED)
9437        return "revoked";
9438      if (code == RequestStatus.COMPLETED)
9439        return "completed";
9440      if (code == RequestStatus.ENTEREDINERROR)
9441        return "entered-in-error";
9442      if (code == RequestStatus.UNKNOWN)
9443        return "unknown";
9444      return "?";
9445      }
9446    public String toSystem(RequestStatus code) {
9447      return code.getSystem();
9448      }
9449    }
9450
9451    public enum ResourceTypeEnum {
9452        /**
9453         * --- Abstract Type! ---This is the base resource type for everything.
9454         */
9455        RESOURCE, 
9456        /**
9457         * 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.
9458         */
9459        BINARY, 
9460        /**
9461         * A container for a collection of resources.
9462         */
9463        BUNDLE, 
9464        /**
9465         * --- Abstract Type! ---A resource that includes narrative, extensions, and contained resources.
9466         */
9467        DOMAINRESOURCE, 
9468        /**
9469         * 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.
9470         */
9471        ACCOUNT, 
9472        /**
9473         * 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).
9474         */
9475        ADMINISTRABLEPRODUCTDEFINITION, 
9476        /**
9477         * An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research subject.  The unintended effects may require additional monitoring, treatment or hospitalization or may result in death.  The AdverseEvent resource also extends to potential or avoided events that could have had such effects.
9478         */
9479        ADVERSEEVENT, 
9480        /**
9481         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
9482         */
9483        ALLERGYINTOLERANCE, 
9484        /**
9485         * 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).
9486         */
9487        APPOINTMENT, 
9488        /**
9489         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
9490         */
9491        APPOINTMENTRESPONSE, 
9492        /**
9493         * A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.
9494         */
9495        AUDITEVENT, 
9496        /**
9497         * 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.
9498         */
9499        BASIC, 
9500        /**
9501         * A biological material originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity.
9502         */
9503        BIOLOGICALLYDERIVEDPRODUCT, 
9504        /**
9505         * 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.
9506         */
9507        BODYSTRUCTURE, 
9508        /**
9509         * --- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.
9510         */
9511        CANONICALRESOURCE, 
9512        /**
9513         * 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.
9514         */
9515        CAPABILITYSTATEMENT, 
9516        /**
9517         * 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.
9518         */
9519        CAPABILITYSTATEMENT2, 
9520        /**
9521         * 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.
9522         */
9523        CODESYSTEM, 
9524        /**
9525         * A compartment definition that defines how resources are accessed on a server.
9526         */
9527        COMPARTMENTDEFINITION, 
9528        /**
9529         * 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.
9530         */
9531        CONCEPTMAP, 
9532        /**
9533         * 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.
9534         */
9535        CONCEPTMAP2, 
9536        /**
9537         * Example of workflow instance.
9538         */
9539        EXAMPLESCENARIO, 
9540        /**
9541         * 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.
9542         */
9543        GRAPHDEFINITION, 
9544        /**
9545         * 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.
9546         */
9547        IMPLEMENTATIONGUIDE, 
9548        /**
9549         * 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.
9550         */
9551        MESSAGEDEFINITION, 
9552        /**
9553         * --- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.
9554         */
9555        METADATARESOURCE, 
9556        /**
9557         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
9558         */
9559        ACTIVITYDEFINITION, 
9560        /**
9561         * This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content.
9562         */
9563        ARTIFACTASSESSMENT, 
9564        /**
9565         * 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.
9566         */
9567        CHARGEITEMDEFINITION, 
9568        /**
9569         * 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.
9570         */
9571        CITATION, 
9572        /**
9573         * A definition of a condition and information relevant to managing it.
9574         */
9575        CONDITIONDEFINITION, 
9576        /**
9577         * The EventDefinition resource provides a reusable description of when a particular event can occur.
9578         */
9579        EVENTDEFINITION, 
9580        /**
9581         * The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.
9582         */
9583        EVIDENCE, 
9584        /**
9585         * The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.
9586         */
9587        EVIDENCEREPORT, 
9588        /**
9589         * The EvidenceVariable resource describes an element that knowledge (Evidence) is about.
9590         */
9591        EVIDENCEVARIABLE, 
9592        /**
9593         * 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.
9594         */
9595        LIBRARY, 
9596        /**
9597         * The Measure resource provides the definition of a quality measure.
9598         */
9599        MEASURE, 
9600        /**
9601         * 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.
9602         */
9603        PLANDEFINITION, 
9604        /**
9605         * 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.
9606         */
9607        QUESTIONNAIRE, 
9608        /**
9609         * 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.
9610         */
9611        NAMINGSYSTEM, 
9612        /**
9613         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
9614         */
9615        OPERATIONDEFINITION, 
9616        /**
9617         * A search parameter that defines a named search item that can be used to search/filter on a resource.
9618         */
9619        SEARCHPARAMETER, 
9620        /**
9621         * 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.
9622         */
9623        STRUCTUREDEFINITION, 
9624        /**
9625         * A Map of relationships between 2 structures that can be used to transform data.
9626         */
9627        STRUCTUREMAP, 
9628        /**
9629         * 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.
9630         */
9631        TERMINOLOGYCAPABILITIES, 
9632        /**
9633         * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
9634         */
9635        TESTSCRIPT, 
9636        /**
9637         * 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).
9638         */
9639        VALUESET, 
9640        /**
9641         * 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.
9642         */
9643        CAREPLAN, 
9644        /**
9645         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care.
9646         */
9647        CARETEAM, 
9648        /**
9649         * 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.
9650         */
9651        CHARGEITEM, 
9652        /**
9653         * 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.
9654         */
9655        CLAIM, 
9656        /**
9657         * This resource provides the adjudication details from the processing of a Claim resource.
9658         */
9659        CLAIMRESPONSE, 
9660        /**
9661         * 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.
9662         */
9663        CLINICALIMPRESSION, 
9664        /**
9665         * A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.
9666         */
9667        CLINICALUSEDEFINITION, 
9668        /**
9669         * A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.
9670         */
9671        CLINICALUSEISSUE, 
9672        /**
9673         * A clinical or business level record of information being transmitted or shared; e.g. an alert that was sent to a responsible provider, a public health agency communication to a provider/reporter in response to a case report for a reportable condition.
9674         */
9675        COMMUNICATION, 
9676        /**
9677         * 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.
9678         */
9679        COMMUNICATIONREQUEST, 
9680        /**
9681         * 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.).
9682         */
9683        COMPOSITION, 
9684        /**
9685         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
9686         */
9687        CONDITION, 
9688        /**
9689         * A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, 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.
9690         */
9691        CONSENT, 
9692        /**
9693         * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.
9694         */
9695        CONTRACT, 
9696        /**
9697         * Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.
9698         */
9699        COVERAGE, 
9700        /**
9701         * 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.
9702         */
9703        COVERAGEELIGIBILITYREQUEST, 
9704        /**
9705         * This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.
9706         */
9707        COVERAGEELIGIBILITYRESPONSE, 
9708        /**
9709         * 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.
9710         */
9711        DETECTEDISSUE, 
9712        /**
9713         * This resource describes the properties (regulated, has real time clock, etc.), adminstrative (manufacturer name, model number, serial number, firmware, etc), and type (knee replacement, blood pressure cuff, MRI, etc.) of a physical unit (these values do not change much within a given module, for example the serail number, manufacturer name, and model number). An actual unit may consist of several modules in a distinct hierarchy and these are represented by multiple Device resources and bound through the 'parent' element.
9714         */
9715        DEVICE, 
9716        /**
9717         * This is a specialized resource that defines the characteristics and capabilities of a device.
9718         */
9719        DEVICEDEFINITION, 
9720        /**
9721         * Indicates that a device is to be or has been dispensed for a named person/patient.  This includes a description of the product (supply) provided and the instructions for using the device.
9722         */
9723        DEVICEDISPENSE, 
9724        /**
9725         * Describes a measurement, calculation or setting capability of a medical device.
9726         */
9727        DEVICEMETRIC, 
9728        /**
9729         * Represents a request a device to be provided to a specific patient. The device may be an implantable device to be subsequently implanted, or an external assistive device, such as a walker, to be delivered and subsequently be used.
9730         */
9731        DEVICEREQUEST, 
9732        /**
9733         * A record of a device being used by a patient where the record is the result of a report from the patient or a clinician.
9734         */
9735        DEVICEUSAGE, 
9736        /**
9737         * The findings and interpretation of diagnostic tests performed on patients, groups of patients, products, substances, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. The report also includes non-clinical context such as batch analysis and stability reporting of products and substances.
9738         */
9739        DIAGNOSTICREPORT, 
9740        /**
9741         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
9742         */
9743        DOCUMENTMANIFEST, 
9744        /**
9745         * A reference to a document of any kind for any purpose. While the term “document” implies a more narrow focus, for this resource this "document" encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference.
9746         */
9747        DOCUMENTREFERENCE, 
9748        /**
9749         * 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.
9750         */
9751        ENCOUNTER, 
9752        /**
9753         * 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.
9754         */
9755        ENDPOINT, 
9756        /**
9757         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
9758         */
9759        ENROLLMENTREQUEST, 
9760        /**
9761         * This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.
9762         */
9763        ENROLLMENTRESPONSE, 
9764        /**
9765         * 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.
9766         */
9767        EPISODEOFCARE, 
9768        /**
9769         * 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.
9770         */
9771        EXPLANATIONOFBENEFIT, 
9772        /**
9773         * Significant health conditions for a person related to the patient relevant in the context of care for the patient.
9774         */
9775        FAMILYMEMBERHISTORY, 
9776        /**
9777         * Prospective warnings of potential issues when providing care to the patient.
9778         */
9779        FLAG, 
9780        /**
9781         * 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.
9782         */
9783        GOAL, 
9784        /**
9785         * 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.
9786         */
9787        GROUP, 
9788        /**
9789         * 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.
9790         */
9791        GUIDANCERESPONSE, 
9792        /**
9793         * The details of a healthcare service available at a location.
9794         */
9795        HEALTHCARESERVICE, 
9796        /**
9797         * A selection of DICOM SOP instances and/or frames within a single Study and Series. This might include additional specifics such as an image region, an Observation UID or a Segmentation Number, allowing linkage to an Observation Resource or transferring this information along with the ImagingStudy Resource.
9798         */
9799        IMAGINGSELECTION, 
9800        /**
9801         * 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.
9802         */
9803        IMAGINGSTUDY, 
9804        /**
9805         * 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.
9806         */
9807        IMMUNIZATION, 
9808        /**
9809         * Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those  recommendations.
9810         */
9811        IMMUNIZATIONEVALUATION, 
9812        /**
9813         * A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.
9814         */
9815        IMMUNIZATIONRECOMMENDATION, 
9816        /**
9817         * An ingredient of a manufactured item or pharmaceutical product.
9818         */
9819        INGREDIENT, 
9820        /**
9821         * Details of a Health Insurance product/plan provided by an organization.
9822         */
9823        INSURANCEPLAN, 
9824        /**
9825         * A report of inventory or stock items.
9826         */
9827        INVENTORYREPORT, 
9828        /**
9829         * Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.
9830         */
9831        INVOICE, 
9832        /**
9833         * Identifies two or more records (resource instances) that refer to the same real-world "occurrence".
9834         */
9835        LINKAGE, 
9836        /**
9837         * A list is a curated collection of resources.
9838         */
9839        LIST, 
9840        /**
9841         * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.
9842         */
9843        LOCATION, 
9844        /**
9845         * The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.
9846         */
9847        MANUFACTUREDITEMDEFINITION, 
9848        /**
9849         * The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.
9850         */
9851        MEASUREREPORT, 
9852        /**
9853         * This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.
9854         */
9855        MEDICATION, 
9856        /**
9857         * 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.
9858         */
9859        MEDICATIONADMINISTRATION, 
9860        /**
9861         * 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.
9862         */
9863        MEDICATIONDISPENSE, 
9864        /**
9865         * Information about a medication that is used to support knowledge.
9866         */
9867        MEDICATIONKNOWLEDGE, 
9868        /**
9869         * 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.
9870         */
9871        MEDICATIONREQUEST, 
9872        /**
9873         * A record of a medication that is being consumed by a patient.   A MedicationUsage 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. 
9874
9875The primary difference between a medicationusage and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medicationusage 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 Usage 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.
9876         */
9877        MEDICATIONUSAGE, 
9878        /**
9879         * Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use, drug catalogs).
9880         */
9881        MEDICINALPRODUCTDEFINITION, 
9882        /**
9883         * 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.
9884         */
9885        MESSAGEHEADER, 
9886        /**
9887         * Raw data describing a biological sequence.
9888         */
9889        MOLECULARSEQUENCE, 
9890        /**
9891         * A record of food or fluid that is being consumed by a patient.   A NutritionIntake may indicate that the patient may be consuming the food or fluid now or has consumed the food or fluid in the past.  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 or through an app that tracks food or fluids consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label,  or from a clinician documenting observed intake.
9892         */
9893        NUTRITIONINTAKE, 
9894        /**
9895         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
9896         */
9897        NUTRITIONORDER, 
9898        /**
9899         * A food or fluid product that is consumed by patients.
9900         */
9901        NUTRITIONPRODUCT, 
9902        /**
9903         * Measurements and simple assertions made about a patient, device or other subject.
9904         */
9905        OBSERVATION, 
9906        /**
9907         * Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.
9908         */
9909        OBSERVATIONDEFINITION, 
9910        /**
9911         * A collection of error, warning, or information messages that result from a system action.
9912         */
9913        OPERATIONOUTCOME, 
9914        /**
9915         * 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.
9916         */
9917        ORGANIZATION, 
9918        /**
9919         * Defines an affiliation/assotiation/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship.
9920         */
9921        ORGANIZATIONAFFILIATION, 
9922        /**
9923         * A medically related item or items, in a container or package.
9924         */
9925        PACKAGEDPRODUCTDEFINITION, 
9926        /**
9927         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
9928         */
9929        PATIENT, 
9930        /**
9931         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
9932         */
9933        PAYMENTNOTICE, 
9934        /**
9935         * This resource provides the details including amount of a payment and allocates the payment items being paid.
9936         */
9937        PAYMENTRECONCILIATION, 
9938        /**
9939         * Permission.
9940         */
9941        PERMISSION, 
9942        /**
9943         * Demographics and administrative information about a person independent of a specific health-related context.
9944         */
9945        PERSON, 
9946        /**
9947         * A person who is directly or indirectly involved in the provisioning of healthcare.
9948         */
9949        PRACTITIONER, 
9950        /**
9951         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
9952         */
9953        PRACTITIONERROLE, 
9954        /**
9955         * An action that is or was performed on or for a patient, practitioner, device, organization, or location. For example, this can be a physical intervention on a patient like an operation, or less invasive like long term services, counseling, or hypnotherapy.  This can be a quality or safety inspection for a location, organization, or device.  This can be an accreditation procedure on a practitioner for licensing.
9956         */
9957        PROCEDURE, 
9958        /**
9959         * 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.
9960         */
9961        PROVENANCE, 
9962        /**
9963         * 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.
9964         */
9965        QUESTIONNAIRERESPONSE, 
9966        /**
9967         * 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.
9968         */
9969        REGULATEDAUTHORIZATION, 
9970        /**
9971         * 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.
9972         */
9973        RELATEDPERSON, 
9974        /**
9975         * 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".
9976         */
9977        REQUESTGROUP, 
9978        /**
9979         * 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.
9980         */
9981        RESEARCHSTUDY, 
9982        /**
9983         * A physical entity which is the primary unit of operational and/or administrative interest in a study.
9984         */
9985        RESEARCHSUBJECT, 
9986        /**
9987         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
9988         */
9989        RISKASSESSMENT, 
9990        /**
9991         * A container for slots of time that may be available for booking appointments.
9992         */
9993        SCHEDULE, 
9994        /**
9995         * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.
9996         */
9997        SERVICEREQUEST, 
9998        /**
9999         * A slot of time on a schedule that may be available for booking appointments.
10000         */
10001        SLOT, 
10002        /**
10003         * A sample to be used for analysis.
10004         */
10005        SPECIMEN, 
10006        /**
10007         * A kind of specimen with associated set of requirements.
10008         */
10009        SPECIMENDEFINITION, 
10010        /**
10011         * The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.
10012         */
10013        SUBSCRIPTION, 
10014        /**
10015         * The SubscriptionStatus resource describes the state of a Subscription during notifications.
10016         */
10017        SUBSCRIPTIONSTATUS, 
10018        /**
10019         * Describes a stream of resource state changes identified by trigger criteria and annotated with labels useful to filter projections from this topic.
10020         */
10021        SUBSCRIPTIONTOPIC, 
10022        /**
10023         * A homogeneous material with a definite composition.
10024         */
10025        SUBSTANCE, 
10026        /**
10027         * The detailed description of a substance, typically at a level beyond what is used for prescribing.
10028         */
10029        SUBSTANCEDEFINITION, 
10030        /**
10031         * Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction.
10032         */
10033        SUBSTANCENUCLEICACID, 
10034        /**
10035         * Properties of a substance specific to it being a polymer.
10036         */
10037        SUBSTANCEPOLYMER, 
10038        /**
10039         * A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators.
10040         */
10041        SUBSTANCEPROTEIN, 
10042        /**
10043         * Todo.
10044         */
10045        SUBSTANCEREFERENCEINFORMATION, 
10046        /**
10047         * Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex.
10048         */
10049        SUBSTANCESOURCEMATERIAL, 
10050        /**
10051         * Record of delivery of what is supplied.
10052         */
10053        SUPPLYDELIVERY, 
10054        /**
10055         * A record of a non-patient specific request for a medication, substance, device, certain types of biologically derived product, and nutrition product used in the healthcare setting.
10056         */
10057        SUPPLYREQUEST, 
10058        /**
10059         * A task to be performed.
10060         */
10061        TASK, 
10062        /**
10063         * A summary of information based on the results of executing a TestScript.
10064         */
10065        TESTREPORT, 
10066        /**
10067         * Describes validation requirements, source(s), status and dates for one or more elements.
10068         */
10069        VERIFICATIONRESULT, 
10070        /**
10071         * An authorization for the provision of glasses and/or contact lenses to a patient.
10072         */
10073        VISIONPRESCRIPTION, 
10074        /**
10075         * 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.
10076         */
10077        PARAMETERS, 
10078        /**
10079         * added to help the parsers
10080         */
10081        NULL;
10082        public static ResourceTypeEnum fromCode(String codeString) throws FHIRException {
10083            if (codeString == null || "".equals(codeString))
10084                return null;
10085        if ("Resource".equals(codeString))
10086          return RESOURCE;
10087        if ("Binary".equals(codeString))
10088          return BINARY;
10089        if ("Bundle".equals(codeString))
10090          return BUNDLE;
10091        if ("DomainResource".equals(codeString))
10092          return DOMAINRESOURCE;
10093        if ("Account".equals(codeString))
10094          return ACCOUNT;
10095        if ("AdministrableProductDefinition".equals(codeString))
10096          return ADMINISTRABLEPRODUCTDEFINITION;
10097        if ("AdverseEvent".equals(codeString))
10098          return ADVERSEEVENT;
10099        if ("AllergyIntolerance".equals(codeString))
10100          return ALLERGYINTOLERANCE;
10101        if ("Appointment".equals(codeString))
10102          return APPOINTMENT;
10103        if ("AppointmentResponse".equals(codeString))
10104          return APPOINTMENTRESPONSE;
10105        if ("AuditEvent".equals(codeString))
10106          return AUDITEVENT;
10107        if ("Basic".equals(codeString))
10108          return BASIC;
10109        if ("BiologicallyDerivedProduct".equals(codeString))
10110          return BIOLOGICALLYDERIVEDPRODUCT;
10111        if ("BodyStructure".equals(codeString))
10112          return BODYSTRUCTURE;
10113        if ("CanonicalResource".equals(codeString))
10114          return CANONICALRESOURCE;
10115        if ("CapabilityStatement".equals(codeString))
10116          return CAPABILITYSTATEMENT;
10117        if ("CapabilityStatement2".equals(codeString))
10118          return CAPABILITYSTATEMENT2;
10119        if ("CodeSystem".equals(codeString))
10120          return CODESYSTEM;
10121        if ("CompartmentDefinition".equals(codeString))
10122          return COMPARTMENTDEFINITION;
10123        if ("ConceptMap".equals(codeString))
10124          return CONCEPTMAP;
10125        if ("ConceptMap2".equals(codeString))
10126          return CONCEPTMAP2;
10127        if ("ExampleScenario".equals(codeString))
10128          return EXAMPLESCENARIO;
10129        if ("GraphDefinition".equals(codeString))
10130          return GRAPHDEFINITION;
10131        if ("ImplementationGuide".equals(codeString))
10132          return IMPLEMENTATIONGUIDE;
10133        if ("MessageDefinition".equals(codeString))
10134          return MESSAGEDEFINITION;
10135        if ("MetadataResource".equals(codeString))
10136          return METADATARESOURCE;
10137        if ("ActivityDefinition".equals(codeString))
10138          return ACTIVITYDEFINITION;
10139        if ("ArtifactAssessment".equals(codeString))
10140          return ARTIFACTASSESSMENT;
10141        if ("ChargeItemDefinition".equals(codeString))
10142          return CHARGEITEMDEFINITION;
10143        if ("Citation".equals(codeString))
10144          return CITATION;
10145        if ("ConditionDefinition".equals(codeString))
10146          return CONDITIONDEFINITION;
10147        if ("EventDefinition".equals(codeString))
10148          return EVENTDEFINITION;
10149        if ("Evidence".equals(codeString))
10150          return EVIDENCE;
10151        if ("EvidenceReport".equals(codeString))
10152          return EVIDENCEREPORT;
10153        if ("EvidenceVariable".equals(codeString))
10154          return EVIDENCEVARIABLE;
10155        if ("Library".equals(codeString))
10156          return LIBRARY;
10157        if ("Measure".equals(codeString))
10158          return MEASURE;
10159        if ("PlanDefinition".equals(codeString))
10160          return PLANDEFINITION;
10161        if ("Questionnaire".equals(codeString))
10162          return QUESTIONNAIRE;
10163        if ("NamingSystem".equals(codeString))
10164          return NAMINGSYSTEM;
10165        if ("OperationDefinition".equals(codeString))
10166          return OPERATIONDEFINITION;
10167        if ("SearchParameter".equals(codeString))
10168          return SEARCHPARAMETER;
10169        if ("StructureDefinition".equals(codeString))
10170          return STRUCTUREDEFINITION;
10171        if ("StructureMap".equals(codeString))
10172          return STRUCTUREMAP;
10173        if ("TerminologyCapabilities".equals(codeString))
10174          return TERMINOLOGYCAPABILITIES;
10175        if ("TestScript".equals(codeString))
10176          return TESTSCRIPT;
10177        if ("ValueSet".equals(codeString))
10178          return VALUESET;
10179        if ("CarePlan".equals(codeString))
10180          return CAREPLAN;
10181        if ("CareTeam".equals(codeString))
10182          return CARETEAM;
10183        if ("ChargeItem".equals(codeString))
10184          return CHARGEITEM;
10185        if ("Claim".equals(codeString))
10186          return CLAIM;
10187        if ("ClaimResponse".equals(codeString))
10188          return CLAIMRESPONSE;
10189        if ("ClinicalImpression".equals(codeString))
10190          return CLINICALIMPRESSION;
10191        if ("ClinicalUseDefinition".equals(codeString))
10192          return CLINICALUSEDEFINITION;
10193        if ("ClinicalUseIssue".equals(codeString))
10194          return CLINICALUSEISSUE;
10195        if ("Communication".equals(codeString))
10196          return COMMUNICATION;
10197        if ("CommunicationRequest".equals(codeString))
10198          return COMMUNICATIONREQUEST;
10199        if ("Composition".equals(codeString))
10200          return COMPOSITION;
10201        if ("Condition".equals(codeString))
10202          return CONDITION;
10203        if ("Consent".equals(codeString))
10204          return CONSENT;
10205        if ("Contract".equals(codeString))
10206          return CONTRACT;
10207        if ("Coverage".equals(codeString))
10208          return COVERAGE;
10209        if ("CoverageEligibilityRequest".equals(codeString))
10210          return COVERAGEELIGIBILITYREQUEST;
10211        if ("CoverageEligibilityResponse".equals(codeString))
10212          return COVERAGEELIGIBILITYRESPONSE;
10213        if ("DetectedIssue".equals(codeString))
10214          return DETECTEDISSUE;
10215        if ("Device".equals(codeString))
10216          return DEVICE;
10217        if ("DeviceDefinition".equals(codeString))
10218          return DEVICEDEFINITION;
10219        if ("DeviceDispense".equals(codeString))
10220          return DEVICEDISPENSE;
10221        if ("DeviceMetric".equals(codeString))
10222          return DEVICEMETRIC;
10223        if ("DeviceRequest".equals(codeString))
10224          return DEVICEREQUEST;
10225        if ("DeviceUsage".equals(codeString))
10226          return DEVICEUSAGE;
10227        if ("DiagnosticReport".equals(codeString))
10228          return DIAGNOSTICREPORT;
10229        if ("DocumentManifest".equals(codeString))
10230          return DOCUMENTMANIFEST;
10231        if ("DocumentReference".equals(codeString))
10232          return DOCUMENTREFERENCE;
10233        if ("Encounter".equals(codeString))
10234          return ENCOUNTER;
10235        if ("Endpoint".equals(codeString))
10236          return ENDPOINT;
10237        if ("EnrollmentRequest".equals(codeString))
10238          return ENROLLMENTREQUEST;
10239        if ("EnrollmentResponse".equals(codeString))
10240          return ENROLLMENTRESPONSE;
10241        if ("EpisodeOfCare".equals(codeString))
10242          return EPISODEOFCARE;
10243        if ("ExplanationOfBenefit".equals(codeString))
10244          return EXPLANATIONOFBENEFIT;
10245        if ("FamilyMemberHistory".equals(codeString))
10246          return FAMILYMEMBERHISTORY;
10247        if ("Flag".equals(codeString))
10248          return FLAG;
10249        if ("Goal".equals(codeString))
10250          return GOAL;
10251        if ("Group".equals(codeString))
10252          return GROUP;
10253        if ("GuidanceResponse".equals(codeString))
10254          return GUIDANCERESPONSE;
10255        if ("HealthcareService".equals(codeString))
10256          return HEALTHCARESERVICE;
10257        if ("ImagingSelection".equals(codeString))
10258          return IMAGINGSELECTION;
10259        if ("ImagingStudy".equals(codeString))
10260          return IMAGINGSTUDY;
10261        if ("Immunization".equals(codeString))
10262          return IMMUNIZATION;
10263        if ("ImmunizationEvaluation".equals(codeString))
10264          return IMMUNIZATIONEVALUATION;
10265        if ("ImmunizationRecommendation".equals(codeString))
10266          return IMMUNIZATIONRECOMMENDATION;
10267        if ("Ingredient".equals(codeString))
10268          return INGREDIENT;
10269        if ("InsurancePlan".equals(codeString))
10270          return INSURANCEPLAN;
10271        if ("InventoryReport".equals(codeString))
10272          return INVENTORYREPORT;
10273        if ("Invoice".equals(codeString))
10274          return INVOICE;
10275        if ("Linkage".equals(codeString))
10276          return LINKAGE;
10277        if ("List".equals(codeString))
10278          return LIST;
10279        if ("Location".equals(codeString))
10280          return LOCATION;
10281        if ("ManufacturedItemDefinition".equals(codeString))
10282          return MANUFACTUREDITEMDEFINITION;
10283        if ("MeasureReport".equals(codeString))
10284          return MEASUREREPORT;
10285        if ("Medication".equals(codeString))
10286          return MEDICATION;
10287        if ("MedicationAdministration".equals(codeString))
10288          return MEDICATIONADMINISTRATION;
10289        if ("MedicationDispense".equals(codeString))
10290          return MEDICATIONDISPENSE;
10291        if ("MedicationKnowledge".equals(codeString))
10292          return MEDICATIONKNOWLEDGE;
10293        if ("MedicationRequest".equals(codeString))
10294          return MEDICATIONREQUEST;
10295        if ("MedicationUsage".equals(codeString))
10296          return MEDICATIONUSAGE;
10297        if ("MedicinalProductDefinition".equals(codeString))
10298          return MEDICINALPRODUCTDEFINITION;
10299        if ("MessageHeader".equals(codeString))
10300          return MESSAGEHEADER;
10301        if ("MolecularSequence".equals(codeString))
10302          return MOLECULARSEQUENCE;
10303        if ("NutritionIntake".equals(codeString))
10304          return NUTRITIONINTAKE;
10305        if ("NutritionOrder".equals(codeString))
10306          return NUTRITIONORDER;
10307        if ("NutritionProduct".equals(codeString))
10308          return NUTRITIONPRODUCT;
10309        if ("Observation".equals(codeString))
10310          return OBSERVATION;
10311        if ("ObservationDefinition".equals(codeString))
10312          return OBSERVATIONDEFINITION;
10313        if ("OperationOutcome".equals(codeString))
10314          return OPERATIONOUTCOME;
10315        if ("Organization".equals(codeString))
10316          return ORGANIZATION;
10317        if ("OrganizationAffiliation".equals(codeString))
10318          return ORGANIZATIONAFFILIATION;
10319        if ("PackagedProductDefinition".equals(codeString))
10320          return PACKAGEDPRODUCTDEFINITION;
10321        if ("Patient".equals(codeString))
10322          return PATIENT;
10323        if ("PaymentNotice".equals(codeString))
10324          return PAYMENTNOTICE;
10325        if ("PaymentReconciliation".equals(codeString))
10326          return PAYMENTRECONCILIATION;
10327        if ("Permission".equals(codeString))
10328          return PERMISSION;
10329        if ("Person".equals(codeString))
10330          return PERSON;
10331        if ("Practitioner".equals(codeString))
10332          return PRACTITIONER;
10333        if ("PractitionerRole".equals(codeString))
10334          return PRACTITIONERROLE;
10335        if ("Procedure".equals(codeString))
10336          return PROCEDURE;
10337        if ("Provenance".equals(codeString))
10338          return PROVENANCE;
10339        if ("QuestionnaireResponse".equals(codeString))
10340          return QUESTIONNAIRERESPONSE;
10341        if ("RegulatedAuthorization".equals(codeString))
10342          return REGULATEDAUTHORIZATION;
10343        if ("RelatedPerson".equals(codeString))
10344          return RELATEDPERSON;
10345        if ("RequestGroup".equals(codeString))
10346          return REQUESTGROUP;
10347        if ("ResearchStudy".equals(codeString))
10348          return RESEARCHSTUDY;
10349        if ("ResearchSubject".equals(codeString))
10350          return RESEARCHSUBJECT;
10351        if ("RiskAssessment".equals(codeString))
10352          return RISKASSESSMENT;
10353        if ("Schedule".equals(codeString))
10354          return SCHEDULE;
10355        if ("ServiceRequest".equals(codeString))
10356          return SERVICEREQUEST;
10357        if ("Slot".equals(codeString))
10358          return SLOT;
10359        if ("Specimen".equals(codeString))
10360          return SPECIMEN;
10361        if ("SpecimenDefinition".equals(codeString))
10362          return SPECIMENDEFINITION;
10363        if ("Subscription".equals(codeString))
10364          return SUBSCRIPTION;
10365        if ("SubscriptionStatus".equals(codeString))
10366          return SUBSCRIPTIONSTATUS;
10367        if ("SubscriptionTopic".equals(codeString))
10368          return SUBSCRIPTIONTOPIC;
10369        if ("Substance".equals(codeString))
10370          return SUBSTANCE;
10371        if ("SubstanceDefinition".equals(codeString))
10372          return SUBSTANCEDEFINITION;
10373        if ("SubstanceNucleicAcid".equals(codeString))
10374          return SUBSTANCENUCLEICACID;
10375        if ("SubstancePolymer".equals(codeString))
10376          return SUBSTANCEPOLYMER;
10377        if ("SubstanceProtein".equals(codeString))
10378          return SUBSTANCEPROTEIN;
10379        if ("SubstanceReferenceInformation".equals(codeString))
10380          return SUBSTANCEREFERENCEINFORMATION;
10381        if ("SubstanceSourceMaterial".equals(codeString))
10382          return SUBSTANCESOURCEMATERIAL;
10383        if ("SupplyDelivery".equals(codeString))
10384          return SUPPLYDELIVERY;
10385        if ("SupplyRequest".equals(codeString))
10386          return SUPPLYREQUEST;
10387        if ("Task".equals(codeString))
10388          return TASK;
10389        if ("TestReport".equals(codeString))
10390          return TESTREPORT;
10391        if ("VerificationResult".equals(codeString))
10392          return VERIFICATIONRESULT;
10393        if ("VisionPrescription".equals(codeString))
10394          return VISIONPRESCRIPTION;
10395        if ("Parameters".equals(codeString))
10396          return PARAMETERS;
10397        throw new FHIRException("Unknown ResourceTypeEnum code '"+codeString+"'");
10398        }
10399        public String toCode() {
10400          switch (this) {
10401            case RESOURCE: return "Resource";
10402            case BINARY: return "Binary";
10403            case BUNDLE: return "Bundle";
10404            case DOMAINRESOURCE: return "DomainResource";
10405            case ACCOUNT: return "Account";
10406            case ADMINISTRABLEPRODUCTDEFINITION: return "AdministrableProductDefinition";
10407            case ADVERSEEVENT: return "AdverseEvent";
10408            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
10409            case APPOINTMENT: return "Appointment";
10410            case APPOINTMENTRESPONSE: return "AppointmentResponse";
10411            case AUDITEVENT: return "AuditEvent";
10412            case BASIC: return "Basic";
10413            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
10414            case BODYSTRUCTURE: return "BodyStructure";
10415            case CANONICALRESOURCE: return "CanonicalResource";
10416            case CAPABILITYSTATEMENT: return "CapabilityStatement";
10417            case CAPABILITYSTATEMENT2: return "CapabilityStatement2";
10418            case CODESYSTEM: return "CodeSystem";
10419            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
10420            case CONCEPTMAP: return "ConceptMap";
10421            case CONCEPTMAP2: return "ConceptMap2";
10422            case EXAMPLESCENARIO: return "ExampleScenario";
10423            case GRAPHDEFINITION: return "GraphDefinition";
10424            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
10425            case MESSAGEDEFINITION: return "MessageDefinition";
10426            case METADATARESOURCE: return "MetadataResource";
10427            case ACTIVITYDEFINITION: return "ActivityDefinition";
10428            case ARTIFACTASSESSMENT: return "ArtifactAssessment";
10429            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
10430            case CITATION: return "Citation";
10431            case CONDITIONDEFINITION: return "ConditionDefinition";
10432            case EVENTDEFINITION: return "EventDefinition";
10433            case EVIDENCE: return "Evidence";
10434            case EVIDENCEREPORT: return "EvidenceReport";
10435            case EVIDENCEVARIABLE: return "EvidenceVariable";
10436            case LIBRARY: return "Library";
10437            case MEASURE: return "Measure";
10438            case PLANDEFINITION: return "PlanDefinition";
10439            case QUESTIONNAIRE: return "Questionnaire";
10440            case NAMINGSYSTEM: return "NamingSystem";
10441            case OPERATIONDEFINITION: return "OperationDefinition";
10442            case SEARCHPARAMETER: return "SearchParameter";
10443            case STRUCTUREDEFINITION: return "StructureDefinition";
10444            case STRUCTUREMAP: return "StructureMap";
10445            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
10446            case TESTSCRIPT: return "TestScript";
10447            case VALUESET: return "ValueSet";
10448            case CAREPLAN: return "CarePlan";
10449            case CARETEAM: return "CareTeam";
10450            case CHARGEITEM: return "ChargeItem";
10451            case CLAIM: return "Claim";
10452            case CLAIMRESPONSE: return "ClaimResponse";
10453            case CLINICALIMPRESSION: return "ClinicalImpression";
10454            case CLINICALUSEDEFINITION: return "ClinicalUseDefinition";
10455            case CLINICALUSEISSUE: return "ClinicalUseIssue";
10456            case COMMUNICATION: return "Communication";
10457            case COMMUNICATIONREQUEST: return "CommunicationRequest";
10458            case COMPOSITION: return "Composition";
10459            case CONDITION: return "Condition";
10460            case CONSENT: return "Consent";
10461            case CONTRACT: return "Contract";
10462            case COVERAGE: return "Coverage";
10463            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
10464            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
10465            case DETECTEDISSUE: return "DetectedIssue";
10466            case DEVICE: return "Device";
10467            case DEVICEDEFINITION: return "DeviceDefinition";
10468            case DEVICEDISPENSE: return "DeviceDispense";
10469            case DEVICEMETRIC: return "DeviceMetric";
10470            case DEVICEREQUEST: return "DeviceRequest";
10471            case DEVICEUSAGE: return "DeviceUsage";
10472            case DIAGNOSTICREPORT: return "DiagnosticReport";
10473            case DOCUMENTMANIFEST: return "DocumentManifest";
10474            case DOCUMENTREFERENCE: return "DocumentReference";
10475            case ENCOUNTER: return "Encounter";
10476            case ENDPOINT: return "Endpoint";
10477            case ENROLLMENTREQUEST: return "EnrollmentRequest";
10478            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
10479            case EPISODEOFCARE: return "EpisodeOfCare";
10480            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
10481            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
10482            case FLAG: return "Flag";
10483            case GOAL: return "Goal";
10484            case GROUP: return "Group";
10485            case GUIDANCERESPONSE: return "GuidanceResponse";
10486            case HEALTHCARESERVICE: return "HealthcareService";
10487            case IMAGINGSELECTION: return "ImagingSelection";
10488            case IMAGINGSTUDY: return "ImagingStudy";
10489            case IMMUNIZATION: return "Immunization";
10490            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
10491            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
10492            case INGREDIENT: return "Ingredient";
10493            case INSURANCEPLAN: return "InsurancePlan";
10494            case INVENTORYREPORT: return "InventoryReport";
10495            case INVOICE: return "Invoice";
10496            case LINKAGE: return "Linkage";
10497            case LIST: return "List";
10498            case LOCATION: return "Location";
10499            case MANUFACTUREDITEMDEFINITION: return "ManufacturedItemDefinition";
10500            case MEASUREREPORT: return "MeasureReport";
10501            case MEDICATION: return "Medication";
10502            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
10503            case MEDICATIONDISPENSE: return "MedicationDispense";
10504            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
10505            case MEDICATIONREQUEST: return "MedicationRequest";
10506            case MEDICATIONUSAGE: return "MedicationUsage";
10507            case MEDICINALPRODUCTDEFINITION: return "MedicinalProductDefinition";
10508            case MESSAGEHEADER: return "MessageHeader";
10509            case MOLECULARSEQUENCE: return "MolecularSequence";
10510            case NUTRITIONINTAKE: return "NutritionIntake";
10511            case NUTRITIONORDER: return "NutritionOrder";
10512            case NUTRITIONPRODUCT: return "NutritionProduct";
10513            case OBSERVATION: return "Observation";
10514            case OBSERVATIONDEFINITION: return "ObservationDefinition";
10515            case OPERATIONOUTCOME: return "OperationOutcome";
10516            case ORGANIZATION: return "Organization";
10517            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
10518            case PACKAGEDPRODUCTDEFINITION: return "PackagedProductDefinition";
10519            case PATIENT: return "Patient";
10520            case PAYMENTNOTICE: return "PaymentNotice";
10521            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
10522            case PERMISSION: return "Permission";
10523            case PERSON: return "Person";
10524            case PRACTITIONER: return "Practitioner";
10525            case PRACTITIONERROLE: return "PractitionerRole";
10526            case PROCEDURE: return "Procedure";
10527            case PROVENANCE: return "Provenance";
10528            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
10529            case REGULATEDAUTHORIZATION: return "RegulatedAuthorization";
10530            case RELATEDPERSON: return "RelatedPerson";
10531            case REQUESTGROUP: return "RequestGroup";
10532            case RESEARCHSTUDY: return "ResearchStudy";
10533            case RESEARCHSUBJECT: return "ResearchSubject";
10534            case RISKASSESSMENT: return "RiskAssessment";
10535            case SCHEDULE: return "Schedule";
10536            case SERVICEREQUEST: return "ServiceRequest";
10537            case SLOT: return "Slot";
10538            case SPECIMEN: return "Specimen";
10539            case SPECIMENDEFINITION: return "SpecimenDefinition";
10540            case SUBSCRIPTION: return "Subscription";
10541            case SUBSCRIPTIONSTATUS: return "SubscriptionStatus";
10542            case SUBSCRIPTIONTOPIC: return "SubscriptionTopic";
10543            case SUBSTANCE: return "Substance";
10544            case SUBSTANCEDEFINITION: return "SubstanceDefinition";
10545            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
10546            case SUBSTANCEPOLYMER: return "SubstancePolymer";
10547            case SUBSTANCEPROTEIN: return "SubstanceProtein";
10548            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
10549            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
10550            case SUPPLYDELIVERY: return "SupplyDelivery";
10551            case SUPPLYREQUEST: return "SupplyRequest";
10552            case TASK: return "Task";
10553            case TESTREPORT: return "TestReport";
10554            case VERIFICATIONRESULT: return "VerificationResult";
10555            case VISIONPRESCRIPTION: return "VisionPrescription";
10556            case PARAMETERS: return "Parameters";
10557            case NULL: return null;
10558            default: return "?";
10559          }
10560        }
10561        public String getSystem() {
10562          switch (this) {
10563            case RESOURCE: return "http://hl7.org/fhir/resource-types";
10564            case BINARY: return "http://hl7.org/fhir/resource-types";
10565            case BUNDLE: return "http://hl7.org/fhir/resource-types";
10566            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
10567            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
10568            case ADMINISTRABLEPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
10569            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
10570            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
10571            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
10572            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
10573            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
10574            case BASIC: return "http://hl7.org/fhir/resource-types";
10575            case BIOLOGICALLYDERIVEDPRODUCT: return "http://hl7.org/fhir/resource-types";
10576            case BODYSTRUCTURE: return "http://hl7.org/fhir/resource-types";
10577            case CANONICALRESOURCE: return "http://hl7.org/fhir/resource-types";
10578            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
10579            case CAPABILITYSTATEMENT2: return "http://hl7.org/fhir/resource-types";
10580            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
10581            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
10582            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
10583            case CONCEPTMAP2: return "http://hl7.org/fhir/resource-types";
10584            case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types";
10585            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
10586            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
10587            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
10588            case METADATARESOURCE: return "http://hl7.org/fhir/resource-types";
10589            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
10590            case ARTIFACTASSESSMENT: return "http://hl7.org/fhir/resource-types";
10591            case CHARGEITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
10592            case CITATION: return "http://hl7.org/fhir/resource-types";
10593            case CONDITIONDEFINITION: return "http://hl7.org/fhir/resource-types";
10594            case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types";
10595            case EVIDENCE: return "http://hl7.org/fhir/resource-types";
10596            case EVIDENCEREPORT: return "http://hl7.org/fhir/resource-types";
10597            case EVIDENCEVARIABLE: return "http://hl7.org/fhir/resource-types";
10598            case LIBRARY: return "http://hl7.org/fhir/resource-types";
10599            case MEASURE: return "http://hl7.org/fhir/resource-types";
10600            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
10601            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
10602            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
10603            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
10604            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
10605            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
10606            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
10607            case TERMINOLOGYCAPABILITIES: return "http://hl7.org/fhir/resource-types";
10608            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
10609            case VALUESET: return "http://hl7.org/fhir/resource-types";
10610            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
10611            case CARETEAM: return "http://hl7.org/fhir/resource-types";
10612            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
10613            case CLAIM: return "http://hl7.org/fhir/resource-types";
10614            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
10615            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
10616            case CLINICALUSEDEFINITION: return "http://hl7.org/fhir/resource-types";
10617            case CLINICALUSEISSUE: return "http://hl7.org/fhir/resource-types";
10618            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
10619            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
10620            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
10621            case CONDITION: return "http://hl7.org/fhir/resource-types";
10622            case CONSENT: return "http://hl7.org/fhir/resource-types";
10623            case CONTRACT: return "http://hl7.org/fhir/resource-types";
10624            case COVERAGE: return "http://hl7.org/fhir/resource-types";
10625            case COVERAGEELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
10626            case COVERAGEELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
10627            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
10628            case DEVICE: return "http://hl7.org/fhir/resource-types";
10629            case DEVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
10630            case DEVICEDISPENSE: return "http://hl7.org/fhir/resource-types";
10631            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
10632            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
10633            case DEVICEUSAGE: return "http://hl7.org/fhir/resource-types";
10634            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
10635            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
10636            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
10637            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
10638            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
10639            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
10640            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
10641            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
10642            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
10643            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
10644            case FLAG: return "http://hl7.org/fhir/resource-types";
10645            case GOAL: return "http://hl7.org/fhir/resource-types";
10646            case GROUP: return "http://hl7.org/fhir/resource-types";
10647            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
10648            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
10649            case IMAGINGSELECTION: return "http://hl7.org/fhir/resource-types";
10650            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
10651            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
10652            case IMMUNIZATIONEVALUATION: return "http://hl7.org/fhir/resource-types";
10653            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
10654            case INGREDIENT: return "http://hl7.org/fhir/resource-types";
10655            case INSURANCEPLAN: return "http://hl7.org/fhir/resource-types";
10656            case INVENTORYREPORT: return "http://hl7.org/fhir/resource-types";
10657            case INVOICE: return "http://hl7.org/fhir/resource-types";
10658            case LINKAGE: return "http://hl7.org/fhir/resource-types";
10659            case LIST: return "http://hl7.org/fhir/resource-types";
10660            case LOCATION: return "http://hl7.org/fhir/resource-types";
10661            case MANUFACTUREDITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
10662            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
10663            case MEDICATION: return "http://hl7.org/fhir/resource-types";
10664            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
10665            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
10666            case MEDICATIONKNOWLEDGE: return "http://hl7.org/fhir/resource-types";
10667            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
10668            case MEDICATIONUSAGE: return "http://hl7.org/fhir/resource-types";
10669            case MEDICINALPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
10670            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
10671            case MOLECULARSEQUENCE: return "http://hl7.org/fhir/resource-types";
10672            case NUTRITIONINTAKE: return "http://hl7.org/fhir/resource-types";
10673            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
10674            case NUTRITIONPRODUCT: return "http://hl7.org/fhir/resource-types";
10675            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
10676            case OBSERVATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
10677            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
10678            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
10679            case ORGANIZATIONAFFILIATION: return "http://hl7.org/fhir/resource-types";
10680            case PACKAGEDPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
10681            case PATIENT: return "http://hl7.org/fhir/resource-types";
10682            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
10683            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
10684            case PERMISSION: return "http://hl7.org/fhir/resource-types";
10685            case PERSON: return "http://hl7.org/fhir/resource-types";
10686            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
10687            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
10688            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
10689            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
10690            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
10691            case REGULATEDAUTHORIZATION: return "http://hl7.org/fhir/resource-types";
10692            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
10693            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
10694            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
10695            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
10696            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
10697            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
10698            case SERVICEREQUEST: return "http://hl7.org/fhir/resource-types";
10699            case SLOT: return "http://hl7.org/fhir/resource-types";
10700            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
10701            case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types";
10702            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
10703            case SUBSCRIPTIONSTATUS: return "http://hl7.org/fhir/resource-types";
10704            case SUBSCRIPTIONTOPIC: return "http://hl7.org/fhir/resource-types";
10705            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
10706            case SUBSTANCEDEFINITION: return "http://hl7.org/fhir/resource-types";
10707            case SUBSTANCENUCLEICACID: return "http://hl7.org/fhir/resource-types";
10708            case SUBSTANCEPOLYMER: return "http://hl7.org/fhir/resource-types";
10709            case SUBSTANCEPROTEIN: return "http://hl7.org/fhir/resource-types";
10710            case SUBSTANCEREFERENCEINFORMATION: return "http://hl7.org/fhir/resource-types";
10711            case SUBSTANCESOURCEMATERIAL: return "http://hl7.org/fhir/resource-types";
10712            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
10713            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
10714            case TASK: return "http://hl7.org/fhir/resource-types";
10715            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
10716            case VERIFICATIONRESULT: return "http://hl7.org/fhir/resource-types";
10717            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
10718            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
10719            case NULL: return null;
10720            default: return "?";
10721          }
10722        }
10723        public String getDefinition() {
10724          switch (this) {
10725            case RESOURCE: return "--- Abstract Type! ---This is the base resource type for everything.";
10726            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.";
10727            case BUNDLE: return "A container for a collection of resources.";
10728            case DOMAINRESOURCE: return "--- Abstract Type! ---A resource that includes narrative, extensions, and contained resources.";
10729            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.";
10730            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).";
10731            case ADVERSEEVENT: return "An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research subject.  The unintended effects may require additional monitoring, treatment or hospitalization or may result in death.  The AdverseEvent resource also extends to potential or avoided events that could have had such effects.";
10732            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
10733            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).";
10734            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
10735            case AUDITEVENT: return "A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.";
10736            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.";
10737            case BIOLOGICALLYDERIVEDPRODUCT: return "A biological material originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity.";
10738            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.";
10739            case CANONICALRESOURCE: return "--- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.";
10740            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.";
10741            case CAPABILITYSTATEMENT2: 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.";
10742            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.";
10743            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
10744            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.";
10745            case CONCEPTMAP2: 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.";
10746            case EXAMPLESCENARIO: return "Example of workflow instance.";
10747            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.";
10748            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.";
10749            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.";
10750            case METADATARESOURCE: return "--- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.";
10751            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.";
10752            case ARTIFACTASSESSMENT: return "This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content.";
10753            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.";
10754            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.";
10755            case CONDITIONDEFINITION: return "A definition of a condition and information relevant to managing it.";
10756            case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur.";
10757            case EVIDENCE: return "The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence.";
10758            case EVIDENCEREPORT: return "The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts.";
10759            case EVIDENCEVARIABLE: return "The EvidenceVariable resource describes an element that knowledge (Evidence) is about.";
10760            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.";
10761            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
10762            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.";
10763            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.";
10764            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.";
10765            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
10766            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
10767            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.";
10768            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
10769            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.";
10770            case TESTSCRIPT: return "A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.";
10771            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).";
10772            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.";
10773            case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care.";
10774            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.";
10775            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.";
10776            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
10777            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.";
10778            case CLINICALUSEDEFINITION: return "A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.";
10779            case CLINICALUSEISSUE: return "A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.";
10780            case COMMUNICATION: return "A clinical or business level record of information being transmitted or shared; e.g. an alert that was sent to a responsible provider, a public health agency communication to a provider/reporter in response to a case report for a reportable condition.";
10781            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.";
10782            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.).";
10783            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
10784            case CONSENT: return "A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, 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.";
10785            case CONTRACT: return "Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.";
10786            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.";
10787            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.";
10788            case COVERAGEELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.";
10789            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.";
10790            case DEVICE: return "This resource describes the properties (regulated, has real time clock, etc.), adminstrative (manufacturer name, model number, serial number, firmware, etc), and type (knee replacement, blood pressure cuff, MRI, etc.) of a physical unit (these values do not change much within a given module, for example the serail number, manufacturer name, and model number). An actual unit may consist of several modules in a distinct hierarchy and these are represented by multiple Device resources and bound through the 'parent' element.";
10791            case DEVICEDEFINITION: return "This is a specialized resource that defines the characteristics and capabilities of a device.";
10792            case DEVICEDISPENSE: return "Indicates that a device is to be or has been dispensed for a named person/patient.  This includes a description of the product (supply) provided and the instructions for using the device.";
10793            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
10794            case DEVICEREQUEST: return "Represents a request a device to be provided to a specific patient. The device may be an implantable device to be subsequently implanted, or an external assistive device, such as a walker, to be delivered and subsequently be used.";
10795            case DEVICEUSAGE: return "A record of a device being used by a patient where the record is the result of a report from the patient or a clinician.";
10796            case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic tests performed on patients, groups of patients, products, substances, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. The report also includes non-clinical context such as batch analysis and stability reporting of products and substances.";
10797            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
10798            case DOCUMENTREFERENCE: return "A reference to a document of any kind for any purpose. While the term “document” implies a more narrow focus, for this resource this \"document\" encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference.";
10799            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.";
10800            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.";
10801            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
10802            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.";
10803            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.";
10804            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.";
10805            case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient.";
10806            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
10807            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.";
10808            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.";
10809            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.";
10810            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
10811            case IMAGINGSELECTION: return "A selection of DICOM SOP instances and/or frames within a single Study and Series. This might include additional specifics such as an image region, an Observation UID or a Segmentation Number, allowing linkage to an Observation Resource or transferring this information along with the ImagingStudy Resource.";
10812            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.";
10813            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.";
10814            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.";
10815            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.";
10816            case INGREDIENT: return "An ingredient of a manufactured item or pharmaceutical product.";
10817            case INSURANCEPLAN: return "Details of a Health Insurance product/plan provided by an organization.";
10818            case INVENTORYREPORT: return "A report of inventory or stock items.";
10819            case INVOICE: return "Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.";
10820            case LINKAGE: return "Identifies two or more records (resource instances) that refer to the same real-world \"occurrence\".";
10821            case LIST: return "A list is a curated collection of resources.";
10822            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.";
10823            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.";
10824            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.";
10825            case MEDICATION: return "This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.";
10826            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.";
10827            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.";
10828            case MEDICATIONKNOWLEDGE: return "Information about a medication that is used to support knowledge.";
10829            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.";
10830            case MEDICATIONUSAGE: return "A record of a medication that is being consumed by a patient.   A MedicationUsage 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 medicationusage and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medicationusage 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 Usage 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.";
10831            case MEDICINALPRODUCTDEFINITION: return "Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use, drug catalogs).";
10832            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.";
10833            case MOLECULARSEQUENCE: return "Raw data describing a biological sequence.";
10834            case NUTRITIONINTAKE: return "A record of food or fluid that is being consumed by a patient.   A NutritionIntake may indicate that the patient may be consuming the food or fluid now or has consumed the food or fluid in the past.  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 or through an app that tracks food or fluids consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label,  or from a clinician documenting observed intake.";
10835            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
10836            case NUTRITIONPRODUCT: return "A food or fluid product that is consumed by patients.";
10837            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
10838            case OBSERVATIONDEFINITION: return "Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.";
10839            case OPERATIONOUTCOME: return "A collection of error, warning, or information messages that result from a system action.";
10840            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.";
10841            case ORGANIZATIONAFFILIATION: return "Defines an affiliation/assotiation/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship.";
10842            case PACKAGEDPRODUCTDEFINITION: return "A medically related item or items, in a container or package.";
10843            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
10844            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
10845            case PAYMENTRECONCILIATION: return "This resource provides the details including amount of a payment and allocates the payment items being paid.";
10846            case PERMISSION: return "Permission.";
10847            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
10848            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
10849            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
10850            case PROCEDURE: return "An action that is or was performed on or for a patient, practitioner, device, organization, or location. For example, this can be a physical intervention on a patient like an operation, or less invasive like long term services, counseling, or hypnotherapy.  This can be a quality or safety inspection for a location, organization, or device.  This can be an accreditation procedure on a practitioner for licensing.";
10851            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.";
10852            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.";
10853            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.";
10854            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.";
10855            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\".";
10856            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.";
10857            case RESEARCHSUBJECT: return "A physical entity which is the primary unit of operational and/or administrative interest in a study.";
10858            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
10859            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
10860            case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.";
10861            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
10862            case SPECIMEN: return "A sample to be used for analysis.";
10863            case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements.";
10864            case SUBSCRIPTION: return "The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.";
10865            case SUBSCRIPTIONSTATUS: return "The SubscriptionStatus resource describes the state of a Subscription during notifications.";
10866            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.";
10867            case SUBSTANCE: return "A homogeneous material with a definite composition.";
10868            case SUBSTANCEDEFINITION: return "The detailed description of a substance, typically at a level beyond what is used for prescribing.";
10869            case SUBSTANCENUCLEICACID: return "Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction.";
10870            case SUBSTANCEPOLYMER: return "Properties of a substance specific to it being a polymer.";
10871            case SUBSTANCEPROTEIN: return "A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators.";
10872            case SUBSTANCEREFERENCEINFORMATION: return "Todo.";
10873            case SUBSTANCESOURCEMATERIAL: return "Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex.";
10874            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
10875            case SUPPLYREQUEST: return "A record of a non-patient specific request for a medication, substance, device, certain types of biologically derived product, and nutrition product used in the healthcare setting.";
10876            case TASK: return "A task to be performed.";
10877            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
10878            case VERIFICATIONRESULT: return "Describes validation requirements, source(s), status and dates for one or more elements.";
10879            case VISIONPRESCRIPTION: return "An authorization for the provision of glasses and/or contact lenses to a patient.";
10880            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.";
10881            case NULL: return null;
10882            default: return "?";
10883          }
10884        }
10885        public String getDisplay() {
10886          switch (this) {
10887            case RESOURCE: return "Resource";
10888            case BINARY: return "Binary";
10889            case BUNDLE: return "Bundle";
10890            case DOMAINRESOURCE: return "DomainResource";
10891            case ACCOUNT: return "Account";
10892            case ADMINISTRABLEPRODUCTDEFINITION: return "AdministrableProductDefinition";
10893            case ADVERSEEVENT: return "AdverseEvent";
10894            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
10895            case APPOINTMENT: return "Appointment";
10896            case APPOINTMENTRESPONSE: return "AppointmentResponse";
10897            case AUDITEVENT: return "AuditEvent";
10898            case BASIC: return "Basic";
10899            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
10900            case BODYSTRUCTURE: return "BodyStructure";
10901            case CANONICALRESOURCE: return "CanonicalResource";
10902            case CAPABILITYSTATEMENT: return "CapabilityStatement";
10903            case CAPABILITYSTATEMENT2: return "CapabilityStatement2";
10904            case CODESYSTEM: return "CodeSystem";
10905            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
10906            case CONCEPTMAP: return "ConceptMap";
10907            case CONCEPTMAP2: return "ConceptMap2";
10908            case EXAMPLESCENARIO: return "ExampleScenario";
10909            case GRAPHDEFINITION: return "GraphDefinition";
10910            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
10911            case MESSAGEDEFINITION: return "MessageDefinition";
10912            case METADATARESOURCE: return "MetadataResource";
10913            case ACTIVITYDEFINITION: return "ActivityDefinition";
10914            case ARTIFACTASSESSMENT: return "ArtifactAssessment";
10915            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
10916            case CITATION: return "Citation";
10917            case CONDITIONDEFINITION: return "ConditionDefinition";
10918            case EVENTDEFINITION: return "EventDefinition";
10919            case EVIDENCE: return "Evidence";
10920            case EVIDENCEREPORT: return "EvidenceReport";
10921            case EVIDENCEVARIABLE: return "EvidenceVariable";
10922            case LIBRARY: return "Library";
10923            case MEASURE: return "Measure";
10924            case PLANDEFINITION: return "PlanDefinition";
10925            case QUESTIONNAIRE: return "Questionnaire";
10926            case NAMINGSYSTEM: return "NamingSystem";
10927            case OPERATIONDEFINITION: return "OperationDefinition";
10928            case SEARCHPARAMETER: return "SearchParameter";
10929            case STRUCTUREDEFINITION: return "StructureDefinition";
10930            case STRUCTUREMAP: return "StructureMap";
10931            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
10932            case TESTSCRIPT: return "TestScript";
10933            case VALUESET: return "ValueSet";
10934            case CAREPLAN: return "CarePlan";
10935            case CARETEAM: return "CareTeam";
10936            case CHARGEITEM: return "ChargeItem";
10937            case CLAIM: return "Claim";
10938            case CLAIMRESPONSE: return "ClaimResponse";
10939            case CLINICALIMPRESSION: return "ClinicalImpression";
10940            case CLINICALUSEDEFINITION: return "ClinicalUseDefinition";
10941            case CLINICALUSEISSUE: return "ClinicalUseIssue";
10942            case COMMUNICATION: return "Communication";
10943            case COMMUNICATIONREQUEST: return "CommunicationRequest";
10944            case COMPOSITION: return "Composition";
10945            case CONDITION: return "Condition";
10946            case CONSENT: return "Consent";
10947            case CONTRACT: return "Contract";
10948            case COVERAGE: return "Coverage";
10949            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
10950            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
10951            case DETECTEDISSUE: return "DetectedIssue";
10952            case DEVICE: return "Device";
10953            case DEVICEDEFINITION: return "DeviceDefinition";
10954            case DEVICEDISPENSE: return "DeviceDispense";
10955            case DEVICEMETRIC: return "DeviceMetric";
10956            case DEVICEREQUEST: return "DeviceRequest";
10957            case DEVICEUSAGE: return "DeviceUsage";
10958            case DIAGNOSTICREPORT: return "DiagnosticReport";
10959            case DOCUMENTMANIFEST: return "DocumentManifest";
10960            case DOCUMENTREFERENCE: return "DocumentReference";
10961            case ENCOUNTER: return "Encounter";
10962            case ENDPOINT: return "Endpoint";
10963            case ENROLLMENTREQUEST: return "EnrollmentRequest";
10964            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
10965            case EPISODEOFCARE: return "EpisodeOfCare";
10966            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
10967            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
10968            case FLAG: return "Flag";
10969            case GOAL: return "Goal";
10970            case GROUP: return "Group";
10971            case GUIDANCERESPONSE: return "GuidanceResponse";
10972            case HEALTHCARESERVICE: return "HealthcareService";
10973            case IMAGINGSELECTION: return "ImagingSelection";
10974            case IMAGINGSTUDY: return "ImagingStudy";
10975            case IMMUNIZATION: return "Immunization";
10976            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
10977            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
10978            case INGREDIENT: return "Ingredient";
10979            case INSURANCEPLAN: return "InsurancePlan";
10980            case INVENTORYREPORT: return "InventoryReport";
10981            case INVOICE: return "Invoice";
10982            case LINKAGE: return "Linkage";
10983            case LIST: return "List";
10984            case LOCATION: return "Location";
10985            case MANUFACTUREDITEMDEFINITION: return "ManufacturedItemDefinition";
10986            case MEASUREREPORT: return "MeasureReport";
10987            case MEDICATION: return "Medication";
10988            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
10989            case MEDICATIONDISPENSE: return "MedicationDispense";
10990            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
10991            case MEDICATIONREQUEST: return "MedicationRequest";
10992            case MEDICATIONUSAGE: return "MedicationUsage";
10993            case MEDICINALPRODUCTDEFINITION: return "MedicinalProductDefinition";
10994            case MESSAGEHEADER: return "MessageHeader";
10995            case MOLECULARSEQUENCE: return "MolecularSequence";
10996            case NUTRITIONINTAKE: return "NutritionIntake";
10997            case NUTRITIONORDER: return "NutritionOrder";
10998            case NUTRITIONPRODUCT: return "NutritionProduct";
10999            case OBSERVATION: return "Observation";
11000            case OBSERVATIONDEFINITION: return "ObservationDefinition";
11001            case OPERATIONOUTCOME: return "OperationOutcome";
11002            case ORGANIZATION: return "Organization";
11003            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
11004            case PACKAGEDPRODUCTDEFINITION: return "PackagedProductDefinition";
11005            case PATIENT: return "Patient";
11006            case PAYMENTNOTICE: return "PaymentNotice";
11007            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
11008            case PERMISSION: return "Permission";
11009            case PERSON: return "Person";
11010            case PRACTITIONER: return "Practitioner";
11011            case PRACTITIONERROLE: return "PractitionerRole";
11012            case PROCEDURE: return "Procedure";
11013            case PROVENANCE: return "Provenance";
11014            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
11015            case REGULATEDAUTHORIZATION: return "RegulatedAuthorization";
11016            case RELATEDPERSON: return "RelatedPerson";
11017            case REQUESTGROUP: return "RequestGroup";
11018            case RESEARCHSTUDY: return "ResearchStudy";
11019            case RESEARCHSUBJECT: return "ResearchSubject";
11020            case RISKASSESSMENT: return "RiskAssessment";
11021            case SCHEDULE: return "Schedule";
11022            case SERVICEREQUEST: return "ServiceRequest";
11023            case SLOT: return "Slot";
11024            case SPECIMEN: return "Specimen";
11025            case SPECIMENDEFINITION: return "SpecimenDefinition";
11026            case SUBSCRIPTION: return "Subscription";
11027            case SUBSCRIPTIONSTATUS: return "SubscriptionStatus";
11028            case SUBSCRIPTIONTOPIC: return "SubscriptionTopic";
11029            case SUBSTANCE: return "Substance";
11030            case SUBSTANCEDEFINITION: return "SubstanceDefinition";
11031            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
11032            case SUBSTANCEPOLYMER: return "SubstancePolymer";
11033            case SUBSTANCEPROTEIN: return "SubstanceProtein";
11034            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
11035            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
11036            case SUPPLYDELIVERY: return "SupplyDelivery";
11037            case SUPPLYREQUEST: return "SupplyRequest";
11038            case TASK: return "Task";
11039            case TESTREPORT: return "TestReport";
11040            case VERIFICATIONRESULT: return "VerificationResult";
11041            case VISIONPRESCRIPTION: return "VisionPrescription";
11042            case PARAMETERS: return "Parameters";
11043            case NULL: return null;
11044            default: return "?";
11045          }
11046        }
11047    }
11048
11049  public static class ResourceTypeEnumEnumFactory implements EnumFactory<ResourceTypeEnum> {
11050    public ResourceTypeEnum fromCode(String codeString) throws IllegalArgumentException {
11051      if (codeString == null || "".equals(codeString))
11052            if (codeString == null || "".equals(codeString))
11053                return null;
11054        if ("Resource".equals(codeString))
11055          return ResourceTypeEnum.RESOURCE;
11056        if ("Binary".equals(codeString))
11057          return ResourceTypeEnum.BINARY;
11058        if ("Bundle".equals(codeString))
11059          return ResourceTypeEnum.BUNDLE;
11060        if ("DomainResource".equals(codeString))
11061          return ResourceTypeEnum.DOMAINRESOURCE;
11062        if ("Account".equals(codeString))
11063          return ResourceTypeEnum.ACCOUNT;
11064        if ("AdministrableProductDefinition".equals(codeString))
11065          return ResourceTypeEnum.ADMINISTRABLEPRODUCTDEFINITION;
11066        if ("AdverseEvent".equals(codeString))
11067          return ResourceTypeEnum.ADVERSEEVENT;
11068        if ("AllergyIntolerance".equals(codeString))
11069          return ResourceTypeEnum.ALLERGYINTOLERANCE;
11070        if ("Appointment".equals(codeString))
11071          return ResourceTypeEnum.APPOINTMENT;
11072        if ("AppointmentResponse".equals(codeString))
11073          return ResourceTypeEnum.APPOINTMENTRESPONSE;
11074        if ("AuditEvent".equals(codeString))
11075          return ResourceTypeEnum.AUDITEVENT;
11076        if ("Basic".equals(codeString))
11077          return ResourceTypeEnum.BASIC;
11078        if ("BiologicallyDerivedProduct".equals(codeString))
11079          return ResourceTypeEnum.BIOLOGICALLYDERIVEDPRODUCT;
11080        if ("BodyStructure".equals(codeString))
11081          return ResourceTypeEnum.BODYSTRUCTURE;
11082        if ("CanonicalResource".equals(codeString))
11083          return ResourceTypeEnum.CANONICALRESOURCE;
11084        if ("CapabilityStatement".equals(codeString))
11085          return ResourceTypeEnum.CAPABILITYSTATEMENT;
11086        if ("CapabilityStatement2".equals(codeString))
11087          return ResourceTypeEnum.CAPABILITYSTATEMENT2;
11088        if ("CodeSystem".equals(codeString))
11089          return ResourceTypeEnum.CODESYSTEM;
11090        if ("CompartmentDefinition".equals(codeString))
11091          return ResourceTypeEnum.COMPARTMENTDEFINITION;
11092        if ("ConceptMap".equals(codeString))
11093          return ResourceTypeEnum.CONCEPTMAP;
11094        if ("ConceptMap2".equals(codeString))
11095          return ResourceTypeEnum.CONCEPTMAP2;
11096        if ("ExampleScenario".equals(codeString))
11097          return ResourceTypeEnum.EXAMPLESCENARIO;
11098        if ("GraphDefinition".equals(codeString))
11099          return ResourceTypeEnum.GRAPHDEFINITION;
11100        if ("ImplementationGuide".equals(codeString))
11101          return ResourceTypeEnum.IMPLEMENTATIONGUIDE;
11102        if ("MessageDefinition".equals(codeString))
11103          return ResourceTypeEnum.MESSAGEDEFINITION;
11104        if ("MetadataResource".equals(codeString))
11105          return ResourceTypeEnum.METADATARESOURCE;
11106        if ("ActivityDefinition".equals(codeString))
11107          return ResourceTypeEnum.ACTIVITYDEFINITION;
11108        if ("ArtifactAssessment".equals(codeString))
11109          return ResourceTypeEnum.ARTIFACTASSESSMENT;
11110        if ("ChargeItemDefinition".equals(codeString))
11111          return ResourceTypeEnum.CHARGEITEMDEFINITION;
11112        if ("Citation".equals(codeString))
11113          return ResourceTypeEnum.CITATION;
11114        if ("ConditionDefinition".equals(codeString))
11115          return ResourceTypeEnum.CONDITIONDEFINITION;
11116        if ("EventDefinition".equals(codeString))
11117          return ResourceTypeEnum.EVENTDEFINITION;
11118        if ("Evidence".equals(codeString))
11119          return ResourceTypeEnum.EVIDENCE;
11120        if ("EvidenceReport".equals(codeString))
11121          return ResourceTypeEnum.EVIDENCEREPORT;
11122        if ("EvidenceVariable".equals(codeString))
11123          return ResourceTypeEnum.EVIDENCEVARIABLE;
11124        if ("Library".equals(codeString))
11125          return ResourceTypeEnum.LIBRARY;
11126        if ("Measure".equals(codeString))
11127          return ResourceTypeEnum.MEASURE;
11128        if ("PlanDefinition".equals(codeString))
11129          return ResourceTypeEnum.PLANDEFINITION;
11130        if ("Questionnaire".equals(codeString))
11131          return ResourceTypeEnum.QUESTIONNAIRE;
11132        if ("NamingSystem".equals(codeString))
11133          return ResourceTypeEnum.NAMINGSYSTEM;
11134        if ("OperationDefinition".equals(codeString))
11135          return ResourceTypeEnum.OPERATIONDEFINITION;
11136        if ("SearchParameter".equals(codeString))
11137          return ResourceTypeEnum.SEARCHPARAMETER;
11138        if ("StructureDefinition".equals(codeString))
11139          return ResourceTypeEnum.STRUCTUREDEFINITION;
11140        if ("StructureMap".equals(codeString))
11141          return ResourceTypeEnum.STRUCTUREMAP;
11142        if ("TerminologyCapabilities".equals(codeString))
11143          return ResourceTypeEnum.TERMINOLOGYCAPABILITIES;
11144        if ("TestScript".equals(codeString))
11145          return ResourceTypeEnum.TESTSCRIPT;
11146        if ("ValueSet".equals(codeString))
11147          return ResourceTypeEnum.VALUESET;
11148        if ("CarePlan".equals(codeString))
11149          return ResourceTypeEnum.CAREPLAN;
11150        if ("CareTeam".equals(codeString))
11151          return ResourceTypeEnum.CARETEAM;
11152        if ("ChargeItem".equals(codeString))
11153          return ResourceTypeEnum.CHARGEITEM;
11154        if ("Claim".equals(codeString))
11155          return ResourceTypeEnum.CLAIM;
11156        if ("ClaimResponse".equals(codeString))
11157          return ResourceTypeEnum.CLAIMRESPONSE;
11158        if ("ClinicalImpression".equals(codeString))
11159          return ResourceTypeEnum.CLINICALIMPRESSION;
11160        if ("ClinicalUseDefinition".equals(codeString))
11161          return ResourceTypeEnum.CLINICALUSEDEFINITION;
11162        if ("ClinicalUseIssue".equals(codeString))
11163          return ResourceTypeEnum.CLINICALUSEISSUE;
11164        if ("Communication".equals(codeString))
11165          return ResourceTypeEnum.COMMUNICATION;
11166        if ("CommunicationRequest".equals(codeString))
11167          return ResourceTypeEnum.COMMUNICATIONREQUEST;
11168        if ("Composition".equals(codeString))
11169          return ResourceTypeEnum.COMPOSITION;
11170        if ("Condition".equals(codeString))
11171          return ResourceTypeEnum.CONDITION;
11172        if ("Consent".equals(codeString))
11173          return ResourceTypeEnum.CONSENT;
11174        if ("Contract".equals(codeString))
11175          return ResourceTypeEnum.CONTRACT;
11176        if ("Coverage".equals(codeString))
11177          return ResourceTypeEnum.COVERAGE;
11178        if ("CoverageEligibilityRequest".equals(codeString))
11179          return ResourceTypeEnum.COVERAGEELIGIBILITYREQUEST;
11180        if ("CoverageEligibilityResponse".equals(codeString))
11181          return ResourceTypeEnum.COVERAGEELIGIBILITYRESPONSE;
11182        if ("DetectedIssue".equals(codeString))
11183          return ResourceTypeEnum.DETECTEDISSUE;
11184        if ("Device".equals(codeString))
11185          return ResourceTypeEnum.DEVICE;
11186        if ("DeviceDefinition".equals(codeString))
11187          return ResourceTypeEnum.DEVICEDEFINITION;
11188        if ("DeviceDispense".equals(codeString))
11189          return ResourceTypeEnum.DEVICEDISPENSE;
11190        if ("DeviceMetric".equals(codeString))
11191          return ResourceTypeEnum.DEVICEMETRIC;
11192        if ("DeviceRequest".equals(codeString))
11193          return ResourceTypeEnum.DEVICEREQUEST;
11194        if ("DeviceUsage".equals(codeString))
11195          return ResourceTypeEnum.DEVICEUSAGE;
11196        if ("DiagnosticReport".equals(codeString))
11197          return ResourceTypeEnum.DIAGNOSTICREPORT;
11198        if ("DocumentManifest".equals(codeString))
11199          return ResourceTypeEnum.DOCUMENTMANIFEST;
11200        if ("DocumentReference".equals(codeString))
11201          return ResourceTypeEnum.DOCUMENTREFERENCE;
11202        if ("Encounter".equals(codeString))
11203          return ResourceTypeEnum.ENCOUNTER;
11204        if ("Endpoint".equals(codeString))
11205          return ResourceTypeEnum.ENDPOINT;
11206        if ("EnrollmentRequest".equals(codeString))
11207          return ResourceTypeEnum.ENROLLMENTREQUEST;
11208        if ("EnrollmentResponse".equals(codeString))
11209          return ResourceTypeEnum.ENROLLMENTRESPONSE;
11210        if ("EpisodeOfCare".equals(codeString))
11211          return ResourceTypeEnum.EPISODEOFCARE;
11212        if ("ExplanationOfBenefit".equals(codeString))
11213          return ResourceTypeEnum.EXPLANATIONOFBENEFIT;
11214        if ("FamilyMemberHistory".equals(codeString))
11215          return ResourceTypeEnum.FAMILYMEMBERHISTORY;
11216        if ("Flag".equals(codeString))
11217          return ResourceTypeEnum.FLAG;
11218        if ("Goal".equals(codeString))
11219          return ResourceTypeEnum.GOAL;
11220        if ("Group".equals(codeString))
11221          return ResourceTypeEnum.GROUP;
11222        if ("GuidanceResponse".equals(codeString))
11223          return ResourceTypeEnum.GUIDANCERESPONSE;
11224        if ("HealthcareService".equals(codeString))
11225          return ResourceTypeEnum.HEALTHCARESERVICE;
11226        if ("ImagingSelection".equals(codeString))
11227          return ResourceTypeEnum.IMAGINGSELECTION;
11228        if ("ImagingStudy".equals(codeString))
11229          return ResourceTypeEnum.IMAGINGSTUDY;
11230        if ("Immunization".equals(codeString))
11231          return ResourceTypeEnum.IMMUNIZATION;
11232        if ("ImmunizationEvaluation".equals(codeString))
11233          return ResourceTypeEnum.IMMUNIZATIONEVALUATION;
11234        if ("ImmunizationRecommendation".equals(codeString))
11235          return ResourceTypeEnum.IMMUNIZATIONRECOMMENDATION;
11236        if ("Ingredient".equals(codeString))
11237          return ResourceTypeEnum.INGREDIENT;
11238        if ("InsurancePlan".equals(codeString))
11239          return ResourceTypeEnum.INSURANCEPLAN;
11240        if ("InventoryReport".equals(codeString))
11241          return ResourceTypeEnum.INVENTORYREPORT;
11242        if ("Invoice".equals(codeString))
11243          return ResourceTypeEnum.INVOICE;
11244        if ("Linkage".equals(codeString))
11245          return ResourceTypeEnum.LINKAGE;
11246        if ("List".equals(codeString))
11247          return ResourceTypeEnum.LIST;
11248        if ("Location".equals(codeString))
11249          return ResourceTypeEnum.LOCATION;
11250        if ("ManufacturedItemDefinition".equals(codeString))
11251          return ResourceTypeEnum.MANUFACTUREDITEMDEFINITION;
11252        if ("MeasureReport".equals(codeString))
11253          return ResourceTypeEnum.MEASUREREPORT;
11254        if ("Medication".equals(codeString))
11255          return ResourceTypeEnum.MEDICATION;
11256        if ("MedicationAdministration".equals(codeString))
11257          return ResourceTypeEnum.MEDICATIONADMINISTRATION;
11258        if ("MedicationDispense".equals(codeString))
11259          return ResourceTypeEnum.MEDICATIONDISPENSE;
11260        if ("MedicationKnowledge".equals(codeString))
11261          return ResourceTypeEnum.MEDICATIONKNOWLEDGE;
11262        if ("MedicationRequest".equals(codeString))
11263          return ResourceTypeEnum.MEDICATIONREQUEST;
11264        if ("MedicationUsage".equals(codeString))
11265          return ResourceTypeEnum.MEDICATIONUSAGE;
11266        if ("MedicinalProductDefinition".equals(codeString))
11267          return ResourceTypeEnum.MEDICINALPRODUCTDEFINITION;
11268        if ("MessageHeader".equals(codeString))
11269          return ResourceTypeEnum.MESSAGEHEADER;
11270        if ("MolecularSequence".equals(codeString))
11271          return ResourceTypeEnum.MOLECULARSEQUENCE;
11272        if ("NutritionIntake".equals(codeString))
11273          return ResourceTypeEnum.NUTRITIONINTAKE;
11274        if ("NutritionOrder".equals(codeString))
11275          return ResourceTypeEnum.NUTRITIONORDER;
11276        if ("NutritionProduct".equals(codeString))
11277          return ResourceTypeEnum.NUTRITIONPRODUCT;
11278        if ("Observation".equals(codeString))
11279          return ResourceTypeEnum.OBSERVATION;
11280        if ("ObservationDefinition".equals(codeString))
11281          return ResourceTypeEnum.OBSERVATIONDEFINITION;
11282        if ("OperationOutcome".equals(codeString))
11283          return ResourceTypeEnum.OPERATIONOUTCOME;
11284        if ("Organization".equals(codeString))
11285          return ResourceTypeEnum.ORGANIZATION;
11286        if ("OrganizationAffiliation".equals(codeString))
11287          return ResourceTypeEnum.ORGANIZATIONAFFILIATION;
11288        if ("PackagedProductDefinition".equals(codeString))
11289          return ResourceTypeEnum.PACKAGEDPRODUCTDEFINITION;
11290        if ("Patient".equals(codeString))
11291          return ResourceTypeEnum.PATIENT;
11292        if ("PaymentNotice".equals(codeString))
11293          return ResourceTypeEnum.PAYMENTNOTICE;
11294        if ("PaymentReconciliation".equals(codeString))
11295          return ResourceTypeEnum.PAYMENTRECONCILIATION;
11296        if ("Permission".equals(codeString))
11297          return ResourceTypeEnum.PERMISSION;
11298        if ("Person".equals(codeString))
11299          return ResourceTypeEnum.PERSON;
11300        if ("Practitioner".equals(codeString))
11301          return ResourceTypeEnum.PRACTITIONER;
11302        if ("PractitionerRole".equals(codeString))
11303          return ResourceTypeEnum.PRACTITIONERROLE;
11304        if ("Procedure".equals(codeString))
11305          return ResourceTypeEnum.PROCEDURE;
11306        if ("Provenance".equals(codeString))
11307          return ResourceTypeEnum.PROVENANCE;
11308        if ("QuestionnaireResponse".equals(codeString))
11309          return ResourceTypeEnum.QUESTIONNAIRERESPONSE;
11310        if ("RegulatedAuthorization".equals(codeString))
11311          return ResourceTypeEnum.REGULATEDAUTHORIZATION;
11312        if ("RelatedPerson".equals(codeString))
11313          return ResourceTypeEnum.RELATEDPERSON;
11314        if ("RequestGroup".equals(codeString))
11315          return ResourceTypeEnum.REQUESTGROUP;
11316        if ("ResearchStudy".equals(codeString))
11317          return ResourceTypeEnum.RESEARCHSTUDY;
11318        if ("ResearchSubject".equals(codeString))
11319          return ResourceTypeEnum.RESEARCHSUBJECT;
11320        if ("RiskAssessment".equals(codeString))
11321          return ResourceTypeEnum.RISKASSESSMENT;
11322        if ("Schedule".equals(codeString))
11323          return ResourceTypeEnum.SCHEDULE;
11324        if ("ServiceRequest".equals(codeString))
11325          return ResourceTypeEnum.SERVICEREQUEST;
11326        if ("Slot".equals(codeString))
11327          return ResourceTypeEnum.SLOT;
11328        if ("Specimen".equals(codeString))
11329          return ResourceTypeEnum.SPECIMEN;
11330        if ("SpecimenDefinition".equals(codeString))
11331          return ResourceTypeEnum.SPECIMENDEFINITION;
11332        if ("Subscription".equals(codeString))
11333          return ResourceTypeEnum.SUBSCRIPTION;
11334        if ("SubscriptionStatus".equals(codeString))
11335          return ResourceTypeEnum.SUBSCRIPTIONSTATUS;
11336        if ("SubscriptionTopic".equals(codeString))
11337          return ResourceTypeEnum.SUBSCRIPTIONTOPIC;
11338        if ("Substance".equals(codeString))
11339          return ResourceTypeEnum.SUBSTANCE;
11340        if ("SubstanceDefinition".equals(codeString))
11341          return ResourceTypeEnum.SUBSTANCEDEFINITION;
11342        if ("SubstanceNucleicAcid".equals(codeString))
11343          return ResourceTypeEnum.SUBSTANCENUCLEICACID;
11344        if ("SubstancePolymer".equals(codeString))
11345          return ResourceTypeEnum.SUBSTANCEPOLYMER;
11346        if ("SubstanceProtein".equals(codeString))
11347          return ResourceTypeEnum.SUBSTANCEPROTEIN;
11348        if ("SubstanceReferenceInformation".equals(codeString))
11349          return ResourceTypeEnum.SUBSTANCEREFERENCEINFORMATION;
11350        if ("SubstanceSourceMaterial".equals(codeString))
11351          return ResourceTypeEnum.SUBSTANCESOURCEMATERIAL;
11352        if ("SupplyDelivery".equals(codeString))
11353          return ResourceTypeEnum.SUPPLYDELIVERY;
11354        if ("SupplyRequest".equals(codeString))
11355          return ResourceTypeEnum.SUPPLYREQUEST;
11356        if ("Task".equals(codeString))
11357          return ResourceTypeEnum.TASK;
11358        if ("TestReport".equals(codeString))
11359          return ResourceTypeEnum.TESTREPORT;
11360        if ("VerificationResult".equals(codeString))
11361          return ResourceTypeEnum.VERIFICATIONRESULT;
11362        if ("VisionPrescription".equals(codeString))
11363          return ResourceTypeEnum.VISIONPRESCRIPTION;
11364        if ("Parameters".equals(codeString))
11365          return ResourceTypeEnum.PARAMETERS;
11366        throw new IllegalArgumentException("Unknown ResourceTypeEnum code '"+codeString+"'");
11367        }
11368        public Enumeration<ResourceTypeEnum> fromType(Base code) throws FHIRException {
11369          if (code == null)
11370            return null;
11371          if (code.isEmpty())
11372            return new Enumeration<ResourceTypeEnum>(this);
11373          String codeString = ((PrimitiveType) code).asStringValue();
11374          if (codeString == null || "".equals(codeString))
11375            return null;
11376        if ("Resource".equals(codeString))
11377          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.RESOURCE);
11378        if ("Binary".equals(codeString))
11379          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.BINARY);
11380        if ("Bundle".equals(codeString))
11381          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.BUNDLE);
11382        if ("DomainResource".equals(codeString))
11383          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DOMAINRESOURCE);
11384        if ("Account".equals(codeString))
11385          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ACCOUNT);
11386        if ("AdministrableProductDefinition".equals(codeString))
11387          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ADMINISTRABLEPRODUCTDEFINITION);
11388        if ("AdverseEvent".equals(codeString))
11389          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ADVERSEEVENT);
11390        if ("AllergyIntolerance".equals(codeString))
11391          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ALLERGYINTOLERANCE);
11392        if ("Appointment".equals(codeString))
11393          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.APPOINTMENT);
11394        if ("AppointmentResponse".equals(codeString))
11395          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.APPOINTMENTRESPONSE);
11396        if ("AuditEvent".equals(codeString))
11397          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.AUDITEVENT);
11398        if ("Basic".equals(codeString))
11399          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.BASIC);
11400        if ("BiologicallyDerivedProduct".equals(codeString))
11401          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.BIOLOGICALLYDERIVEDPRODUCT);
11402        if ("BodyStructure".equals(codeString))
11403          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.BODYSTRUCTURE);
11404        if ("CanonicalResource".equals(codeString))
11405          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CANONICALRESOURCE);
11406        if ("CapabilityStatement".equals(codeString))
11407          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CAPABILITYSTATEMENT);
11408        if ("CapabilityStatement2".equals(codeString))
11409          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CAPABILITYSTATEMENT2);
11410        if ("CodeSystem".equals(codeString))
11411          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CODESYSTEM);
11412        if ("CompartmentDefinition".equals(codeString))
11413          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COMPARTMENTDEFINITION);
11414        if ("ConceptMap".equals(codeString))
11415          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CONCEPTMAP);
11416        if ("ConceptMap2".equals(codeString))
11417          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CONCEPTMAP2);
11418        if ("ExampleScenario".equals(codeString))
11419          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EXAMPLESCENARIO);
11420        if ("GraphDefinition".equals(codeString))
11421          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.GRAPHDEFINITION);
11422        if ("ImplementationGuide".equals(codeString))
11423          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.IMPLEMENTATIONGUIDE);
11424        if ("MessageDefinition".equals(codeString))
11425          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MESSAGEDEFINITION);
11426        if ("MetadataResource".equals(codeString))
11427          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.METADATARESOURCE);
11428        if ("ActivityDefinition".equals(codeString))
11429          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ACTIVITYDEFINITION);
11430        if ("ArtifactAssessment".equals(codeString))
11431          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ARTIFACTASSESSMENT);
11432        if ("ChargeItemDefinition".equals(codeString))
11433          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CHARGEITEMDEFINITION);
11434        if ("Citation".equals(codeString))
11435          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CITATION);
11436        if ("ConditionDefinition".equals(codeString))
11437          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CONDITIONDEFINITION);
11438        if ("EventDefinition".equals(codeString))
11439          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EVENTDEFINITION);
11440        if ("Evidence".equals(codeString))
11441          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EVIDENCE);
11442        if ("EvidenceReport".equals(codeString))
11443          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EVIDENCEREPORT);
11444        if ("EvidenceVariable".equals(codeString))
11445          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EVIDENCEVARIABLE);
11446        if ("Library".equals(codeString))
11447          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.LIBRARY);
11448        if ("Measure".equals(codeString))
11449          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEASURE);
11450        if ("PlanDefinition".equals(codeString))
11451          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PLANDEFINITION);
11452        if ("Questionnaire".equals(codeString))
11453          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.QUESTIONNAIRE);
11454        if ("NamingSystem".equals(codeString))
11455          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.NAMINGSYSTEM);
11456        if ("OperationDefinition".equals(codeString))
11457          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.OPERATIONDEFINITION);
11458        if ("SearchParameter".equals(codeString))
11459          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SEARCHPARAMETER);
11460        if ("StructureDefinition".equals(codeString))
11461          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.STRUCTUREDEFINITION);
11462        if ("StructureMap".equals(codeString))
11463          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.STRUCTUREMAP);
11464        if ("TerminologyCapabilities".equals(codeString))
11465          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.TERMINOLOGYCAPABILITIES);
11466        if ("TestScript".equals(codeString))
11467          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.TESTSCRIPT);
11468        if ("ValueSet".equals(codeString))
11469          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.VALUESET);
11470        if ("CarePlan".equals(codeString))
11471          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CAREPLAN);
11472        if ("CareTeam".equals(codeString))
11473          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CARETEAM);
11474        if ("ChargeItem".equals(codeString))
11475          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CHARGEITEM);
11476        if ("Claim".equals(codeString))
11477          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CLAIM);
11478        if ("ClaimResponse".equals(codeString))
11479          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CLAIMRESPONSE);
11480        if ("ClinicalImpression".equals(codeString))
11481          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CLINICALIMPRESSION);
11482        if ("ClinicalUseDefinition".equals(codeString))
11483          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CLINICALUSEDEFINITION);
11484        if ("ClinicalUseIssue".equals(codeString))
11485          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CLINICALUSEISSUE);
11486        if ("Communication".equals(codeString))
11487          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COMMUNICATION);
11488        if ("CommunicationRequest".equals(codeString))
11489          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COMMUNICATIONREQUEST);
11490        if ("Composition".equals(codeString))
11491          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COMPOSITION);
11492        if ("Condition".equals(codeString))
11493          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CONDITION);
11494        if ("Consent".equals(codeString))
11495          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CONSENT);
11496        if ("Contract".equals(codeString))
11497          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.CONTRACT);
11498        if ("Coverage".equals(codeString))
11499          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COVERAGE);
11500        if ("CoverageEligibilityRequest".equals(codeString))
11501          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COVERAGEELIGIBILITYREQUEST);
11502        if ("CoverageEligibilityResponse".equals(codeString))
11503          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.COVERAGEELIGIBILITYRESPONSE);
11504        if ("DetectedIssue".equals(codeString))
11505          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DETECTEDISSUE);
11506        if ("Device".equals(codeString))
11507          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DEVICE);
11508        if ("DeviceDefinition".equals(codeString))
11509          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DEVICEDEFINITION);
11510        if ("DeviceDispense".equals(codeString))
11511          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DEVICEDISPENSE);
11512        if ("DeviceMetric".equals(codeString))
11513          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DEVICEMETRIC);
11514        if ("DeviceRequest".equals(codeString))
11515          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DEVICEREQUEST);
11516        if ("DeviceUsage".equals(codeString))
11517          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DEVICEUSAGE);
11518        if ("DiagnosticReport".equals(codeString))
11519          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DIAGNOSTICREPORT);
11520        if ("DocumentManifest".equals(codeString))
11521          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DOCUMENTMANIFEST);
11522        if ("DocumentReference".equals(codeString))
11523          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.DOCUMENTREFERENCE);
11524        if ("Encounter".equals(codeString))
11525          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ENCOUNTER);
11526        if ("Endpoint".equals(codeString))
11527          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ENDPOINT);
11528        if ("EnrollmentRequest".equals(codeString))
11529          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ENROLLMENTREQUEST);
11530        if ("EnrollmentResponse".equals(codeString))
11531          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ENROLLMENTRESPONSE);
11532        if ("EpisodeOfCare".equals(codeString))
11533          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EPISODEOFCARE);
11534        if ("ExplanationOfBenefit".equals(codeString))
11535          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.EXPLANATIONOFBENEFIT);
11536        if ("FamilyMemberHistory".equals(codeString))
11537          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.FAMILYMEMBERHISTORY);
11538        if ("Flag".equals(codeString))
11539          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.FLAG);
11540        if ("Goal".equals(codeString))
11541          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.GOAL);
11542        if ("Group".equals(codeString))
11543          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.GROUP);
11544        if ("GuidanceResponse".equals(codeString))
11545          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.GUIDANCERESPONSE);
11546        if ("HealthcareService".equals(codeString))
11547          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.HEALTHCARESERVICE);
11548        if ("ImagingSelection".equals(codeString))
11549          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.IMAGINGSELECTION);
11550        if ("ImagingStudy".equals(codeString))
11551          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.IMAGINGSTUDY);
11552        if ("Immunization".equals(codeString))
11553          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.IMMUNIZATION);
11554        if ("ImmunizationEvaluation".equals(codeString))
11555          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.IMMUNIZATIONEVALUATION);
11556        if ("ImmunizationRecommendation".equals(codeString))
11557          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.IMMUNIZATIONRECOMMENDATION);
11558        if ("Ingredient".equals(codeString))
11559          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.INGREDIENT);
11560        if ("InsurancePlan".equals(codeString))
11561          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.INSURANCEPLAN);
11562        if ("InventoryReport".equals(codeString))
11563          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.INVENTORYREPORT);
11564        if ("Invoice".equals(codeString))
11565          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.INVOICE);
11566        if ("Linkage".equals(codeString))
11567          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.LINKAGE);
11568        if ("List".equals(codeString))
11569          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.LIST);
11570        if ("Location".equals(codeString))
11571          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.LOCATION);
11572        if ("ManufacturedItemDefinition".equals(codeString))
11573          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MANUFACTUREDITEMDEFINITION);
11574        if ("MeasureReport".equals(codeString))
11575          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEASUREREPORT);
11576        if ("Medication".equals(codeString))
11577          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATION);
11578        if ("MedicationAdministration".equals(codeString))
11579          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONADMINISTRATION);
11580        if ("MedicationDispense".equals(codeString))
11581          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONDISPENSE);
11582        if ("MedicationKnowledge".equals(codeString))
11583          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONKNOWLEDGE);
11584        if ("MedicationRequest".equals(codeString))
11585          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONREQUEST);
11586        if ("MedicationUsage".equals(codeString))
11587          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONUSAGE);
11588        if ("MedicinalProductDefinition".equals(codeString))
11589          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICINALPRODUCTDEFINITION);
11590        if ("MessageHeader".equals(codeString))
11591          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MESSAGEHEADER);
11592        if ("MolecularSequence".equals(codeString))
11593          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MOLECULARSEQUENCE);
11594        if ("NutritionIntake".equals(codeString))
11595          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.NUTRITIONINTAKE);
11596        if ("NutritionOrder".equals(codeString))
11597          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.NUTRITIONORDER);
11598        if ("NutritionProduct".equals(codeString))
11599          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.NUTRITIONPRODUCT);
11600        if ("Observation".equals(codeString))
11601          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.OBSERVATION);
11602        if ("ObservationDefinition".equals(codeString))
11603          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.OBSERVATIONDEFINITION);
11604        if ("OperationOutcome".equals(codeString))
11605          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.OPERATIONOUTCOME);
11606        if ("Organization".equals(codeString))
11607          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ORGANIZATION);
11608        if ("OrganizationAffiliation".equals(codeString))
11609          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.ORGANIZATIONAFFILIATION);
11610        if ("PackagedProductDefinition".equals(codeString))
11611          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PACKAGEDPRODUCTDEFINITION);
11612        if ("Patient".equals(codeString))
11613          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PATIENT);
11614        if ("PaymentNotice".equals(codeString))
11615          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PAYMENTNOTICE);
11616        if ("PaymentReconciliation".equals(codeString))
11617          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PAYMENTRECONCILIATION);
11618        if ("Permission".equals(codeString))
11619          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PERMISSION);
11620        if ("Person".equals(codeString))
11621          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PERSON);
11622        if ("Practitioner".equals(codeString))
11623          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PRACTITIONER);
11624        if ("PractitionerRole".equals(codeString))
11625          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PRACTITIONERROLE);
11626        if ("Procedure".equals(codeString))
11627          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PROCEDURE);
11628        if ("Provenance".equals(codeString))
11629          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PROVENANCE);
11630        if ("QuestionnaireResponse".equals(codeString))
11631          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.QUESTIONNAIRERESPONSE);
11632        if ("RegulatedAuthorization".equals(codeString))
11633          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.REGULATEDAUTHORIZATION);
11634        if ("RelatedPerson".equals(codeString))
11635          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.RELATEDPERSON);
11636        if ("RequestGroup".equals(codeString))
11637          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.REQUESTGROUP);
11638        if ("ResearchStudy".equals(codeString))
11639          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.RESEARCHSTUDY);
11640        if ("ResearchSubject".equals(codeString))
11641          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.RESEARCHSUBJECT);
11642        if ("RiskAssessment".equals(codeString))
11643          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.RISKASSESSMENT);
11644        if ("Schedule".equals(codeString))
11645          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SCHEDULE);
11646        if ("ServiceRequest".equals(codeString))
11647          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SERVICEREQUEST);
11648        if ("Slot".equals(codeString))
11649          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SLOT);
11650        if ("Specimen".equals(codeString))
11651          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SPECIMEN);
11652        if ("SpecimenDefinition".equals(codeString))
11653          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SPECIMENDEFINITION);
11654        if ("Subscription".equals(codeString))
11655          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSCRIPTION);
11656        if ("SubscriptionStatus".equals(codeString))
11657          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSCRIPTIONSTATUS);
11658        if ("SubscriptionTopic".equals(codeString))
11659          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSCRIPTIONTOPIC);
11660        if ("Substance".equals(codeString))
11661          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSTANCE);
11662        if ("SubstanceDefinition".equals(codeString))
11663          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSTANCEDEFINITION);
11664        if ("SubstanceNucleicAcid".equals(codeString))
11665          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSTANCENUCLEICACID);
11666        if ("SubstancePolymer".equals(codeString))
11667          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSTANCEPOLYMER);
11668        if ("SubstanceProtein".equals(codeString))
11669          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSTANCEPROTEIN);
11670        if ("SubstanceReferenceInformation".equals(codeString))
11671          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSTANCEREFERENCEINFORMATION);
11672        if ("SubstanceSourceMaterial".equals(codeString))
11673          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUBSTANCESOURCEMATERIAL);
11674        if ("SupplyDelivery".equals(codeString))
11675          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUPPLYDELIVERY);
11676        if ("SupplyRequest".equals(codeString))
11677          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.SUPPLYREQUEST);
11678        if ("Task".equals(codeString))
11679          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.TASK);
11680        if ("TestReport".equals(codeString))
11681          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.TESTREPORT);
11682        if ("VerificationResult".equals(codeString))
11683          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.VERIFICATIONRESULT);
11684        if ("VisionPrescription".equals(codeString))
11685          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.VISIONPRESCRIPTION);
11686        if ("Parameters".equals(codeString))
11687          return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.PARAMETERS);
11688        throw new FHIRException("Unknown ResourceTypeEnum code '"+codeString+"'");
11689        }
11690    public String toCode(ResourceTypeEnum code) {
11691      if (code == ResourceTypeEnum.RESOURCE)
11692        return "Resource";
11693      if (code == ResourceTypeEnum.BINARY)
11694        return "Binary";
11695      if (code == ResourceTypeEnum.BUNDLE)
11696        return "Bundle";
11697      if (code == ResourceTypeEnum.DOMAINRESOURCE)
11698        return "DomainResource";
11699      if (code == ResourceTypeEnum.ACCOUNT)
11700        return "Account";
11701      if (code == ResourceTypeEnum.ADMINISTRABLEPRODUCTDEFINITION)
11702        return "AdministrableProductDefinition";
11703      if (code == ResourceTypeEnum.ADVERSEEVENT)
11704        return "AdverseEvent";
11705      if (code == ResourceTypeEnum.ALLERGYINTOLERANCE)
11706        return "AllergyIntolerance";
11707      if (code == ResourceTypeEnum.APPOINTMENT)
11708        return "Appointment";
11709      if (code == ResourceTypeEnum.APPOINTMENTRESPONSE)
11710        return "AppointmentResponse";
11711      if (code == ResourceTypeEnum.AUDITEVENT)
11712        return "AuditEvent";
11713      if (code == ResourceTypeEnum.BASIC)
11714        return "Basic";
11715      if (code == ResourceTypeEnum.BIOLOGICALLYDERIVEDPRODUCT)
11716        return "BiologicallyDerivedProduct";
11717      if (code == ResourceTypeEnum.BODYSTRUCTURE)
11718        return "BodyStructure";
11719      if (code == ResourceTypeEnum.CANONICALRESOURCE)
11720        return "CanonicalResource";
11721      if (code == ResourceTypeEnum.CAPABILITYSTATEMENT)
11722        return "CapabilityStatement";
11723      if (code == ResourceTypeEnum.CAPABILITYSTATEMENT2)
11724        return "CapabilityStatement2";
11725      if (code == ResourceTypeEnum.CODESYSTEM)
11726        return "CodeSystem";
11727      if (code == ResourceTypeEnum.COMPARTMENTDEFINITION)
11728        return "CompartmentDefinition";
11729      if (code == ResourceTypeEnum.CONCEPTMAP)
11730        return "ConceptMap";
11731      if (code == ResourceTypeEnum.CONCEPTMAP2)
11732        return "ConceptMap2";
11733      if (code == ResourceTypeEnum.EXAMPLESCENARIO)
11734        return "ExampleScenario";
11735      if (code == ResourceTypeEnum.GRAPHDEFINITION)
11736        return "GraphDefinition";
11737      if (code == ResourceTypeEnum.IMPLEMENTATIONGUIDE)
11738        return "ImplementationGuide";
11739      if (code == ResourceTypeEnum.MESSAGEDEFINITION)
11740        return "MessageDefinition";
11741      if (code == ResourceTypeEnum.METADATARESOURCE)
11742        return "MetadataResource";
11743      if (code == ResourceTypeEnum.ACTIVITYDEFINITION)
11744        return "ActivityDefinition";
11745      if (code == ResourceTypeEnum.ARTIFACTASSESSMENT)
11746        return "ArtifactAssessment";
11747      if (code == ResourceTypeEnum.CHARGEITEMDEFINITION)
11748        return "ChargeItemDefinition";
11749      if (code == ResourceTypeEnum.CITATION)
11750        return "Citation";
11751      if (code == ResourceTypeEnum.CONDITIONDEFINITION)
11752        return "ConditionDefinition";
11753      if (code == ResourceTypeEnum.EVENTDEFINITION)
11754        return "EventDefinition";
11755      if (code == ResourceTypeEnum.EVIDENCE)
11756        return "Evidence";
11757      if (code == ResourceTypeEnum.EVIDENCEREPORT)
11758        return "EvidenceReport";
11759      if (code == ResourceTypeEnum.EVIDENCEVARIABLE)
11760        return "EvidenceVariable";
11761      if (code == ResourceTypeEnum.LIBRARY)
11762        return "Library";
11763      if (code == ResourceTypeEnum.MEASURE)
11764        return "Measure";
11765      if (code == ResourceTypeEnum.PLANDEFINITION)
11766        return "PlanDefinition";
11767      if (code == ResourceTypeEnum.QUESTIONNAIRE)
11768        return "Questionnaire";
11769      if (code == ResourceTypeEnum.NAMINGSYSTEM)
11770        return "NamingSystem";
11771      if (code == ResourceTypeEnum.OPERATIONDEFINITION)
11772        return "OperationDefinition";
11773      if (code == ResourceTypeEnum.SEARCHPARAMETER)
11774        return "SearchParameter";
11775      if (code == ResourceTypeEnum.STRUCTUREDEFINITION)
11776        return "StructureDefinition";
11777      if (code == ResourceTypeEnum.STRUCTUREMAP)
11778        return "StructureMap";
11779      if (code == ResourceTypeEnum.TERMINOLOGYCAPABILITIES)
11780        return "TerminologyCapabilities";
11781      if (code == ResourceTypeEnum.TESTSCRIPT)
11782        return "TestScript";
11783      if (code == ResourceTypeEnum.VALUESET)
11784        return "ValueSet";
11785      if (code == ResourceTypeEnum.CAREPLAN)
11786        return "CarePlan";
11787      if (code == ResourceTypeEnum.CARETEAM)
11788        return "CareTeam";
11789      if (code == ResourceTypeEnum.CHARGEITEM)
11790        return "ChargeItem";
11791      if (code == ResourceTypeEnum.CLAIM)
11792        return "Claim";
11793      if (code == ResourceTypeEnum.CLAIMRESPONSE)
11794        return "ClaimResponse";
11795      if (code == ResourceTypeEnum.CLINICALIMPRESSION)
11796        return "ClinicalImpression";
11797      if (code == ResourceTypeEnum.CLINICALUSEDEFINITION)
11798        return "ClinicalUseDefinition";
11799      if (code == ResourceTypeEnum.CLINICALUSEISSUE)
11800        return "ClinicalUseIssue";
11801      if (code == ResourceTypeEnum.COMMUNICATION)
11802        return "Communication";
11803      if (code == ResourceTypeEnum.COMMUNICATIONREQUEST)
11804        return "CommunicationRequest";
11805      if (code == ResourceTypeEnum.COMPOSITION)
11806        return "Composition";
11807      if (code == ResourceTypeEnum.CONDITION)
11808        return "Condition";
11809      if (code == ResourceTypeEnum.CONSENT)
11810        return "Consent";
11811      if (code == ResourceTypeEnum.CONTRACT)
11812        return "Contract";
11813      if (code == ResourceTypeEnum.COVERAGE)
11814        return "Coverage";
11815      if (code == ResourceTypeEnum.COVERAGEELIGIBILITYREQUEST)
11816        return "CoverageEligibilityRequest";
11817      if (code == ResourceTypeEnum.COVERAGEELIGIBILITYRESPONSE)
11818        return "CoverageEligibilityResponse";
11819      if (code == ResourceTypeEnum.DETECTEDISSUE)
11820        return "DetectedIssue";
11821      if (code == ResourceTypeEnum.DEVICE)
11822        return "Device";
11823      if (code == ResourceTypeEnum.DEVICEDEFINITION)
11824        return "DeviceDefinition";
11825      if (code == ResourceTypeEnum.DEVICEDISPENSE)
11826        return "DeviceDispense";
11827      if (code == ResourceTypeEnum.DEVICEMETRIC)
11828        return "DeviceMetric";
11829      if (code == ResourceTypeEnum.DEVICEREQUEST)
11830        return "DeviceRequest";
11831      if (code == ResourceTypeEnum.DEVICEUSAGE)
11832        return "DeviceUsage";
11833      if (code == ResourceTypeEnum.DIAGNOSTICREPORT)
11834        return "DiagnosticReport";
11835      if (code == ResourceTypeEnum.DOCUMENTMANIFEST)
11836        return "DocumentManifest";
11837      if (code == ResourceTypeEnum.DOCUMENTREFERENCE)
11838        return "DocumentReference";
11839      if (code == ResourceTypeEnum.ENCOUNTER)
11840        return "Encounter";
11841      if (code == ResourceTypeEnum.ENDPOINT)
11842        return "Endpoint";
11843      if (code == ResourceTypeEnum.ENROLLMENTREQUEST)
11844        return "EnrollmentRequest";
11845      if (code == ResourceTypeEnum.ENROLLMENTRESPONSE)
11846        return "EnrollmentResponse";
11847      if (code == ResourceTypeEnum.EPISODEOFCARE)
11848        return "EpisodeOfCare";
11849      if (code == ResourceTypeEnum.EXPLANATIONOFBENEFIT)
11850        return "ExplanationOfBenefit";
11851      if (code == ResourceTypeEnum.FAMILYMEMBERHISTORY)
11852        return "FamilyMemberHistory";
11853      if (code == ResourceTypeEnum.FLAG)
11854        return "Flag";
11855      if (code == ResourceTypeEnum.GOAL)
11856        return "Goal";
11857      if (code == ResourceTypeEnum.GROUP)
11858        return "Group";
11859      if (code == ResourceTypeEnum.GUIDANCERESPONSE)
11860        return "GuidanceResponse";
11861      if (code == ResourceTypeEnum.HEALTHCARESERVICE)
11862        return "HealthcareService";
11863      if (code == ResourceTypeEnum.IMAGINGSELECTION)
11864        return "ImagingSelection";
11865      if (code == ResourceTypeEnum.IMAGINGSTUDY)
11866        return "ImagingStudy";
11867      if (code == ResourceTypeEnum.IMMUNIZATION)
11868        return "Immunization";
11869      if (code == ResourceTypeEnum.IMMUNIZATIONEVALUATION)
11870        return "ImmunizationEvaluation";
11871      if (code == ResourceTypeEnum.IMMUNIZATIONRECOMMENDATION)
11872        return "ImmunizationRecommendation";
11873      if (code == ResourceTypeEnum.INGREDIENT)
11874        return "Ingredient";
11875      if (code == ResourceTypeEnum.INSURANCEPLAN)
11876        return "InsurancePlan";
11877      if (code == ResourceTypeEnum.INVENTORYREPORT)
11878        return "InventoryReport";
11879      if (code == ResourceTypeEnum.INVOICE)
11880        return "Invoice";
11881      if (code == ResourceTypeEnum.LINKAGE)
11882        return "Linkage";
11883      if (code == ResourceTypeEnum.LIST)
11884        return "List";
11885      if (code == ResourceTypeEnum.LOCATION)
11886        return "Location";
11887      if (code == ResourceTypeEnum.MANUFACTUREDITEMDEFINITION)
11888        return "ManufacturedItemDefinition";
11889      if (code == ResourceTypeEnum.MEASUREREPORT)
11890        return "MeasureReport";
11891      if (code == ResourceTypeEnum.MEDICATION)
11892        return "Medication";
11893      if (code == ResourceTypeEnum.MEDICATIONADMINISTRATION)
11894        return "MedicationAdministration";
11895      if (code == ResourceTypeEnum.MEDICATIONDISPENSE)
11896        return "MedicationDispense";
11897      if (code == ResourceTypeEnum.MEDICATIONKNOWLEDGE)
11898        return "MedicationKnowledge";
11899      if (code == ResourceTypeEnum.MEDICATIONREQUEST)
11900        return "MedicationRequest";
11901      if (code == ResourceTypeEnum.MEDICATIONUSAGE)
11902        return "MedicationUsage";
11903      if (code == ResourceTypeEnum.MEDICINALPRODUCTDEFINITION)
11904        return "MedicinalProductDefinition";
11905      if (code == ResourceTypeEnum.MESSAGEHEADER)
11906        return "MessageHeader";
11907      if (code == ResourceTypeEnum.MOLECULARSEQUENCE)
11908        return "MolecularSequence";
11909      if (code == ResourceTypeEnum.NUTRITIONINTAKE)
11910        return "NutritionIntake";
11911      if (code == ResourceTypeEnum.NUTRITIONORDER)
11912        return "NutritionOrder";
11913      if (code == ResourceTypeEnum.NUTRITIONPRODUCT)
11914        return "NutritionProduct";
11915      if (code == ResourceTypeEnum.OBSERVATION)
11916        return "Observation";
11917      if (code == ResourceTypeEnum.OBSERVATIONDEFINITION)
11918        return "ObservationDefinition";
11919      if (code == ResourceTypeEnum.OPERATIONOUTCOME)
11920        return "OperationOutcome";
11921      if (code == ResourceTypeEnum.ORGANIZATION)
11922        return "Organization";
11923      if (code == ResourceTypeEnum.ORGANIZATIONAFFILIATION)
11924        return "OrganizationAffiliation";
11925      if (code == ResourceTypeEnum.PACKAGEDPRODUCTDEFINITION)
11926        return "PackagedProductDefinition";
11927      if (code == ResourceTypeEnum.PATIENT)
11928        return "Patient";
11929      if (code == ResourceTypeEnum.PAYMENTNOTICE)
11930        return "PaymentNotice";
11931      if (code == ResourceTypeEnum.PAYMENTRECONCILIATION)
11932        return "PaymentReconciliation";
11933      if (code == ResourceTypeEnum.PERMISSION)
11934        return "Permission";
11935      if (code == ResourceTypeEnum.PERSON)
11936        return "Person";
11937      if (code == ResourceTypeEnum.PRACTITIONER)
11938        return "Practitioner";
11939      if (code == ResourceTypeEnum.PRACTITIONERROLE)
11940        return "PractitionerRole";
11941      if (code == ResourceTypeEnum.PROCEDURE)
11942        return "Procedure";
11943      if (code == ResourceTypeEnum.PROVENANCE)
11944        return "Provenance";
11945      if (code == ResourceTypeEnum.QUESTIONNAIRERESPONSE)
11946        return "QuestionnaireResponse";
11947      if (code == ResourceTypeEnum.REGULATEDAUTHORIZATION)
11948        return "RegulatedAuthorization";
11949      if (code == ResourceTypeEnum.RELATEDPERSON)
11950        return "RelatedPerson";
11951      if (code == ResourceTypeEnum.REQUESTGROUP)
11952        return "RequestGroup";
11953      if (code == ResourceTypeEnum.RESEARCHSTUDY)
11954        return "ResearchStudy";
11955      if (code == ResourceTypeEnum.RESEARCHSUBJECT)
11956        return "ResearchSubject";
11957      if (code == ResourceTypeEnum.RISKASSESSMENT)
11958        return "RiskAssessment";
11959      if (code == ResourceTypeEnum.SCHEDULE)
11960        return "Schedule";
11961      if (code == ResourceTypeEnum.SERVICEREQUEST)
11962        return "ServiceRequest";
11963      if (code == ResourceTypeEnum.SLOT)
11964        return "Slot";
11965      if (code == ResourceTypeEnum.SPECIMEN)
11966        return "Specimen";
11967      if (code == ResourceTypeEnum.SPECIMENDEFINITION)
11968        return "SpecimenDefinition";
11969      if (code == ResourceTypeEnum.SUBSCRIPTION)
11970        return "Subscription";
11971      if (code == ResourceTypeEnum.SUBSCRIPTIONSTATUS)
11972        return "SubscriptionStatus";
11973      if (code == ResourceTypeEnum.SUBSCRIPTIONTOPIC)
11974        return "SubscriptionTopic";
11975      if (code == ResourceTypeEnum.SUBSTANCE)
11976        return "Substance";
11977      if (code == ResourceTypeEnum.SUBSTANCEDEFINITION)
11978        return "SubstanceDefinition";
11979      if (code == ResourceTypeEnum.SUBSTANCENUCLEICACID)
11980        return "SubstanceNucleicAcid";
11981      if (code == ResourceTypeEnum.SUBSTANCEPOLYMER)
11982        return "SubstancePolymer";
11983      if (code == ResourceTypeEnum.SUBSTANCEPROTEIN)
11984        return "SubstanceProtein";
11985      if (code == ResourceTypeEnum.SUBSTANCEREFERENCEINFORMATION)
11986        return "SubstanceReferenceInformation";
11987      if (code == ResourceTypeEnum.SUBSTANCESOURCEMATERIAL)
11988        return "SubstanceSourceMaterial";
11989      if (code == ResourceTypeEnum.SUPPLYDELIVERY)
11990        return "SupplyDelivery";
11991      if (code == ResourceTypeEnum.SUPPLYREQUEST)
11992        return "SupplyRequest";
11993      if (code == ResourceTypeEnum.TASK)
11994        return "Task";
11995      if (code == ResourceTypeEnum.TESTREPORT)
11996        return "TestReport";
11997      if (code == ResourceTypeEnum.VERIFICATIONRESULT)
11998        return "VerificationResult";
11999      if (code == ResourceTypeEnum.VISIONPRESCRIPTION)
12000        return "VisionPrescription";
12001      if (code == ResourceTypeEnum.PARAMETERS)
12002        return "Parameters";
12003      return "?";
12004      }
12005    public String toSystem(ResourceTypeEnum code) {
12006      return code.getSystem();
12007      }
12008    }
12009
12010    public enum RestfulCapabilityMode {
12011        /**
12012         * The application acts as a client for this resource.
12013         */
12014        CLIENT, 
12015        /**
12016         * The application acts as a server for this resource.
12017         */
12018        SERVER, 
12019        /**
12020         * added to help the parsers
12021         */
12022        NULL;
12023        public static RestfulCapabilityMode fromCode(String codeString) throws FHIRException {
12024            if (codeString == null || "".equals(codeString))
12025                return null;
12026        if ("client".equals(codeString))
12027          return CLIENT;
12028        if ("server".equals(codeString))
12029          return SERVER;
12030        throw new FHIRException("Unknown RestfulCapabilityMode code '"+codeString+"'");
12031        }
12032        public String toCode() {
12033          switch (this) {
12034            case CLIENT: return "client";
12035            case SERVER: return "server";
12036            case NULL: return null;
12037            default: return "?";
12038          }
12039        }
12040        public String getSystem() {
12041          switch (this) {
12042            case CLIENT: return "http://hl7.org/fhir/restful-capability-mode";
12043            case SERVER: return "http://hl7.org/fhir/restful-capability-mode";
12044            case NULL: return null;
12045            default: return "?";
12046          }
12047        }
12048        public String getDefinition() {
12049          switch (this) {
12050            case CLIENT: return "The application acts as a client for this resource.";
12051            case SERVER: return "The application acts as a server for this resource.";
12052            case NULL: return null;
12053            default: return "?";
12054          }
12055        }
12056        public String getDisplay() {
12057          switch (this) {
12058            case CLIENT: return "Client";
12059            case SERVER: return "Server";
12060            case NULL: return null;
12061            default: return "?";
12062          }
12063        }
12064    }
12065
12066  public static class RestfulCapabilityModeEnumFactory implements EnumFactory<RestfulCapabilityMode> {
12067    public RestfulCapabilityMode fromCode(String codeString) throws IllegalArgumentException {
12068      if (codeString == null || "".equals(codeString))
12069            if (codeString == null || "".equals(codeString))
12070                return null;
12071        if ("client".equals(codeString))
12072          return RestfulCapabilityMode.CLIENT;
12073        if ("server".equals(codeString))
12074          return RestfulCapabilityMode.SERVER;
12075        throw new IllegalArgumentException("Unknown RestfulCapabilityMode code '"+codeString+"'");
12076        }
12077        public Enumeration<RestfulCapabilityMode> fromType(Base code) throws FHIRException {
12078          if (code == null)
12079            return null;
12080          if (code.isEmpty())
12081            return new Enumeration<RestfulCapabilityMode>(this);
12082          String codeString = ((PrimitiveType) code).asStringValue();
12083          if (codeString == null || "".equals(codeString))
12084            return null;
12085        if ("client".equals(codeString))
12086          return new Enumeration<RestfulCapabilityMode>(this, RestfulCapabilityMode.CLIENT);
12087        if ("server".equals(codeString))
12088          return new Enumeration<RestfulCapabilityMode>(this, RestfulCapabilityMode.SERVER);
12089        throw new FHIRException("Unknown RestfulCapabilityMode code '"+codeString+"'");
12090        }
12091    public String toCode(RestfulCapabilityMode code) {
12092      if (code == RestfulCapabilityMode.CLIENT)
12093        return "client";
12094      if (code == RestfulCapabilityMode.SERVER)
12095        return "server";
12096      return "?";
12097      }
12098    public String toSystem(RestfulCapabilityMode code) {
12099      return code.getSystem();
12100      }
12101    }
12102
12103    public enum SearchParamType {
12104        /**
12105         * Search parameter SHALL be a number (a whole number, or a decimal).
12106         */
12107        NUMBER, 
12108        /**
12109         * Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported.
12110         */
12111        DATE, 
12112        /**
12113         * 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.
12114         */
12115        STRING, 
12116        /**
12117         * 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.
12118         */
12119        TOKEN, 
12120        /**
12121         * A reference to another resource (Reference or canonical).
12122         */
12123        REFERENCE, 
12124        /**
12125         * A composite search parameter that combines a search on two values together.
12126         */
12127        COMPOSITE, 
12128        /**
12129         * A search parameter that searches on a quantity.
12130         */
12131        QUANTITY, 
12132        /**
12133         * A search parameter that searches on a URI (RFC 3986).
12134         */
12135        URI, 
12136        /**
12137         * Special logic applies to this parameter per the description of the search parameter.
12138         */
12139        SPECIAL, 
12140        /**
12141         * added to help the parsers
12142         */
12143        NULL;
12144        public static SearchParamType fromCode(String codeString) throws FHIRException {
12145            if (codeString == null || "".equals(codeString))
12146                return null;
12147        if ("number".equals(codeString))
12148          return NUMBER;
12149        if ("date".equals(codeString))
12150          return DATE;
12151        if ("string".equals(codeString))
12152          return STRING;
12153        if ("token".equals(codeString))
12154          return TOKEN;
12155        if ("reference".equals(codeString))
12156          return REFERENCE;
12157        if ("composite".equals(codeString))
12158          return COMPOSITE;
12159        if ("quantity".equals(codeString))
12160          return QUANTITY;
12161        if ("uri".equals(codeString))
12162          return URI;
12163        if ("special".equals(codeString))
12164          return SPECIAL;
12165        throw new FHIRException("Unknown SearchParamType code '"+codeString+"'");
12166        }
12167        public String toCode() {
12168          switch (this) {
12169            case NUMBER: return "number";
12170            case DATE: return "date";
12171            case STRING: return "string";
12172            case TOKEN: return "token";
12173            case REFERENCE: return "reference";
12174            case COMPOSITE: return "composite";
12175            case QUANTITY: return "quantity";
12176            case URI: return "uri";
12177            case SPECIAL: return "special";
12178            case NULL: return null;
12179            default: return "?";
12180          }
12181        }
12182        public String getSystem() {
12183          switch (this) {
12184            case NUMBER: return "http://hl7.org/fhir/search-param-type";
12185            case DATE: return "http://hl7.org/fhir/search-param-type";
12186            case STRING: return "http://hl7.org/fhir/search-param-type";
12187            case TOKEN: return "http://hl7.org/fhir/search-param-type";
12188            case REFERENCE: return "http://hl7.org/fhir/search-param-type";
12189            case COMPOSITE: return "http://hl7.org/fhir/search-param-type";
12190            case QUANTITY: return "http://hl7.org/fhir/search-param-type";
12191            case URI: return "http://hl7.org/fhir/search-param-type";
12192            case SPECIAL: return "http://hl7.org/fhir/search-param-type";
12193            case NULL: return null;
12194            default: return "?";
12195          }
12196        }
12197        public String getDefinition() {
12198          switch (this) {
12199            case NUMBER: return "Search parameter SHALL be a number (a whole number, or a decimal).";
12200            case DATE: return "Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported.";
12201            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.";
12202            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.";
12203            case REFERENCE: return "A reference to another resource (Reference or canonical).";
12204            case COMPOSITE: return "A composite search parameter that combines a search on two values together.";
12205            case QUANTITY: return "A search parameter that searches on a quantity.";
12206            case URI: return "A search parameter that searches on a URI (RFC 3986).";
12207            case SPECIAL: return "Special logic applies to this parameter per the description of the search parameter.";
12208            case NULL: return null;
12209            default: return "?";
12210          }
12211        }
12212        public String getDisplay() {
12213          switch (this) {
12214            case NUMBER: return "Number";
12215            case DATE: return "Date/DateTime";
12216            case STRING: return "String";
12217            case TOKEN: return "Token";
12218            case REFERENCE: return "Reference";
12219            case COMPOSITE: return "Composite";
12220            case QUANTITY: return "Quantity";
12221            case URI: return "URI";
12222            case SPECIAL: return "Special";
12223            case NULL: return null;
12224            default: return "?";
12225          }
12226        }
12227    }
12228
12229  public static class SearchParamTypeEnumFactory implements EnumFactory<SearchParamType> {
12230    public SearchParamType fromCode(String codeString) throws IllegalArgumentException {
12231      if (codeString == null || "".equals(codeString))
12232            if (codeString == null || "".equals(codeString))
12233                return null;
12234        if ("number".equals(codeString))
12235          return SearchParamType.NUMBER;
12236        if ("date".equals(codeString))
12237          return SearchParamType.DATE;
12238        if ("string".equals(codeString))
12239          return SearchParamType.STRING;
12240        if ("token".equals(codeString))
12241          return SearchParamType.TOKEN;
12242        if ("reference".equals(codeString))
12243          return SearchParamType.REFERENCE;
12244        if ("composite".equals(codeString))
12245          return SearchParamType.COMPOSITE;
12246        if ("quantity".equals(codeString))
12247          return SearchParamType.QUANTITY;
12248        if ("uri".equals(codeString))
12249          return SearchParamType.URI;
12250        if ("special".equals(codeString))
12251          return SearchParamType.SPECIAL;
12252        throw new IllegalArgumentException("Unknown SearchParamType code '"+codeString+"'");
12253        }
12254        public Enumeration<SearchParamType> fromType(Base code) throws FHIRException {
12255          if (code == null)
12256            return null;
12257          if (code.isEmpty())
12258            return new Enumeration<SearchParamType>(this);
12259          String codeString = ((PrimitiveType) code).asStringValue();
12260          if (codeString == null || "".equals(codeString))
12261            return null;
12262        if ("number".equals(codeString))
12263          return new Enumeration<SearchParamType>(this, SearchParamType.NUMBER);
12264        if ("date".equals(codeString))
12265          return new Enumeration<SearchParamType>(this, SearchParamType.DATE);
12266        if ("string".equals(codeString))
12267          return new Enumeration<SearchParamType>(this, SearchParamType.STRING);
12268        if ("token".equals(codeString))
12269          return new Enumeration<SearchParamType>(this, SearchParamType.TOKEN);
12270        if ("reference".equals(codeString))
12271          return new Enumeration<SearchParamType>(this, SearchParamType.REFERENCE);
12272        if ("composite".equals(codeString))
12273          return new Enumeration<SearchParamType>(this, SearchParamType.COMPOSITE);
12274        if ("quantity".equals(codeString))
12275          return new Enumeration<SearchParamType>(this, SearchParamType.QUANTITY);
12276        if ("uri".equals(codeString))
12277          return new Enumeration<SearchParamType>(this, SearchParamType.URI);
12278        if ("special".equals(codeString))
12279          return new Enumeration<SearchParamType>(this, SearchParamType.SPECIAL);
12280        throw new FHIRException("Unknown SearchParamType code '"+codeString+"'");
12281        }
12282    public String toCode(SearchParamType code) {
12283      if (code == SearchParamType.NUMBER)
12284        return "number";
12285      if (code == SearchParamType.DATE)
12286        return "date";
12287      if (code == SearchParamType.STRING)
12288        return "string";
12289      if (code == SearchParamType.TOKEN)
12290        return "token";
12291      if (code == SearchParamType.REFERENCE)
12292        return "reference";
12293      if (code == SearchParamType.COMPOSITE)
12294        return "composite";
12295      if (code == SearchParamType.QUANTITY)
12296        return "quantity";
12297      if (code == SearchParamType.URI)
12298        return "uri";
12299      if (code == SearchParamType.SPECIAL)
12300        return "special";
12301      return "?";
12302      }
12303    public String toSystem(SearchParamType code) {
12304      return code.getSystem();
12305      }
12306    }
12307
12308    public enum SubscriptionSearchModifier {
12309        /**
12310         * Used to match a value according to FHIR Search rules (e.g., Patient/123, Encounter/2002).
12311         */
12312        EQUAL, 
12313        /**
12314         * The value for the parameter in the resource is equal to the provided value.
12315         */
12316        EQ, 
12317        /**
12318         * The value for the parameter in the resource is not equal to the provided value.
12319         */
12320        NE, 
12321        /**
12322         * The value for the parameter in the resource is greater than the provided value.
12323         */
12324        GT, 
12325        /**
12326         * The value for the parameter in the resource is less than the provided value.
12327         */
12328        LT, 
12329        /**
12330         * The value for the parameter in the resource is greater or equal to the provided value.
12331         */
12332        GE, 
12333        /**
12334         * The value for the parameter in the resource is less or equal to the provided value.
12335         */
12336        LE, 
12337        /**
12338         * The value for the parameter in the resource starts after the provided value.
12339         */
12340        SA, 
12341        /**
12342         * The value for the parameter in the resource ends before the provided value.
12343         */
12344        EB, 
12345        /**
12346         * The value for the parameter in the resource is approximately the same to the provided value. Note that the recommended value for the approximation is 10% of the stated value (or for a date, 10% of the gap between now and the date), but systems may choose other values where appropriate.
12347         */
12348        AP, 
12349        /**
12350         * The search parameter is a concept with the form [system]|[code], and the search parameter tests whether the coding in a resource subsumes the specified search code.
12351         */
12352        ABOVE, 
12353        /**
12354         * The search parameter is a concept with the form [system]|[code], and the search parameter tests whether the coding in a resource is subsumed by the specified search code.
12355         */
12356        BELOW, 
12357        /**
12358         * The search parameter is a member of a Group or List, or the search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the value is present in the specified Group, List, or Value Set.
12359         */
12360        IN, 
12361        /**
12362         * The search parameter is a member of a Group or List, or the search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the value is NOT present in the specified Group, List, or Value Set.
12363         */
12364        NOTIN, 
12365        /**
12366         * The search parameter has the format system|code|value, where the system and code refer to a Identifier.type.coding.system and .code, and match if any of the type codes match. All 3 parts must be present.
12367         */
12368        OFTYPE, 
12369        /**
12370         * added to help the parsers
12371         */
12372        NULL;
12373        public static SubscriptionSearchModifier fromCode(String codeString) throws FHIRException {
12374            if (codeString == null || "".equals(codeString))
12375                return null;
12376        if ("=".equals(codeString))
12377          return EQUAL;
12378        if ("eq".equals(codeString))
12379          return EQ;
12380        if ("ne".equals(codeString))
12381          return NE;
12382        if ("gt".equals(codeString))
12383          return GT;
12384        if ("lt".equals(codeString))
12385          return LT;
12386        if ("ge".equals(codeString))
12387          return GE;
12388        if ("le".equals(codeString))
12389          return LE;
12390        if ("sa".equals(codeString))
12391          return SA;
12392        if ("eb".equals(codeString))
12393          return EB;
12394        if ("ap".equals(codeString))
12395          return AP;
12396        if ("above".equals(codeString))
12397          return ABOVE;
12398        if ("below".equals(codeString))
12399          return BELOW;
12400        if ("in".equals(codeString))
12401          return IN;
12402        if ("not-in".equals(codeString))
12403          return NOTIN;
12404        if ("of-type".equals(codeString))
12405          return OFTYPE;
12406        throw new FHIRException("Unknown SubscriptionSearchModifier code '"+codeString+"'");
12407        }
12408        public String toCode() {
12409          switch (this) {
12410            case EQUAL: return "=";
12411            case EQ: return "eq";
12412            case NE: return "ne";
12413            case GT: return "gt";
12414            case LT: return "lt";
12415            case GE: return "ge";
12416            case LE: return "le";
12417            case SA: return "sa";
12418            case EB: return "eb";
12419            case AP: return "ap";
12420            case ABOVE: return "above";
12421            case BELOW: return "below";
12422            case IN: return "in";
12423            case NOTIN: return "not-in";
12424            case OFTYPE: return "of-type";
12425            case NULL: return null;
12426            default: return "?";
12427          }
12428        }
12429        public String getSystem() {
12430          switch (this) {
12431            case EQUAL: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12432            case EQ: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12433            case NE: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12434            case GT: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12435            case LT: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12436            case GE: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12437            case LE: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12438            case SA: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12439            case EB: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12440            case AP: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12441            case ABOVE: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12442            case BELOW: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12443            case IN: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12444            case NOTIN: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12445            case OFTYPE: return "http://terminology.hl7.org/CodeSystem/subscription-search-modifier";
12446            case NULL: return null;
12447            default: return "?";
12448          }
12449        }
12450        public String getDefinition() {
12451          switch (this) {
12452            case EQUAL: return "Used to match a value according to FHIR Search rules (e.g., Patient/123, Encounter/2002).";
12453            case EQ: return "The value for the parameter in the resource is equal to the provided value.";
12454            case NE: return "The value for the parameter in the resource is not equal to the provided value.";
12455            case GT: return "The value for the parameter in the resource is greater than the provided value.";
12456            case LT: return "The value for the parameter in the resource is less than the provided value.";
12457            case GE: return "The value for the parameter in the resource is greater or equal to the provided value.";
12458            case LE: return "The value for the parameter in the resource is less or equal to the provided value.";
12459            case SA: return "The value for the parameter in the resource starts after the provided value.";
12460            case EB: return "The value for the parameter in the resource ends before the provided value.";
12461            case AP: return "The value for the parameter in the resource is approximately the same to the provided value. Note that the recommended value for the approximation is 10% of the stated value (or for a date, 10% of the gap between now and the date), but systems may choose other values where appropriate.";
12462            case ABOVE: return "The search parameter is a concept with the form [system]|[code], and the search parameter tests whether the coding in a resource subsumes the specified search code.";
12463            case BELOW: return "The search parameter is a concept with the form [system]|[code], and the search parameter tests whether the coding in a resource is subsumed by the specified search code.";
12464            case IN: return "The search parameter is a member of a Group or List, or the search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the value is present in the specified Group, List, or Value Set.";
12465            case NOTIN: return "The search parameter is a member of a Group or List, or the search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the value is NOT present in the specified Group, List, or Value Set.";
12466            case OFTYPE: return "The search parameter has the format system|code|value, where the system and code refer to a Identifier.type.coding.system and .code, and match if any of the type codes match. All 3 parts must be present.";
12467            case NULL: return null;
12468            default: return "?";
12469          }
12470        }
12471        public String getDisplay() {
12472          switch (this) {
12473            case EQUAL: return "=";
12474            case EQ: return "Equal";
12475            case NE: return "Not Equal";
12476            case GT: return "Greater Than";
12477            case LT: return "Less Than";
12478            case GE: return "Greater Than or Equal";
12479            case LE: return "Less Than or Equal";
12480            case SA: return "Starts After";
12481            case EB: return "Ends Before";
12482            case AP: return "Approximately";
12483            case ABOVE: return "Above";
12484            case BELOW: return "Below";
12485            case IN: return "In";
12486            case NOTIN: return "Not In";
12487            case OFTYPE: return "Of Type";
12488            case NULL: return null;
12489            default: return "?";
12490          }
12491        }
12492    }
12493
12494  public static class SubscriptionSearchModifierEnumFactory implements EnumFactory<SubscriptionSearchModifier> {
12495    public SubscriptionSearchModifier fromCode(String codeString) throws IllegalArgumentException {
12496      if (codeString == null || "".equals(codeString))
12497            if (codeString == null || "".equals(codeString))
12498                return null;
12499        if ("=".equals(codeString))
12500          return SubscriptionSearchModifier.EQUAL;
12501        if ("eq".equals(codeString))
12502          return SubscriptionSearchModifier.EQ;
12503        if ("ne".equals(codeString))
12504          return SubscriptionSearchModifier.NE;
12505        if ("gt".equals(codeString))
12506          return SubscriptionSearchModifier.GT;
12507        if ("lt".equals(codeString))
12508          return SubscriptionSearchModifier.LT;
12509        if ("ge".equals(codeString))
12510          return SubscriptionSearchModifier.GE;
12511        if ("le".equals(codeString))
12512          return SubscriptionSearchModifier.LE;
12513        if ("sa".equals(codeString))
12514          return SubscriptionSearchModifier.SA;
12515        if ("eb".equals(codeString))
12516          return SubscriptionSearchModifier.EB;
12517        if ("ap".equals(codeString))
12518          return SubscriptionSearchModifier.AP;
12519        if ("above".equals(codeString))
12520          return SubscriptionSearchModifier.ABOVE;
12521        if ("below".equals(codeString))
12522          return SubscriptionSearchModifier.BELOW;
12523        if ("in".equals(codeString))
12524          return SubscriptionSearchModifier.IN;
12525        if ("not-in".equals(codeString))
12526          return SubscriptionSearchModifier.NOTIN;
12527        if ("of-type".equals(codeString))
12528          return SubscriptionSearchModifier.OFTYPE;
12529        throw new IllegalArgumentException("Unknown SubscriptionSearchModifier code '"+codeString+"'");
12530        }
12531        public Enumeration<SubscriptionSearchModifier> fromType(Base code) throws FHIRException {
12532          if (code == null)
12533            return null;
12534          if (code.isEmpty())
12535            return new Enumeration<SubscriptionSearchModifier>(this);
12536          String codeString = ((PrimitiveType) code).asStringValue();
12537          if (codeString == null || "".equals(codeString))
12538            return null;
12539        if ("=".equals(codeString))
12540          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.EQUAL);
12541        if ("eq".equals(codeString))
12542          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.EQ);
12543        if ("ne".equals(codeString))
12544          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.NE);
12545        if ("gt".equals(codeString))
12546          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.GT);
12547        if ("lt".equals(codeString))
12548          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.LT);
12549        if ("ge".equals(codeString))
12550          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.GE);
12551        if ("le".equals(codeString))
12552          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.LE);
12553        if ("sa".equals(codeString))
12554          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.SA);
12555        if ("eb".equals(codeString))
12556          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.EB);
12557        if ("ap".equals(codeString))
12558          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.AP);
12559        if ("above".equals(codeString))
12560          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.ABOVE);
12561        if ("below".equals(codeString))
12562          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.BELOW);
12563        if ("in".equals(codeString))
12564          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.IN);
12565        if ("not-in".equals(codeString))
12566          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.NOTIN);
12567        if ("of-type".equals(codeString))
12568          return new Enumeration<SubscriptionSearchModifier>(this, SubscriptionSearchModifier.OFTYPE);
12569        throw new FHIRException("Unknown SubscriptionSearchModifier code '"+codeString+"'");
12570        }
12571    public String toCode(SubscriptionSearchModifier code) {
12572      if (code == SubscriptionSearchModifier.EQUAL)
12573        return "=";
12574      if (code == SubscriptionSearchModifier.EQ)
12575        return "eq";
12576      if (code == SubscriptionSearchModifier.NE)
12577        return "ne";
12578      if (code == SubscriptionSearchModifier.GT)
12579        return "gt";
12580      if (code == SubscriptionSearchModifier.LT)
12581        return "lt";
12582      if (code == SubscriptionSearchModifier.GE)
12583        return "ge";
12584      if (code == SubscriptionSearchModifier.LE)
12585        return "le";
12586      if (code == SubscriptionSearchModifier.SA)
12587        return "sa";
12588      if (code == SubscriptionSearchModifier.EB)
12589        return "eb";
12590      if (code == SubscriptionSearchModifier.AP)
12591        return "ap";
12592      if (code == SubscriptionSearchModifier.ABOVE)
12593        return "above";
12594      if (code == SubscriptionSearchModifier.BELOW)
12595        return "below";
12596      if (code == SubscriptionSearchModifier.IN)
12597        return "in";
12598      if (code == SubscriptionSearchModifier.NOTIN)
12599        return "not-in";
12600      if (code == SubscriptionSearchModifier.OFTYPE)
12601        return "of-type";
12602      return "?";
12603      }
12604    public String toSystem(SubscriptionSearchModifier code) {
12605      return code.getSystem();
12606      }
12607    }
12608
12609    public enum SubscriptionState {
12610        /**
12611         * The client has requested the subscription, and the server has not yet set it up.
12612         */
12613        REQUESTED, 
12614        /**
12615         * The subscription is active.
12616         */
12617        ACTIVE, 
12618        /**
12619         * The server has an error executing the notification.
12620         */
12621        ERROR, 
12622        /**
12623         * Too many errors have occurred or the subscription has expired.
12624         */
12625        OFF, 
12626        /**
12627         * This subscription has been flagged as incorrect.
12628         */
12629        ENTEREDINERROR, 
12630        /**
12631         * added to help the parsers
12632         */
12633        NULL;
12634        public static SubscriptionState fromCode(String codeString) throws FHIRException {
12635            if (codeString == null || "".equals(codeString))
12636                return null;
12637        if ("requested".equals(codeString))
12638          return REQUESTED;
12639        if ("active".equals(codeString))
12640          return ACTIVE;
12641        if ("error".equals(codeString))
12642          return ERROR;
12643        if ("off".equals(codeString))
12644          return OFF;
12645        if ("entered-in-error".equals(codeString))
12646          return ENTEREDINERROR;
12647        throw new FHIRException("Unknown SubscriptionState code '"+codeString+"'");
12648        }
12649        public String toCode() {
12650          switch (this) {
12651            case REQUESTED: return "requested";
12652            case ACTIVE: return "active";
12653            case ERROR: return "error";
12654            case OFF: return "off";
12655            case ENTEREDINERROR: return "entered-in-error";
12656            case NULL: return null;
12657            default: return "?";
12658          }
12659        }
12660        public String getSystem() {
12661          switch (this) {
12662            case REQUESTED: return "http://terminology.hl7.org/CodeSystem/subscription-state";
12663            case ACTIVE: return "http://terminology.hl7.org/CodeSystem/subscription-state";
12664            case ERROR: return "http://terminology.hl7.org/CodeSystem/subscription-state";
12665            case OFF: return "http://terminology.hl7.org/CodeSystem/subscription-state";
12666            case ENTEREDINERROR: return "http://terminology.hl7.org/CodeSystem/subscription-state";
12667            case NULL: return null;
12668            default: return "?";
12669          }
12670        }
12671        public String getDefinition() {
12672          switch (this) {
12673            case REQUESTED: return "The client has requested the subscription, and the server has not yet set it up.";
12674            case ACTIVE: return "The subscription is active.";
12675            case ERROR: return "The server has an error executing the notification.";
12676            case OFF: return "Too many errors have occurred or the subscription has expired.";
12677            case ENTEREDINERROR: return "This subscription has been flagged as incorrect.";
12678            case NULL: return null;
12679            default: return "?";
12680          }
12681        }
12682        public String getDisplay() {
12683          switch (this) {
12684            case REQUESTED: return "Requested";
12685            case ACTIVE: return "Active";
12686            case ERROR: return "Error";
12687            case OFF: return "Off";
12688            case ENTEREDINERROR: return "Entered in Error";
12689            case NULL: return null;
12690            default: return "?";
12691          }
12692        }
12693    }
12694
12695  public static class SubscriptionStateEnumFactory implements EnumFactory<SubscriptionState> {
12696    public SubscriptionState fromCode(String codeString) throws IllegalArgumentException {
12697      if (codeString == null || "".equals(codeString))
12698            if (codeString == null || "".equals(codeString))
12699                return null;
12700        if ("requested".equals(codeString))
12701          return SubscriptionState.REQUESTED;
12702        if ("active".equals(codeString))
12703          return SubscriptionState.ACTIVE;
12704        if ("error".equals(codeString))
12705          return SubscriptionState.ERROR;
12706        if ("off".equals(codeString))
12707          return SubscriptionState.OFF;
12708        if ("entered-in-error".equals(codeString))
12709          return SubscriptionState.ENTEREDINERROR;
12710        throw new IllegalArgumentException("Unknown SubscriptionState code '"+codeString+"'");
12711        }
12712        public Enumeration<SubscriptionState> fromType(Base code) throws FHIRException {
12713          if (code == null)
12714            return null;
12715          if (code.isEmpty())
12716            return new Enumeration<SubscriptionState>(this);
12717          String codeString = ((PrimitiveType) code).asStringValue();
12718          if (codeString == null || "".equals(codeString))
12719            return null;
12720        if ("requested".equals(codeString))
12721          return new Enumeration<SubscriptionState>(this, SubscriptionState.REQUESTED);
12722        if ("active".equals(codeString))
12723          return new Enumeration<SubscriptionState>(this, SubscriptionState.ACTIVE);
12724        if ("error".equals(codeString))
12725          return new Enumeration<SubscriptionState>(this, SubscriptionState.ERROR);
12726        if ("off".equals(codeString))
12727          return new Enumeration<SubscriptionState>(this, SubscriptionState.OFF);
12728        if ("entered-in-error".equals(codeString))
12729          return new Enumeration<SubscriptionState>(this, SubscriptionState.ENTEREDINERROR);
12730        throw new FHIRException("Unknown SubscriptionState code '"+codeString+"'");
12731        }
12732    public String toCode(SubscriptionState code) {
12733      if (code == SubscriptionState.REQUESTED)
12734        return "requested";
12735      if (code == SubscriptionState.ACTIVE)
12736        return "active";
12737      if (code == SubscriptionState.ERROR)
12738        return "error";
12739      if (code == SubscriptionState.OFF)
12740        return "off";
12741      if (code == SubscriptionState.ENTEREDINERROR)
12742        return "entered-in-error";
12743      return "?";
12744      }
12745    public String toSystem(SubscriptionState code) {
12746      return code.getSystem();
12747      }
12748    }
12749
12750    public enum Use {
12751        /**
12752         * The treatment is complete and this represents a Claim for the services.
12753         */
12754        CLAIM, 
12755        /**
12756         * The treatment is proposed and this represents a Pre-authorization for the services.
12757         */
12758        PREAUTHORIZATION, 
12759        /**
12760         * The treatment is proposed and this represents a Pre-determination for the services.
12761         */
12762        PREDETERMINATION, 
12763        /**
12764         * added to help the parsers
12765         */
12766        NULL;
12767        public static Use fromCode(String codeString) throws FHIRException {
12768            if (codeString == null || "".equals(codeString))
12769                return null;
12770        if ("claim".equals(codeString))
12771          return CLAIM;
12772        if ("preauthorization".equals(codeString))
12773          return PREAUTHORIZATION;
12774        if ("predetermination".equals(codeString))
12775          return PREDETERMINATION;
12776        throw new FHIRException("Unknown Use code '"+codeString+"'");
12777        }
12778        public String toCode() {
12779          switch (this) {
12780            case CLAIM: return "claim";
12781            case PREAUTHORIZATION: return "preauthorization";
12782            case PREDETERMINATION: return "predetermination";
12783            case NULL: return null;
12784            default: return "?";
12785          }
12786        }
12787        public String getSystem() {
12788          switch (this) {
12789            case CLAIM: return "http://hl7.org/fhir/claim-use";
12790            case PREAUTHORIZATION: return "http://hl7.org/fhir/claim-use";
12791            case PREDETERMINATION: return "http://hl7.org/fhir/claim-use";
12792            case NULL: return null;
12793            default: return "?";
12794          }
12795        }
12796        public String getDefinition() {
12797          switch (this) {
12798            case CLAIM: return "The treatment is complete and this represents a Claim for the services.";
12799            case PREAUTHORIZATION: return "The treatment is proposed and this represents a Pre-authorization for the services.";
12800            case PREDETERMINATION: return "The treatment is proposed and this represents a Pre-determination for the services.";
12801            case NULL: return null;
12802            default: return "?";
12803          }
12804        }
12805        public String getDisplay() {
12806          switch (this) {
12807            case CLAIM: return "Claim";
12808            case PREAUTHORIZATION: return "Preauthorization";
12809            case PREDETERMINATION: return "Predetermination";
12810            case NULL: return null;
12811            default: return "?";
12812          }
12813        }
12814    }
12815
12816  public static class UseEnumFactory implements EnumFactory<Use> {
12817    public Use fromCode(String codeString) throws IllegalArgumentException {
12818      if (codeString == null || "".equals(codeString))
12819            if (codeString == null || "".equals(codeString))
12820                return null;
12821        if ("claim".equals(codeString))
12822          return Use.CLAIM;
12823        if ("preauthorization".equals(codeString))
12824          return Use.PREAUTHORIZATION;
12825        if ("predetermination".equals(codeString))
12826          return Use.PREDETERMINATION;
12827        throw new IllegalArgumentException("Unknown Use code '"+codeString+"'");
12828        }
12829        public Enumeration<Use> fromType(Base code) throws FHIRException {
12830          if (code == null)
12831            return null;
12832          if (code.isEmpty())
12833            return new Enumeration<Use>(this);
12834          String codeString = ((PrimitiveType) code).asStringValue();
12835          if (codeString == null || "".equals(codeString))
12836            return null;
12837        if ("claim".equals(codeString))
12838          return new Enumeration<Use>(this, Use.CLAIM);
12839        if ("preauthorization".equals(codeString))
12840          return new Enumeration<Use>(this, Use.PREAUTHORIZATION);
12841        if ("predetermination".equals(codeString))
12842          return new Enumeration<Use>(this, Use.PREDETERMINATION);
12843        throw new FHIRException("Unknown Use code '"+codeString+"'");
12844        }
12845    public String toCode(Use code) {
12846      if (code == Use.CLAIM)
12847        return "claim";
12848      if (code == Use.PREAUTHORIZATION)
12849        return "preauthorization";
12850      if (code == Use.PREDETERMINATION)
12851        return "predetermination";
12852      return "?";
12853      }
12854    public String toSystem(Use code) {
12855      return code.getSystem();
12856      }
12857    }
12858
12859
12860}
12861