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 Mon, Jul 18, 2022 12:45+1000 for FHIR v5.0.0-snapshot2
033
034
035import org.hl7.fhir.instance.model.api.*;
036import org.hl7.fhir.utilities.Utilities;
037import org.hl7.fhir.exceptions.FHIRException;
038
039public class Enumerations {
040
041// In here: 
042//   ActionCardinalityBehavior: Defines behavior for an action or a group for how many times that item may be repeated.[PlanDefinition, RequestGroup]
043//   ActionConditionKind: Defines the kinds of conditions that can appear on actions.[PlanDefinition, RequestGroup]
044//   ActionGroupingBehavior: Defines organization behavior of a group.[PlanDefinition, RequestGroup]
045//   ActionParticipantType: The type of participant for the action.[ActivityDefinition, PlanDefinition, RequestGroup]
046//   ActionPrecheckBehavior: Defines selection frequency behavior for an action or group.[PlanDefinition, RequestGroup]
047//   ActionRelationshipType: Defines the types of relationships between actions.[PlanDefinition, RequestGroup]
048//   ActionRequiredBehavior: Defines expectations around whether an action or action group is required.[PlanDefinition, RequestGroup]
049//   ActionSelectionBehavior: Defines selection behavior of a group.[PlanDefinition, RequestGroup]
050//   AdministrativeGender: The gender of a person used for administrative purposes.[ObservationDefinition, Patient, Person, Practitioner, RelatedPerson]
051//   BindingStrength: Indication of the degree of conformance expectations associated with a binding.[ElementDefinition, OperationDefinition]
052//   CapabilityStatementKind: How a capability statement is intended to be used.[CapabilityStatement, CapabilityStatement2, TerminologyCapabilities]
053//   ClaimProcessingCodes: This value set includes Claim Processing Outcome codes.[ClaimResponse, ExplanationOfBenefit]
054//   CompartmentType: Which type a compartment definition describes.[CompartmentDefinition, GraphDefinition]
055//   CompositionStatus: The workflow/clinical status of the composition.[Composition, DocumentReference]
056//   ConceptMapRelationship: The relationship between concepts.[ConceptMap]
057//   DaysOfWeek: The days of the week.[HealthcareService, Location, PractitionerRole, Timing]
058//   DeviceNameType: The type of name the device is referred by.[Device, DeviceDefinition]
059//   DocumentReferenceStatus: The status of the document reference.[DocumentManifest, DocumentReference]
060//   EventStatus: Codes identifying the lifecycle stage of an event.[ClinicalImpression, Communication, NutritionIntake, Procedure]
061//   EvidenceVariableHandling: The handling of the variable in statistical analysis for exposures or outcomes (E.g. Dichotomous, Continuous, Descriptive).[Evidence, EvidenceVariable]
062//   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]
063//   FHIRVersion: All published FHIR Versions.[CapabilityStatement, CapabilityStatement2, ImplementationGuide, StructureDefinition]
064//   FilterOperator: The kind of operation to perform as a part of a property based filter.[CodeSystem, ValueSet]
065//   FinancialResourceStatusCodes: This value set includes Status codes.[Claim, ClaimResponse, Coverage, CoverageEligibilityRequest, CoverageEligibilityResponse, EnrollmentRequest, EnrollmentResponse, PaymentNotice, PaymentReconciliation, VisionPrescription]
066//   InvoicePriceComponentType: Codes indicating the kind of the price component.[ChargeItemDefinition, Invoice]
067//   ListMode: The processing mode that applies to this list.[Composition, EvidenceReport, List]
068//   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]
069//   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]
070//   NoteType: The presentation types of notes.[ClaimResponse, ExplanationOfBenefit, PaymentReconciliation]
071//   ObservationStatus: Codes providing the status of an observation.[DetectedIssue, Observation, RiskAssessment]
072//   OperationParameterUse: Whether an operation parameter is an input or an output parameter.[OperationDefinition, ParameterDefinition]
073//   ParticipationStatus: The Participation status of an appointment.[Appointment, AppointmentResponse]
074//   PublicationStatus: The lifecycle status of an artifact.[ActivityDefinition, AdministrableProductDefinition, CanonicalResource, CapabilityStatement, CapabilityStatement2, ChargeItemDefinition, Citation, CodeSystem, CompartmentDefinition, ConceptMap, 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]
075//   QuantityComparator: How the Quantity should be understood and represented.[Age, Count, Distance, Duration, Quantity]
076//   RequestIntent: Codes indicating the degree of authority/intentionality associated with a request.[ActivityDefinition, CommunicationRequest, DeviceRequest, NutritionOrder, RequestGroup, ServiceRequest]
077//   RequestPriority: Identifies the level of importance to be assigned to actioning the request.[ActivityDefinition, Communication, CommunicationRequest, DeviceRequest, MedicationRequest, PlanDefinition, RequestGroup, ServiceRequest, SupplyRequest, Task, Transport]
078//   RequestStatus: Codes identifying the lifecycle stage of a request.[CarePlan, CommunicationRequest, DeviceRequest, NutritionOrder, RequestGroup, ServiceRequest]
079//   ResourceTypeEnum: One of the resource types defined as part of this version of FHIR.[CapabilityStatement, CapabilityStatement2, CompartmentDefinition, ExampleScenario, GraphDefinition, ImplementationGuide, MessageDefinition, OperationDefinition, Questionnaire, SearchParameter]
080//   RestfulCapabilityMode: The mode of a RESTful capability statement.[CapabilityStatement, CapabilityStatement2]
081//   SearchParamType: Data types allowed to be used for search parameters.[CapabilityStatement, CapabilityStatement2, OperationDefinition, SearchParameter]
082//   SubscriptionSearchModifier: FHIR search modifiers allowed for use in Subscriptions and SubscriptionTopics.[Subscription, SubscriptionTopic]
083//   SubscriptionStatusCodes: State values for FHIR Subscriptions.[Subscription, SubscriptionStatus]
084//   Use: The purpose of the Claim: predetermination, preauthorization, claim.[Claim, ClaimResponse, ExplanationOfBenefit]
085
086
087    public enum ActionCardinalityBehavior {
088        /**
089         * The action may only be selected one time.
090         */
091        SINGLE, 
092        /**
093         * The action may be selected multiple times.
094         */
095        MULTIPLE, 
096        /**
097         * added to help the parsers
098         */
099        NULL;
100        public static ActionCardinalityBehavior fromCode(String codeString) throws FHIRException {
101            if (codeString == null || "".equals(codeString))
102                return null;
103        if ("single".equals(codeString))
104          return SINGLE;
105        if ("multiple".equals(codeString))
106          return MULTIPLE;
107        throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
108        }
109        public String toCode() {
110          switch (this) {
111            case SINGLE: return "single";
112            case MULTIPLE: return "multiple";
113            case NULL: return null;
114            default: return "?";
115          }
116        }
117        public String getSystem() {
118          switch (this) {
119            case SINGLE: return "http://hl7.org/fhir/action-cardinality-behavior";
120            case MULTIPLE: return "http://hl7.org/fhir/action-cardinality-behavior";
121            case NULL: return null;
122            default: return "?";
123          }
124        }
125        public String getDefinition() {
126          switch (this) {
127            case SINGLE: return "The action may only be selected one time.";
128            case MULTIPLE: return "The action may be selected multiple times.";
129            case NULL: return null;
130            default: return "?";
131          }
132        }
133        public String getDisplay() {
134          switch (this) {
135            case SINGLE: return "Single";
136            case MULTIPLE: return "Multiple";
137            case NULL: return null;
138            default: return "?";
139          }
140        }
141    }
142
143  public static class ActionCardinalityBehaviorEnumFactory implements EnumFactory<ActionCardinalityBehavior> {
144    public ActionCardinalityBehavior fromCode(String codeString) throws IllegalArgumentException {
145      if (codeString == null || "".equals(codeString))
146            if (codeString == null || "".equals(codeString))
147                return null;
148        if ("single".equals(codeString))
149          return ActionCardinalityBehavior.SINGLE;
150        if ("multiple".equals(codeString))
151          return ActionCardinalityBehavior.MULTIPLE;
152        throw new IllegalArgumentException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
153        }
154        public Enumeration<ActionCardinalityBehavior> fromType(Base code) throws FHIRException {
155          if (code == null)
156            return null;
157          if (code.isEmpty())
158            return new Enumeration<ActionCardinalityBehavior>(this);
159          String codeString = ((PrimitiveType) code).asStringValue();
160          if (codeString == null || "".equals(codeString))
161            return null;
162        if ("single".equals(codeString))
163          return new Enumeration<ActionCardinalityBehavior>(this, ActionCardinalityBehavior.SINGLE);
164        if ("multiple".equals(codeString))
165          return new Enumeration<ActionCardinalityBehavior>(this, ActionCardinalityBehavior.MULTIPLE);
166        throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
167        }
168    public String toCode(ActionCardinalityBehavior code) {
169      if (code == ActionCardinalityBehavior.SINGLE)
170        return "single";
171      if (code == ActionCardinalityBehavior.MULTIPLE)
172        return "multiple";
173      return "?";
174      }
175    public String toSystem(ActionCardinalityBehavior code) {
176      return code.getSystem();
177      }
178    }
179
180    public enum ActionConditionKind {
181        /**
182         * The condition describes whether or not a given action is applicable.
183         */
184        APPLICABILITY, 
185        /**
186         * The condition is a starting condition for the action.
187         */
188        START, 
189        /**
190         * The condition is a stop, or exit condition for the action.
191         */
192        STOP, 
193        /**
194         * added to help the parsers
195         */
196        NULL;
197        public static ActionConditionKind fromCode(String codeString) throws FHIRException {
198            if (codeString == null || "".equals(codeString))
199                return null;
200        if ("applicability".equals(codeString))
201          return APPLICABILITY;
202        if ("start".equals(codeString))
203          return START;
204        if ("stop".equals(codeString))
205          return STOP;
206        throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'");
207        }
208        public String toCode() {
209          switch (this) {
210            case APPLICABILITY: return "applicability";
211            case START: return "start";
212            case STOP: return "stop";
213            case NULL: return null;
214            default: return "?";
215          }
216        }
217        public String getSystem() {
218          switch (this) {
219            case APPLICABILITY: return "http://hl7.org/fhir/action-condition-kind";
220            case START: return "http://hl7.org/fhir/action-condition-kind";
221            case STOP: return "http://hl7.org/fhir/action-condition-kind";
222            case NULL: return null;
223            default: return "?";
224          }
225        }
226        public String getDefinition() {
227          switch (this) {
228            case APPLICABILITY: return "The condition describes whether or not a given action is applicable.";
229            case START: return "The condition is a starting condition for the action.";
230            case STOP: return "The condition is a stop, or exit condition for the action.";
231            case NULL: return null;
232            default: return "?";
233          }
234        }
235        public String getDisplay() {
236          switch (this) {
237            case APPLICABILITY: return "Applicability";
238            case START: return "Start";
239            case STOP: return "Stop";
240            case NULL: return null;
241            default: return "?";
242          }
243        }
244    }
245
246  public static class ActionConditionKindEnumFactory implements EnumFactory<ActionConditionKind> {
247    public ActionConditionKind fromCode(String codeString) throws IllegalArgumentException {
248      if (codeString == null || "".equals(codeString))
249            if (codeString == null || "".equals(codeString))
250                return null;
251        if ("applicability".equals(codeString))
252          return ActionConditionKind.APPLICABILITY;
253        if ("start".equals(codeString))
254          return ActionConditionKind.START;
255        if ("stop".equals(codeString))
256          return ActionConditionKind.STOP;
257        throw new IllegalArgumentException("Unknown ActionConditionKind code '"+codeString+"'");
258        }
259        public Enumeration<ActionConditionKind> fromType(Base code) throws FHIRException {
260          if (code == null)
261            return null;
262          if (code.isEmpty())
263            return new Enumeration<ActionConditionKind>(this);
264          String codeString = ((PrimitiveType) code).asStringValue();
265          if (codeString == null || "".equals(codeString))
266            return null;
267        if ("applicability".equals(codeString))
268          return new Enumeration<ActionConditionKind>(this, ActionConditionKind.APPLICABILITY);
269        if ("start".equals(codeString))
270          return new Enumeration<ActionConditionKind>(this, ActionConditionKind.START);
271        if ("stop".equals(codeString))
272          return new Enumeration<ActionConditionKind>(this, ActionConditionKind.STOP);
273        throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'");
274        }
275    public String toCode(ActionConditionKind code) {
276      if (code == ActionConditionKind.APPLICABILITY)
277        return "applicability";
278      if (code == ActionConditionKind.START)
279        return "start";
280      if (code == ActionConditionKind.STOP)
281        return "stop";
282      return "?";
283      }
284    public String toSystem(ActionConditionKind code) {
285      return code.getSystem();
286      }
287    }
288
289    public enum ActionGroupingBehavior {
290        /**
291         * Any group marked with this behavior should be displayed as a visual group to the end user.
292         */
293        VISUALGROUP, 
294        /**
295         * 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.
296         */
297        LOGICALGROUP, 
298        /**
299         * 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".
300         */
301        SENTENCEGROUP, 
302        /**
303         * added to help the parsers
304         */
305        NULL;
306        public static ActionGroupingBehavior fromCode(String codeString) throws FHIRException {
307            if (codeString == null || "".equals(codeString))
308                return null;
309        if ("visual-group".equals(codeString))
310          return VISUALGROUP;
311        if ("logical-group".equals(codeString))
312          return LOGICALGROUP;
313        if ("sentence-group".equals(codeString))
314          return SENTENCEGROUP;
315        throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'");
316        }
317        public String toCode() {
318          switch (this) {
319            case VISUALGROUP: return "visual-group";
320            case LOGICALGROUP: return "logical-group";
321            case SENTENCEGROUP: return "sentence-group";
322            case NULL: return null;
323            default: return "?";
324          }
325        }
326        public String getSystem() {
327          switch (this) {
328            case VISUALGROUP: return "http://hl7.org/fhir/action-grouping-behavior";
329            case LOGICALGROUP: return "http://hl7.org/fhir/action-grouping-behavior";
330            case SENTENCEGROUP: return "http://hl7.org/fhir/action-grouping-behavior";
331            case NULL: return null;
332            default: return "?";
333          }
334        }
335        public String getDefinition() {
336          switch (this) {
337            case VISUALGROUP: return "Any group marked with this behavior should be displayed as a visual group to the end user.";
338            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.";
339            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\".";
340            case NULL: return null;
341            default: return "?";
342          }
343        }
344        public String getDisplay() {
345          switch (this) {
346            case VISUALGROUP: return "Visual Group";
347            case LOGICALGROUP: return "Logical Group";
348            case SENTENCEGROUP: return "Sentence Group";
349            case NULL: return null;
350            default: return "?";
351          }
352        }
353    }
354
355  public static class ActionGroupingBehaviorEnumFactory implements EnumFactory<ActionGroupingBehavior> {
356    public ActionGroupingBehavior fromCode(String codeString) throws IllegalArgumentException {
357      if (codeString == null || "".equals(codeString))
358            if (codeString == null || "".equals(codeString))
359                return null;
360        if ("visual-group".equals(codeString))
361          return ActionGroupingBehavior.VISUALGROUP;
362        if ("logical-group".equals(codeString))
363          return ActionGroupingBehavior.LOGICALGROUP;
364        if ("sentence-group".equals(codeString))
365          return ActionGroupingBehavior.SENTENCEGROUP;
366        throw new IllegalArgumentException("Unknown ActionGroupingBehavior code '"+codeString+"'");
367        }
368        public Enumeration<ActionGroupingBehavior> fromType(Base code) throws FHIRException {
369          if (code == null)
370            return null;
371          if (code.isEmpty())
372            return new Enumeration<ActionGroupingBehavior>(this);
373          String codeString = ((PrimitiveType) code).asStringValue();
374          if (codeString == null || "".equals(codeString))
375            return null;
376        if ("visual-group".equals(codeString))
377          return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.VISUALGROUP);
378        if ("logical-group".equals(codeString))
379          return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.LOGICALGROUP);
380        if ("sentence-group".equals(codeString))
381          return new Enumeration<ActionGroupingBehavior>(this, ActionGroupingBehavior.SENTENCEGROUP);
382        throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'");
383        }
384    public String toCode(ActionGroupingBehavior code) {
385      if (code == ActionGroupingBehavior.VISUALGROUP)
386        return "visual-group";
387      if (code == ActionGroupingBehavior.LOGICALGROUP)
388        return "logical-group";
389      if (code == ActionGroupingBehavior.SENTENCEGROUP)
390        return "sentence-group";
391      return "?";
392      }
393    public String toSystem(ActionGroupingBehavior code) {
394      return code.getSystem();
395      }
396    }
397
398    public enum ActionParticipantType {
399        /**
400         * The participant is a care team caring for the patient under evaluation.
401         */
402        CARETEAM, 
403        /**
404         * The participant is a system or device used in the care of the patient.
405         */
406        DEVICE, 
407        /**
408         * The participant is a group of participants involved in the care of the patient.
409         */
410        GROUP, 
411        /**
412         * The participant is an institution that can provide the given healthcare service used in the care of the patient.
413         */
414        HEALTHCARESERVICE, 
415        /**
416         * The participant is a location involved in the care of the patient.
417         */
418        LOCATION, 
419        /**
420         * The participant is an organization involved in the care of the patient.
421         */
422        ORGANIZATION, 
423        /**
424         * The participant is the patient under evaluation.
425         */
426        PATIENT, 
427        /**
428         * The participant is a practitioner involved in the patient's care.
429         */
430        PRACTITIONER, 
431        /**
432         * The participant is a particular practitioner role involved in the patient's care.
433         */
434        PRACTITIONERROLE, 
435        /**
436         * The participant is a person related to the patient.
437         */
438        RELATEDPERSON, 
439        /**
440         * added to help the parsers
441         */
442        NULL;
443        public static ActionParticipantType fromCode(String codeString) throws FHIRException {
444            if (codeString == null || "".equals(codeString))
445                return null;
446        if ("careteam".equals(codeString))
447          return CARETEAM;
448        if ("device".equals(codeString))
449          return DEVICE;
450        if ("group".equals(codeString))
451          return GROUP;
452        if ("healthcareservice".equals(codeString))
453          return HEALTHCARESERVICE;
454        if ("location".equals(codeString))
455          return LOCATION;
456        if ("organization".equals(codeString))
457          return ORGANIZATION;
458        if ("patient".equals(codeString))
459          return PATIENT;
460        if ("practitioner".equals(codeString))
461          return PRACTITIONER;
462        if ("practitionerrole".equals(codeString))
463          return PRACTITIONERROLE;
464        if ("relatedperson".equals(codeString))
465          return RELATEDPERSON;
466        throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'");
467        }
468        public String toCode() {
469          switch (this) {
470            case CARETEAM: return "careteam";
471            case DEVICE: return "device";
472            case GROUP: return "group";
473            case HEALTHCARESERVICE: return "healthcareservice";
474            case LOCATION: return "location";
475            case ORGANIZATION: return "organization";
476            case PATIENT: return "patient";
477            case PRACTITIONER: return "practitioner";
478            case PRACTITIONERROLE: return "practitionerrole";
479            case RELATEDPERSON: return "relatedperson";
480            case NULL: return null;
481            default: return "?";
482          }
483        }
484        public String getSystem() {
485          switch (this) {
486            case CARETEAM: return "http://hl7.org/fhir/action-participant-type";
487            case DEVICE: return "http://hl7.org/fhir/action-participant-type";
488            case GROUP: return "http://hl7.org/fhir/action-participant-type";
489            case HEALTHCARESERVICE: return "http://hl7.org/fhir/action-participant-type";
490            case LOCATION: return "http://hl7.org/fhir/action-participant-type";
491            case ORGANIZATION: return "http://hl7.org/fhir/action-participant-type";
492            case PATIENT: return "http://hl7.org/fhir/action-participant-type";
493            case PRACTITIONER: return "http://hl7.org/fhir/action-participant-type";
494            case PRACTITIONERROLE: return "http://hl7.org/fhir/action-participant-type";
495            case RELATEDPERSON: return "http://hl7.org/fhir/action-participant-type";
496            case NULL: return null;
497            default: return "?";
498          }
499        }
500        public String getDefinition() {
501          switch (this) {
502            case CARETEAM: return "The participant is a care team caring for the patient under evaluation.";
503            case DEVICE: return "The participant is a system or device used in the care of the patient.";
504            case GROUP: return "The participant is a group of participants involved in the care of the patient.";
505            case HEALTHCARESERVICE: return "The participant is an institution that can provide the given healthcare service used in the care of the patient.";
506            case LOCATION: return "The participant is a location involved in the care of the patient.";
507            case ORGANIZATION: return "The participant is an organization involved in the care of the patient.";
508            case PATIENT: return "The participant is the patient under evaluation.";
509            case PRACTITIONER: return "The participant is a practitioner involved in the patient's care.";
510            case PRACTITIONERROLE: return "The participant is a particular practitioner role involved in the patient's care.";
511            case RELATEDPERSON: return "The participant is a person related to the patient.";
512            case NULL: return null;
513            default: return "?";
514          }
515        }
516        public String getDisplay() {
517          switch (this) {
518            case CARETEAM: return "CareTeam";
519            case DEVICE: return "Device";
520            case GROUP: return "Group";
521            case HEALTHCARESERVICE: return "HealthcareService";
522            case LOCATION: return "Location";
523            case ORGANIZATION: return "Organization";
524            case PATIENT: return "Patient";
525            case PRACTITIONER: return "Practitioner";
526            case PRACTITIONERROLE: return "PractitionerRole";
527            case RELATEDPERSON: return "RelatedPerson";
528            case NULL: return null;
529            default: return "?";
530          }
531        }
532    }
533
534  public static class ActionParticipantTypeEnumFactory implements EnumFactory<ActionParticipantType> {
535    public ActionParticipantType fromCode(String codeString) throws IllegalArgumentException {
536      if (codeString == null || "".equals(codeString))
537            if (codeString == null || "".equals(codeString))
538                return null;
539        if ("careteam".equals(codeString))
540          return ActionParticipantType.CARETEAM;
541        if ("device".equals(codeString))
542          return ActionParticipantType.DEVICE;
543        if ("group".equals(codeString))
544          return ActionParticipantType.GROUP;
545        if ("healthcareservice".equals(codeString))
546          return ActionParticipantType.HEALTHCARESERVICE;
547        if ("location".equals(codeString))
548          return ActionParticipantType.LOCATION;
549        if ("organization".equals(codeString))
550          return ActionParticipantType.ORGANIZATION;
551        if ("patient".equals(codeString))
552          return ActionParticipantType.PATIENT;
553        if ("practitioner".equals(codeString))
554          return ActionParticipantType.PRACTITIONER;
555        if ("practitionerrole".equals(codeString))
556          return ActionParticipantType.PRACTITIONERROLE;
557        if ("relatedperson".equals(codeString))
558          return ActionParticipantType.RELATEDPERSON;
559        throw new IllegalArgumentException("Unknown ActionParticipantType code '"+codeString+"'");
560        }
561        public Enumeration<ActionParticipantType> fromType(Base code) throws FHIRException {
562          if (code == null)
563            return null;
564          if (code.isEmpty())
565            return new Enumeration<ActionParticipantType>(this);
566          String codeString = ((PrimitiveType) code).asStringValue();
567          if (codeString == null || "".equals(codeString))
568            return null;
569        if ("careteam".equals(codeString))
570          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.CARETEAM);
571        if ("device".equals(codeString))
572          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.DEVICE);
573        if ("group".equals(codeString))
574          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.GROUP);
575        if ("healthcareservice".equals(codeString))
576          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.HEALTHCARESERVICE);
577        if ("location".equals(codeString))
578          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.LOCATION);
579        if ("organization".equals(codeString))
580          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.ORGANIZATION);
581        if ("patient".equals(codeString))
582          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.PATIENT);
583        if ("practitioner".equals(codeString))
584          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.PRACTITIONER);
585        if ("practitionerrole".equals(codeString))
586          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.PRACTITIONERROLE);
587        if ("relatedperson".equals(codeString))
588          return new Enumeration<ActionParticipantType>(this, ActionParticipantType.RELATEDPERSON);
589        throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'");
590        }
591    public String toCode(ActionParticipantType code) {
592      if (code == ActionParticipantType.CARETEAM)
593        return "careteam";
594      if (code == ActionParticipantType.DEVICE)
595        return "device";
596      if (code == ActionParticipantType.GROUP)
597        return "group";
598      if (code == ActionParticipantType.HEALTHCARESERVICE)
599        return "healthcareservice";
600      if (code == ActionParticipantType.LOCATION)
601        return "location";
602      if (code == ActionParticipantType.ORGANIZATION)
603        return "organization";
604      if (code == ActionParticipantType.PATIENT)
605        return "patient";
606      if (code == ActionParticipantType.PRACTITIONER)
607        return "practitioner";
608      if (code == ActionParticipantType.PRACTITIONERROLE)
609        return "practitionerrole";
610      if (code == ActionParticipantType.RELATEDPERSON)
611        return "relatedperson";
612      return "?";
613      }
614    public String toSystem(ActionParticipantType code) {
615      return code.getSystem();
616      }
617    }
618
619    public enum ActionPrecheckBehavior {
620        /**
621         * 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.
622         */
623        YES, 
624        /**
625         * 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.
626         */
627        NO, 
628        /**
629         * added to help the parsers
630         */
631        NULL;
632        public static ActionPrecheckBehavior fromCode(String codeString) throws FHIRException {
633            if (codeString == null || "".equals(codeString))
634                return null;
635        if ("yes".equals(codeString))
636          return YES;
637        if ("no".equals(codeString))
638          return NO;
639        throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
640        }
641        public String toCode() {
642          switch (this) {
643            case YES: return "yes";
644            case NO: return "no";
645            case NULL: return null;
646            default: return "?";
647          }
648        }
649        public String getSystem() {
650          switch (this) {
651            case YES: return "http://hl7.org/fhir/action-precheck-behavior";
652            case NO: return "http://hl7.org/fhir/action-precheck-behavior";
653            case NULL: return null;
654            default: return "?";
655          }
656        }
657        public String getDefinition() {
658          switch (this) {
659            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.";
660            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.";
661            case NULL: return null;
662            default: return "?";
663          }
664        }
665        public String getDisplay() {
666          switch (this) {
667            case YES: return "Yes";
668            case NO: return "No";
669            case NULL: return null;
670            default: return "?";
671          }
672        }
673    }
674
675  public static class ActionPrecheckBehaviorEnumFactory implements EnumFactory<ActionPrecheckBehavior> {
676    public ActionPrecheckBehavior fromCode(String codeString) throws IllegalArgumentException {
677      if (codeString == null || "".equals(codeString))
678            if (codeString == null || "".equals(codeString))
679                return null;
680        if ("yes".equals(codeString))
681          return ActionPrecheckBehavior.YES;
682        if ("no".equals(codeString))
683          return ActionPrecheckBehavior.NO;
684        throw new IllegalArgumentException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
685        }
686        public Enumeration<ActionPrecheckBehavior> fromType(Base code) throws FHIRException {
687          if (code == null)
688            return null;
689          if (code.isEmpty())
690            return new Enumeration<ActionPrecheckBehavior>(this);
691          String codeString = ((PrimitiveType) code).asStringValue();
692          if (codeString == null || "".equals(codeString))
693            return null;
694        if ("yes".equals(codeString))
695          return new Enumeration<ActionPrecheckBehavior>(this, ActionPrecheckBehavior.YES);
696        if ("no".equals(codeString))
697          return new Enumeration<ActionPrecheckBehavior>(this, ActionPrecheckBehavior.NO);
698        throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
699        }
700    public String toCode(ActionPrecheckBehavior code) {
701      if (code == ActionPrecheckBehavior.YES)
702        return "yes";
703      if (code == ActionPrecheckBehavior.NO)
704        return "no";
705      return "?";
706      }
707    public String toSystem(ActionPrecheckBehavior code) {
708      return code.getSystem();
709      }
710    }
711
712    public enum ActionRelationshipType {
713        /**
714         * The action must be performed before the start of the related action.
715         */
716        BEFORESTART, 
717        /**
718         * The action must be performed before the related action.
719         */
720        BEFORE, 
721        /**
722         * The action must be performed before the end of the related action.
723         */
724        BEFOREEND, 
725        /**
726         * The action must be performed concurrent with the start of the related action.
727         */
728        CONCURRENTWITHSTART, 
729        /**
730         * The action must be performed concurrent with the related action.
731         */
732        CONCURRENT, 
733        /**
734         * The action must be performed concurrent with the end of the related action.
735         */
736        CONCURRENTWITHEND, 
737        /**
738         * The action must be performed after the start of the related action.
739         */
740        AFTERSTART, 
741        /**
742         * The action must be performed after the related action.
743         */
744        AFTER, 
745        /**
746         * The action must be performed after the end of the related action.
747         */
748        AFTEREND, 
749        /**
750         * added to help the parsers
751         */
752        NULL;
753        public static ActionRelationshipType fromCode(String codeString) throws FHIRException {
754            if (codeString == null || "".equals(codeString))
755                return null;
756        if ("before-start".equals(codeString))
757          return BEFORESTART;
758        if ("before".equals(codeString))
759          return BEFORE;
760        if ("before-end".equals(codeString))
761          return BEFOREEND;
762        if ("concurrent-with-start".equals(codeString))
763          return CONCURRENTWITHSTART;
764        if ("concurrent".equals(codeString))
765          return CONCURRENT;
766        if ("concurrent-with-end".equals(codeString))
767          return CONCURRENTWITHEND;
768        if ("after-start".equals(codeString))
769          return AFTERSTART;
770        if ("after".equals(codeString))
771          return AFTER;
772        if ("after-end".equals(codeString))
773          return AFTEREND;
774        throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'");
775        }
776        public String toCode() {
777          switch (this) {
778            case BEFORESTART: return "before-start";
779            case BEFORE: return "before";
780            case BEFOREEND: return "before-end";
781            case CONCURRENTWITHSTART: return "concurrent-with-start";
782            case CONCURRENT: return "concurrent";
783            case CONCURRENTWITHEND: return "concurrent-with-end";
784            case AFTERSTART: return "after-start";
785            case AFTER: return "after";
786            case AFTEREND: return "after-end";
787            case NULL: return null;
788            default: return "?";
789          }
790        }
791        public String getSystem() {
792          switch (this) {
793            case BEFORESTART: return "http://hl7.org/fhir/action-relationship-type";
794            case BEFORE: return "http://hl7.org/fhir/action-relationship-type";
795            case BEFOREEND: return "http://hl7.org/fhir/action-relationship-type";
796            case CONCURRENTWITHSTART: return "http://hl7.org/fhir/action-relationship-type";
797            case CONCURRENT: return "http://hl7.org/fhir/action-relationship-type";
798            case CONCURRENTWITHEND: return "http://hl7.org/fhir/action-relationship-type";
799            case AFTERSTART: return "http://hl7.org/fhir/action-relationship-type";
800            case AFTER: return "http://hl7.org/fhir/action-relationship-type";
801            case AFTEREND: return "http://hl7.org/fhir/action-relationship-type";
802            case NULL: return null;
803            default: return "?";
804          }
805        }
806        public String getDefinition() {
807          switch (this) {
808            case BEFORESTART: return "The action must be performed before the start of the related action.";
809            case BEFORE: return "The action must be performed before the related action.";
810            case BEFOREEND: return "The action must be performed before the end of the related action.";
811            case CONCURRENTWITHSTART: return "The action must be performed concurrent with the start of the related action.";
812            case CONCURRENT: return "The action must be performed concurrent with the related action.";
813            case CONCURRENTWITHEND: return "The action must be performed concurrent with the end of the related action.";
814            case AFTERSTART: return "The action must be performed after the start of the related action.";
815            case AFTER: return "The action must be performed after the related action.";
816            case AFTEREND: return "The action must be performed after the end of the related action.";
817            case NULL: return null;
818            default: return "?";
819          }
820        }
821        public String getDisplay() {
822          switch (this) {
823            case BEFORESTART: return "Before Start";
824            case BEFORE: return "Before";
825            case BEFOREEND: return "Before End";
826            case CONCURRENTWITHSTART: return "Concurrent With Start";
827            case CONCURRENT: return "Concurrent";
828            case CONCURRENTWITHEND: return "Concurrent With End";
829            case AFTERSTART: return "After Start";
830            case AFTER: return "After";
831            case AFTEREND: return "After End";
832            case NULL: return null;
833            default: return "?";
834          }
835        }
836    }
837
838  public static class ActionRelationshipTypeEnumFactory implements EnumFactory<ActionRelationshipType> {
839    public ActionRelationshipType fromCode(String codeString) throws IllegalArgumentException {
840      if (codeString == null || "".equals(codeString))
841            if (codeString == null || "".equals(codeString))
842                return null;
843        if ("before-start".equals(codeString))
844          return ActionRelationshipType.BEFORESTART;
845        if ("before".equals(codeString))
846          return ActionRelationshipType.BEFORE;
847        if ("before-end".equals(codeString))
848          return ActionRelationshipType.BEFOREEND;
849        if ("concurrent-with-start".equals(codeString))
850          return ActionRelationshipType.CONCURRENTWITHSTART;
851        if ("concurrent".equals(codeString))
852          return ActionRelationshipType.CONCURRENT;
853        if ("concurrent-with-end".equals(codeString))
854          return ActionRelationshipType.CONCURRENTWITHEND;
855        if ("after-start".equals(codeString))
856          return ActionRelationshipType.AFTERSTART;
857        if ("after".equals(codeString))
858          return ActionRelationshipType.AFTER;
859        if ("after-end".equals(codeString))
860          return ActionRelationshipType.AFTEREND;
861        throw new IllegalArgumentException("Unknown ActionRelationshipType code '"+codeString+"'");
862        }
863        public Enumeration<ActionRelationshipType> fromType(Base code) throws FHIRException {
864          if (code == null)
865            return null;
866          if (code.isEmpty())
867            return new Enumeration<ActionRelationshipType>(this);
868          String codeString = ((PrimitiveType) code).asStringValue();
869          if (codeString == null || "".equals(codeString))
870            return null;
871        if ("before-start".equals(codeString))
872          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFORESTART);
873        if ("before".equals(codeString))
874          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFORE);
875        if ("before-end".equals(codeString))
876          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.BEFOREEND);
877        if ("concurrent-with-start".equals(codeString))
878          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENTWITHSTART);
879        if ("concurrent".equals(codeString))
880          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENT);
881        if ("concurrent-with-end".equals(codeString))
882          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.CONCURRENTWITHEND);
883        if ("after-start".equals(codeString))
884          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTERSTART);
885        if ("after".equals(codeString))
886          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTER);
887        if ("after-end".equals(codeString))
888          return new Enumeration<ActionRelationshipType>(this, ActionRelationshipType.AFTEREND);
889        throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'");
890        }
891    public String toCode(ActionRelationshipType code) {
892      if (code == ActionRelationshipType.BEFORESTART)
893        return "before-start";
894      if (code == ActionRelationshipType.BEFORE)
895        return "before";
896      if (code == ActionRelationshipType.BEFOREEND)
897        return "before-end";
898      if (code == ActionRelationshipType.CONCURRENTWITHSTART)
899        return "concurrent-with-start";
900      if (code == ActionRelationshipType.CONCURRENT)
901        return "concurrent";
902      if (code == ActionRelationshipType.CONCURRENTWITHEND)
903        return "concurrent-with-end";
904      if (code == ActionRelationshipType.AFTERSTART)
905        return "after-start";
906      if (code == ActionRelationshipType.AFTER)
907        return "after";
908      if (code == ActionRelationshipType.AFTEREND)
909        return "after-end";
910      return "?";
911      }
912    public String toSystem(ActionRelationshipType code) {
913      return code.getSystem();
914      }
915    }
916
917    public enum ActionRequiredBehavior {
918        /**
919         * 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.
920         */
921        MUST, 
922        /**
923         * An action with this behavior may be included in the set of actions processed by the end user.
924         */
925        COULD, 
926        /**
927         * 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.
928         */
929        MUSTUNLESSDOCUMENTED, 
930        /**
931         * added to help the parsers
932         */
933        NULL;
934        public static ActionRequiredBehavior fromCode(String codeString) throws FHIRException {
935            if (codeString == null || "".equals(codeString))
936                return null;
937        if ("must".equals(codeString))
938          return MUST;
939        if ("could".equals(codeString))
940          return COULD;
941        if ("must-unless-documented".equals(codeString))
942          return MUSTUNLESSDOCUMENTED;
943        throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'");
944        }
945        public String toCode() {
946          switch (this) {
947            case MUST: return "must";
948            case COULD: return "could";
949            case MUSTUNLESSDOCUMENTED: return "must-unless-documented";
950            case NULL: return null;
951            default: return "?";
952          }
953        }
954        public String getSystem() {
955          switch (this) {
956            case MUST: return "http://hl7.org/fhir/action-required-behavior";
957            case COULD: return "http://hl7.org/fhir/action-required-behavior";
958            case MUSTUNLESSDOCUMENTED: return "http://hl7.org/fhir/action-required-behavior";
959            case NULL: return null;
960            default: return "?";
961          }
962        }
963        public String getDefinition() {
964          switch (this) {
965            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.";
966            case COULD: return "An action with this behavior may be included in the set of actions processed by the end user.";
967            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.";
968            case NULL: return null;
969            default: return "?";
970          }
971        }
972        public String getDisplay() {
973          switch (this) {
974            case MUST: return "Must";
975            case COULD: return "Could";
976            case MUSTUNLESSDOCUMENTED: return "Must Unless Documented";
977            case NULL: return null;
978            default: return "?";
979          }
980        }
981    }
982
983  public static class ActionRequiredBehaviorEnumFactory implements EnumFactory<ActionRequiredBehavior> {
984    public ActionRequiredBehavior fromCode(String codeString) throws IllegalArgumentException {
985      if (codeString == null || "".equals(codeString))
986            if (codeString == null || "".equals(codeString))
987                return null;
988        if ("must".equals(codeString))
989          return ActionRequiredBehavior.MUST;
990        if ("could".equals(codeString))
991          return ActionRequiredBehavior.COULD;
992        if ("must-unless-documented".equals(codeString))
993          return ActionRequiredBehavior.MUSTUNLESSDOCUMENTED;
994        throw new IllegalArgumentException("Unknown ActionRequiredBehavior code '"+codeString+"'");
995        }
996        public Enumeration<ActionRequiredBehavior> fromType(Base code) throws FHIRException {
997          if (code == null)
998            return null;
999          if (code.isEmpty())
1000            return new Enumeration<ActionRequiredBehavior>(this);
1001          String codeString = ((PrimitiveType) code).asStringValue();
1002          if (codeString == null || "".equals(codeString))
1003            return null;
1004        if ("must".equals(codeString))
1005          return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.MUST);
1006        if ("could".equals(codeString))
1007          return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.COULD);
1008        if ("must-unless-documented".equals(codeString))
1009          return new Enumeration<ActionRequiredBehavior>(this, ActionRequiredBehavior.MUSTUNLESSDOCUMENTED);
1010        throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'");
1011        }
1012    public String toCode(ActionRequiredBehavior code) {
1013      if (code == ActionRequiredBehavior.MUST)
1014        return "must";
1015      if (code == ActionRequiredBehavior.COULD)
1016        return "could";
1017      if (code == ActionRequiredBehavior.MUSTUNLESSDOCUMENTED)
1018        return "must-unless-documented";
1019      return "?";
1020      }
1021    public String toSystem(ActionRequiredBehavior code) {
1022      return code.getSystem();
1023      }
1024    }
1025
1026    public enum ActionSelectionBehavior {
1027        /**
1028         * Any number of the actions in the group may be chosen, from zero to all.
1029         */
1030        ANY, 
1031        /**
1032         * All the actions in the group must be selected as a single unit.
1033         */
1034        ALL, 
1035        /**
1036         * 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.
1037         */
1038        ALLORNONE, 
1039        /**
1040         * 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.
1041         */
1042        EXACTLYONE, 
1043        /**
1044         * The end user may choose zero or at most one of the actions in the group.
1045         */
1046        ATMOSTONE, 
1047        /**
1048         * The end user must choose a minimum of one, and as many additional as desired.
1049         */
1050        ONEORMORE, 
1051        /**
1052         * added to help the parsers
1053         */
1054        NULL;
1055        public static ActionSelectionBehavior fromCode(String codeString) throws FHIRException {
1056            if (codeString == null || "".equals(codeString))
1057                return null;
1058        if ("any".equals(codeString))
1059          return ANY;
1060        if ("all".equals(codeString))
1061          return ALL;
1062        if ("all-or-none".equals(codeString))
1063          return ALLORNONE;
1064        if ("exactly-one".equals(codeString))
1065          return EXACTLYONE;
1066        if ("at-most-one".equals(codeString))
1067          return ATMOSTONE;
1068        if ("one-or-more".equals(codeString))
1069          return ONEORMORE;
1070        throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'");
1071        }
1072        public String toCode() {
1073          switch (this) {
1074            case ANY: return "any";
1075            case ALL: return "all";
1076            case ALLORNONE: return "all-or-none";
1077            case EXACTLYONE: return "exactly-one";
1078            case ATMOSTONE: return "at-most-one";
1079            case ONEORMORE: return "one-or-more";
1080            case NULL: return null;
1081            default: return "?";
1082          }
1083        }
1084        public String getSystem() {
1085          switch (this) {
1086            case ANY: return "http://hl7.org/fhir/action-selection-behavior";
1087            case ALL: return "http://hl7.org/fhir/action-selection-behavior";
1088            case ALLORNONE: return "http://hl7.org/fhir/action-selection-behavior";
1089            case EXACTLYONE: return "http://hl7.org/fhir/action-selection-behavior";
1090            case ATMOSTONE: return "http://hl7.org/fhir/action-selection-behavior";
1091            case ONEORMORE: return "http://hl7.org/fhir/action-selection-behavior";
1092            case NULL: return null;
1093            default: return "?";
1094          }
1095        }
1096        public String getDefinition() {
1097          switch (this) {
1098            case ANY: return "Any number of the actions in the group may be chosen, from zero to all.";
1099            case ALL: return "All the actions in the group must be selected as a single unit.";
1100            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.";
1101            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.";
1102            case ATMOSTONE: return "The end user may choose zero or at most one of the actions in the group.";
1103            case ONEORMORE: return "The end user must choose a minimum of one, and as many additional as desired.";
1104            case NULL: return null;
1105            default: return "?";
1106          }
1107        }
1108        public String getDisplay() {
1109          switch (this) {
1110            case ANY: return "Any";
1111            case ALL: return "All";
1112            case ALLORNONE: return "All Or None";
1113            case EXACTLYONE: return "Exactly One";
1114            case ATMOSTONE: return "At Most One";
1115            case ONEORMORE: return "One Or More";
1116            case NULL: return null;
1117            default: return "?";
1118          }
1119        }
1120    }
1121
1122  public static class ActionSelectionBehaviorEnumFactory implements EnumFactory<ActionSelectionBehavior> {
1123    public ActionSelectionBehavior fromCode(String codeString) throws IllegalArgumentException {
1124      if (codeString == null || "".equals(codeString))
1125            if (codeString == null || "".equals(codeString))
1126                return null;
1127        if ("any".equals(codeString))
1128          return ActionSelectionBehavior.ANY;
1129        if ("all".equals(codeString))
1130          return ActionSelectionBehavior.ALL;
1131        if ("all-or-none".equals(codeString))
1132          return ActionSelectionBehavior.ALLORNONE;
1133        if ("exactly-one".equals(codeString))
1134          return ActionSelectionBehavior.EXACTLYONE;
1135        if ("at-most-one".equals(codeString))
1136          return ActionSelectionBehavior.ATMOSTONE;
1137        if ("one-or-more".equals(codeString))
1138          return ActionSelectionBehavior.ONEORMORE;
1139        throw new IllegalArgumentException("Unknown ActionSelectionBehavior code '"+codeString+"'");
1140        }
1141        public Enumeration<ActionSelectionBehavior> fromType(Base code) throws FHIRException {
1142          if (code == null)
1143            return null;
1144          if (code.isEmpty())
1145            return new Enumeration<ActionSelectionBehavior>(this);
1146          String codeString = ((PrimitiveType) code).asStringValue();
1147          if (codeString == null || "".equals(codeString))
1148            return null;
1149        if ("any".equals(codeString))
1150          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ANY);
1151        if ("all".equals(codeString))
1152          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ALL);
1153        if ("all-or-none".equals(codeString))
1154          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ALLORNONE);
1155        if ("exactly-one".equals(codeString))
1156          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.EXACTLYONE);
1157        if ("at-most-one".equals(codeString))
1158          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ATMOSTONE);
1159        if ("one-or-more".equals(codeString))
1160          return new Enumeration<ActionSelectionBehavior>(this, ActionSelectionBehavior.ONEORMORE);
1161        throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'");
1162        }
1163    public String toCode(ActionSelectionBehavior code) {
1164      if (code == ActionSelectionBehavior.ANY)
1165        return "any";
1166      if (code == ActionSelectionBehavior.ALL)
1167        return "all";
1168      if (code == ActionSelectionBehavior.ALLORNONE)
1169        return "all-or-none";
1170      if (code == ActionSelectionBehavior.EXACTLYONE)
1171        return "exactly-one";
1172      if (code == ActionSelectionBehavior.ATMOSTONE)
1173        return "at-most-one";
1174      if (code == ActionSelectionBehavior.ONEORMORE)
1175        return "one-or-more";
1176      return "?";
1177      }
1178    public String toSystem(ActionSelectionBehavior code) {
1179      return code.getSystem();
1180      }
1181    }
1182
1183    public enum AdministrativeGender {
1184        /**
1185         * Male.
1186         */
1187        MALE, 
1188        /**
1189         * Female.
1190         */
1191        FEMALE, 
1192        /**
1193         * Other.
1194         */
1195        OTHER, 
1196        /**
1197         * Unknown.
1198         */
1199        UNKNOWN, 
1200        /**
1201         * added to help the parsers
1202         */
1203        NULL;
1204        public static AdministrativeGender fromCode(String codeString) throws FHIRException {
1205            if (codeString == null || "".equals(codeString))
1206                return null;
1207        if ("male".equals(codeString))
1208          return MALE;
1209        if ("female".equals(codeString))
1210          return FEMALE;
1211        if ("other".equals(codeString))
1212          return OTHER;
1213        if ("unknown".equals(codeString))
1214          return UNKNOWN;
1215        throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'");
1216        }
1217        public String toCode() {
1218          switch (this) {
1219            case MALE: return "male";
1220            case FEMALE: return "female";
1221            case OTHER: return "other";
1222            case UNKNOWN: return "unknown";
1223            case NULL: return null;
1224            default: return "?";
1225          }
1226        }
1227        public String getSystem() {
1228          switch (this) {
1229            case MALE: return "http://hl7.org/fhir/administrative-gender";
1230            case FEMALE: return "http://hl7.org/fhir/administrative-gender";
1231            case OTHER: return "http://hl7.org/fhir/administrative-gender";
1232            case UNKNOWN: return "http://hl7.org/fhir/administrative-gender";
1233            case NULL: return null;
1234            default: return "?";
1235          }
1236        }
1237        public String getDefinition() {
1238          switch (this) {
1239            case MALE: return "Male.";
1240            case FEMALE: return "Female.";
1241            case OTHER: return "Other.";
1242            case UNKNOWN: return "Unknown.";
1243            case NULL: return null;
1244            default: return "?";
1245          }
1246        }
1247        public String getDisplay() {
1248          switch (this) {
1249            case MALE: return "Male";
1250            case FEMALE: return "Female";
1251            case OTHER: return "Other";
1252            case UNKNOWN: return "Unknown";
1253            case NULL: return null;
1254            default: return "?";
1255          }
1256        }
1257    }
1258
1259  public static class AdministrativeGenderEnumFactory implements EnumFactory<AdministrativeGender> {
1260    public AdministrativeGender fromCode(String codeString) throws IllegalArgumentException {
1261      if (codeString == null || "".equals(codeString))
1262            if (codeString == null || "".equals(codeString))
1263                return null;
1264        if ("male".equals(codeString))
1265          return AdministrativeGender.MALE;
1266        if ("female".equals(codeString))
1267          return AdministrativeGender.FEMALE;
1268        if ("other".equals(codeString))
1269          return AdministrativeGender.OTHER;
1270        if ("unknown".equals(codeString))
1271          return AdministrativeGender.UNKNOWN;
1272        throw new IllegalArgumentException("Unknown AdministrativeGender code '"+codeString+"'");
1273        }
1274        public Enumeration<AdministrativeGender> fromType(Base code) throws FHIRException {
1275          if (code == null)
1276            return null;
1277          if (code.isEmpty())
1278            return new Enumeration<AdministrativeGender>(this);
1279          String codeString = ((PrimitiveType) code).asStringValue();
1280          if (codeString == null || "".equals(codeString))
1281            return null;
1282        if ("male".equals(codeString))
1283          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.MALE);
1284        if ("female".equals(codeString))
1285          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.FEMALE);
1286        if ("other".equals(codeString))
1287          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.OTHER);
1288        if ("unknown".equals(codeString))
1289          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.UNKNOWN);
1290        throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'");
1291        }
1292    public String toCode(AdministrativeGender code) {
1293      if (code == AdministrativeGender.MALE)
1294        return "male";
1295      if (code == AdministrativeGender.FEMALE)
1296        return "female";
1297      if (code == AdministrativeGender.OTHER)
1298        return "other";
1299      if (code == AdministrativeGender.UNKNOWN)
1300        return "unknown";
1301      return "?";
1302      }
1303    public String toSystem(AdministrativeGender code) {
1304      return code.getSystem();
1305      }
1306    }
1307
1308    public enum BindingStrength {
1309        /**
1310         * To be conformant, the concept in this element SHALL be from the specified value set.
1311         */
1312        REQUIRED, 
1313        /**
1314         * 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.
1315         */
1316        EXTENSIBLE, 
1317        /**
1318         * Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant.
1319         */
1320        PREFERRED, 
1321        /**
1322         * 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.
1323         */
1324        EXAMPLE, 
1325        /**
1326         * added to help the parsers
1327         */
1328        NULL;
1329        public static BindingStrength fromCode(String codeString) throws FHIRException {
1330            if (codeString == null || "".equals(codeString))
1331                return null;
1332        if ("required".equals(codeString))
1333          return REQUIRED;
1334        if ("extensible".equals(codeString))
1335          return EXTENSIBLE;
1336        if ("preferred".equals(codeString))
1337          return PREFERRED;
1338        if ("example".equals(codeString))
1339          return EXAMPLE;
1340        throw new FHIRException("Unknown BindingStrength code '"+codeString+"'");
1341        }
1342        public String toCode() {
1343          switch (this) {
1344            case REQUIRED: return "required";
1345            case EXTENSIBLE: return "extensible";
1346            case PREFERRED: return "preferred";
1347            case EXAMPLE: return "example";
1348            case NULL: return null;
1349            default: return "?";
1350          }
1351        }
1352        public String getSystem() {
1353          switch (this) {
1354            case REQUIRED: return "http://hl7.org/fhir/binding-strength";
1355            case EXTENSIBLE: return "http://hl7.org/fhir/binding-strength";
1356            case PREFERRED: return "http://hl7.org/fhir/binding-strength";
1357            case EXAMPLE: return "http://hl7.org/fhir/binding-strength";
1358            case NULL: return null;
1359            default: return "?";
1360          }
1361        }
1362        public String getDefinition() {
1363          switch (this) {
1364            case REQUIRED: return "To be conformant, the concept in this element SHALL be from the specified value set.";
1365            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.";
1366            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.";
1367            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.";
1368            case NULL: return null;
1369            default: return "?";
1370          }
1371        }
1372        public String getDisplay() {
1373          switch (this) {
1374            case REQUIRED: return "Required";
1375            case EXTENSIBLE: return "Extensible";
1376            case PREFERRED: return "Preferred";
1377            case EXAMPLE: return "Example";
1378            case NULL: return null;
1379            default: return "?";
1380          }
1381        }
1382    }
1383
1384  public static class BindingStrengthEnumFactory implements EnumFactory<BindingStrength> {
1385    public BindingStrength fromCode(String codeString) throws IllegalArgumentException {
1386      if (codeString == null || "".equals(codeString))
1387            if (codeString == null || "".equals(codeString))
1388                return null;
1389        if ("required".equals(codeString))
1390          return BindingStrength.REQUIRED;
1391        if ("extensible".equals(codeString))
1392          return BindingStrength.EXTENSIBLE;
1393        if ("preferred".equals(codeString))
1394          return BindingStrength.PREFERRED;
1395        if ("example".equals(codeString))
1396          return BindingStrength.EXAMPLE;
1397        throw new IllegalArgumentException("Unknown BindingStrength code '"+codeString+"'");
1398        }
1399        public Enumeration<BindingStrength> fromType(Base code) throws FHIRException {
1400          if (code == null)
1401            return null;
1402          if (code.isEmpty())
1403            return new Enumeration<BindingStrength>(this);
1404          String codeString = ((PrimitiveType) code).asStringValue();
1405          if (codeString == null || "".equals(codeString))
1406            return null;
1407        if ("required".equals(codeString))
1408          return new Enumeration<BindingStrength>(this, BindingStrength.REQUIRED);
1409        if ("extensible".equals(codeString))
1410          return new Enumeration<BindingStrength>(this, BindingStrength.EXTENSIBLE);
1411        if ("preferred".equals(codeString))
1412          return new Enumeration<BindingStrength>(this, BindingStrength.PREFERRED);
1413        if ("example".equals(codeString))
1414          return new Enumeration<BindingStrength>(this, BindingStrength.EXAMPLE);
1415        throw new FHIRException("Unknown BindingStrength code '"+codeString+"'");
1416        }
1417    public String toCode(BindingStrength code) {
1418      if (code == BindingStrength.REQUIRED)
1419        return "required";
1420      if (code == BindingStrength.EXTENSIBLE)
1421        return "extensible";
1422      if (code == BindingStrength.PREFERRED)
1423        return "preferred";
1424      if (code == BindingStrength.EXAMPLE)
1425        return "example";
1426      return "?";
1427      }
1428    public String toSystem(BindingStrength code) {
1429      return code.getSystem();
1430      }
1431    }
1432
1433    public enum CapabilityStatementKind {
1434        /**
1435         * 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.
1436         */
1437        INSTANCE, 
1438        /**
1439         * The CapabilityStatement instance represents the capabilities of a system or piece of software, independent of a particular installation.
1440         */
1441        CAPABILITY, 
1442        /**
1443         * 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'.
1444         */
1445        REQUIREMENTS, 
1446        /**
1447         * added to help the parsers
1448         */
1449        NULL;
1450        public static CapabilityStatementKind fromCode(String codeString) throws FHIRException {
1451            if (codeString == null || "".equals(codeString))
1452                return null;
1453        if ("instance".equals(codeString))
1454          return INSTANCE;
1455        if ("capability".equals(codeString))
1456          return CAPABILITY;
1457        if ("requirements".equals(codeString))
1458          return REQUIREMENTS;
1459        throw new FHIRException("Unknown CapabilityStatementKind code '"+codeString+"'");
1460        }
1461        public String toCode() {
1462          switch (this) {
1463            case INSTANCE: return "instance";
1464            case CAPABILITY: return "capability";
1465            case REQUIREMENTS: return "requirements";
1466            case NULL: return null;
1467            default: return "?";
1468          }
1469        }
1470        public String getSystem() {
1471          switch (this) {
1472            case INSTANCE: return "http://hl7.org/fhir/capability-statement-kind";
1473            case CAPABILITY: return "http://hl7.org/fhir/capability-statement-kind";
1474            case REQUIREMENTS: return "http://hl7.org/fhir/capability-statement-kind";
1475            case NULL: return null;
1476            default: return "?";
1477          }
1478        }
1479        public String getDefinition() {
1480          switch (this) {
1481            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.";
1482            case CAPABILITY: return "The CapabilityStatement instance represents the capabilities of a system or piece of software, independent of a particular installation.";
1483            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'.";
1484            case NULL: return null;
1485            default: return "?";
1486          }
1487        }
1488        public String getDisplay() {
1489          switch (this) {
1490            case INSTANCE: return "Instance";
1491            case CAPABILITY: return "Capability";
1492            case REQUIREMENTS: return "Requirements";
1493            case NULL: return null;
1494            default: return "?";
1495          }
1496        }
1497    }
1498
1499  public static class CapabilityStatementKindEnumFactory implements EnumFactory<CapabilityStatementKind> {
1500    public CapabilityStatementKind fromCode(String codeString) throws IllegalArgumentException {
1501      if (codeString == null || "".equals(codeString))
1502            if (codeString == null || "".equals(codeString))
1503                return null;
1504        if ("instance".equals(codeString))
1505          return CapabilityStatementKind.INSTANCE;
1506        if ("capability".equals(codeString))
1507          return CapabilityStatementKind.CAPABILITY;
1508        if ("requirements".equals(codeString))
1509          return CapabilityStatementKind.REQUIREMENTS;
1510        throw new IllegalArgumentException("Unknown CapabilityStatementKind code '"+codeString+"'");
1511        }
1512        public Enumeration<CapabilityStatementKind> fromType(Base code) throws FHIRException {
1513          if (code == null)
1514            return null;
1515          if (code.isEmpty())
1516            return new Enumeration<CapabilityStatementKind>(this);
1517          String codeString = ((PrimitiveType) code).asStringValue();
1518          if (codeString == null || "".equals(codeString))
1519            return null;
1520        if ("instance".equals(codeString))
1521          return new Enumeration<CapabilityStatementKind>(this, CapabilityStatementKind.INSTANCE);
1522        if ("capability".equals(codeString))
1523          return new Enumeration<CapabilityStatementKind>(this, CapabilityStatementKind.CAPABILITY);
1524        if ("requirements".equals(codeString))
1525          return new Enumeration<CapabilityStatementKind>(this, CapabilityStatementKind.REQUIREMENTS);
1526        throw new FHIRException("Unknown CapabilityStatementKind code '"+codeString+"'");
1527        }
1528    public String toCode(CapabilityStatementKind code) {
1529      if (code == CapabilityStatementKind.INSTANCE)
1530        return "instance";
1531      if (code == CapabilityStatementKind.CAPABILITY)
1532        return "capability";
1533      if (code == CapabilityStatementKind.REQUIREMENTS)
1534        return "requirements";
1535      return "?";
1536      }
1537    public String toSystem(CapabilityStatementKind code) {
1538      return code.getSystem();
1539      }
1540    }
1541
1542    public enum ClaimProcessingCodes {
1543        /**
1544         * The Claim/Pre-authorization/Pre-determination has been received but processing has not begun.
1545         */
1546        QUEUED, 
1547        /**
1548         * The processing has completed without errors
1549         */
1550        COMPLETE, 
1551        /**
1552         * One or more errors have been detected in the Claim
1553         */
1554        ERROR, 
1555        /**
1556         * No errors have been detected in the Claim and some of the adjudication has been performed.
1557         */
1558        PARTIAL, 
1559        /**
1560         * added to help the parsers
1561         */
1562        NULL;
1563        public static ClaimProcessingCodes fromCode(String codeString) throws FHIRException {
1564            if (codeString == null || "".equals(codeString))
1565                return null;
1566        if ("queued".equals(codeString))
1567          return QUEUED;
1568        if ("complete".equals(codeString))
1569          return COMPLETE;
1570        if ("error".equals(codeString))
1571          return ERROR;
1572        if ("partial".equals(codeString))
1573          return PARTIAL;
1574        throw new FHIRException("Unknown ClaimProcessingCodes code '"+codeString+"'");
1575        }
1576        public String toCode() {
1577          switch (this) {
1578            case QUEUED: return "queued";
1579            case COMPLETE: return "complete";
1580            case ERROR: return "error";
1581            case PARTIAL: return "partial";
1582            case NULL: return null;
1583            default: return "?";
1584          }
1585        }
1586        public String getSystem() {
1587          switch (this) {
1588            case QUEUED: return "http://hl7.org/fhir/claim-outcome";
1589            case COMPLETE: return "http://hl7.org/fhir/claim-outcome";
1590            case ERROR: return "http://hl7.org/fhir/claim-outcome";
1591            case PARTIAL: return "http://hl7.org/fhir/claim-outcome";
1592            case NULL: return null;
1593            default: return "?";
1594          }
1595        }
1596        public String getDefinition() {
1597          switch (this) {
1598            case QUEUED: return "The Claim/Pre-authorization/Pre-determination has been received but processing has not begun.";
1599            case COMPLETE: return "The processing has completed without errors";
1600            case ERROR: return "One or more errors have been detected in the Claim";
1601            case PARTIAL: return "No errors have been detected in the Claim and some of the adjudication has been performed.";
1602            case NULL: return null;
1603            default: return "?";
1604          }
1605        }
1606        public String getDisplay() {
1607          switch (this) {
1608            case QUEUED: return "Queued";
1609            case COMPLETE: return "Processing Complete";
1610            case ERROR: return "Error";
1611            case PARTIAL: return "Partial Processing";
1612            case NULL: return null;
1613            default: return "?";
1614          }
1615        }
1616    }
1617
1618  public static class ClaimProcessingCodesEnumFactory implements EnumFactory<ClaimProcessingCodes> {
1619    public ClaimProcessingCodes fromCode(String codeString) throws IllegalArgumentException {
1620      if (codeString == null || "".equals(codeString))
1621            if (codeString == null || "".equals(codeString))
1622                return null;
1623        if ("queued".equals(codeString))
1624          return ClaimProcessingCodes.QUEUED;
1625        if ("complete".equals(codeString))
1626          return ClaimProcessingCodes.COMPLETE;
1627        if ("error".equals(codeString))
1628          return ClaimProcessingCodes.ERROR;
1629        if ("partial".equals(codeString))
1630          return ClaimProcessingCodes.PARTIAL;
1631        throw new IllegalArgumentException("Unknown ClaimProcessingCodes code '"+codeString+"'");
1632        }
1633        public Enumeration<ClaimProcessingCodes> fromType(Base code) throws FHIRException {
1634          if (code == null)
1635            return null;
1636          if (code.isEmpty())
1637            return new Enumeration<ClaimProcessingCodes>(this);
1638          String codeString = ((PrimitiveType) code).asStringValue();
1639          if (codeString == null || "".equals(codeString))
1640            return null;
1641        if ("queued".equals(codeString))
1642          return new Enumeration<ClaimProcessingCodes>(this, ClaimProcessingCodes.QUEUED);
1643        if ("complete".equals(codeString))
1644          return new Enumeration<ClaimProcessingCodes>(this, ClaimProcessingCodes.COMPLETE);
1645        if ("error".equals(codeString))
1646          return new Enumeration<ClaimProcessingCodes>(this, ClaimProcessingCodes.ERROR);
1647        if ("partial".equals(codeString))
1648          return new Enumeration<ClaimProcessingCodes>(this, ClaimProcessingCodes.PARTIAL);
1649        throw new FHIRException("Unknown ClaimProcessingCodes code '"+codeString+"'");
1650        }
1651    public String toCode(ClaimProcessingCodes code) {
1652      if (code == ClaimProcessingCodes.QUEUED)
1653        return "queued";
1654      if (code == ClaimProcessingCodes.COMPLETE)
1655        return "complete";
1656      if (code == ClaimProcessingCodes.ERROR)
1657        return "error";
1658      if (code == ClaimProcessingCodes.PARTIAL)
1659        return "partial";
1660      return "?";
1661      }
1662    public String toSystem(ClaimProcessingCodes code) {
1663      return code.getSystem();
1664      }
1665    }
1666
1667    public enum CompartmentType {
1668        /**
1669         * The compartment definition is for the patient compartment.
1670         */
1671        PATIENT, 
1672        /**
1673         * The compartment definition is for the encounter compartment.
1674         */
1675        ENCOUNTER, 
1676        /**
1677         * The compartment definition is for the related-person compartment.
1678         */
1679        RELATEDPERSON, 
1680        /**
1681         * The compartment definition is for the practitioner compartment.
1682         */
1683        PRACTITIONER, 
1684        /**
1685         * The compartment definition is for the device compartment.
1686         */
1687        DEVICE, 
1688        /**
1689         * added to help the parsers
1690         */
1691        NULL;
1692        public static CompartmentType fromCode(String codeString) throws FHIRException {
1693            if (codeString == null || "".equals(codeString))
1694                return null;
1695        if ("Patient".equals(codeString))
1696          return PATIENT;
1697        if ("Encounter".equals(codeString))
1698          return ENCOUNTER;
1699        if ("RelatedPerson".equals(codeString))
1700          return RELATEDPERSON;
1701        if ("Practitioner".equals(codeString))
1702          return PRACTITIONER;
1703        if ("Device".equals(codeString))
1704          return DEVICE;
1705        throw new FHIRException("Unknown CompartmentType code '"+codeString+"'");
1706        }
1707        public String toCode() {
1708          switch (this) {
1709            case PATIENT: return "Patient";
1710            case ENCOUNTER: return "Encounter";
1711            case RELATEDPERSON: return "RelatedPerson";
1712            case PRACTITIONER: return "Practitioner";
1713            case DEVICE: return "Device";
1714            case NULL: return null;
1715            default: return "?";
1716          }
1717        }
1718        public String getSystem() {
1719          switch (this) {
1720            case PATIENT: return "http://hl7.org/fhir/compartment-type";
1721            case ENCOUNTER: return "http://hl7.org/fhir/compartment-type";
1722            case RELATEDPERSON: return "http://hl7.org/fhir/compartment-type";
1723            case PRACTITIONER: return "http://hl7.org/fhir/compartment-type";
1724            case DEVICE: return "http://hl7.org/fhir/compartment-type";
1725            case NULL: return null;
1726            default: return "?";
1727          }
1728        }
1729        public String getDefinition() {
1730          switch (this) {
1731            case PATIENT: return "The compartment definition is for the patient compartment.";
1732            case ENCOUNTER: return "The compartment definition is for the encounter compartment.";
1733            case RELATEDPERSON: return "The compartment definition is for the related-person compartment.";
1734            case PRACTITIONER: return "The compartment definition is for the practitioner compartment.";
1735            case DEVICE: return "The compartment definition is for the device compartment.";
1736            case NULL: return null;
1737            default: return "?";
1738          }
1739        }
1740        public String getDisplay() {
1741          switch (this) {
1742            case PATIENT: return "Patient";
1743            case ENCOUNTER: return "Encounter";
1744            case RELATEDPERSON: return "RelatedPerson";
1745            case PRACTITIONER: return "Practitioner";
1746            case DEVICE: return "Device";
1747            case NULL: return null;
1748            default: return "?";
1749          }
1750        }
1751    }
1752
1753  public static class CompartmentTypeEnumFactory implements EnumFactory<CompartmentType> {
1754    public CompartmentType fromCode(String codeString) throws IllegalArgumentException {
1755      if (codeString == null || "".equals(codeString))
1756            if (codeString == null || "".equals(codeString))
1757                return null;
1758        if ("Patient".equals(codeString))
1759          return CompartmentType.PATIENT;
1760        if ("Encounter".equals(codeString))
1761          return CompartmentType.ENCOUNTER;
1762        if ("RelatedPerson".equals(codeString))
1763          return CompartmentType.RELATEDPERSON;
1764        if ("Practitioner".equals(codeString))
1765          return CompartmentType.PRACTITIONER;
1766        if ("Device".equals(codeString))
1767          return CompartmentType.DEVICE;
1768        throw new IllegalArgumentException("Unknown CompartmentType code '"+codeString+"'");
1769        }
1770        public Enumeration<CompartmentType> fromType(Base code) throws FHIRException {
1771          if (code == null)
1772            return null;
1773          if (code.isEmpty())
1774            return new Enumeration<CompartmentType>(this);
1775          String codeString = ((PrimitiveType) code).asStringValue();
1776          if (codeString == null || "".equals(codeString))
1777            return null;
1778        if ("Patient".equals(codeString))
1779          return new Enumeration<CompartmentType>(this, CompartmentType.PATIENT);
1780        if ("Encounter".equals(codeString))
1781          return new Enumeration<CompartmentType>(this, CompartmentType.ENCOUNTER);
1782        if ("RelatedPerson".equals(codeString))
1783          return new Enumeration<CompartmentType>(this, CompartmentType.RELATEDPERSON);
1784        if ("Practitioner".equals(codeString))
1785          return new Enumeration<CompartmentType>(this, CompartmentType.PRACTITIONER);
1786        if ("Device".equals(codeString))
1787          return new Enumeration<CompartmentType>(this, CompartmentType.DEVICE);
1788        throw new FHIRException("Unknown CompartmentType code '"+codeString+"'");
1789        }
1790    public String toCode(CompartmentType code) {
1791      if (code == CompartmentType.PATIENT)
1792        return "Patient";
1793      if (code == CompartmentType.ENCOUNTER)
1794        return "Encounter";
1795      if (code == CompartmentType.RELATEDPERSON)
1796        return "RelatedPerson";
1797      if (code == CompartmentType.PRACTITIONER)
1798        return "Practitioner";
1799      if (code == CompartmentType.DEVICE)
1800        return "Device";
1801      return "?";
1802      }
1803    public String toSystem(CompartmentType code) {
1804      return code.getSystem();
1805      }
1806    }
1807
1808    public enum CompositionStatus {
1809        /**
1810         * This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified.
1811         */
1812        PRELIMINARY, 
1813        /**
1814         * 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.
1815         */
1816        FINAL, 
1817        /**
1818         * 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.
1819         */
1820        AMENDED, 
1821        /**
1822         * 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.
1823         */
1824        ENTEREDINERROR, 
1825        /**
1826         * This composition has been withdrawn or superseded and should no longer be used.
1827         */
1828        DEPRECATED, 
1829        /**
1830         * added to help the parsers
1831         */
1832        NULL;
1833        public static CompositionStatus fromCode(String codeString) throws FHIRException {
1834            if (codeString == null || "".equals(codeString))
1835                return null;
1836        if ("preliminary".equals(codeString))
1837          return PRELIMINARY;
1838        if ("final".equals(codeString))
1839          return FINAL;
1840        if ("amended".equals(codeString))
1841          return AMENDED;
1842        if ("entered-in-error".equals(codeString))
1843          return ENTEREDINERROR;
1844        if ("deprecated".equals(codeString))
1845          return DEPRECATED;
1846        throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'");
1847        }
1848        public String toCode() {
1849          switch (this) {
1850            case PRELIMINARY: return "preliminary";
1851            case FINAL: return "final";
1852            case AMENDED: return "amended";
1853            case ENTEREDINERROR: return "entered-in-error";
1854            case DEPRECATED: return "deprecated";
1855            case NULL: return null;
1856            default: return "?";
1857          }
1858        }
1859        public String getSystem() {
1860          switch (this) {
1861            case PRELIMINARY: return "http://hl7.org/fhir/composition-status";
1862            case FINAL: return "http://hl7.org/fhir/composition-status";
1863            case AMENDED: return "http://hl7.org/fhir/composition-status";
1864            case ENTEREDINERROR: return "http://hl7.org/fhir/composition-status";
1865            case DEPRECATED: return "http://hl7.org/fhir/composition-status";
1866            case NULL: return null;
1867            default: return "?";
1868          }
1869        }
1870        public String getDefinition() {
1871          switch (this) {
1872            case PRELIMINARY: return "This is a preliminary composition or document (also known as initial or interim). The content may be incomplete or unverified.";
1873            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.";
1874            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.";
1875            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.";
1876            case DEPRECATED: return "This composition has been withdrawn or superseded and should no longer be used.";
1877            case NULL: return null;
1878            default: return "?";
1879          }
1880        }
1881        public String getDisplay() {
1882          switch (this) {
1883            case PRELIMINARY: return "Preliminary";
1884            case FINAL: return "Final";
1885            case AMENDED: return "Amended";
1886            case ENTEREDINERROR: return "Entered in Error";
1887            case DEPRECATED: return "Deprecated";
1888            case NULL: return null;
1889            default: return "?";
1890          }
1891        }
1892    }
1893
1894  public static class CompositionStatusEnumFactory implements EnumFactory<CompositionStatus> {
1895    public CompositionStatus fromCode(String codeString) throws IllegalArgumentException {
1896      if (codeString == null || "".equals(codeString))
1897            if (codeString == null || "".equals(codeString))
1898                return null;
1899        if ("preliminary".equals(codeString))
1900          return CompositionStatus.PRELIMINARY;
1901        if ("final".equals(codeString))
1902          return CompositionStatus.FINAL;
1903        if ("amended".equals(codeString))
1904          return CompositionStatus.AMENDED;
1905        if ("entered-in-error".equals(codeString))
1906          return CompositionStatus.ENTEREDINERROR;
1907        if ("deprecated".equals(codeString))
1908          return CompositionStatus.DEPRECATED;
1909        throw new IllegalArgumentException("Unknown CompositionStatus code '"+codeString+"'");
1910        }
1911        public Enumeration<CompositionStatus> fromType(Base code) throws FHIRException {
1912          if (code == null)
1913            return null;
1914          if (code.isEmpty())
1915            return new Enumeration<CompositionStatus>(this);
1916          String codeString = ((PrimitiveType) code).asStringValue();
1917          if (codeString == null || "".equals(codeString))
1918            return null;
1919        if ("preliminary".equals(codeString))
1920          return new Enumeration<CompositionStatus>(this, CompositionStatus.PRELIMINARY);
1921        if ("final".equals(codeString))
1922          return new Enumeration<CompositionStatus>(this, CompositionStatus.FINAL);
1923        if ("amended".equals(codeString))
1924          return new Enumeration<CompositionStatus>(this, CompositionStatus.AMENDED);
1925        if ("entered-in-error".equals(codeString))
1926          return new Enumeration<CompositionStatus>(this, CompositionStatus.ENTEREDINERROR);
1927        if ("deprecated".equals(codeString))
1928          return new Enumeration<CompositionStatus>(this, CompositionStatus.DEPRECATED);
1929        throw new FHIRException("Unknown CompositionStatus code '"+codeString+"'");
1930        }
1931    public String toCode(CompositionStatus code) {
1932      if (code == CompositionStatus.PRELIMINARY)
1933        return "preliminary";
1934      if (code == CompositionStatus.FINAL)
1935        return "final";
1936      if (code == CompositionStatus.AMENDED)
1937        return "amended";
1938      if (code == CompositionStatus.ENTEREDINERROR)
1939        return "entered-in-error";
1940      if (code == CompositionStatus.DEPRECATED)
1941        return "deprecated";
1942      return "?";
1943      }
1944    public String toSystem(CompositionStatus code) {
1945      return code.getSystem();
1946      }
1947    }
1948
1949    public enum ConceptMapRelationship {
1950        /**
1951         * The concepts are related to each other, but the exact relationship is not known.
1952         */
1953        RELATEDTO, 
1954        /**
1955         * The definitions of the concepts mean the same thing.
1956         */
1957        EQUIVALENT, 
1958        /**
1959         * The source concept is narrower in meaning than the target concept.
1960         */
1961        SOURCEISNARROWERTHANTARGET, 
1962        /**
1963         * The source concept is broader in meaning than the target concept.
1964         */
1965        SOURCEISBROADERTHANTARGET, 
1966        /**
1967         * This is an explicit assertion that the target concept is not related to the source concept.
1968         */
1969        NOTRELATEDTO, 
1970        /**
1971         * added to help the parsers
1972         */
1973        NULL;
1974        public static ConceptMapRelationship fromCode(String codeString) throws FHIRException {
1975            if (codeString == null || "".equals(codeString))
1976                return null;
1977        if ("related-to".equals(codeString))
1978          return RELATEDTO;
1979        if ("equivalent".equals(codeString))
1980          return EQUIVALENT;
1981        if ("source-is-narrower-than-target".equals(codeString))
1982          return SOURCEISNARROWERTHANTARGET;
1983        if ("source-is-broader-than-target".equals(codeString))
1984          return SOURCEISBROADERTHANTARGET;
1985        if ("not-related-to".equals(codeString))
1986          return NOTRELATEDTO;
1987        throw new FHIRException("Unknown ConceptMapRelationship code '"+codeString+"'");
1988        }
1989        public String toCode() {
1990          switch (this) {
1991            case RELATEDTO: return "related-to";
1992            case EQUIVALENT: return "equivalent";
1993            case SOURCEISNARROWERTHANTARGET: return "source-is-narrower-than-target";
1994            case SOURCEISBROADERTHANTARGET: return "source-is-broader-than-target";
1995            case NOTRELATEDTO: return "not-related-to";
1996            case NULL: return null;
1997            default: return "?";
1998          }
1999        }
2000        public String getSystem() {
2001          switch (this) {
2002            case RELATEDTO: return "http://hl7.org/fhir/concept-map-relationship";
2003            case EQUIVALENT: return "http://hl7.org/fhir/concept-map-relationship";
2004            case SOURCEISNARROWERTHANTARGET: return "http://hl7.org/fhir/concept-map-relationship";
2005            case SOURCEISBROADERTHANTARGET: return "http://hl7.org/fhir/concept-map-relationship";
2006            case NOTRELATEDTO: return "http://hl7.org/fhir/concept-map-relationship";
2007            case NULL: return null;
2008            default: return "?";
2009          }
2010        }
2011        public String getDefinition() {
2012          switch (this) {
2013            case RELATEDTO: return "The concepts are related to each other, but the exact relationship is not known.";
2014            case EQUIVALENT: return "The definitions of the concepts mean the same thing.";
2015            case SOURCEISNARROWERTHANTARGET: return "The source concept is narrower in meaning than the target concept.";
2016            case SOURCEISBROADERTHANTARGET: return "The source concept is broader in meaning than the target concept.";
2017            case NOTRELATEDTO: return "This is an explicit assertion that the target concept is not related to the source concept.";
2018            case NULL: return null;
2019            default: return "?";
2020          }
2021        }
2022        public String getDisplay() {
2023          switch (this) {
2024            case RELATEDTO: return "Related To";
2025            case EQUIVALENT: return "Equivalent";
2026            case SOURCEISNARROWERTHANTARGET: return "Source Is Narrower Than Target";
2027            case SOURCEISBROADERTHANTARGET: return "Source Is Broader Than Target";
2028            case NOTRELATEDTO: return "Not Related To";
2029            case NULL: return null;
2030            default: return "?";
2031          }
2032        }
2033    }
2034
2035  public static class ConceptMapRelationshipEnumFactory implements EnumFactory<ConceptMapRelationship> {
2036    public ConceptMapRelationship fromCode(String codeString) throws IllegalArgumentException {
2037      if (codeString == null || "".equals(codeString))
2038            if (codeString == null || "".equals(codeString))
2039                return null;
2040        if ("related-to".equals(codeString))
2041          return ConceptMapRelationship.RELATEDTO;
2042        if ("equivalent".equals(codeString))
2043          return ConceptMapRelationship.EQUIVALENT;
2044        if ("source-is-narrower-than-target".equals(codeString))
2045          return ConceptMapRelationship.SOURCEISNARROWERTHANTARGET;
2046        if ("source-is-broader-than-target".equals(codeString))
2047          return ConceptMapRelationship.SOURCEISBROADERTHANTARGET;
2048        if ("not-related-to".equals(codeString))
2049          return ConceptMapRelationship.NOTRELATEDTO;
2050        throw new IllegalArgumentException("Unknown ConceptMapRelationship code '"+codeString+"'");
2051        }
2052        public Enumeration<ConceptMapRelationship> fromType(Base code) throws FHIRException {
2053          if (code == null)
2054            return null;
2055          if (code.isEmpty())
2056            return new Enumeration<ConceptMapRelationship>(this);
2057          String codeString = ((PrimitiveType) code).asStringValue();
2058          if (codeString == null || "".equals(codeString))
2059            return null;
2060        if ("related-to".equals(codeString))
2061          return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.RELATEDTO);
2062        if ("equivalent".equals(codeString))
2063          return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.EQUIVALENT);
2064        if ("source-is-narrower-than-target".equals(codeString))
2065          return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.SOURCEISNARROWERTHANTARGET);
2066        if ("source-is-broader-than-target".equals(codeString))
2067          return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.SOURCEISBROADERTHANTARGET);
2068        if ("not-related-to".equals(codeString))
2069          return new Enumeration<ConceptMapRelationship>(this, ConceptMapRelationship.NOTRELATEDTO);
2070        throw new FHIRException("Unknown ConceptMapRelationship code '"+codeString+"'");
2071        }
2072    public String toCode(ConceptMapRelationship code) {
2073      if (code == ConceptMapRelationship.RELATEDTO)
2074        return "related-to";
2075      if (code == ConceptMapRelationship.EQUIVALENT)
2076        return "equivalent";
2077      if (code == ConceptMapRelationship.SOURCEISNARROWERTHANTARGET)
2078        return "source-is-narrower-than-target";
2079      if (code == ConceptMapRelationship.SOURCEISBROADERTHANTARGET)
2080        return "source-is-broader-than-target";
2081      if (code == ConceptMapRelationship.NOTRELATEDTO)
2082        return "not-related-to";
2083      return "?";
2084      }
2085    public String toSystem(ConceptMapRelationship code) {
2086      return code.getSystem();
2087      }
2088    }
2089
2090    public enum DaysOfWeek {
2091        /**
2092         * Monday.
2093         */
2094        MON, 
2095        /**
2096         * Tuesday.
2097         */
2098        TUE, 
2099        /**
2100         * Wednesday.
2101         */
2102        WED, 
2103        /**
2104         * Thursday.
2105         */
2106        THU, 
2107        /**
2108         * Friday.
2109         */
2110        FRI, 
2111        /**
2112         * Saturday.
2113         */
2114        SAT, 
2115        /**
2116         * Sunday.
2117         */
2118        SUN, 
2119        /**
2120         * added to help the parsers
2121         */
2122        NULL;
2123        public static DaysOfWeek fromCode(String codeString) throws FHIRException {
2124            if (codeString == null || "".equals(codeString))
2125                return null;
2126        if ("mon".equals(codeString))
2127          return MON;
2128        if ("tue".equals(codeString))
2129          return TUE;
2130        if ("wed".equals(codeString))
2131          return WED;
2132        if ("thu".equals(codeString))
2133          return THU;
2134        if ("fri".equals(codeString))
2135          return FRI;
2136        if ("sat".equals(codeString))
2137          return SAT;
2138        if ("sun".equals(codeString))
2139          return SUN;
2140        throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'");
2141        }
2142        public String toCode() {
2143          switch (this) {
2144            case MON: return "mon";
2145            case TUE: return "tue";
2146            case WED: return "wed";
2147            case THU: return "thu";
2148            case FRI: return "fri";
2149            case SAT: return "sat";
2150            case SUN: return "sun";
2151            case NULL: return null;
2152            default: return "?";
2153          }
2154        }
2155        public String getSystem() {
2156          switch (this) {
2157            case MON: return "http://hl7.org/fhir/days-of-week";
2158            case TUE: return "http://hl7.org/fhir/days-of-week";
2159            case WED: return "http://hl7.org/fhir/days-of-week";
2160            case THU: return "http://hl7.org/fhir/days-of-week";
2161            case FRI: return "http://hl7.org/fhir/days-of-week";
2162            case SAT: return "http://hl7.org/fhir/days-of-week";
2163            case SUN: return "http://hl7.org/fhir/days-of-week";
2164            case NULL: return null;
2165            default: return "?";
2166          }
2167        }
2168        public String getDefinition() {
2169          switch (this) {
2170            case MON: return "Monday.";
2171            case TUE: return "Tuesday.";
2172            case WED: return "Wednesday.";
2173            case THU: return "Thursday.";
2174            case FRI: return "Friday.";
2175            case SAT: return "Saturday.";
2176            case SUN: return "Sunday.";
2177            case NULL: return null;
2178            default: return "?";
2179          }
2180        }
2181        public String getDisplay() {
2182          switch (this) {
2183            case MON: return "Monday";
2184            case TUE: return "Tuesday";
2185            case WED: return "Wednesday";
2186            case THU: return "Thursday";
2187            case FRI: return "Friday";
2188            case SAT: return "Saturday";
2189            case SUN: return "Sunday";
2190            case NULL: return null;
2191            default: return "?";
2192          }
2193        }
2194    }
2195
2196  public static class DaysOfWeekEnumFactory implements EnumFactory<DaysOfWeek> {
2197    public DaysOfWeek fromCode(String codeString) throws IllegalArgumentException {
2198      if (codeString == null || "".equals(codeString))
2199            if (codeString == null || "".equals(codeString))
2200                return null;
2201        if ("mon".equals(codeString))
2202          return DaysOfWeek.MON;
2203        if ("tue".equals(codeString))
2204          return DaysOfWeek.TUE;
2205        if ("wed".equals(codeString))
2206          return DaysOfWeek.WED;
2207        if ("thu".equals(codeString))
2208          return DaysOfWeek.THU;
2209        if ("fri".equals(codeString))
2210          return DaysOfWeek.FRI;
2211        if ("sat".equals(codeString))
2212          return DaysOfWeek.SAT;
2213        if ("sun".equals(codeString))
2214          return DaysOfWeek.SUN;
2215        throw new IllegalArgumentException("Unknown DaysOfWeek code '"+codeString+"'");
2216        }
2217        public Enumeration<DaysOfWeek> fromType(Base code) throws FHIRException {
2218          if (code == null)
2219            return null;
2220          if (code.isEmpty())
2221            return new Enumeration<DaysOfWeek>(this);
2222          String codeString = ((PrimitiveType) code).asStringValue();
2223          if (codeString == null || "".equals(codeString))
2224            return null;
2225        if ("mon".equals(codeString))
2226          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.MON);
2227        if ("tue".equals(codeString))
2228          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.TUE);
2229        if ("wed".equals(codeString))
2230          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.WED);
2231        if ("thu".equals(codeString))
2232          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.THU);
2233        if ("fri".equals(codeString))
2234          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.FRI);
2235        if ("sat".equals(codeString))
2236          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.SAT);
2237        if ("sun".equals(codeString))
2238          return new Enumeration<DaysOfWeek>(this, DaysOfWeek.SUN);
2239        throw new FHIRException("Unknown DaysOfWeek code '"+codeString+"'");
2240        }
2241    public String toCode(DaysOfWeek code) {
2242      if (code == DaysOfWeek.MON)
2243        return "mon";
2244      if (code == DaysOfWeek.TUE)
2245        return "tue";
2246      if (code == DaysOfWeek.WED)
2247        return "wed";
2248      if (code == DaysOfWeek.THU)
2249        return "thu";
2250      if (code == DaysOfWeek.FRI)
2251        return "fri";
2252      if (code == DaysOfWeek.SAT)
2253        return "sat";
2254      if (code == DaysOfWeek.SUN)
2255        return "sun";
2256      return "?";
2257      }
2258    public String toSystem(DaysOfWeek code) {
2259      return code.getSystem();
2260      }
2261    }
2262
2263    public enum DeviceNameType {
2264        /**
2265         * 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.
2266         */
2267        REGISTEREDNAME, 
2268        /**
2269         * 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.
2270         */
2271        USERFRIENDLYNAME, 
2272        /**
2273         * 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.
2274         */
2275        PATIENTREPORTEDNAME, 
2276        /**
2277         * added to help the parsers
2278         */
2279        NULL;
2280        public static DeviceNameType fromCode(String codeString) throws FHIRException {
2281            if (codeString == null || "".equals(codeString))
2282                return null;
2283        if ("registered-name".equals(codeString))
2284          return REGISTEREDNAME;
2285        if ("user-friendly-name".equals(codeString))
2286          return USERFRIENDLYNAME;
2287        if ("patient-reported-name".equals(codeString))
2288          return PATIENTREPORTEDNAME;
2289        throw new FHIRException("Unknown DeviceNameType code '"+codeString+"'");
2290        }
2291        public String toCode() {
2292          switch (this) {
2293            case REGISTEREDNAME: return "registered-name";
2294            case USERFRIENDLYNAME: return "user-friendly-name";
2295            case PATIENTREPORTEDNAME: return "patient-reported-name";
2296            case NULL: return null;
2297            default: return "?";
2298          }
2299        }
2300        public String getSystem() {
2301          switch (this) {
2302            case REGISTEREDNAME: return "http://hl7.org/fhir/device-nametype";
2303            case USERFRIENDLYNAME: return "http://hl7.org/fhir/device-nametype";
2304            case PATIENTREPORTEDNAME: return "http://hl7.org/fhir/device-nametype";
2305            case NULL: return null;
2306            default: return "?";
2307          }
2308        }
2309        public String getDefinition() {
2310          switch (this) {
2311            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.";
2312            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.";
2313            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.";
2314            case NULL: return null;
2315            default: return "?";
2316          }
2317        }
2318        public String getDisplay() {
2319          switch (this) {
2320            case REGISTEREDNAME: return "Registered name";
2321            case USERFRIENDLYNAME: return "User Friendly name";
2322            case PATIENTREPORTEDNAME: return "Patient Reported name";
2323            case NULL: return null;
2324            default: return "?";
2325          }
2326        }
2327    }
2328
2329  public static class DeviceNameTypeEnumFactory implements EnumFactory<DeviceNameType> {
2330    public DeviceNameType fromCode(String codeString) throws IllegalArgumentException {
2331      if (codeString == null || "".equals(codeString))
2332            if (codeString == null || "".equals(codeString))
2333                return null;
2334        if ("registered-name".equals(codeString))
2335          return DeviceNameType.REGISTEREDNAME;
2336        if ("user-friendly-name".equals(codeString))
2337          return DeviceNameType.USERFRIENDLYNAME;
2338        if ("patient-reported-name".equals(codeString))
2339          return DeviceNameType.PATIENTREPORTEDNAME;
2340        throw new IllegalArgumentException("Unknown DeviceNameType code '"+codeString+"'");
2341        }
2342        public Enumeration<DeviceNameType> fromType(Base code) throws FHIRException {
2343          if (code == null)
2344            return null;
2345          if (code.isEmpty())
2346            return new Enumeration<DeviceNameType>(this);
2347          String codeString = ((PrimitiveType) code).asStringValue();
2348          if (codeString == null || "".equals(codeString))
2349            return null;
2350        if ("registered-name".equals(codeString))
2351          return new Enumeration<DeviceNameType>(this, DeviceNameType.REGISTEREDNAME);
2352        if ("user-friendly-name".equals(codeString))
2353          return new Enumeration<DeviceNameType>(this, DeviceNameType.USERFRIENDLYNAME);
2354        if ("patient-reported-name".equals(codeString))
2355          return new Enumeration<DeviceNameType>(this, DeviceNameType.PATIENTREPORTEDNAME);
2356        throw new FHIRException("Unknown DeviceNameType code '"+codeString+"'");
2357        }
2358    public String toCode(DeviceNameType code) {
2359      if (code == DeviceNameType.REGISTEREDNAME)
2360        return "registered-name";
2361      if (code == DeviceNameType.USERFRIENDLYNAME)
2362        return "user-friendly-name";
2363      if (code == DeviceNameType.PATIENTREPORTEDNAME)
2364        return "patient-reported-name";
2365      return "?";
2366      }
2367    public String toSystem(DeviceNameType code) {
2368      return code.getSystem();
2369      }
2370    }
2371
2372    public enum DocumentReferenceStatus {
2373        /**
2374         * This is the current reference for this document.
2375         */
2376        CURRENT, 
2377        /**
2378         * This reference has been superseded by another reference.
2379         */
2380        SUPERSEDED, 
2381        /**
2382         * This reference was created in error.
2383         */
2384        ENTEREDINERROR, 
2385        /**
2386         * added to help the parsers
2387         */
2388        NULL;
2389        public static DocumentReferenceStatus fromCode(String codeString) throws FHIRException {
2390            if (codeString == null || "".equals(codeString))
2391                return null;
2392        if ("current".equals(codeString))
2393          return CURRENT;
2394        if ("superseded".equals(codeString))
2395          return SUPERSEDED;
2396        if ("entered-in-error".equals(codeString))
2397          return ENTEREDINERROR;
2398        throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'");
2399        }
2400        public String toCode() {
2401          switch (this) {
2402            case CURRENT: return "current";
2403            case SUPERSEDED: return "superseded";
2404            case ENTEREDINERROR: return "entered-in-error";
2405            case NULL: return null;
2406            default: return "?";
2407          }
2408        }
2409        public String getSystem() {
2410          switch (this) {
2411            case CURRENT: return "http://hl7.org/fhir/document-reference-status";
2412            case SUPERSEDED: return "http://hl7.org/fhir/document-reference-status";
2413            case ENTEREDINERROR: return "http://hl7.org/fhir/document-reference-status";
2414            case NULL: return null;
2415            default: return "?";
2416          }
2417        }
2418        public String getDefinition() {
2419          switch (this) {
2420            case CURRENT: return "This is the current reference for this document.";
2421            case SUPERSEDED: return "This reference has been superseded by another reference.";
2422            case ENTEREDINERROR: return "This reference was created in error.";
2423            case NULL: return null;
2424            default: return "?";
2425          }
2426        }
2427        public String getDisplay() {
2428          switch (this) {
2429            case CURRENT: return "Current";
2430            case SUPERSEDED: return "Superseded";
2431            case ENTEREDINERROR: return "Entered in Error";
2432            case NULL: return null;
2433            default: return "?";
2434          }
2435        }
2436    }
2437
2438  public static class DocumentReferenceStatusEnumFactory implements EnumFactory<DocumentReferenceStatus> {
2439    public DocumentReferenceStatus fromCode(String codeString) throws IllegalArgumentException {
2440      if (codeString == null || "".equals(codeString))
2441            if (codeString == null || "".equals(codeString))
2442                return null;
2443        if ("current".equals(codeString))
2444          return DocumentReferenceStatus.CURRENT;
2445        if ("superseded".equals(codeString))
2446          return DocumentReferenceStatus.SUPERSEDED;
2447        if ("entered-in-error".equals(codeString))
2448          return DocumentReferenceStatus.ENTEREDINERROR;
2449        throw new IllegalArgumentException("Unknown DocumentReferenceStatus code '"+codeString+"'");
2450        }
2451        public Enumeration<DocumentReferenceStatus> fromType(Base code) throws FHIRException {
2452          if (code == null)
2453            return null;
2454          if (code.isEmpty())
2455            return new Enumeration<DocumentReferenceStatus>(this);
2456          String codeString = ((PrimitiveType) code).asStringValue();
2457          if (codeString == null || "".equals(codeString))
2458            return null;
2459        if ("current".equals(codeString))
2460          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.CURRENT);
2461        if ("superseded".equals(codeString))
2462          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.SUPERSEDED);
2463        if ("entered-in-error".equals(codeString))
2464          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.ENTEREDINERROR);
2465        throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'");
2466        }
2467    public String toCode(DocumentReferenceStatus code) {
2468      if (code == DocumentReferenceStatus.CURRENT)
2469        return "current";
2470      if (code == DocumentReferenceStatus.SUPERSEDED)
2471        return "superseded";
2472      if (code == DocumentReferenceStatus.ENTEREDINERROR)
2473        return "entered-in-error";
2474      return "?";
2475      }
2476    public String toSystem(DocumentReferenceStatus code) {
2477      return code.getSystem();
2478      }
2479    }
2480
2481    public enum EventStatus {
2482        /**
2483         * 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.
2484         */
2485        PREPARATION, 
2486        /**
2487         * The event is currently occurring.
2488         */
2489        INPROGRESS, 
2490        /**
2491         * 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.
2492         */
2493        NOTDONE, 
2494        /**
2495         * The event has been temporarily stopped but is expected to resume in the future.
2496         */
2497        ONHOLD, 
2498        /**
2499         * 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.
2500         */
2501        STOPPED, 
2502        /**
2503         * The event has now concluded.
2504         */
2505        COMPLETED, 
2506        /**
2507         * 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".).
2508         */
2509        ENTEREDINERROR, 
2510        /**
2511         * 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.
2512         */
2513        UNKNOWN, 
2514        /**
2515         * added to help the parsers
2516         */
2517        NULL;
2518        public static EventStatus fromCode(String codeString) throws FHIRException {
2519            if (codeString == null || "".equals(codeString))
2520                return null;
2521        if ("preparation".equals(codeString))
2522          return PREPARATION;
2523        if ("in-progress".equals(codeString))
2524          return INPROGRESS;
2525        if ("not-done".equals(codeString))
2526          return NOTDONE;
2527        if ("on-hold".equals(codeString))
2528          return ONHOLD;
2529        if ("stopped".equals(codeString))
2530          return STOPPED;
2531        if ("completed".equals(codeString))
2532          return COMPLETED;
2533        if ("entered-in-error".equals(codeString))
2534          return ENTEREDINERROR;
2535        if ("unknown".equals(codeString))
2536          return UNKNOWN;
2537        throw new FHIRException("Unknown EventStatus code '"+codeString+"'");
2538        }
2539        public String toCode() {
2540          switch (this) {
2541            case PREPARATION: return "preparation";
2542            case INPROGRESS: return "in-progress";
2543            case NOTDONE: return "not-done";
2544            case ONHOLD: return "on-hold";
2545            case STOPPED: return "stopped";
2546            case COMPLETED: return "completed";
2547            case ENTEREDINERROR: return "entered-in-error";
2548            case UNKNOWN: return "unknown";
2549            case NULL: return null;
2550            default: return "?";
2551          }
2552        }
2553        public String getSystem() {
2554          switch (this) {
2555            case PREPARATION: return "http://hl7.org/fhir/event-status";
2556            case INPROGRESS: return "http://hl7.org/fhir/event-status";
2557            case NOTDONE: return "http://hl7.org/fhir/event-status";
2558            case ONHOLD: return "http://hl7.org/fhir/event-status";
2559            case STOPPED: return "http://hl7.org/fhir/event-status";
2560            case COMPLETED: return "http://hl7.org/fhir/event-status";
2561            case ENTEREDINERROR: return "http://hl7.org/fhir/event-status";
2562            case UNKNOWN: return "http://hl7.org/fhir/event-status";
2563            case NULL: return null;
2564            default: return "?";
2565          }
2566        }
2567        public String getDefinition() {
2568          switch (this) {
2569            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.";
2570            case INPROGRESS: return "The event is currently occurring.";
2571            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.";
2572            case ONHOLD: return "The event has been temporarily stopped but is expected to resume in the future.";
2573            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.";
2574            case COMPLETED: return "The event has now concluded.";
2575            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\".).";
2576            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.";
2577            case NULL: return null;
2578            default: return "?";
2579          }
2580        }
2581        public String getDisplay() {
2582          switch (this) {
2583            case PREPARATION: return "Preparation";
2584            case INPROGRESS: return "In Progress";
2585            case NOTDONE: return "Not Done";
2586            case ONHOLD: return "On Hold";
2587            case STOPPED: return "Stopped";
2588            case COMPLETED: return "Completed";
2589            case ENTEREDINERROR: return "Entered in Error";
2590            case UNKNOWN: return "Unknown";
2591            case NULL: return null;
2592            default: return "?";
2593          }
2594        }
2595    }
2596
2597  public static class EventStatusEnumFactory implements EnumFactory<EventStatus> {
2598    public EventStatus fromCode(String codeString) throws IllegalArgumentException {
2599      if (codeString == null || "".equals(codeString))
2600            if (codeString == null || "".equals(codeString))
2601                return null;
2602        if ("preparation".equals(codeString))
2603          return EventStatus.PREPARATION;
2604        if ("in-progress".equals(codeString))
2605          return EventStatus.INPROGRESS;
2606        if ("not-done".equals(codeString))
2607          return EventStatus.NOTDONE;
2608        if ("on-hold".equals(codeString))
2609          return EventStatus.ONHOLD;
2610        if ("stopped".equals(codeString))
2611          return EventStatus.STOPPED;
2612        if ("completed".equals(codeString))
2613          return EventStatus.COMPLETED;
2614        if ("entered-in-error".equals(codeString))
2615          return EventStatus.ENTEREDINERROR;
2616        if ("unknown".equals(codeString))
2617          return EventStatus.UNKNOWN;
2618        throw new IllegalArgumentException("Unknown EventStatus code '"+codeString+"'");
2619        }
2620        public Enumeration<EventStatus> fromType(Base code) throws FHIRException {
2621          if (code == null)
2622            return null;
2623          if (code.isEmpty())
2624            return new Enumeration<EventStatus>(this);
2625          String codeString = ((PrimitiveType) code).asStringValue();
2626          if (codeString == null || "".equals(codeString))
2627            return null;
2628        if ("preparation".equals(codeString))
2629          return new Enumeration<EventStatus>(this, EventStatus.PREPARATION);
2630        if ("in-progress".equals(codeString))
2631          return new Enumeration<EventStatus>(this, EventStatus.INPROGRESS);
2632        if ("not-done".equals(codeString))
2633          return new Enumeration<EventStatus>(this, EventStatus.NOTDONE);
2634        if ("on-hold".equals(codeString))
2635          return new Enumeration<EventStatus>(this, EventStatus.ONHOLD);
2636        if ("stopped".equals(codeString))
2637          return new Enumeration<EventStatus>(this, EventStatus.STOPPED);
2638        if ("completed".equals(codeString))
2639          return new Enumeration<EventStatus>(this, EventStatus.COMPLETED);
2640        if ("entered-in-error".equals(codeString))
2641          return new Enumeration<EventStatus>(this, EventStatus.ENTEREDINERROR);
2642        if ("unknown".equals(codeString))
2643          return new Enumeration<EventStatus>(this, EventStatus.UNKNOWN);
2644        throw new FHIRException("Unknown EventStatus code '"+codeString+"'");
2645        }
2646    public String toCode(EventStatus code) {
2647      if (code == EventStatus.PREPARATION)
2648        return "preparation";
2649      if (code == EventStatus.INPROGRESS)
2650        return "in-progress";
2651      if (code == EventStatus.NOTDONE)
2652        return "not-done";
2653      if (code == EventStatus.ONHOLD)
2654        return "on-hold";
2655      if (code == EventStatus.STOPPED)
2656        return "stopped";
2657      if (code == EventStatus.COMPLETED)
2658        return "completed";
2659      if (code == EventStatus.ENTEREDINERROR)
2660        return "entered-in-error";
2661      if (code == EventStatus.UNKNOWN)
2662        return "unknown";
2663      return "?";
2664      }
2665    public String toSystem(EventStatus code) {
2666      return code.getSystem();
2667      }
2668    }
2669
2670    public enum EvidenceVariableHandling {
2671        /**
2672         * 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).
2673         */
2674        CONTINUOUS, 
2675        /**
2676         * 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).
2677         */
2678        DICHOTOMOUS, 
2679        /**
2680         * 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).
2681         */
2682        ORDINAL, 
2683        /**
2684         * 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.
2685         */
2686        POLYCHOTOMOUS, 
2687        /**
2688         * added to help the parsers
2689         */
2690        NULL;
2691        public static EvidenceVariableHandling fromCode(String codeString) throws FHIRException {
2692            if (codeString == null || "".equals(codeString))
2693                return null;
2694        if ("continuous".equals(codeString))
2695          return CONTINUOUS;
2696        if ("dichotomous".equals(codeString))
2697          return DICHOTOMOUS;
2698        if ("ordinal".equals(codeString))
2699          return ORDINAL;
2700        if ("polychotomous".equals(codeString))
2701          return POLYCHOTOMOUS;
2702        throw new FHIRException("Unknown EvidenceVariableHandling code '"+codeString+"'");
2703        }
2704        public String toCode() {
2705          switch (this) {
2706            case CONTINUOUS: return "continuous";
2707            case DICHOTOMOUS: return "dichotomous";
2708            case ORDINAL: return "ordinal";
2709            case POLYCHOTOMOUS: return "polychotomous";
2710            case NULL: return null;
2711            default: return "?";
2712          }
2713        }
2714        public String getSystem() {
2715          switch (this) {
2716            case CONTINUOUS: return "http://hl7.org/fhir/variable-handling";
2717            case DICHOTOMOUS: return "http://hl7.org/fhir/variable-handling";
2718            case ORDINAL: return "http://hl7.org/fhir/variable-handling";
2719            case POLYCHOTOMOUS: return "http://hl7.org/fhir/variable-handling";
2720            case NULL: return null;
2721            default: return "?";
2722          }
2723        }
2724        public String getDefinition() {
2725          switch (this) {
2726            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).";
2727            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).";
2728            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).";
2729            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.";
2730            case NULL: return null;
2731            default: return "?";
2732          }
2733        }
2734        public String getDisplay() {
2735          switch (this) {
2736            case CONTINUOUS: return "continuous variable";
2737            case DICHOTOMOUS: return "dichotomous variable";
2738            case ORDINAL: return "ordinal variable";
2739            case POLYCHOTOMOUS: return "polychotomous variable";
2740            case NULL: return null;
2741            default: return "?";
2742          }
2743        }
2744    }
2745
2746  public static class EvidenceVariableHandlingEnumFactory implements EnumFactory<EvidenceVariableHandling> {
2747    public EvidenceVariableHandling fromCode(String codeString) throws IllegalArgumentException {
2748      if (codeString == null || "".equals(codeString))
2749            if (codeString == null || "".equals(codeString))
2750                return null;
2751        if ("continuous".equals(codeString))
2752          return EvidenceVariableHandling.CONTINUOUS;
2753        if ("dichotomous".equals(codeString))
2754          return EvidenceVariableHandling.DICHOTOMOUS;
2755        if ("ordinal".equals(codeString))
2756          return EvidenceVariableHandling.ORDINAL;
2757        if ("polychotomous".equals(codeString))
2758          return EvidenceVariableHandling.POLYCHOTOMOUS;
2759        throw new IllegalArgumentException("Unknown EvidenceVariableHandling code '"+codeString+"'");
2760        }
2761        public Enumeration<EvidenceVariableHandling> fromType(Base code) throws FHIRException {
2762          if (code == null)
2763            return null;
2764          if (code.isEmpty())
2765            return new Enumeration<EvidenceVariableHandling>(this);
2766          String codeString = ((PrimitiveType) code).asStringValue();
2767          if (codeString == null || "".equals(codeString))
2768            return null;
2769        if ("continuous".equals(codeString))
2770          return new Enumeration<EvidenceVariableHandling>(this, EvidenceVariableHandling.CONTINUOUS);
2771        if ("dichotomous".equals(codeString))
2772          return new Enumeration<EvidenceVariableHandling>(this, EvidenceVariableHandling.DICHOTOMOUS);
2773        if ("ordinal".equals(codeString))
2774          return new Enumeration<EvidenceVariableHandling>(this, EvidenceVariableHandling.ORDINAL);
2775        if ("polychotomous".equals(codeString))
2776          return new Enumeration<EvidenceVariableHandling>(this, EvidenceVariableHandling.POLYCHOTOMOUS);
2777        throw new FHIRException("Unknown EvidenceVariableHandling code '"+codeString+"'");
2778        }
2779    public String toCode(EvidenceVariableHandling code) {
2780      if (code == EvidenceVariableHandling.CONTINUOUS)
2781        return "continuous";
2782      if (code == EvidenceVariableHandling.DICHOTOMOUS)
2783        return "dichotomous";
2784      if (code == EvidenceVariableHandling.ORDINAL)
2785        return "ordinal";
2786      if (code == EvidenceVariableHandling.POLYCHOTOMOUS)
2787        return "polychotomous";
2788      return "?";
2789      }
2790    public String toSystem(EvidenceVariableHandling code) {
2791      return code.getSystem();
2792      }
2793    }
2794
2795    public enum FHIRAllTypes {
2796        /**
2797         * 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.
2798         */
2799        ADDRESS, 
2800        /**
2801         * A duration of time during which an organism (or a process) has existed.
2802         */
2803        AGE, 
2804        /**
2805         * A  text note which also  contains information about who made the statement and when.
2806         */
2807        ANNOTATION, 
2808        /**
2809         * For referring to data content defined in other formats.
2810         */
2811        ATTACHMENT, 
2812        /**
2813         * Base definition for all elements that are defined inside a resource - but not those in a data type.
2814         */
2815        BACKBONEELEMENT, 
2816        /**
2817         * Base definition for the few data types that are allowed to carry modifier extensions.
2818         */
2819        BACKBONETYPE, 
2820        /**
2821         * Base definition for all types defined in FHIR type system.
2822         */
2823        BASE, 
2824        /**
2825         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
2826         */
2827        CODEABLECONCEPT, 
2828        /**
2829         * A reference to a resource (by instance), or instead, a reference to a concept defined in a terminology or ontology (by class).
2830         */
2831        CODEABLEREFERENCE, 
2832        /**
2833         * A reference to a code defined by a terminology system.
2834         */
2835        CODING, 
2836        /**
2837         * Specifies contact information for a person or organization.
2838         */
2839        CONTACTDETAIL, 
2840        /**
2841         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
2842         */
2843        CONTACTPOINT, 
2844        /**
2845         * A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.
2846         */
2847        CONTRIBUTOR, 
2848        /**
2849         * 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.
2850         */
2851        COUNT, 
2852        /**
2853         * Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.
2854         */
2855        DATAREQUIREMENT, 
2856        /**
2857         * The base class for all re-useable types defined as part of the FHIR Specification.
2858         */
2859        DATATYPE, 
2860        /**
2861         * A length - a value with a unit that is a physical distance.
2862         */
2863        DISTANCE, 
2864        /**
2865         * Indicates how the medication is/was taken or should be taken by the patient.
2866         */
2867        DOSAGE, 
2868        /**
2869         * A length of time.
2870         */
2871        DURATION, 
2872        /**
2873         * Base definition for all elements in a resource.
2874         */
2875        ELEMENT, 
2876        /**
2877         * Captures constraints on each element within the resource, profile, or extension.
2878         */
2879        ELEMENTDEFINITION, 
2880        /**
2881         * 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.
2882         */
2883        EXPRESSION, 
2884        /**
2885         * Specifies contact information for a specific purpose over a period of time, might be handled/monitored by a specific named person or organization.
2886         */
2887        EXTENDEDCONTACTDETAIL, 
2888        /**
2889         * Optional Extension Element - found in all resources.
2890         */
2891        EXTENSION, 
2892        /**
2893         * A human's name with the ability to identify parts and usage.
2894         */
2895        HUMANNAME, 
2896        /**
2897         * An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.
2898         */
2899        IDENTIFIER, 
2900        /**
2901         * 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.
2902         */
2903        MARKETINGSTATUS, 
2904        /**
2905         * 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.
2906         */
2907        META, 
2908        /**
2909         * An amount of economic utility in some recognized currency.
2910         */
2911        MONEY, 
2912        /**
2913         * null
2914         */
2915        MONEYQUANTITY, 
2916        /**
2917         * A human-readable summary of the resource conveying the essential clinical and business information for the resource.
2918         */
2919        NARRATIVE, 
2920        /**
2921         * 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.
2922         */
2923        PARAMETERDEFINITION, 
2924        /**
2925         * A time period defined by a start and end date and optionally time.
2926         */
2927        PERIOD, 
2928        /**
2929         * A populatioof people with some set of grouping criteria.
2930         */
2931        POPULATION, 
2932        /**
2933         * The base type for all re-useable types defined that have a simple property.
2934         */
2935        PRIMITIVETYPE, 
2936        /**
2937         * The shelf-life and storage information for a medicinal product item or container can be described using this class.
2938         */
2939        PRODUCTSHELFLIFE, 
2940        /**
2941         * 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.
2942         */
2943        QUANTITY, 
2944        /**
2945         * A set of ordered Quantities defined by a low and high limit.
2946         */
2947        RANGE, 
2948        /**
2949         * A relationship of two Quantity values - expressed as a numerator and a denominator.
2950         */
2951        RATIO, 
2952        /**
2953         * A range of ratios expressed as a low and high numerator and a denominator.
2954         */
2955        RATIORANGE, 
2956        /**
2957         * A reference from one resource to another.
2958         */
2959        REFERENCE, 
2960        /**
2961         * Related artifacts such as additional documentation, justification, or bibliographic references.
2962         */
2963        RELATEDARTIFACT, 
2964        /**
2965         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
2966         */
2967        SAMPLEDDATA, 
2968        /**
2969         * 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.
2970         */
2971        SIGNATURE, 
2972        /**
2973         * null
2974         */
2975        SIMPLEQUANTITY, 
2976        /**
2977         * 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.
2978         */
2979        TIMING, 
2980        /**
2981         * A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.
2982         */
2983        TRIGGERDEFINITION, 
2984        /**
2985         * 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).
2986         */
2987        USAGECONTEXT, 
2988        /**
2989         * A stream of bytes
2990         */
2991        BASE64BINARY, 
2992        /**
2993         * Value of "true" or "false"
2994         */
2995        BOOLEAN, 
2996        /**
2997         * A URI that is a reference to a canonical URL on a FHIR resource
2998         */
2999        CANONICAL, 
3000        /**
3001         * 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
3002         */
3003        CODE, 
3004        /**
3005         * 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.
3006         */
3007        DATE, 
3008        /**
3009         * 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.
3010         */
3011        DATETIME, 
3012        /**
3013         * A rational number with implicit precision
3014         */
3015        DECIMAL, 
3016        /**
3017         * 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.
3018         */
3019        ID, 
3020        /**
3021         * An instant in time - known at least to the second
3022         */
3023        INSTANT, 
3024        /**
3025         * A whole number
3026         */
3027        INTEGER, 
3028        /**
3029         * A very large whole number
3030         */
3031        INTEGER64, 
3032        /**
3033         * A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine
3034         */
3035        MARKDOWN, 
3036        /**
3037         * An OID represented as a URI
3038         */
3039        OID, 
3040        /**
3041         * An integer with a value that is positive (e.g. >0)
3042         */
3043        POSITIVEINT, 
3044        /**
3045         * A sequence of Unicode characters
3046         */
3047        STRING, 
3048        /**
3049         * A time during the day, with no date specified
3050         */
3051        TIME, 
3052        /**
3053         * An integer with a value that is not negative (e.g. >= 0)
3054         */
3055        UNSIGNEDINT, 
3056        /**
3057         * String of characters used to identify a name or a resource
3058         */
3059        URI, 
3060        /**
3061         * A URI that is a literal reference
3062         */
3063        URL, 
3064        /**
3065         * A UUID, represented as a URI
3066         */
3067        UUID, 
3068        /**
3069         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
3070         */
3071        XHTML, 
3072        /**
3073         * --- Abstract Type! ---This is the base resource type for everything.
3074         */
3075        RESOURCE, 
3076        /**
3077         * 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.
3078         */
3079        BINARY, 
3080        /**
3081         * A container for a collection of resources.
3082         */
3083        BUNDLE, 
3084        /**
3085         * --- Abstract Type! ---A resource that includes narrative, extensions, and contained resources.
3086         */
3087        DOMAINRESOURCE, 
3088        /**
3089         * 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.
3090         */
3091        ACCOUNT, 
3092        /**
3093         * 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).
3094         */
3095        ADMINISTRABLEPRODUCTDEFINITION, 
3096        /**
3097         * 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.
3098         */
3099        ADVERSEEVENT, 
3100        /**
3101         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
3102         */
3103        ALLERGYINTOLERANCE, 
3104        /**
3105         * 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).
3106         */
3107        APPOINTMENT, 
3108        /**
3109         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
3110         */
3111        APPOINTMENTRESPONSE, 
3112        /**
3113         * This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content.
3114         */
3115        ARTIFACTASSESSMENT, 
3116        /**
3117         * A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.
3118         */
3119        AUDITEVENT, 
3120        /**
3121         * 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.
3122         */
3123        BASIC, 
3124        /**
3125         * A biological material originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity.
3126         */
3127        BIOLOGICALLYDERIVEDPRODUCT, 
3128        /**
3129         * 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.
3130         */
3131        BODYSTRUCTURE, 
3132        /**
3133         * --- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.
3134         */
3135        CANONICALRESOURCE, 
3136        /**
3137         * 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.
3138         */
3139        CAPABILITYSTATEMENT, 
3140        /**
3141         * 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.
3142         */
3143        CAPABILITYSTATEMENT2, 
3144        /**
3145         * 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.
3146         */
3147        CODESYSTEM, 
3148        /**
3149         * A compartment definition that defines how resources are accessed on a server.
3150         */
3151        COMPARTMENTDEFINITION, 
3152        /**
3153         * Example of workflow instance.
3154         */
3155        EXAMPLESCENARIO, 
3156        /**
3157         * 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.
3158         */
3159        GRAPHDEFINITION, 
3160        /**
3161         * 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.
3162         */
3163        IMPLEMENTATIONGUIDE, 
3164        /**
3165         * 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.
3166         */
3167        MESSAGEDEFINITION, 
3168        /**
3169         * --- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.
3170         */
3171        METADATARESOURCE, 
3172        /**
3173         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
3174         */
3175        ACTIVITYDEFINITION, 
3176        /**
3177         * 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.
3178         */
3179        CHARGEITEMDEFINITION, 
3180        /**
3181         * 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.
3182         */
3183        CITATION, 
3184        /**
3185         * 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.
3186         */
3187        CONCEPTMAP, 
3188        /**
3189         * A definition of a condition and information relevant to managing it.
3190         */
3191        CONDITIONDEFINITION, 
3192        /**
3193         * The EventDefinition resource provides a reusable description of when a particular event can occur.
3194         */
3195        EVENTDEFINITION, 
3196        /**
3197         * 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.
3198         */
3199        EVIDENCE, 
3200        /**
3201         * 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.
3202         */
3203        EVIDENCEREPORT, 
3204        /**
3205         * The EvidenceVariable resource describes an element that knowledge (Evidence) is about.
3206         */
3207        EVIDENCEVARIABLE, 
3208        /**
3209         * 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.
3210         */
3211        LIBRARY, 
3212        /**
3213         * The Measure resource provides the definition of a quality measure.
3214         */
3215        MEASURE, 
3216        /**
3217         * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a "System" used within the Identifier and Coding data types.
3218         */
3219        NAMINGSYSTEM, 
3220        /**
3221         * 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.
3222         */
3223        PLANDEFINITION, 
3224        /**
3225         * 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.
3226         */
3227        QUESTIONNAIRE, 
3228        /**
3229         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
3230         */
3231        OPERATIONDEFINITION, 
3232        /**
3233         * A search parameter that defines a named search item that can be used to search/filter on a resource.
3234         */
3235        SEARCHPARAMETER, 
3236        /**
3237         * 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.
3238         */
3239        STRUCTUREDEFINITION, 
3240        /**
3241         * A Map of relationships between 2 structures that can be used to transform data.
3242         */
3243        STRUCTUREMAP, 
3244        /**
3245         * Describes a stream of resource state changes identified by trigger criteria and annotated with labels useful to filter projections from this topic.
3246         */
3247        SUBSCRIPTIONTOPIC, 
3248        /**
3249         * 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.
3250         */
3251        TERMINOLOGYCAPABILITIES, 
3252        /**
3253         * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
3254         */
3255        TESTSCRIPT, 
3256        /**
3257         * 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).
3258         */
3259        VALUESET, 
3260        /**
3261         * 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.
3262         */
3263        CAREPLAN, 
3264        /**
3265         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care.
3266         */
3267        CARETEAM, 
3268        /**
3269         * 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.
3270         */
3271        CHARGEITEM, 
3272        /**
3273         * 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.
3274         */
3275        CLAIM, 
3276        /**
3277         * This resource provides the adjudication details from the processing of a Claim resource.
3278         */
3279        CLAIMRESPONSE, 
3280        /**
3281         * 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.
3282         */
3283        CLINICALIMPRESSION, 
3284        /**
3285         * A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.
3286         */
3287        CLINICALUSEDEFINITION, 
3288        /**
3289         * 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.
3290         */
3291        COMMUNICATION, 
3292        /**
3293         * 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.
3294         */
3295        COMMUNICATIONREQUEST, 
3296        /**
3297         * 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.).
3298         */
3299        COMPOSITION, 
3300        /**
3301         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
3302         */
3303        CONDITION, 
3304        /**
3305         * 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.
3306         */
3307        CONSENT, 
3308        /**
3309         * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.
3310         */
3311        CONTRACT, 
3312        /**
3313         * Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.
3314         */
3315        COVERAGE, 
3316        /**
3317         * 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.
3318         */
3319        COVERAGEELIGIBILITYREQUEST, 
3320        /**
3321         * This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.
3322         */
3323        COVERAGEELIGIBILITYRESPONSE, 
3324        /**
3325         * 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.
3326         */
3327        DETECTEDISSUE, 
3328        /**
3329         * 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.
3330         */
3331        DEVICE, 
3332        /**
3333         * This is a specialized resource that defines the characteristics and capabilities of a device.
3334         */
3335        DEVICEDEFINITION, 
3336        /**
3337         * 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.
3338         */
3339        DEVICEDISPENSE, 
3340        /**
3341         * Describes a measurement, calculation or setting capability of a medical device.
3342         */
3343        DEVICEMETRIC, 
3344        /**
3345         * 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.
3346         */
3347        DEVICEREQUEST, 
3348        /**
3349         * 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.
3350         */
3351        DEVICEUSAGE, 
3352        /**
3353         * 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.
3354         */
3355        DIAGNOSTICREPORT, 
3356        /**
3357         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
3358         */
3359        DOCUMENTMANIFEST, 
3360        /**
3361         * 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.
3362         */
3363        DOCUMENTREFERENCE, 
3364        /**
3365         * 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.
3366         */
3367        ENCOUNTER, 
3368        /**
3369         * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b, a REST endpoint for another FHIR server, or a s/Mime email address. This may include any security context information.
3370         */
3371        ENDPOINT, 
3372        /**
3373         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
3374         */
3375        ENROLLMENTREQUEST, 
3376        /**
3377         * This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.
3378         */
3379        ENROLLMENTRESPONSE, 
3380        /**
3381         * 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.
3382         */
3383        EPISODEOFCARE, 
3384        /**
3385         * 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.
3386         */
3387        EXPLANATIONOFBENEFIT, 
3388        /**
3389         * Significant health conditions for a person related to the patient relevant in the context of care for the patient.
3390         */
3391        FAMILYMEMBERHISTORY, 
3392        /**
3393         * Prospective warnings of potential issues when providing care to the patient.
3394         */
3395        FLAG, 
3396        /**
3397         * This resource describes a product or service that is available through a program and includes the conditions and constraints of availability.  All of the information in this resource is specific to the inclusion of the item in the formulary and is not inherent to the item itself.
3398         */
3399        FORMULARYITEM, 
3400        /**
3401         * 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.
3402         */
3403        GOAL, 
3404        /**
3405         * 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.
3406         */
3407        GROUP, 
3408        /**
3409         * 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.
3410         */
3411        GUIDANCERESPONSE, 
3412        /**
3413         * The details of a healthcare service available at a location.
3414         */
3415        HEALTHCARESERVICE, 
3416        /**
3417         * 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.
3418         */
3419        IMAGINGSELECTION, 
3420        /**
3421         * 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.
3422         */
3423        IMAGINGSTUDY, 
3424        /**
3425         * 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.
3426         */
3427        IMMUNIZATION, 
3428        /**
3429         * Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those  recommendations.
3430         */
3431        IMMUNIZATIONEVALUATION, 
3432        /**
3433         * A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.
3434         */
3435        IMMUNIZATIONRECOMMENDATION, 
3436        /**
3437         * An ingredient of a manufactured item or pharmaceutical product.
3438         */
3439        INGREDIENT, 
3440        /**
3441         * Details of a Health Insurance product/plan provided by an organization.
3442         */
3443        INSURANCEPLAN, 
3444        /**
3445         * A report of inventory or stock items.
3446         */
3447        INVENTORYREPORT, 
3448        /**
3449         * Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.
3450         */
3451        INVOICE, 
3452        /**
3453         * Identifies two or more records (resource instances) that refer to the same real-world "occurrence".
3454         */
3455        LINKAGE, 
3456        /**
3457         * A list is a curated collection of resources.
3458         */
3459        LIST, 
3460        /**
3461         * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.
3462         */
3463        LOCATION, 
3464        /**
3465         * The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product.
3466         */
3467        MANUFACTUREDITEMDEFINITION, 
3468        /**
3469         * The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.
3470         */
3471        MEASUREREPORT, 
3472        /**
3473         * 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.
3474         */
3475        MEDICATION, 
3476        /**
3477         * 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.
3478         */
3479        MEDICATIONADMINISTRATION, 
3480        /**
3481         * 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.
3482         */
3483        MEDICATIONDISPENSE, 
3484        /**
3485         * Information about a medication that is used to support knowledge.
3486         */
3487        MEDICATIONKNOWLEDGE, 
3488        /**
3489         * 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.
3490         */
3491        MEDICATIONREQUEST, 
3492        /**
3493         * 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. 
3494
3495The 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.
3496         */
3497        MEDICATIONUSAGE, 
3498        /**
3499         * Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use, drug catalogs, to support prescribing, adverse events management etc.).
3500         */
3501        MEDICINALPRODUCTDEFINITION, 
3502        /**
3503         * 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.
3504         */
3505        MESSAGEHEADER, 
3506        /**
3507         * Representation of a molecular sequence.
3508         */
3509        MOLECULARSEQUENCE, 
3510        /**
3511         * 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.
3512         */
3513        NUTRITIONINTAKE, 
3514        /**
3515         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
3516         */
3517        NUTRITIONORDER, 
3518        /**
3519         * A food or supplement that is consumed by patients.
3520         */
3521        NUTRITIONPRODUCT, 
3522        /**
3523         * Measurements and simple assertions made about a patient, device or other subject.
3524         */
3525        OBSERVATION, 
3526        /**
3527         * Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.
3528         */
3529        OBSERVATIONDEFINITION, 
3530        /**
3531         * A collection of error, warning, or information messages that result from a system action.
3532         */
3533        OPERATIONOUTCOME, 
3534        /**
3535         * 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.
3536         */
3537        ORGANIZATION, 
3538        /**
3539         * Defines an affiliation/assotiation/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship.
3540         */
3541        ORGANIZATIONAFFILIATION, 
3542        /**
3543         * A medically related item or items, in a container or package.
3544         */
3545        PACKAGEDPRODUCTDEFINITION, 
3546        /**
3547         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
3548         */
3549        PATIENT, 
3550        /**
3551         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
3552         */
3553        PAYMENTNOTICE, 
3554        /**
3555         * This resource provides the details including amount of a payment and allocates the payment items being paid.
3556         */
3557        PAYMENTRECONCILIATION, 
3558        /**
3559         * Permission.
3560         */
3561        PERMISSION, 
3562        /**
3563         * Demographics and administrative information about a person independent of a specific health-related context.
3564         */
3565        PERSON, 
3566        /**
3567         * A person who is directly or indirectly involved in the provisioning of healthcare.
3568         */
3569        PRACTITIONER, 
3570        /**
3571         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
3572         */
3573        PRACTITIONERROLE, 
3574        /**
3575         * 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.
3576         */
3577        PROCEDURE, 
3578        /**
3579         * 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.
3580         */
3581        PROVENANCE, 
3582        /**
3583         * 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.
3584         */
3585        QUESTIONNAIRERESPONSE, 
3586        /**
3587         * 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.
3588         */
3589        REGULATEDAUTHORIZATION, 
3590        /**
3591         * Information about a person that is involved in a patient's health or the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.
3592         */
3593        RELATEDPERSON, 
3594        /**
3595         * 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".
3596         */
3597        REQUESTGROUP, 
3598        /**
3599         * 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.
3600         */
3601        RESEARCHSTUDY, 
3602        /**
3603         * A physical entity which is the primary unit of operational and/or administrative interest in a study.
3604         */
3605        RESEARCHSUBJECT, 
3606        /**
3607         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
3608         */
3609        RISKASSESSMENT, 
3610        /**
3611         * A container for slots of time that may be available for booking appointments.
3612         */
3613        SCHEDULE, 
3614        /**
3615         * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.
3616         */
3617        SERVICEREQUEST, 
3618        /**
3619         * A slot of time on a schedule that may be available for booking appointments.
3620         */
3621        SLOT, 
3622        /**
3623         * A sample to be used for analysis.
3624         */
3625        SPECIMEN, 
3626        /**
3627         * A kind of specimen with associated set of requirements.
3628         */
3629        SPECIMENDEFINITION, 
3630        /**
3631         * The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.
3632         */
3633        SUBSCRIPTION, 
3634        /**
3635         * The SubscriptionStatus resource describes the state of a Subscription during notifications.
3636         */
3637        SUBSCRIPTIONSTATUS, 
3638        /**
3639         * A homogeneous material with a definite composition.
3640         */
3641        SUBSTANCE, 
3642        /**
3643         * The detailed description of a substance, typically at a level beyond what is used for prescribing.
3644         */
3645        SUBSTANCEDEFINITION, 
3646        /**
3647         * 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.
3648         */
3649        SUBSTANCENUCLEICACID, 
3650        /**
3651         * Properties of a substance specific to it being a polymer.
3652         */
3653        SUBSTANCEPOLYMER, 
3654        /**
3655         * 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.
3656         */
3657        SUBSTANCEPROTEIN, 
3658        /**
3659         * Todo.
3660         */
3661        SUBSTANCEREFERENCEINFORMATION, 
3662        /**
3663         * 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.
3664         */
3665        SUBSTANCESOURCEMATERIAL, 
3666        /**
3667         * Record of delivery of what is supplied.
3668         */
3669        SUPPLYDELIVERY, 
3670        /**
3671         * 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.
3672         */
3673        SUPPLYREQUEST, 
3674        /**
3675         * A task to be performed.
3676         */
3677        TASK, 
3678        /**
3679         * A summary of information based on the results of executing a TestScript.
3680         */
3681        TESTREPORT, 
3682        /**
3683         * Record of transport.
3684         */
3685        TRANSPORT, 
3686        /**
3687         * Describes validation requirements, source(s), status and dates for one or more elements.
3688         */
3689        VERIFICATIONRESULT, 
3690        /**
3691         * An authorization for the provision of glasses and/or contact lenses to a patient.
3692         */
3693        VISIONPRESCRIPTION, 
3694        /**
3695         * This resource is a non-persisted resource primarily used to pass information into and back from an [operation](operations.html). There is no RESTful endpoint associated with it.
3696         */
3697        PARAMETERS, 
3698        /**
3699         * A place holder that means any kind of data type
3700         */
3701        TYPE, 
3702        /**
3703         * A place holder that means any kind of resource
3704         */
3705        ANY, 
3706        /**
3707         * added to help the parsers
3708         */
3709        NULL;
3710        public static FHIRAllTypes fromCode(String codeString) throws FHIRException {
3711            if (codeString == null || "".equals(codeString))
3712                return null;
3713        if ("Address".equals(codeString))
3714          return ADDRESS;
3715        if ("Age".equals(codeString))
3716          return AGE;
3717        if ("Annotation".equals(codeString))
3718          return ANNOTATION;
3719        if ("Attachment".equals(codeString))
3720          return ATTACHMENT;
3721        if ("BackboneElement".equals(codeString))
3722          return BACKBONEELEMENT;
3723        if ("BackboneType".equals(codeString))
3724          return BACKBONETYPE;
3725        if ("Base".equals(codeString))
3726          return BASE;
3727        if ("CodeableConcept".equals(codeString))
3728          return CODEABLECONCEPT;
3729        if ("CodeableReference".equals(codeString))
3730          return CODEABLEREFERENCE;
3731        if ("Coding".equals(codeString))
3732          return CODING;
3733        if ("ContactDetail".equals(codeString))
3734          return CONTACTDETAIL;
3735        if ("ContactPoint".equals(codeString))
3736          return CONTACTPOINT;
3737        if ("Contributor".equals(codeString))
3738          return CONTRIBUTOR;
3739        if ("Count".equals(codeString))
3740          return COUNT;
3741        if ("DataRequirement".equals(codeString))
3742          return DATAREQUIREMENT;
3743        if ("DataType".equals(codeString))
3744          return DATATYPE;
3745        if ("Distance".equals(codeString))
3746          return DISTANCE;
3747        if ("Dosage".equals(codeString))
3748          return DOSAGE;
3749        if ("Duration".equals(codeString))
3750          return DURATION;
3751        if ("Element".equals(codeString))
3752          return ELEMENT;
3753        if ("ElementDefinition".equals(codeString))
3754          return ELEMENTDEFINITION;
3755        if ("Expression".equals(codeString))
3756          return EXPRESSION;
3757        if ("ExtendedContactDetail".equals(codeString))
3758          return EXTENDEDCONTACTDETAIL;
3759        if ("Extension".equals(codeString))
3760          return EXTENSION;
3761        if ("HumanName".equals(codeString))
3762          return HUMANNAME;
3763        if ("Identifier".equals(codeString))
3764          return IDENTIFIER;
3765        if ("MarketingStatus".equals(codeString))
3766          return MARKETINGSTATUS;
3767        if ("Meta".equals(codeString))
3768          return META;
3769        if ("Money".equals(codeString))
3770          return MONEY;
3771        if ("MoneyQuantity".equals(codeString))
3772          return MONEYQUANTITY;
3773        if ("Narrative".equals(codeString))
3774          return NARRATIVE;
3775        if ("ParameterDefinition".equals(codeString))
3776          return PARAMETERDEFINITION;
3777        if ("Period".equals(codeString))
3778          return PERIOD;
3779        if ("Population".equals(codeString))
3780          return POPULATION;
3781        if ("PrimitiveType".equals(codeString))
3782          return PRIMITIVETYPE;
3783        if ("ProductShelfLife".equals(codeString))
3784          return PRODUCTSHELFLIFE;
3785        if ("Quantity".equals(codeString))
3786          return QUANTITY;
3787        if ("Range".equals(codeString))
3788          return RANGE;
3789        if ("Ratio".equals(codeString))
3790          return RATIO;
3791        if ("RatioRange".equals(codeString))
3792          return RATIORANGE;
3793        if ("Reference".equals(codeString))
3794          return REFERENCE;
3795        if ("RelatedArtifact".equals(codeString))
3796          return RELATEDARTIFACT;
3797        if ("SampledData".equals(codeString))
3798          return SAMPLEDDATA;
3799        if ("Signature".equals(codeString))
3800          return SIGNATURE;
3801        if ("SimpleQuantity".equals(codeString))
3802          return SIMPLEQUANTITY;
3803        if ("Timing".equals(codeString))
3804          return TIMING;
3805        if ("TriggerDefinition".equals(codeString))
3806          return TRIGGERDEFINITION;
3807        if ("UsageContext".equals(codeString))
3808          return USAGECONTEXT;
3809        if ("base64Binary".equals(codeString))
3810          return BASE64BINARY;
3811        if ("boolean".equals(codeString))
3812          return BOOLEAN;
3813        if ("canonical".equals(codeString))
3814          return CANONICAL;
3815        if ("code".equals(codeString))
3816          return CODE;
3817        if ("date".equals(codeString))
3818          return DATE;
3819        if ("dateTime".equals(codeString))
3820          return DATETIME;
3821        if ("decimal".equals(codeString))
3822          return DECIMAL;
3823        if ("id".equals(codeString))
3824          return ID;
3825        if ("instant".equals(codeString))
3826          return INSTANT;
3827        if ("integer".equals(codeString))
3828          return INTEGER;
3829        if ("integer64".equals(codeString))
3830          return INTEGER64;
3831        if ("markdown".equals(codeString))
3832          return MARKDOWN;
3833        if ("oid".equals(codeString))
3834          return OID;
3835        if ("positiveInt".equals(codeString))
3836          return POSITIVEINT;
3837        if ("string".equals(codeString))
3838          return STRING;
3839        if ("time".equals(codeString))
3840          return TIME;
3841        if ("unsignedInt".equals(codeString))
3842          return UNSIGNEDINT;
3843        if ("uri".equals(codeString))
3844          return URI;
3845        if ("url".equals(codeString))
3846          return URL;
3847        if ("uuid".equals(codeString))
3848          return UUID;
3849        if ("xhtml".equals(codeString))
3850          return XHTML;
3851        if ("Resource".equals(codeString))
3852          return RESOURCE;
3853        if ("Binary".equals(codeString))
3854          return BINARY;
3855        if ("Bundle".equals(codeString))
3856          return BUNDLE;
3857        if ("DomainResource".equals(codeString))
3858          return DOMAINRESOURCE;
3859        if ("Account".equals(codeString))
3860          return ACCOUNT;
3861        if ("AdministrableProductDefinition".equals(codeString))
3862          return ADMINISTRABLEPRODUCTDEFINITION;
3863        if ("AdverseEvent".equals(codeString))
3864          return ADVERSEEVENT;
3865        if ("AllergyIntolerance".equals(codeString))
3866          return ALLERGYINTOLERANCE;
3867        if ("Appointment".equals(codeString))
3868          return APPOINTMENT;
3869        if ("AppointmentResponse".equals(codeString))
3870          return APPOINTMENTRESPONSE;
3871        if ("ArtifactAssessment".equals(codeString))
3872          return ARTIFACTASSESSMENT;
3873        if ("AuditEvent".equals(codeString))
3874          return AUDITEVENT;
3875        if ("Basic".equals(codeString))
3876          return BASIC;
3877        if ("BiologicallyDerivedProduct".equals(codeString))
3878          return BIOLOGICALLYDERIVEDPRODUCT;
3879        if ("BodyStructure".equals(codeString))
3880          return BODYSTRUCTURE;
3881        if ("CanonicalResource".equals(codeString))
3882          return CANONICALRESOURCE;
3883        if ("CapabilityStatement".equals(codeString))
3884          return CAPABILITYSTATEMENT;
3885        if ("CapabilityStatement2".equals(codeString))
3886          return CAPABILITYSTATEMENT2;
3887        if ("CodeSystem".equals(codeString))
3888          return CODESYSTEM;
3889        if ("CompartmentDefinition".equals(codeString))
3890          return COMPARTMENTDEFINITION;
3891        if ("ExampleScenario".equals(codeString))
3892          return EXAMPLESCENARIO;
3893        if ("GraphDefinition".equals(codeString))
3894          return GRAPHDEFINITION;
3895        if ("ImplementationGuide".equals(codeString))
3896          return IMPLEMENTATIONGUIDE;
3897        if ("MessageDefinition".equals(codeString))
3898          return MESSAGEDEFINITION;
3899        if ("MetadataResource".equals(codeString))
3900          return METADATARESOURCE;
3901        if ("ActivityDefinition".equals(codeString))
3902          return ACTIVITYDEFINITION;
3903        if ("ChargeItemDefinition".equals(codeString))
3904          return CHARGEITEMDEFINITION;
3905        if ("Citation".equals(codeString))
3906          return CITATION;
3907        if ("ConceptMap".equals(codeString))
3908          return CONCEPTMAP;
3909        if ("ConditionDefinition".equals(codeString))
3910          return CONDITIONDEFINITION;
3911        if ("EventDefinition".equals(codeString))
3912          return EVENTDEFINITION;
3913        if ("Evidence".equals(codeString))
3914          return EVIDENCE;
3915        if ("EvidenceReport".equals(codeString))
3916          return EVIDENCEREPORT;
3917        if ("EvidenceVariable".equals(codeString))
3918          return EVIDENCEVARIABLE;
3919        if ("Library".equals(codeString))
3920          return LIBRARY;
3921        if ("Measure".equals(codeString))
3922          return MEASURE;
3923        if ("NamingSystem".equals(codeString))
3924          return NAMINGSYSTEM;
3925        if ("PlanDefinition".equals(codeString))
3926          return PLANDEFINITION;
3927        if ("Questionnaire".equals(codeString))
3928          return QUESTIONNAIRE;
3929        if ("OperationDefinition".equals(codeString))
3930          return OPERATIONDEFINITION;
3931        if ("SearchParameter".equals(codeString))
3932          return SEARCHPARAMETER;
3933        if ("StructureDefinition".equals(codeString))
3934          return STRUCTUREDEFINITION;
3935        if ("StructureMap".equals(codeString))
3936          return STRUCTUREMAP;
3937        if ("SubscriptionTopic".equals(codeString))
3938          return SUBSCRIPTIONTOPIC;
3939        if ("TerminologyCapabilities".equals(codeString))
3940          return TERMINOLOGYCAPABILITIES;
3941        if ("TestScript".equals(codeString))
3942          return TESTSCRIPT;
3943        if ("ValueSet".equals(codeString))
3944          return VALUESET;
3945        if ("CarePlan".equals(codeString))
3946          return CAREPLAN;
3947        if ("CareTeam".equals(codeString))
3948          return CARETEAM;
3949        if ("ChargeItem".equals(codeString))
3950          return CHARGEITEM;
3951        if ("Claim".equals(codeString))
3952          return CLAIM;
3953        if ("ClaimResponse".equals(codeString))
3954          return CLAIMRESPONSE;
3955        if ("ClinicalImpression".equals(codeString))
3956          return CLINICALIMPRESSION;
3957        if ("ClinicalUseDefinition".equals(codeString))
3958          return CLINICALUSEDEFINITION;
3959        if ("Communication".equals(codeString))
3960          return COMMUNICATION;
3961        if ("CommunicationRequest".equals(codeString))
3962          return COMMUNICATIONREQUEST;
3963        if ("Composition".equals(codeString))
3964          return COMPOSITION;
3965        if ("Condition".equals(codeString))
3966          return CONDITION;
3967        if ("Consent".equals(codeString))
3968          return CONSENT;
3969        if ("Contract".equals(codeString))
3970          return CONTRACT;
3971        if ("Coverage".equals(codeString))
3972          return COVERAGE;
3973        if ("CoverageEligibilityRequest".equals(codeString))
3974          return COVERAGEELIGIBILITYREQUEST;
3975        if ("CoverageEligibilityResponse".equals(codeString))
3976          return COVERAGEELIGIBILITYRESPONSE;
3977        if ("DetectedIssue".equals(codeString))
3978          return DETECTEDISSUE;
3979        if ("Device".equals(codeString))
3980          return DEVICE;
3981        if ("DeviceDefinition".equals(codeString))
3982          return DEVICEDEFINITION;
3983        if ("DeviceDispense".equals(codeString))
3984          return DEVICEDISPENSE;
3985        if ("DeviceMetric".equals(codeString))
3986          return DEVICEMETRIC;
3987        if ("DeviceRequest".equals(codeString))
3988          return DEVICEREQUEST;
3989        if ("DeviceUsage".equals(codeString))
3990          return DEVICEUSAGE;
3991        if ("DiagnosticReport".equals(codeString))
3992          return DIAGNOSTICREPORT;
3993        if ("DocumentManifest".equals(codeString))
3994          return DOCUMENTMANIFEST;
3995        if ("DocumentReference".equals(codeString))
3996          return DOCUMENTREFERENCE;
3997        if ("Encounter".equals(codeString))
3998          return ENCOUNTER;
3999        if ("Endpoint".equals(codeString))
4000          return ENDPOINT;
4001        if ("EnrollmentRequest".equals(codeString))
4002          return ENROLLMENTREQUEST;
4003        if ("EnrollmentResponse".equals(codeString))
4004          return ENROLLMENTRESPONSE;
4005        if ("EpisodeOfCare".equals(codeString))
4006          return EPISODEOFCARE;
4007        if ("ExplanationOfBenefit".equals(codeString))
4008          return EXPLANATIONOFBENEFIT;
4009        if ("FamilyMemberHistory".equals(codeString))
4010          return FAMILYMEMBERHISTORY;
4011        if ("Flag".equals(codeString))
4012          return FLAG;
4013        if ("FormularyItem".equals(codeString))
4014          return FORMULARYITEM;
4015        if ("Goal".equals(codeString))
4016          return GOAL;
4017        if ("Group".equals(codeString))
4018          return GROUP;
4019        if ("GuidanceResponse".equals(codeString))
4020          return GUIDANCERESPONSE;
4021        if ("HealthcareService".equals(codeString))
4022          return HEALTHCARESERVICE;
4023        if ("ImagingSelection".equals(codeString))
4024          return IMAGINGSELECTION;
4025        if ("ImagingStudy".equals(codeString))
4026          return IMAGINGSTUDY;
4027        if ("Immunization".equals(codeString))
4028          return IMMUNIZATION;
4029        if ("ImmunizationEvaluation".equals(codeString))
4030          return IMMUNIZATIONEVALUATION;
4031        if ("ImmunizationRecommendation".equals(codeString))
4032          return IMMUNIZATIONRECOMMENDATION;
4033        if ("Ingredient".equals(codeString))
4034          return INGREDIENT;
4035        if ("InsurancePlan".equals(codeString))
4036          return INSURANCEPLAN;
4037        if ("InventoryReport".equals(codeString))
4038          return INVENTORYREPORT;
4039        if ("Invoice".equals(codeString))
4040          return INVOICE;
4041        if ("Linkage".equals(codeString))
4042          return LINKAGE;
4043        if ("List".equals(codeString))
4044          return LIST;
4045        if ("Location".equals(codeString))
4046          return LOCATION;
4047        if ("ManufacturedItemDefinition".equals(codeString))
4048          return MANUFACTUREDITEMDEFINITION;
4049        if ("MeasureReport".equals(codeString))
4050          return MEASUREREPORT;
4051        if ("Medication".equals(codeString))
4052          return MEDICATION;
4053        if ("MedicationAdministration".equals(codeString))
4054          return MEDICATIONADMINISTRATION;
4055        if ("MedicationDispense".equals(codeString))
4056          return MEDICATIONDISPENSE;
4057        if ("MedicationKnowledge".equals(codeString))
4058          return MEDICATIONKNOWLEDGE;
4059        if ("MedicationRequest".equals(codeString))
4060          return MEDICATIONREQUEST;
4061        if ("MedicationUsage".equals(codeString))
4062          return MEDICATIONUSAGE;
4063        if ("MedicinalProductDefinition".equals(codeString))
4064          return MEDICINALPRODUCTDEFINITION;
4065        if ("MessageHeader".equals(codeString))
4066          return MESSAGEHEADER;
4067        if ("MolecularSequence".equals(codeString))
4068          return MOLECULARSEQUENCE;
4069        if ("NutritionIntake".equals(codeString))
4070          return NUTRITIONINTAKE;
4071        if ("NutritionOrder".equals(codeString))
4072          return NUTRITIONORDER;
4073        if ("NutritionProduct".equals(codeString))
4074          return NUTRITIONPRODUCT;
4075        if ("Observation".equals(codeString))
4076          return OBSERVATION;
4077        if ("ObservationDefinition".equals(codeString))
4078          return OBSERVATIONDEFINITION;
4079        if ("OperationOutcome".equals(codeString))
4080          return OPERATIONOUTCOME;
4081        if ("Organization".equals(codeString))
4082          return ORGANIZATION;
4083        if ("OrganizationAffiliation".equals(codeString))
4084          return ORGANIZATIONAFFILIATION;
4085        if ("PackagedProductDefinition".equals(codeString))
4086          return PACKAGEDPRODUCTDEFINITION;
4087        if ("Patient".equals(codeString))
4088          return PATIENT;
4089        if ("PaymentNotice".equals(codeString))
4090          return PAYMENTNOTICE;
4091        if ("PaymentReconciliation".equals(codeString))
4092          return PAYMENTRECONCILIATION;
4093        if ("Permission".equals(codeString))
4094          return PERMISSION;
4095        if ("Person".equals(codeString))
4096          return PERSON;
4097        if ("Practitioner".equals(codeString))
4098          return PRACTITIONER;
4099        if ("PractitionerRole".equals(codeString))
4100          return PRACTITIONERROLE;
4101        if ("Procedure".equals(codeString))
4102          return PROCEDURE;
4103        if ("Provenance".equals(codeString))
4104          return PROVENANCE;
4105        if ("QuestionnaireResponse".equals(codeString))
4106          return QUESTIONNAIRERESPONSE;
4107        if ("RegulatedAuthorization".equals(codeString))
4108          return REGULATEDAUTHORIZATION;
4109        if ("RelatedPerson".equals(codeString))
4110          return RELATEDPERSON;
4111        if ("RequestGroup".equals(codeString))
4112          return REQUESTGROUP;
4113        if ("ResearchStudy".equals(codeString))
4114          return RESEARCHSTUDY;
4115        if ("ResearchSubject".equals(codeString))
4116          return RESEARCHSUBJECT;
4117        if ("RiskAssessment".equals(codeString))
4118          return RISKASSESSMENT;
4119        if ("Schedule".equals(codeString))
4120          return SCHEDULE;
4121        if ("ServiceRequest".equals(codeString))
4122          return SERVICEREQUEST;
4123        if ("Slot".equals(codeString))
4124          return SLOT;
4125        if ("Specimen".equals(codeString))
4126          return SPECIMEN;
4127        if ("SpecimenDefinition".equals(codeString))
4128          return SPECIMENDEFINITION;
4129        if ("Subscription".equals(codeString))
4130          return SUBSCRIPTION;
4131        if ("SubscriptionStatus".equals(codeString))
4132          return SUBSCRIPTIONSTATUS;
4133        if ("Substance".equals(codeString))
4134          return SUBSTANCE;
4135        if ("SubstanceDefinition".equals(codeString))
4136          return SUBSTANCEDEFINITION;
4137        if ("SubstanceNucleicAcid".equals(codeString))
4138          return SUBSTANCENUCLEICACID;
4139        if ("SubstancePolymer".equals(codeString))
4140          return SUBSTANCEPOLYMER;
4141        if ("SubstanceProtein".equals(codeString))
4142          return SUBSTANCEPROTEIN;
4143        if ("SubstanceReferenceInformation".equals(codeString))
4144          return SUBSTANCEREFERENCEINFORMATION;
4145        if ("SubstanceSourceMaterial".equals(codeString))
4146          return SUBSTANCESOURCEMATERIAL;
4147        if ("SupplyDelivery".equals(codeString))
4148          return SUPPLYDELIVERY;
4149        if ("SupplyRequest".equals(codeString))
4150          return SUPPLYREQUEST;
4151        if ("Task".equals(codeString))
4152          return TASK;
4153        if ("TestReport".equals(codeString))
4154          return TESTREPORT;
4155        if ("Transport".equals(codeString))
4156          return TRANSPORT;
4157        if ("VerificationResult".equals(codeString))
4158          return VERIFICATIONRESULT;
4159        if ("VisionPrescription".equals(codeString))
4160          return VISIONPRESCRIPTION;
4161        if ("Parameters".equals(codeString))
4162          return PARAMETERS;
4163        if ("Type".equals(codeString))
4164          return TYPE;
4165        if ("Any".equals(codeString))
4166          return ANY;
4167        throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'");
4168        }
4169        public String toCode() {
4170          switch (this) {
4171            case ADDRESS: return "Address";
4172            case AGE: return "Age";
4173            case ANNOTATION: return "Annotation";
4174            case ATTACHMENT: return "Attachment";
4175            case BACKBONEELEMENT: return "BackboneElement";
4176            case BACKBONETYPE: return "BackboneType";
4177            case BASE: return "Base";
4178            case CODEABLECONCEPT: return "CodeableConcept";
4179            case CODEABLEREFERENCE: return "CodeableReference";
4180            case CODING: return "Coding";
4181            case CONTACTDETAIL: return "ContactDetail";
4182            case CONTACTPOINT: return "ContactPoint";
4183            case CONTRIBUTOR: return "Contributor";
4184            case COUNT: return "Count";
4185            case DATAREQUIREMENT: return "DataRequirement";
4186            case DATATYPE: return "DataType";
4187            case DISTANCE: return "Distance";
4188            case DOSAGE: return "Dosage";
4189            case DURATION: return "Duration";
4190            case ELEMENT: return "Element";
4191            case ELEMENTDEFINITION: return "ElementDefinition";
4192            case EXPRESSION: return "Expression";
4193            case EXTENDEDCONTACTDETAIL: return "ExtendedContactDetail";
4194            case EXTENSION: return "Extension";
4195            case HUMANNAME: return "HumanName";
4196            case IDENTIFIER: return "Identifier";
4197            case MARKETINGSTATUS: return "MarketingStatus";
4198            case META: return "Meta";
4199            case MONEY: return "Money";
4200            case MONEYQUANTITY: return "MoneyQuantity";
4201            case NARRATIVE: return "Narrative";
4202            case PARAMETERDEFINITION: return "ParameterDefinition";
4203            case PERIOD: return "Period";
4204            case POPULATION: return "Population";
4205            case PRIMITIVETYPE: return "PrimitiveType";
4206            case PRODUCTSHELFLIFE: return "ProductShelfLife";
4207            case QUANTITY: return "Quantity";
4208            case RANGE: return "Range";
4209            case RATIO: return "Ratio";
4210            case RATIORANGE: return "RatioRange";
4211            case REFERENCE: return "Reference";
4212            case RELATEDARTIFACT: return "RelatedArtifact";
4213            case SAMPLEDDATA: return "SampledData";
4214            case SIGNATURE: return "Signature";
4215            case SIMPLEQUANTITY: return "SimpleQuantity";
4216            case TIMING: return "Timing";
4217            case TRIGGERDEFINITION: return "TriggerDefinition";
4218            case USAGECONTEXT: return "UsageContext";
4219            case BASE64BINARY: return "base64Binary";
4220            case BOOLEAN: return "boolean";
4221            case CANONICAL: return "canonical";
4222            case CODE: return "code";
4223            case DATE: return "date";
4224            case DATETIME: return "dateTime";
4225            case DECIMAL: return "decimal";
4226            case ID: return "id";
4227            case INSTANT: return "instant";
4228            case INTEGER: return "integer";
4229            case INTEGER64: return "integer64";
4230            case MARKDOWN: return "markdown";
4231            case OID: return "oid";
4232            case POSITIVEINT: return "positiveInt";
4233            case STRING: return "string";
4234            case TIME: return "time";
4235            case UNSIGNEDINT: return "unsignedInt";
4236            case URI: return "uri";
4237            case URL: return "url";
4238            case UUID: return "uuid";
4239            case XHTML: return "xhtml";
4240            case RESOURCE: return "Resource";
4241            case BINARY: return "Binary";
4242            case BUNDLE: return "Bundle";
4243            case DOMAINRESOURCE: return "DomainResource";
4244            case ACCOUNT: return "Account";
4245            case ADMINISTRABLEPRODUCTDEFINITION: return "AdministrableProductDefinition";
4246            case ADVERSEEVENT: return "AdverseEvent";
4247            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
4248            case APPOINTMENT: return "Appointment";
4249            case APPOINTMENTRESPONSE: return "AppointmentResponse";
4250            case ARTIFACTASSESSMENT: return "ArtifactAssessment";
4251            case AUDITEVENT: return "AuditEvent";
4252            case BASIC: return "Basic";
4253            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
4254            case BODYSTRUCTURE: return "BodyStructure";
4255            case CANONICALRESOURCE: return "CanonicalResource";
4256            case CAPABILITYSTATEMENT: return "CapabilityStatement";
4257            case CAPABILITYSTATEMENT2: return "CapabilityStatement2";
4258            case CODESYSTEM: return "CodeSystem";
4259            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
4260            case EXAMPLESCENARIO: return "ExampleScenario";
4261            case GRAPHDEFINITION: return "GraphDefinition";
4262            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
4263            case MESSAGEDEFINITION: return "MessageDefinition";
4264            case METADATARESOURCE: return "MetadataResource";
4265            case ACTIVITYDEFINITION: return "ActivityDefinition";
4266            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
4267            case CITATION: return "Citation";
4268            case CONCEPTMAP: return "ConceptMap";
4269            case CONDITIONDEFINITION: return "ConditionDefinition";
4270            case EVENTDEFINITION: return "EventDefinition";
4271            case EVIDENCE: return "Evidence";
4272            case EVIDENCEREPORT: return "EvidenceReport";
4273            case EVIDENCEVARIABLE: return "EvidenceVariable";
4274            case LIBRARY: return "Library";
4275            case MEASURE: return "Measure";
4276            case NAMINGSYSTEM: return "NamingSystem";
4277            case PLANDEFINITION: return "PlanDefinition";
4278            case QUESTIONNAIRE: return "Questionnaire";
4279            case OPERATIONDEFINITION: return "OperationDefinition";
4280            case SEARCHPARAMETER: return "SearchParameter";
4281            case STRUCTUREDEFINITION: return "StructureDefinition";
4282            case STRUCTUREMAP: return "StructureMap";
4283            case SUBSCRIPTIONTOPIC: return "SubscriptionTopic";
4284            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
4285            case TESTSCRIPT: return "TestScript";
4286            case VALUESET: return "ValueSet";
4287            case CAREPLAN: return "CarePlan";
4288            case CARETEAM: return "CareTeam";
4289            case CHARGEITEM: return "ChargeItem";
4290            case CLAIM: return "Claim";
4291            case CLAIMRESPONSE: return "ClaimResponse";
4292            case CLINICALIMPRESSION: return "ClinicalImpression";
4293            case CLINICALUSEDEFINITION: return "ClinicalUseDefinition";
4294            case COMMUNICATION: return "Communication";
4295            case COMMUNICATIONREQUEST: return "CommunicationRequest";
4296            case COMPOSITION: return "Composition";
4297            case CONDITION: return "Condition";
4298            case CONSENT: return "Consent";
4299            case CONTRACT: return "Contract";
4300            case COVERAGE: return "Coverage";
4301            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
4302            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
4303            case DETECTEDISSUE: return "DetectedIssue";
4304            case DEVICE: return "Device";
4305            case DEVICEDEFINITION: return "DeviceDefinition";
4306            case DEVICEDISPENSE: return "DeviceDispense";
4307            case DEVICEMETRIC: return "DeviceMetric";
4308            case DEVICEREQUEST: return "DeviceRequest";
4309            case DEVICEUSAGE: return "DeviceUsage";
4310            case DIAGNOSTICREPORT: return "DiagnosticReport";
4311            case DOCUMENTMANIFEST: return "DocumentManifest";
4312            case DOCUMENTREFERENCE: return "DocumentReference";
4313            case ENCOUNTER: return "Encounter";
4314            case ENDPOINT: return "Endpoint";
4315            case ENROLLMENTREQUEST: return "EnrollmentRequest";
4316            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
4317            case EPISODEOFCARE: return "EpisodeOfCare";
4318            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
4319            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
4320            case FLAG: return "Flag";
4321            case FORMULARYITEM: return "FormularyItem";
4322            case GOAL: return "Goal";
4323            case GROUP: return "Group";
4324            case GUIDANCERESPONSE: return "GuidanceResponse";
4325            case HEALTHCARESERVICE: return "HealthcareService";
4326            case IMAGINGSELECTION: return "ImagingSelection";
4327            case IMAGINGSTUDY: return "ImagingStudy";
4328            case IMMUNIZATION: return "Immunization";
4329            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
4330            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
4331            case INGREDIENT: return "Ingredient";
4332            case INSURANCEPLAN: return "InsurancePlan";
4333            case INVENTORYREPORT: return "InventoryReport";
4334            case INVOICE: return "Invoice";
4335            case LINKAGE: return "Linkage";
4336            case LIST: return "List";
4337            case LOCATION: return "Location";
4338            case MANUFACTUREDITEMDEFINITION: return "ManufacturedItemDefinition";
4339            case MEASUREREPORT: return "MeasureReport";
4340            case MEDICATION: return "Medication";
4341            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
4342            case MEDICATIONDISPENSE: return "MedicationDispense";
4343            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
4344            case MEDICATIONREQUEST: return "MedicationRequest";
4345            case MEDICATIONUSAGE: return "MedicationUsage";
4346            case MEDICINALPRODUCTDEFINITION: return "MedicinalProductDefinition";
4347            case MESSAGEHEADER: return "MessageHeader";
4348            case MOLECULARSEQUENCE: return "MolecularSequence";
4349            case NUTRITIONINTAKE: return "NutritionIntake";
4350            case NUTRITIONORDER: return "NutritionOrder";
4351            case NUTRITIONPRODUCT: return "NutritionProduct";
4352            case OBSERVATION: return "Observation";
4353            case OBSERVATIONDEFINITION: return "ObservationDefinition";
4354            case OPERATIONOUTCOME: return "OperationOutcome";
4355            case ORGANIZATION: return "Organization";
4356            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
4357            case PACKAGEDPRODUCTDEFINITION: return "PackagedProductDefinition";
4358            case PATIENT: return "Patient";
4359            case PAYMENTNOTICE: return "PaymentNotice";
4360            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
4361            case PERMISSION: return "Permission";
4362            case PERSON: return "Person";
4363            case PRACTITIONER: return "Practitioner";
4364            case PRACTITIONERROLE: return "PractitionerRole";
4365            case PROCEDURE: return "Procedure";
4366            case PROVENANCE: return "Provenance";
4367            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
4368            case REGULATEDAUTHORIZATION: return "RegulatedAuthorization";
4369            case RELATEDPERSON: return "RelatedPerson";
4370            case REQUESTGROUP: return "RequestGroup";
4371            case RESEARCHSTUDY: return "ResearchStudy";
4372            case RESEARCHSUBJECT: return "ResearchSubject";
4373            case RISKASSESSMENT: return "RiskAssessment";
4374            case SCHEDULE: return "Schedule";
4375            case SERVICEREQUEST: return "ServiceRequest";
4376            case SLOT: return "Slot";
4377            case SPECIMEN: return "Specimen";
4378            case SPECIMENDEFINITION: return "SpecimenDefinition";
4379            case SUBSCRIPTION: return "Subscription";
4380            case SUBSCRIPTIONSTATUS: return "SubscriptionStatus";
4381            case SUBSTANCE: return "Substance";
4382            case SUBSTANCEDEFINITION: return "SubstanceDefinition";
4383            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
4384            case SUBSTANCEPOLYMER: return "SubstancePolymer";
4385            case SUBSTANCEPROTEIN: return "SubstanceProtein";
4386            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
4387            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
4388            case SUPPLYDELIVERY: return "SupplyDelivery";
4389            case SUPPLYREQUEST: return "SupplyRequest";
4390            case TASK: return "Task";
4391            case TESTREPORT: return "TestReport";
4392            case TRANSPORT: return "Transport";
4393            case VERIFICATIONRESULT: return "VerificationResult";
4394            case VISIONPRESCRIPTION: return "VisionPrescription";
4395            case PARAMETERS: return "Parameters";
4396            case TYPE: return "Type";
4397            case ANY: return "Any";
4398            case NULL: return null;
4399            default: return "?";
4400          }
4401        }
4402        public String getSystem() {
4403          switch (this) {
4404            case ADDRESS: return "http://hl7.org/fhir/data-types";
4405            case AGE: return "http://hl7.org/fhir/data-types";
4406            case ANNOTATION: return "http://hl7.org/fhir/data-types";
4407            case ATTACHMENT: return "http://hl7.org/fhir/data-types";
4408            case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types";
4409            case BACKBONETYPE: return "http://hl7.org/fhir/data-types";
4410            case BASE: return "http://hl7.org/fhir/data-types";
4411            case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types";
4412            case CODEABLEREFERENCE: return "http://hl7.org/fhir/data-types";
4413            case CODING: return "http://hl7.org/fhir/data-types";
4414            case CONTACTDETAIL: return "http://hl7.org/fhir/data-types";
4415            case CONTACTPOINT: return "http://hl7.org/fhir/data-types";
4416            case CONTRIBUTOR: return "http://hl7.org/fhir/data-types";
4417            case COUNT: return "http://hl7.org/fhir/data-types";
4418            case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types";
4419            case DATATYPE: return "http://hl7.org/fhir/data-types";
4420            case DISTANCE: return "http://hl7.org/fhir/data-types";
4421            case DOSAGE: return "http://hl7.org/fhir/data-types";
4422            case DURATION: return "http://hl7.org/fhir/data-types";
4423            case ELEMENT: return "http://hl7.org/fhir/data-types";
4424            case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types";
4425            case EXPRESSION: return "http://hl7.org/fhir/data-types";
4426            case EXTENDEDCONTACTDETAIL: return "http://hl7.org/fhir/data-types";
4427            case EXTENSION: return "http://hl7.org/fhir/data-types";
4428            case HUMANNAME: return "http://hl7.org/fhir/data-types";
4429            case IDENTIFIER: return "http://hl7.org/fhir/data-types";
4430            case MARKETINGSTATUS: return "http://hl7.org/fhir/data-types";
4431            case META: return "http://hl7.org/fhir/data-types";
4432            case MONEY: return "http://hl7.org/fhir/data-types";
4433            case MONEYQUANTITY: return "http://hl7.org/fhir/data-types";
4434            case NARRATIVE: return "http://hl7.org/fhir/data-types";
4435            case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types";
4436            case PERIOD: return "http://hl7.org/fhir/data-types";
4437            case POPULATION: return "http://hl7.org/fhir/data-types";
4438            case PRIMITIVETYPE: return "http://hl7.org/fhir/data-types";
4439            case PRODUCTSHELFLIFE: return "http://hl7.org/fhir/data-types";
4440            case QUANTITY: return "http://hl7.org/fhir/data-types";
4441            case RANGE: return "http://hl7.org/fhir/data-types";
4442            case RATIO: return "http://hl7.org/fhir/data-types";
4443            case RATIORANGE: return "http://hl7.org/fhir/data-types";
4444            case REFERENCE: return "http://hl7.org/fhir/data-types";
4445            case RELATEDARTIFACT: return "http://hl7.org/fhir/data-types";
4446            case SAMPLEDDATA: return "http://hl7.org/fhir/data-types";
4447            case SIGNATURE: return "http://hl7.org/fhir/data-types";
4448            case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types";
4449            case TIMING: return "http://hl7.org/fhir/data-types";
4450            case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types";
4451            case USAGECONTEXT: return "http://hl7.org/fhir/data-types";
4452            case BASE64BINARY: return "http://hl7.org/fhir/data-types";
4453            case BOOLEAN: return "http://hl7.org/fhir/data-types";
4454            case CANONICAL: return "http://hl7.org/fhir/data-types";
4455            case CODE: return "http://hl7.org/fhir/data-types";
4456            case DATE: return "http://hl7.org/fhir/data-types";
4457            case DATETIME: return "http://hl7.org/fhir/data-types";
4458            case DECIMAL: return "http://hl7.org/fhir/data-types";
4459            case ID: return "http://hl7.org/fhir/data-types";
4460            case INSTANT: return "http://hl7.org/fhir/data-types";
4461            case INTEGER: return "http://hl7.org/fhir/data-types";
4462            case INTEGER64: return "http://hl7.org/fhir/data-types";
4463            case MARKDOWN: return "http://hl7.org/fhir/data-types";
4464            case OID: return "http://hl7.org/fhir/data-types";
4465            case POSITIVEINT: return "http://hl7.org/fhir/data-types";
4466            case STRING: return "http://hl7.org/fhir/data-types";
4467            case TIME: return "http://hl7.org/fhir/data-types";
4468            case UNSIGNEDINT: return "http://hl7.org/fhir/data-types";
4469            case URI: return "http://hl7.org/fhir/data-types";
4470            case URL: return "http://hl7.org/fhir/data-types";
4471            case UUID: return "http://hl7.org/fhir/data-types";
4472            case XHTML: return "http://hl7.org/fhir/data-types";
4473            case RESOURCE: return "http://hl7.org/fhir/resource-types";
4474            case BINARY: return "http://hl7.org/fhir/resource-types";
4475            case BUNDLE: return "http://hl7.org/fhir/resource-types";
4476            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
4477            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
4478            case ADMINISTRABLEPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
4479            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
4480            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
4481            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
4482            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
4483            case ARTIFACTASSESSMENT: return "http://hl7.org/fhir/resource-types";
4484            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
4485            case BASIC: return "http://hl7.org/fhir/resource-types";
4486            case BIOLOGICALLYDERIVEDPRODUCT: return "http://hl7.org/fhir/resource-types";
4487            case BODYSTRUCTURE: return "http://hl7.org/fhir/resource-types";
4488            case CANONICALRESOURCE: return "http://hl7.org/fhir/resource-types";
4489            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
4490            case CAPABILITYSTATEMENT2: return "http://hl7.org/fhir/resource-types";
4491            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
4492            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
4493            case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types";
4494            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
4495            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
4496            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
4497            case METADATARESOURCE: return "http://hl7.org/fhir/resource-types";
4498            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
4499            case CHARGEITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
4500            case CITATION: return "http://hl7.org/fhir/resource-types";
4501            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
4502            case CONDITIONDEFINITION: return "http://hl7.org/fhir/resource-types";
4503            case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types";
4504            case EVIDENCE: return "http://hl7.org/fhir/resource-types";
4505            case EVIDENCEREPORT: return "http://hl7.org/fhir/resource-types";
4506            case EVIDENCEVARIABLE: return "http://hl7.org/fhir/resource-types";
4507            case LIBRARY: return "http://hl7.org/fhir/resource-types";
4508            case MEASURE: return "http://hl7.org/fhir/resource-types";
4509            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
4510            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
4511            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
4512            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
4513            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
4514            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
4515            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
4516            case SUBSCRIPTIONTOPIC: return "http://hl7.org/fhir/resource-types";
4517            case TERMINOLOGYCAPABILITIES: return "http://hl7.org/fhir/resource-types";
4518            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
4519            case VALUESET: return "http://hl7.org/fhir/resource-types";
4520            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
4521            case CARETEAM: return "http://hl7.org/fhir/resource-types";
4522            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
4523            case CLAIM: return "http://hl7.org/fhir/resource-types";
4524            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
4525            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
4526            case CLINICALUSEDEFINITION: return "http://hl7.org/fhir/resource-types";
4527            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
4528            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
4529            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
4530            case CONDITION: return "http://hl7.org/fhir/resource-types";
4531            case CONSENT: return "http://hl7.org/fhir/resource-types";
4532            case CONTRACT: return "http://hl7.org/fhir/resource-types";
4533            case COVERAGE: return "http://hl7.org/fhir/resource-types";
4534            case COVERAGEELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
4535            case COVERAGEELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
4536            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
4537            case DEVICE: return "http://hl7.org/fhir/resource-types";
4538            case DEVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
4539            case DEVICEDISPENSE: return "http://hl7.org/fhir/resource-types";
4540            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
4541            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
4542            case DEVICEUSAGE: return "http://hl7.org/fhir/resource-types";
4543            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
4544            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
4545            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
4546            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
4547            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
4548            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
4549            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
4550            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
4551            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
4552            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
4553            case FLAG: return "http://hl7.org/fhir/resource-types";
4554            case FORMULARYITEM: return "http://hl7.org/fhir/resource-types";
4555            case GOAL: return "http://hl7.org/fhir/resource-types";
4556            case GROUP: return "http://hl7.org/fhir/resource-types";
4557            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
4558            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
4559            case IMAGINGSELECTION: return "http://hl7.org/fhir/resource-types";
4560            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
4561            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
4562            case IMMUNIZATIONEVALUATION: return "http://hl7.org/fhir/resource-types";
4563            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
4564            case INGREDIENT: return "http://hl7.org/fhir/resource-types";
4565            case INSURANCEPLAN: return "http://hl7.org/fhir/resource-types";
4566            case INVENTORYREPORT: return "http://hl7.org/fhir/resource-types";
4567            case INVOICE: return "http://hl7.org/fhir/resource-types";
4568            case LINKAGE: return "http://hl7.org/fhir/resource-types";
4569            case LIST: return "http://hl7.org/fhir/resource-types";
4570            case LOCATION: return "http://hl7.org/fhir/resource-types";
4571            case MANUFACTUREDITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
4572            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
4573            case MEDICATION: return "http://hl7.org/fhir/resource-types";
4574            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
4575            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
4576            case MEDICATIONKNOWLEDGE: return "http://hl7.org/fhir/resource-types";
4577            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
4578            case MEDICATIONUSAGE: return "http://hl7.org/fhir/resource-types";
4579            case MEDICINALPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
4580            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
4581            case MOLECULARSEQUENCE: return "http://hl7.org/fhir/resource-types";
4582            case NUTRITIONINTAKE: return "http://hl7.org/fhir/resource-types";
4583            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
4584            case NUTRITIONPRODUCT: return "http://hl7.org/fhir/resource-types";
4585            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
4586            case OBSERVATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
4587            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
4588            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
4589            case ORGANIZATIONAFFILIATION: return "http://hl7.org/fhir/resource-types";
4590            case PACKAGEDPRODUCTDEFINITION: return "http://hl7.org/fhir/resource-types";
4591            case PATIENT: return "http://hl7.org/fhir/resource-types";
4592            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
4593            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
4594            case PERMISSION: return "http://hl7.org/fhir/resource-types";
4595            case PERSON: return "http://hl7.org/fhir/resource-types";
4596            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
4597            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
4598            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
4599            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
4600            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
4601            case REGULATEDAUTHORIZATION: return "http://hl7.org/fhir/resource-types";
4602            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
4603            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
4604            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
4605            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
4606            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
4607            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
4608            case SERVICEREQUEST: return "http://hl7.org/fhir/resource-types";
4609            case SLOT: return "http://hl7.org/fhir/resource-types";
4610            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
4611            case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types";
4612            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
4613            case SUBSCRIPTIONSTATUS: return "http://hl7.org/fhir/resource-types";
4614            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
4615            case SUBSTANCEDEFINITION: return "http://hl7.org/fhir/resource-types";
4616            case SUBSTANCENUCLEICACID: return "http://hl7.org/fhir/resource-types";
4617            case SUBSTANCEPOLYMER: return "http://hl7.org/fhir/resource-types";
4618            case SUBSTANCEPROTEIN: return "http://hl7.org/fhir/resource-types";
4619            case SUBSTANCEREFERENCEINFORMATION: return "http://hl7.org/fhir/resource-types";
4620            case SUBSTANCESOURCEMATERIAL: return "http://hl7.org/fhir/resource-types";
4621            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
4622            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
4623            case TASK: return "http://hl7.org/fhir/resource-types";
4624            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
4625            case TRANSPORT: return "http://hl7.org/fhir/resource-types";
4626            case VERIFICATIONRESULT: return "http://hl7.org/fhir/resource-types";
4627            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
4628            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
4629            case TYPE: return "http://hl7.org/fhir/abstract-types";
4630            case ANY: return "http://hl7.org/fhir/abstract-types";
4631            case NULL: return null;
4632            default: return "?";
4633          }
4634        }
4635        public String getDefinition() {
4636          switch (this) {
4637            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.";
4638            case AGE: return "A duration of time during which an organism (or a process) has existed.";
4639            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
4640            case ATTACHMENT: return "For referring to data content defined in other formats.";
4641            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
4642            case BACKBONETYPE: return "Base definition for the few data types that are allowed to carry modifier extensions.";
4643            case BASE: return "Base definition for all types defined in FHIR type system.";
4644            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
4645            case CODEABLEREFERENCE: return "A reference to a resource (by instance), or instead, a reference to a concept defined in a terminology or ontology (by class).";
4646            case CODING: return "A reference to a code defined by a terminology system.";
4647            case CONTACTDETAIL: return "Specifies contact information for a person or organization.";
4648            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
4649            case CONTRIBUTOR: return "A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.";
4650            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.";
4651            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.";
4652            case DATATYPE: return "The base class for all re-useable types defined as part of the FHIR Specification.";
4653            case DISTANCE: return "A length - a value with a unit that is a physical distance.";
4654            case DOSAGE: return "Indicates how the medication is/was taken or should be taken by the patient.";
4655            case DURATION: return "A length of time.";
4656            case ELEMENT: return "Base definition for all elements in a resource.";
4657            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
4658            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.";
4659            case EXTENDEDCONTACTDETAIL: return "Specifies contact information for a specific purpose over a period of time, might be handled/monitored by a specific named person or organization.";
4660            case EXTENSION: return "Optional Extension Element - found in all resources.";
4661            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
4662            case IDENTIFIER: return "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.";
4663            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.";
4664            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.";
4665            case MONEY: return "An amount of economic utility in some recognized currency.";
4666            case MONEYQUANTITY: return "";
4667            case NARRATIVE: return "A human-readable summary of the resource conveying the essential clinical and business information for the resource.";
4668            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.";
4669            case PERIOD: return "A time period defined by a start and end date and optionally time.";
4670            case POPULATION: return "A populatioof people with some set of grouping criteria.";
4671            case PRIMITIVETYPE: return "The base type for all re-useable types defined that have a simple property.";
4672            case PRODUCTSHELFLIFE: return "The shelf-life and storage information for a medicinal product item or container can be described using this class.";
4673            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.";
4674            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
4675            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
4676            case RATIORANGE: return "A range of ratios expressed as a low and high numerator and a denominator.";
4677            case REFERENCE: return "A reference from one resource to another.";
4678            case RELATEDARTIFACT: return "Related artifacts such as additional documentation, justification, or bibliographic references.";
4679            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.";
4680            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.";
4681            case SIMPLEQUANTITY: return "";
4682            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.";
4683            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.";
4684            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).";
4685            case BASE64BINARY: return "A stream of bytes";
4686            case BOOLEAN: return "Value of \"true\" or \"false\"";
4687            case CANONICAL: return "A URI that is a reference to a canonical URL on a FHIR resource";
4688            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";
4689            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.";
4690            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.";
4691            case DECIMAL: return "A rational number with implicit precision";
4692            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.";
4693            case INSTANT: return "An instant in time - known at least to the second";
4694            case INTEGER: return "A whole number";
4695            case INTEGER64: return "A very large whole number";
4696            case MARKDOWN: return "A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine";
4697            case OID: return "An OID represented as a URI";
4698            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
4699            case STRING: return "A sequence of Unicode characters";
4700            case TIME: return "A time during the day, with no date specified";
4701            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
4702            case URI: return "String of characters used to identify a name or a resource";
4703            case URL: return "A URI that is a literal reference";
4704            case UUID: return "A UUID, represented as a URI";
4705            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
4706            case RESOURCE: return "--- Abstract Type! ---This is the base resource type for everything.";
4707            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.";
4708            case BUNDLE: return "A container for a collection of resources.";
4709            case DOMAINRESOURCE: return "--- Abstract Type! ---A resource that includes narrative, extensions, and contained resources.";
4710            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.";
4711            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).";
4712            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.";
4713            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
4714            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).";
4715            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
4716            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.";
4717            case AUDITEVENT: return "A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis.";
4718            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.";
4719            case BIOLOGICALLYDERIVEDPRODUCT: return "A biological material originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity.";
4720            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.";
4721            case CANONICALRESOURCE: return "--- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.";
4722            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.";
4723            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.";
4724            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.";
4725            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
4726            case EXAMPLESCENARIO: return "Example of workflow instance.";
4727            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.";
4728            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.";
4729            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.";
4730            case METADATARESOURCE: return "--- Abstract Type! ---Common Ancestor declaration for conformance and knowledge artifact resources.";
4731            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.";
4732            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.";
4733            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.";
4734            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.";
4735            case CONDITIONDEFINITION: return "A definition of a condition and information relevant to managing it.";
4736            case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur.";
4737            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.";
4738            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.";
4739            case EVIDENCEVARIABLE: return "The EvidenceVariable resource describes an element that knowledge (Evidence) is about.";
4740            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.";
4741            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
4742            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.";
4743            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.";
4744            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.";
4745            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
4746            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
4747            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.";
4748            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
4749            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.";
4750            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.";
4751            case TESTSCRIPT: return "A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.";
4752            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).";
4753            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.";
4754            case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care.";
4755            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.";
4756            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.";
4757            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
4758            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.";
4759            case CLINICALUSEDEFINITION: return "A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure.";
4760            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.";
4761            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.";
4762            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.).";
4763            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
4764            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.";
4765            case CONTRACT: return "Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.";
4766            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.";
4767            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.";
4768            case COVERAGEELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.";
4769            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.";
4770            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.";
4771            case DEVICEDEFINITION: return "This is a specialized resource that defines the characteristics and capabilities of a device.";
4772            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.";
4773            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
4774            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.";
4775            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.";
4776            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.";
4777            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
4778            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.";
4779            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.";
4780            case ENDPOINT: return "The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b, a REST endpoint for another FHIR server, or a s/Mime email address. This may include any security context information.";
4781            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
4782            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.";
4783            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.";
4784            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.";
4785            case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient.";
4786            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
4787            case FORMULARYITEM: return "This resource describes a product or service that is available through a program and includes the conditions and constraints of availability.  All of the information in this resource is specific to the inclusion of the item in the formulary and is not inherent to the item itself.";
4788            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.";
4789            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.";
4790            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.";
4791            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
4792            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.";
4793            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.";
4794            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.";
4795            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.";
4796            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.";
4797            case INGREDIENT: return "An ingredient of a manufactured item or pharmaceutical product.";
4798            case INSURANCEPLAN: return "Details of a Health Insurance product/plan provided by an organization.";
4799            case INVENTORYREPORT: return "A report of inventory or stock items.";
4800            case INVOICE: return "Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.";
4801            case LINKAGE: return "Identifies two or more records (resource instances) that refer to the same real-world \"occurrence\".";
4802            case LIST: return "A list is a curated collection of resources.";
4803            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.";
4804            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.";
4805            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.";
4806            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.";
4807            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.";
4808            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.";
4809            case MEDICATIONKNOWLEDGE: return "Information about a medication that is used to support knowledge.";
4810            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.";
4811            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.";
4812            case MEDICINALPRODUCTDEFINITION: return "Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use, drug catalogs, to support prescribing, adverse events management etc.).";
4813            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.";
4814            case MOLECULARSEQUENCE: return "Representation of a molecular sequence.";
4815            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.";
4816            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
4817            case NUTRITIONPRODUCT: return "A food or supplement that is consumed by patients.";
4818            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
4819            case OBSERVATIONDEFINITION: return "Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.";
4820            case OPERATIONOUTCOME: return "A collection of error, warning, or information messages that result from a system action.";
4821            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.";
4822            case ORGANIZATIONAFFILIATION: return "Defines an affiliation/assotiation/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship.";
4823            case PACKAGEDPRODUCTDEFINITION: return "A medically related item or items, in a container or package.";
4824            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
4825            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
4826            case PAYMENTRECONCILIATION: return "This resource provides the details including amount of a payment and allocates the payment items being paid.";
4827            case PERMISSION: return "Permission.";
4828            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
4829            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
4830            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
4831            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.";
4832            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.";
4833            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.";
4834            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.";
4835            case RELATEDPERSON: return "Information about a person that is involved in a patient's health or the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.";
4836            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\".";
4837            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.";
4838            case RESEARCHSUBJECT: return "A physical entity which is the primary unit of operational and/or administrative interest in a study.";
4839            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
4840            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
4841            case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.";
4842            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
4843            case SPECIMEN: return "A sample to be used for analysis.";
4844            case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements.";
4845            case SUBSCRIPTION: return "The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.";
4846            case SUBSCRIPTIONSTATUS: return "The SubscriptionStatus resource describes the state of a Subscription during notifications.";
4847            case SUBSTANCE: return "A homogeneous material with a definite composition.";
4848            case SUBSTANCEDEFINITION: return "The detailed description of a substance, typically at a level beyond what is used for prescribing.";
4849            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.";
4850            case SUBSTANCEPOLYMER: return "Properties of a substance specific to it being a polymer.";
4851            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.";
4852            case SUBSTANCEREFERENCEINFORMATION: return "Todo.";
4853            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.";
4854            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
4855            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.";
4856            case TASK: return "A task to be performed.";
4857            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
4858            case TRANSPORT: return "Record of transport.";
4859            case VERIFICATIONRESULT: return "Describes validation requirements, source(s), status and dates for one or more elements.";
4860            case VISIONPRESCRIPTION: return "An authorization for the provision of glasses and/or contact lenses to a patient.";
4861            case PARAMETERS: return "This resource is a non-persisted resource primarily used to pass information into and back from an [operation](operations.html). There is no RESTful endpoint associated with it.";
4862            case TYPE: return "A place holder that means any kind of data type";
4863            case ANY: return "A place holder that means any kind of resource";
4864            case NULL: return null;
4865            default: return "?";
4866          }
4867        }
4868        public String getDisplay() {
4869          switch (this) {
4870            case ADDRESS: return "Address";
4871            case AGE: return "Age";
4872            case ANNOTATION: return "Annotation";
4873            case ATTACHMENT: return "Attachment";
4874            case BACKBONEELEMENT: return "BackboneElement";
4875            case BACKBONETYPE: return "BackboneType";
4876            case BASE: return "Base";
4877            case CODEABLECONCEPT: return "CodeableConcept";
4878            case CODEABLEREFERENCE: return "CodeableReference";
4879            case CODING: return "Coding";
4880            case CONTACTDETAIL: return "ContactDetail";
4881            case CONTACTPOINT: return "ContactPoint";
4882            case CONTRIBUTOR: return "Contributor";
4883            case COUNT: return "Count";
4884            case DATAREQUIREMENT: return "DataRequirement";
4885            case DATATYPE: return "DataType";
4886            case DISTANCE: return "Distance";
4887            case DOSAGE: return "Dosage";
4888            case DURATION: return "Duration";
4889            case ELEMENT: return "Element";
4890            case ELEMENTDEFINITION: return "ElementDefinition";
4891            case EXPRESSION: return "Expression";
4892            case EXTENDEDCONTACTDETAIL: return "ExtendedContactDetail";
4893            case EXTENSION: return "Extension";
4894            case HUMANNAME: return "HumanName";
4895            case IDENTIFIER: return "Identifier";
4896            case MARKETINGSTATUS: return "MarketingStatus";
4897            case META: return "Meta";
4898            case MONEY: return "Money";
4899            case MONEYQUANTITY: return "MoneyQuantity";
4900            case NARRATIVE: return "Narrative";
4901            case PARAMETERDEFINITION: return "ParameterDefinition";
4902            case PERIOD: return "Period";
4903            case POPULATION: return "Population";
4904            case PRIMITIVETYPE: return "PrimitiveType";
4905            case PRODUCTSHELFLIFE: return "ProductShelfLife";
4906            case QUANTITY: return "Quantity";
4907            case RANGE: return "Range";
4908            case RATIO: return "Ratio";
4909            case RATIORANGE: return "RatioRange";
4910            case REFERENCE: return "Reference";
4911            case RELATEDARTIFACT: return "RelatedArtifact";
4912            case SAMPLEDDATA: return "SampledData";
4913            case SIGNATURE: return "Signature";
4914            case SIMPLEQUANTITY: return "SimpleQuantity";
4915            case TIMING: return "Timing";
4916            case TRIGGERDEFINITION: return "TriggerDefinition";
4917            case USAGECONTEXT: return "UsageContext";
4918            case BASE64BINARY: return "base64Binary";
4919            case BOOLEAN: return "boolean";
4920            case CANONICAL: return "canonical";
4921            case CODE: return "code";
4922            case DATE: return "date";
4923            case DATETIME: return "dateTime";
4924            case DECIMAL: return "decimal";
4925            case ID: return "id";
4926            case INSTANT: return "instant";
4927            case INTEGER: return "integer";
4928            case INTEGER64: return "integer64";
4929            case MARKDOWN: return "markdown";
4930            case OID: return "oid";
4931            case POSITIVEINT: return "positiveInt";
4932            case STRING: return "string";
4933            case TIME: return "time";
4934            case UNSIGNEDINT: return "unsignedInt";
4935            case URI: return "uri";
4936            case URL: return "url";
4937            case UUID: return "uuid";
4938            case XHTML: return "XHTML";
4939            case RESOURCE: return "Resource";
4940            case BINARY: return "Binary";
4941            case BUNDLE: return "Bundle";
4942            case DOMAINRESOURCE: return "DomainResource";
4943            case ACCOUNT: return "Account";
4944            case ADMINISTRABLEPRODUCTDEFINITION: return "AdministrableProductDefinition";
4945            case ADVERSEEVENT: return "AdverseEvent";
4946            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
4947            case APPOINTMENT: return "Appointment";
4948            case APPOINTMENTRESPONSE: return "AppointmentResponse";
4949            case ARTIFACTASSESSMENT: return "ArtifactAssessment";
4950            case AUDITEVENT: return "AuditEvent";
4951            case BASIC: return "Basic";
4952            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
4953            case BODYSTRUCTURE: return "BodyStructure";
4954            case CANONICALRESOURCE: return "CanonicalResource";
4955            case CAPABILITYSTATEMENT: return "CapabilityStatement";
4956            case CAPABILITYSTATEMENT2: return "CapabilityStatement2";
4957            case CODESYSTEM: return "CodeSystem";
4958            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
4959            case EXAMPLESCENARIO: return "ExampleScenario";
4960            case GRAPHDEFINITION: return "GraphDefinition";
4961            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
4962            case MESSAGEDEFINITION: return "MessageDefinition";
4963            case METADATARESOURCE: return "MetadataResource";
4964            case ACTIVITYDEFINITION: return "ActivityDefinition";
4965            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
4966            case CITATION: return "Citation";
4967            case CONCEPTMAP: return "ConceptMap";
4968            case CONDITIONDEFINITION: return "ConditionDefinition";
4969            case EVENTDEFINITION: return "EventDefinition";
4970            case EVIDENCE: return "Evidence";
4971            case EVIDENCEREPORT: return "EvidenceReport";
4972            case EVIDENCEVARIABLE: return "EvidenceVariable";
4973            case LIBRARY: return "Library";
4974            case MEASURE: return "Measure";
4975            case NAMINGSYSTEM: return "NamingSystem";
4976            case PLANDEFINITION: return "PlanDefinition";
4977            case QUESTIONNAIRE: return "Questionnaire";
4978            case OPERATIONDEFINITION: return "OperationDefinition";
4979            case SEARCHPARAMETER: return "SearchParameter";
4980            case STRUCTUREDEFINITION: return "StructureDefinition";
4981            case STRUCTUREMAP: return "StructureMap";
4982            case SUBSCRIPTIONTOPIC: return "SubscriptionTopic";
4983            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
4984            case TESTSCRIPT: return "TestScript";
4985            case VALUESET: return "ValueSet";
4986            case CAREPLAN: return "CarePlan";
4987            case CARETEAM: return "CareTeam";
4988            case CHARGEITEM: return "ChargeItem";
4989            case CLAIM: return "Claim";
4990            case CLAIMRESPONSE: return "ClaimResponse";
4991            case CLINICALIMPRESSION: return "ClinicalImpression";
4992            case CLINICALUSEDEFINITION: return "ClinicalUseDefinition";
4993            case COMMUNICATION: return "Communication";
4994            case COMMUNICATIONREQUEST: return "CommunicationRequest";
4995            case COMPOSITION: return "Composition";
4996            case CONDITION: return "Condition";
4997            case CONSENT: return "Consent";
4998            case CONTRACT: return "Contract";
4999            case COVERAGE: return "Coverage";
5000            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
5001            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
5002            case DETECTEDISSUE: return "DetectedIssue";
5003            case DEVICE: return "Device";
5004            case DEVICEDEFINITION: return "DeviceDefinition";
5005            case DEVICEDISPENSE: return "DeviceDispense";
5006            case DEVICEMETRIC: return "DeviceMetric";
5007            case DEVICEREQUEST: return "DeviceRequest";
5008            case DEVICEUSAGE: return "DeviceUsage";
5009            case DIAGNOSTICREPORT: return "DiagnosticReport";
5010            case DOCUMENTMANIFEST: return "DocumentManifest";
5011            case DOCUMENTREFERENCE: return "DocumentReference";
5012            case ENCOUNTER: return "Encounter";
5013            case ENDPOINT: return "Endpoint";
5014            case ENROLLMENTREQUEST: return "EnrollmentRequest";
5015            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
5016            case EPISODEOFCARE: return "EpisodeOfCare";
5017            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
5018            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
5019            case FLAG: return "Flag";
5020            case FORMULARYITEM: return "FormularyItem";
5021            case GOAL: return "Goal";
5022            case GROUP: return "Group";
5023            case GUIDANCERESPONSE: return "GuidanceResponse";
5024            case HEALTHCARESERVICE: return "HealthcareService";
5025            case IMAGINGSELECTION: return "ImagingSelection";
5026            case IMAGINGSTUDY: return "ImagingStudy";
5027            case IMMUNIZATION: return "Immunization";
5028            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
5029            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
5030            case INGREDIENT: return "Ingredient";
5031            case INSURANCEPLAN: return "InsurancePlan";
5032            case INVENTORYREPORT: return "InventoryReport";
5033            case INVOICE: return "Invoice";
5034            case LINKAGE: return "Linkage";
5035            case LIST: return "List";
5036            case LOCATION: return "Location";
5037            case MANUFACTUREDITEMDEFINITION: return "ManufacturedItemDefinition";
5038            case MEASUREREPORT: return "MeasureReport";
5039            case MEDICATION: return "Medication";
5040            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
5041            case MEDICATIONDISPENSE: return "MedicationDispense";
5042            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
5043            case MEDICATIONREQUEST: return "MedicationRequest";
5044            case MEDICATIONUSAGE: return "MedicationUsage";
5045            case MEDICINALPRODUCTDEFINITION: return "MedicinalProductDefinition";
5046            case MESSAGEHEADER: return "MessageHeader";
5047            case MOLECULARSEQUENCE: return "MolecularSequence";
5048            case NUTRITIONINTAKE: return "NutritionIntake";
5049            case NUTRITIONORDER: return "NutritionOrder";
5050            case NUTRITIONPRODUCT: return "NutritionProduct";
5051            case OBSERVATION: return "Observation";
5052            case OBSERVATIONDEFINITION: return "ObservationDefinition";
5053            case OPERATIONOUTCOME: return "OperationOutcome";
5054            case ORGANIZATION: return "Organization";
5055            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
5056            case PACKAGEDPRODUCTDEFINITION: return "PackagedProductDefinition";
5057            case PATIENT: return "Patient";
5058            case PAYMENTNOTICE: return "PaymentNotice";
5059            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
5060            case PERMISSION: return "Permission";
5061            case PERSON: return "Person";
5062            case PRACTITIONER: return "Practitioner";
5063            case PRACTITIONERROLE: return "PractitionerRole";
5064            case PROCEDURE: return "Procedure";
5065            case PROVENANCE: return "Provenance";
5066            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
5067            case REGULATEDAUTHORIZATION: return "RegulatedAuthorization";
5068            case RELATEDPERSON: return "RelatedPerson";
5069            case REQUESTGROUP: return "RequestGroup";
5070            case RESEARCHSTUDY: return "ResearchStudy";
5071            case RESEARCHSUBJECT: return "ResearchSubject";
5072            case RISKASSESSMENT: return "RiskAssessment";
5073            case SCHEDULE: return "Schedule";
5074            case SERVICEREQUEST: return "ServiceRequest";
5075            case SLOT: return "Slot";
5076            case SPECIMEN: return "Specimen";
5077            case SPECIMENDEFINITION: return "SpecimenDefinition";
5078            case SUBSCRIPTION: return "Subscription";
5079            case SUBSCRIPTIONSTATUS: return "SubscriptionStatus";
5080            case SUBSTANCE: return "Substance";
5081            case SUBSTANCEDEFINITION: return "SubstanceDefinition";
5082            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
5083            case SUBSTANCEPOLYMER: return "SubstancePolymer";
5084            case SUBSTANCEPROTEIN: return "SubstanceProtein";
5085            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
5086            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
5087            case SUPPLYDELIVERY: return "SupplyDelivery";
5088            case SUPPLYREQUEST: return "SupplyRequest";
5089            case TASK: return "Task";
5090            case TESTREPORT: return "TestReport";
5091            case TRANSPORT: return "Transport";
5092            case VERIFICATIONRESULT: return "VerificationResult";
5093            case VISIONPRESCRIPTION: return "VisionPrescription";
5094            case PARAMETERS: return "Parameters";
5095            case TYPE: return "Type";
5096            case ANY: return "Any";
5097            case NULL: return null;
5098            default: return "?";
5099          }
5100        }
5101    }
5102
5103  public static class FHIRAllTypesEnumFactory implements EnumFactory<FHIRAllTypes> {
5104    public FHIRAllTypes fromCode(String codeString) throws IllegalArgumentException {
5105      if (codeString == null || "".equals(codeString))
5106            if (codeString == null || "".equals(codeString))
5107                return null;
5108        if ("Address".equals(codeString))
5109          return FHIRAllTypes.ADDRESS;
5110        if ("Age".equals(codeString))
5111          return FHIRAllTypes.AGE;
5112        if ("Annotation".equals(codeString))
5113          return FHIRAllTypes.ANNOTATION;
5114        if ("Attachment".equals(codeString))
5115          return FHIRAllTypes.ATTACHMENT;
5116        if ("BackboneElement".equals(codeString))
5117          return FHIRAllTypes.BACKBONEELEMENT;
5118        if ("BackboneType".equals(codeString))
5119          return FHIRAllTypes.BACKBONETYPE;
5120        if ("Base".equals(codeString))
5121          return FHIRAllTypes.BASE;
5122        if ("CodeableConcept".equals(codeString))
5123          return FHIRAllTypes.CODEABLECONCEPT;
5124        if ("CodeableReference".equals(codeString))
5125          return FHIRAllTypes.CODEABLEREFERENCE;
5126        if ("Coding".equals(codeString))
5127          return FHIRAllTypes.CODING;
5128        if ("ContactDetail".equals(codeString))
5129          return FHIRAllTypes.CONTACTDETAIL;
5130        if ("ContactPoint".equals(codeString))
5131          return FHIRAllTypes.CONTACTPOINT;
5132        if ("Contributor".equals(codeString))
5133          return FHIRAllTypes.CONTRIBUTOR;
5134        if ("Count".equals(codeString))
5135          return FHIRAllTypes.COUNT;
5136        if ("DataRequirement".equals(codeString))
5137          return FHIRAllTypes.DATAREQUIREMENT;
5138        if ("DataType".equals(codeString))
5139          return FHIRAllTypes.DATATYPE;
5140        if ("Distance".equals(codeString))
5141          return FHIRAllTypes.DISTANCE;
5142        if ("Dosage".equals(codeString))
5143          return FHIRAllTypes.DOSAGE;
5144        if ("Duration".equals(codeString))
5145          return FHIRAllTypes.DURATION;
5146        if ("Element".equals(codeString))
5147          return FHIRAllTypes.ELEMENT;
5148        if ("ElementDefinition".equals(codeString))
5149          return FHIRAllTypes.ELEMENTDEFINITION;
5150        if ("Expression".equals(codeString))
5151          return FHIRAllTypes.EXPRESSION;
5152        if ("ExtendedContactDetail".equals(codeString))
5153          return FHIRAllTypes.EXTENDEDCONTACTDETAIL;
5154        if ("Extension".equals(codeString))
5155          return FHIRAllTypes.EXTENSION;
5156        if ("HumanName".equals(codeString))
5157          return FHIRAllTypes.HUMANNAME;
5158        if ("Identifier".equals(codeString))
5159          return FHIRAllTypes.IDENTIFIER;
5160        if ("MarketingStatus".equals(codeString))
5161          return FHIRAllTypes.MARKETINGSTATUS;
5162        if ("Meta".equals(codeString))
5163          return FHIRAllTypes.META;
5164        if ("Money".equals(codeString))
5165          return FHIRAllTypes.MONEY;
5166        if ("MoneyQuantity".equals(codeString))
5167          return FHIRAllTypes.MONEYQUANTITY;
5168        if ("Narrative".equals(codeString))
5169          return FHIRAllTypes.NARRATIVE;
5170        if ("ParameterDefinition".equals(codeString))
5171          return FHIRAllTypes.PARAMETERDEFINITION;
5172        if ("Period".equals(codeString))
5173          return FHIRAllTypes.PERIOD;
5174        if ("Population".equals(codeString))
5175          return FHIRAllTypes.POPULATION;
5176        if ("PrimitiveType".equals(codeString))
5177          return FHIRAllTypes.PRIMITIVETYPE;
5178        if ("ProductShelfLife".equals(codeString))
5179          return FHIRAllTypes.PRODUCTSHELFLIFE;
5180        if ("Quantity".equals(codeString))
5181          return FHIRAllTypes.QUANTITY;
5182        if ("Range".equals(codeString))
5183          return FHIRAllTypes.RANGE;
5184        if ("Ratio".equals(codeString))
5185          return FHIRAllTypes.RATIO;
5186        if ("RatioRange".equals(codeString))
5187          return FHIRAllTypes.RATIORANGE;
5188        if ("Reference".equals(codeString))
5189          return FHIRAllTypes.REFERENCE;
5190        if ("RelatedArtifact".equals(codeString))
5191          return FHIRAllTypes.RELATEDARTIFACT;
5192        if ("SampledData".equals(codeString))
5193          return FHIRAllTypes.SAMPLEDDATA;
5194        if ("Signature".equals(codeString))
5195          return FHIRAllTypes.SIGNATURE;
5196        if ("SimpleQuantity".equals(codeString))
5197          return FHIRAllTypes.SIMPLEQUANTITY;
5198        if ("Timing".equals(codeString))
5199          return FHIRAllTypes.TIMING;
5200        if ("TriggerDefinition".equals(codeString))
5201          return FHIRAllTypes.TRIGGERDEFINITION;
5202        if ("UsageContext".equals(codeString))
5203          return FHIRAllTypes.USAGECONTEXT;
5204        if ("base64Binary".equals(codeString))
5205          return FHIRAllTypes.BASE64BINARY;
5206        if ("boolean".equals(codeString))
5207          return FHIRAllTypes.BOOLEAN;
5208        if ("canonical".equals(codeString))
5209          return FHIRAllTypes.CANONICAL;
5210        if ("code".equals(codeString))
5211          return FHIRAllTypes.CODE;
5212        if ("date".equals(codeString))
5213          return FHIRAllTypes.DATE;
5214        if ("dateTime".equals(codeString))
5215          return FHIRAllTypes.DATETIME;
5216        if ("decimal".equals(codeString))
5217          return FHIRAllTypes.DECIMAL;
5218        if ("id".equals(codeString))
5219          return FHIRAllTypes.ID;
5220        if ("instant".equals(codeString))
5221          return FHIRAllTypes.INSTANT;
5222        if ("integer".equals(codeString))
5223          return FHIRAllTypes.INTEGER;
5224        if ("integer64".equals(codeString))
5225          return FHIRAllTypes.INTEGER64;
5226        if ("markdown".equals(codeString))
5227          return FHIRAllTypes.MARKDOWN;
5228        if ("oid".equals(codeString))
5229          return FHIRAllTypes.OID;
5230        if ("positiveInt".equals(codeString))
5231          return FHIRAllTypes.POSITIVEINT;
5232        if ("string".equals(codeString))
5233          return FHIRAllTypes.STRING;
5234        if ("time".equals(codeString))
5235          return FHIRAllTypes.TIME;
5236        if ("unsignedInt".equals(codeString))
5237          return FHIRAllTypes.UNSIGNEDINT;
5238        if ("uri".equals(codeString))
5239          return FHIRAllTypes.URI;
5240        if ("url".equals(codeString))
5241          return FHIRAllTypes.URL;
5242        if ("uuid".equals(codeString))
5243          return FHIRAllTypes.UUID;
5244        if ("xhtml".equals(codeString))
5245          return FHIRAllTypes.XHTML;
5246        if ("Resource".equals(codeString))
5247          return FHIRAllTypes.RESOURCE;
5248        if ("Binary".equals(codeString))
5249          return FHIRAllTypes.BINARY;
5250        if ("Bundle".equals(codeString))
5251          return FHIRAllTypes.BUNDLE;
5252        if ("DomainResource".equals(codeString))
5253          return FHIRAllTypes.DOMAINRESOURCE;
5254        if ("Account".equals(codeString))
5255          return FHIRAllTypes.ACCOUNT;
5256        if ("AdministrableProductDefinition".equals(codeString))
5257          return FHIRAllTypes.ADMINISTRABLEPRODUCTDEFINITION;
5258        if ("AdverseEvent".equals(codeString))
5259          return FHIRAllTypes.ADVERSEEVENT;
5260        if ("AllergyIntolerance".equals(codeString))
5261          return FHIRAllTypes.ALLERGYINTOLERANCE;
5262        if ("Appointment".equals(codeString))
5263          return FHIRAllTypes.APPOINTMENT;
5264        if ("AppointmentResponse".equals(codeString))
5265          return FHIRAllTypes.APPOINTMENTRESPONSE;
5266        if ("ArtifactAssessment".equals(codeString))
5267          return FHIRAllTypes.ARTIFACTASSESSMENT;
5268        if ("AuditEvent".equals(codeString))
5269          return FHIRAllTypes.AUDITEVENT;
5270        if ("Basic".equals(codeString))
5271          return FHIRAllTypes.BASIC;
5272        if ("BiologicallyDerivedProduct".equals(codeString))
5273          return FHIRAllTypes.BIOLOGICALLYDERIVEDPRODUCT;
5274        if ("BodyStructure".equals(codeString))
5275          return FHIRAllTypes.BODYSTRUCTURE;
5276        if ("CanonicalResource".equals(codeString))
5277          return FHIRAllTypes.CANONICALRESOURCE;
5278        if ("CapabilityStatement".equals(codeString))
5279          return FHIRAllTypes.CAPABILITYSTATEMENT;
5280        if ("CapabilityStatement2".equals(codeString))
5281          return FHIRAllTypes.CAPABILITYSTATEMENT2;
5282        if ("CodeSystem".equals(codeString))
5283          return FHIRAllTypes.CODESYSTEM;
5284        if ("CompartmentDefinition".equals(codeString))
5285          return FHIRAllTypes.COMPARTMENTDEFINITION;
5286        if ("ExampleScenario".equals(codeString))
5287          return FHIRAllTypes.EXAMPLESCENARIO;
5288        if ("GraphDefinition".equals(codeString))
5289          return FHIRAllTypes.GRAPHDEFINITION;
5290        if ("ImplementationGuide".equals(codeString))
5291          return FHIRAllTypes.IMPLEMENTATIONGUIDE;
5292        if ("MessageDefinition".equals(codeString))
5293          return FHIRAllTypes.MESSAGEDEFINITION;
5294        if ("MetadataResource".equals(codeString))
5295          return FHIRAllTypes.METADATARESOURCE;
5296        if ("ActivityDefinition".equals(codeString))
5297          return FHIRAllTypes.ACTIVITYDEFINITION;
5298        if ("ChargeItemDefinition".equals(codeString))
5299          return FHIRAllTypes.CHARGEITEMDEFINITION;
5300        if ("Citation".equals(codeString))
5301          return FHIRAllTypes.CITATION;
5302        if ("ConceptMap".equals(codeString))
5303          return FHIRAllTypes.CONCEPTMAP;
5304        if ("ConditionDefinition".equals(codeString))
5305          return FHIRAllTypes.CONDITIONDEFINITION;
5306        if ("EventDefinition".equals(codeString))
5307          return FHIRAllTypes.EVENTDEFINITION;
5308        if ("Evidence".equals(codeString))
5309          return FHIRAllTypes.EVIDENCE;
5310        if ("EvidenceReport".equals(codeString))
5311          return FHIRAllTypes.EVIDENCEREPORT;
5312        if ("EvidenceVariable".equals(codeString))
5313          return FHIRAllTypes.EVIDENCEVARIABLE;
5314        if ("Library".equals(codeString))
5315          return FHIRAllTypes.LIBRARY;
5316        if ("Measure".equals(codeString))
5317          return FHIRAllTypes.MEASURE;
5318        if ("NamingSystem".equals(codeString))
5319          return FHIRAllTypes.NAMINGSYSTEM;
5320        if ("PlanDefinition".equals(codeString))
5321          return FHIRAllTypes.PLANDEFINITION;
5322        if ("Questionnaire".equals(codeString))
5323          return FHIRAllTypes.QUESTIONNAIRE;
5324        if ("OperationDefinition".equals(codeString))
5325          return FHIRAllTypes.OPERATIONDEFINITION;
5326        if ("SearchParameter".equals(codeString))
5327          return FHIRAllTypes.SEARCHPARAMETER;
5328        if ("StructureDefinition".equals(codeString))
5329          return FHIRAllTypes.STRUCTUREDEFINITION;
5330        if ("StructureMap".equals(codeString))
5331          return FHIRAllTypes.STRUCTUREMAP;
5332        if ("SubscriptionTopic".equals(codeString))
5333          return FHIRAllTypes.SUBSCRIPTIONTOPIC;
5334        if ("TerminologyCapabilities".equals(codeString))
5335          return FHIRAllTypes.TERMINOLOGYCAPABILITIES;
5336        if ("TestScript".equals(codeString))
5337          return FHIRAllTypes.TESTSCRIPT;
5338        if ("ValueSet".equals(codeString))
5339          return FHIRAllTypes.VALUESET;
5340        if ("CarePlan".equals(codeString))
5341          return FHIRAllTypes.CAREPLAN;
5342        if ("CareTeam".equals(codeString))
5343          return FHIRAllTypes.CARETEAM;
5344        if ("ChargeItem".equals(codeString))
5345          return FHIRAllTypes.CHARGEITEM;
5346        if ("Claim".equals(codeString))
5347          return FHIRAllTypes.CLAIM;
5348        if ("ClaimResponse".equals(codeString))
5349          return FHIRAllTypes.CLAIMRESPONSE;
5350        if ("ClinicalImpression".equals(codeString))
5351          return FHIRAllTypes.CLINICALIMPRESSION;
5352        if ("ClinicalUseDefinition".equals(codeString))
5353          return FHIRAllTypes.CLINICALUSEDEFINITION;
5354        if ("Communication".equals(codeString))
5355          return FHIRAllTypes.COMMUNICATION;
5356        if ("CommunicationRequest".equals(codeString))
5357          return FHIRAllTypes.COMMUNICATIONREQUEST;
5358        if ("Composition".equals(codeString))
5359          return FHIRAllTypes.COMPOSITION;
5360        if ("Condition".equals(codeString))
5361          return FHIRAllTypes.CONDITION;
5362        if ("Consent".equals(codeString))
5363          return FHIRAllTypes.CONSENT;
5364        if ("Contract".equals(codeString))
5365          return FHIRAllTypes.CONTRACT;
5366        if ("Coverage".equals(codeString))
5367          return FHIRAllTypes.COVERAGE;
5368        if ("CoverageEligibilityRequest".equals(codeString))
5369          return FHIRAllTypes.COVERAGEELIGIBILITYREQUEST;
5370        if ("CoverageEligibilityResponse".equals(codeString))
5371          return FHIRAllTypes.COVERAGEELIGIBILITYRESPONSE;
5372        if ("DetectedIssue".equals(codeString))
5373          return FHIRAllTypes.DETECTEDISSUE;
5374        if ("Device".equals(codeString))
5375          return FHIRAllTypes.DEVICE;
5376        if ("DeviceDefinition".equals(codeString))
5377          return FHIRAllTypes.DEVICEDEFINITION;
5378        if ("DeviceDispense".equals(codeString))
5379          return FHIRAllTypes.DEVICEDISPENSE;
5380        if ("DeviceMetric".equals(codeString))
5381          return FHIRAllTypes.DEVICEMETRIC;
5382        if ("DeviceRequest".equals(codeString))
5383          return FHIRAllTypes.DEVICEREQUEST;
5384        if ("DeviceUsage".equals(codeString))
5385          return FHIRAllTypes.DEVICEUSAGE;
5386        if ("DiagnosticReport".equals(codeString))
5387          return FHIRAllTypes.DIAGNOSTICREPORT;
5388        if ("DocumentManifest".equals(codeString))
5389          return FHIRAllTypes.DOCUMENTMANIFEST;
5390        if ("DocumentReference".equals(codeString))
5391          return FHIRAllTypes.DOCUMENTREFERENCE;
5392        if ("Encounter".equals(codeString))
5393          return FHIRAllTypes.ENCOUNTER;
5394        if ("Endpoint".equals(codeString))
5395          return FHIRAllTypes.ENDPOINT;
5396        if ("EnrollmentRequest".equals(codeString))
5397          return FHIRAllTypes.ENROLLMENTREQUEST;
5398        if ("EnrollmentResponse".equals(codeString))
5399          return FHIRAllTypes.ENROLLMENTRESPONSE;
5400        if ("EpisodeOfCare".equals(codeString))
5401          return FHIRAllTypes.EPISODEOFCARE;
5402        if ("ExplanationOfBenefit".equals(codeString))
5403          return FHIRAllTypes.EXPLANATIONOFBENEFIT;
5404        if ("FamilyMemberHistory".equals(codeString))
5405          return FHIRAllTypes.FAMILYMEMBERHISTORY;
5406        if ("Flag".equals(codeString))
5407          return FHIRAllTypes.FLAG;
5408        if ("FormularyItem".equals(codeString))
5409          return FHIRAllTypes.FORMULARYITEM;
5410        if ("Goal".equals(codeString))
5411          return FHIRAllTypes.GOAL;
5412        if ("Group".equals(codeString))
5413          return FHIRAllTypes.GROUP;
5414        if ("GuidanceResponse".equals(codeString))
5415          return FHIRAllTypes.GUIDANCERESPONSE;
5416        if ("HealthcareService".equals(codeString))
5417          return FHIRAllTypes.HEALTHCARESERVICE;
5418        if ("ImagingSelection".equals(codeString))
5419          return FHIRAllTypes.IMAGINGSELECTION;
5420        if ("ImagingStudy".equals(codeString))
5421          return FHIRAllTypes.IMAGINGSTUDY;
5422        if ("Immunization".equals(codeString))
5423          return FHIRAllTypes.IMMUNIZATION;
5424        if ("ImmunizationEvaluation".equals(codeString))
5425          return FHIRAllTypes.IMMUNIZATIONEVALUATION;
5426        if ("ImmunizationRecommendation".equals(codeString))
5427          return FHIRAllTypes.IMMUNIZATIONRECOMMENDATION;
5428        if ("Ingredient".equals(codeString))
5429          return FHIRAllTypes.INGREDIENT;
5430        if ("InsurancePlan".equals(codeString))
5431          return FHIRAllTypes.INSURANCEPLAN;
5432        if ("InventoryReport".equals(codeString))
5433          return FHIRAllTypes.INVENTORYREPORT;
5434        if ("Invoice".equals(codeString))
5435          return FHIRAllTypes.INVOICE;
5436        if ("Linkage".equals(codeString))
5437          return FHIRAllTypes.LINKAGE;
5438        if ("List".equals(codeString))
5439          return FHIRAllTypes.LIST;
5440        if ("Location".equals(codeString))
5441          return FHIRAllTypes.LOCATION;
5442        if ("ManufacturedItemDefinition".equals(codeString))
5443          return FHIRAllTypes.MANUFACTUREDITEMDEFINITION;
5444        if ("MeasureReport".equals(codeString))
5445          return FHIRAllTypes.MEASUREREPORT;
5446        if ("Medication".equals(codeString))
5447          return FHIRAllTypes.MEDICATION;
5448        if ("MedicationAdministration".equals(codeString))
5449          return FHIRAllTypes.MEDICATIONADMINISTRATION;
5450        if ("MedicationDispense".equals(codeString))
5451          return FHIRAllTypes.MEDICATIONDISPENSE;
5452        if ("MedicationKnowledge".equals(codeString))
5453          return FHIRAllTypes.MEDICATIONKNOWLEDGE;
5454        if ("MedicationRequest".equals(codeString))
5455          return FHIRAllTypes.MEDICATIONREQUEST;
5456        if ("MedicationUsage".equals(codeString))
5457          return FHIRAllTypes.MEDICATIONUSAGE;
5458        if ("MedicinalProductDefinition".equals(codeString))
5459          return FHIRAllTypes.MEDICINALPRODUCTDEFINITION;
5460        if ("MessageHeader".equals(codeString))
5461          return FHIRAllTypes.MESSAGEHEADER;
5462        if ("MolecularSequence".equals(codeString))
5463          return FHIRAllTypes.MOLECULARSEQUENCE;
5464        if ("NutritionIntake".equals(codeString))
5465          return FHIRAllTypes.NUTRITIONINTAKE;
5466        if ("NutritionOrder".equals(codeString))
5467          return FHIRAllTypes.NUTRITIONORDER;
5468        if ("NutritionProduct".equals(codeString))
5469          return FHIRAllTypes.NUTRITIONPRODUCT;
5470        if ("Observation".equals(codeString))
5471          return FHIRAllTypes.OBSERVATION;
5472        if ("ObservationDefinition".equals(codeString))
5473          return FHIRAllTypes.OBSERVATIONDEFINITION;
5474        if ("OperationOutcome".equals(codeString))
5475          return FHIRAllTypes.OPERATIONOUTCOME;
5476        if ("Organization".equals(codeString))
5477          return FHIRAllTypes.ORGANIZATION;
5478        if ("OrganizationAffiliation".equals(codeString))
5479          return FHIRAllTypes.ORGANIZATIONAFFILIATION;
5480        if ("PackagedProductDefinition".equals(codeString))
5481          return FHIRAllTypes.PACKAGEDPRODUCTDEFINITION;
5482        if ("Patient".equals(codeString))
5483          return FHIRAllTypes.PATIENT;
5484        if ("PaymentNotice".equals(codeString))
5485          return FHIRAllTypes.PAYMENTNOTICE;
5486        if ("PaymentReconciliation".equals(codeString))
5487          return FHIRAllTypes.PAYMENTRECONCILIATION;
5488        if ("Permission".equals(codeString))
5489          return FHIRAllTypes.PERMISSION;
5490        if ("Person".equals(codeString))
5491          return FHIRAllTypes.PERSON;
5492        if ("Practitioner".equals(codeString))
5493          return FHIRAllTypes.PRACTITIONER;
5494        if ("PractitionerRole".equals(codeString))
5495          return FHIRAllTypes.PRACTITIONERROLE;
5496        if ("Procedure".equals(codeString))
5497          return FHIRAllTypes.PROCEDURE;
5498        if ("Provenance".equals(codeString))
5499          return FHIRAllTypes.PROVENANCE;
5500        if ("QuestionnaireResponse".equals(codeString))
5501          return FHIRAllTypes.QUESTIONNAIRERESPONSE;
5502        if ("RegulatedAuthorization".equals(codeString))
5503          return FHIRAllTypes.REGULATEDAUTHORIZATION;
5504        if ("RelatedPerson".equals(codeString))
5505          return FHIRAllTypes.RELATEDPERSON;
5506        if ("RequestGroup".equals(codeString))
5507          return FHIRAllTypes.REQUESTGROUP;
5508        if ("ResearchStudy".equals(codeString))
5509          return FHIRAllTypes.RESEARCHSTUDY;
5510        if ("ResearchSubject".equals(codeString))
5511          return FHIRAllTypes.RESEARCHSUBJECT;
5512        if ("RiskAssessment".equals(codeString))
5513          return FHIRAllTypes.RISKASSESSMENT;
5514        if ("Schedule".equals(codeString))
5515          return FHIRAllTypes.SCHEDULE;
5516        if ("ServiceRequest".equals(codeString))
5517          return FHIRAllTypes.SERVICEREQUEST;
5518        if ("Slot".equals(codeString))
5519          return FHIRAllTypes.SLOT;
5520        if ("Specimen".equals(codeString))
5521          return FHIRAllTypes.SPECIMEN;
5522        if ("SpecimenDefinition".equals(codeString))
5523          return FHIRAllTypes.SPECIMENDEFINITION;
5524        if ("Subscription".equals(codeString))
5525          return FHIRAllTypes.SUBSCRIPTION;
5526        if ("SubscriptionStatus".equals(codeString))
5527          return FHIRAllTypes.SUBSCRIPTIONSTATUS;
5528        if ("Substance".equals(codeString))
5529          return FHIRAllTypes.SUBSTANCE;
5530        if ("SubstanceDefinition".equals(codeString))
5531          return FHIRAllTypes.SUBSTANCEDEFINITION;
5532        if ("SubstanceNucleicAcid".equals(codeString))
5533          return FHIRAllTypes.SUBSTANCENUCLEICACID;
5534        if ("SubstancePolymer".equals(codeString))
5535          return FHIRAllTypes.SUBSTANCEPOLYMER;
5536        if ("SubstanceProtein".equals(codeString))
5537          return FHIRAllTypes.SUBSTANCEPROTEIN;
5538        if ("SubstanceReferenceInformation".equals(codeString))
5539          return FHIRAllTypes.SUBSTANCEREFERENCEINFORMATION;
5540        if ("SubstanceSourceMaterial".equals(codeString))
5541          return FHIRAllTypes.SUBSTANCESOURCEMATERIAL;
5542        if ("SupplyDelivery".equals(codeString))
5543          return FHIRAllTypes.SUPPLYDELIVERY;
5544        if ("SupplyRequest".equals(codeString))
5545          return FHIRAllTypes.SUPPLYREQUEST;
5546        if ("Task".equals(codeString))
5547          return FHIRAllTypes.TASK;
5548        if ("TestReport".equals(codeString))
5549          return FHIRAllTypes.TESTREPORT;
5550        if ("Transport".equals(codeString))
5551          return FHIRAllTypes.TRANSPORT;
5552        if ("VerificationResult".equals(codeString))
5553          return FHIRAllTypes.VERIFICATIONRESULT;
5554        if ("VisionPrescription".equals(codeString))
5555          return FHIRAllTypes.VISIONPRESCRIPTION;
5556        if ("Parameters".equals(codeString))
5557          return FHIRAllTypes.PARAMETERS;
5558        if ("Type".equals(codeString))
5559          return FHIRAllTypes.TYPE;
5560        if ("Any".equals(codeString))
5561          return FHIRAllTypes.ANY;
5562        throw new IllegalArgumentException("Unknown FHIRAllTypes code '"+codeString+"'");
5563        }
5564        public Enumeration<FHIRAllTypes> fromType(Base code) throws FHIRException {
5565          if (code == null)
5566            return null;
5567          if (code.isEmpty())
5568            return new Enumeration<FHIRAllTypes>(this);
5569          String codeString = ((PrimitiveType) code).asStringValue();
5570          if (codeString == null || "".equals(codeString))
5571            return null;
5572        if ("Address".equals(codeString))
5573          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADDRESS);
5574        if ("Age".equals(codeString))
5575          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.AGE);
5576        if ("Annotation".equals(codeString))
5577          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ANNOTATION);
5578        if ("Attachment".equals(codeString))
5579          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ATTACHMENT);
5580        if ("BackboneElement".equals(codeString))
5581          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BACKBONEELEMENT);
5582        if ("BackboneType".equals(codeString))
5583          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BACKBONETYPE);
5584        if ("Base".equals(codeString))
5585          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASE);
5586        if ("CodeableConcept".equals(codeString))
5587          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODEABLECONCEPT);
5588        if ("CodeableReference".equals(codeString))
5589          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODEABLEREFERENCE);
5590        if ("Coding".equals(codeString))
5591          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODING);
5592        if ("ContactDetail".equals(codeString))
5593          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTACTDETAIL);
5594        if ("ContactPoint".equals(codeString))
5595          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTACTPOINT);
5596        if ("Contributor".equals(codeString))
5597          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTRIBUTOR);
5598        if ("Count".equals(codeString))
5599          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COUNT);
5600        if ("DataRequirement".equals(codeString))
5601          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATAREQUIREMENT);
5602        if ("DataType".equals(codeString))
5603          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATATYPE);
5604        if ("Distance".equals(codeString))
5605          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DISTANCE);
5606        if ("Dosage".equals(codeString))
5607          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOSAGE);
5608        if ("Duration".equals(codeString))
5609          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DURATION);
5610        if ("Element".equals(codeString))
5611          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELEMENT);
5612        if ("ElementDefinition".equals(codeString))
5613          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELEMENTDEFINITION);
5614        if ("Expression".equals(codeString))
5615          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXPRESSION);
5616        if ("ExtendedContactDetail".equals(codeString))
5617          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXTENDEDCONTACTDETAIL);
5618        if ("Extension".equals(codeString))
5619          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXTENSION);
5620        if ("HumanName".equals(codeString))
5621          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.HUMANNAME);
5622        if ("Identifier".equals(codeString))
5623          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IDENTIFIER);
5624        if ("MarketingStatus".equals(codeString))
5625          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MARKETINGSTATUS);
5626        if ("Meta".equals(codeString))
5627          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.META);
5628        if ("Money".equals(codeString))
5629          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MONEY);
5630        if ("MoneyQuantity".equals(codeString))
5631          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MONEYQUANTITY);
5632        if ("Narrative".equals(codeString))
5633          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NARRATIVE);
5634        if ("ParameterDefinition".equals(codeString))
5635          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PARAMETERDEFINITION);
5636        if ("Period".equals(codeString))
5637          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERIOD);
5638        if ("Population".equals(codeString))
5639          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.POPULATION);
5640        if ("PrimitiveType".equals(codeString))
5641          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRIMITIVETYPE);
5642        if ("ProductShelfLife".equals(codeString))
5643          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRODUCTSHELFLIFE);
5644        if ("Quantity".equals(codeString))
5645          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUANTITY);
5646        if ("Range".equals(codeString))
5647          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RANGE);
5648        if ("Ratio".equals(codeString))
5649          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RATIO);
5650        if ("RatioRange".equals(codeString))
5651          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RATIORANGE);
5652        if ("Reference".equals(codeString))
5653          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REFERENCE);
5654        if ("RelatedArtifact".equals(codeString))
5655          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RELATEDARTIFACT);
5656        if ("SampledData".equals(codeString))
5657          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SAMPLEDDATA);
5658        if ("Signature".equals(codeString))
5659          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SIGNATURE);
5660        if ("SimpleQuantity".equals(codeString))
5661          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SIMPLEQUANTITY);
5662        if ("Timing".equals(codeString))
5663          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TIMING);
5664        if ("TriggerDefinition".equals(codeString))
5665          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TRIGGERDEFINITION);
5666        if ("UsageContext".equals(codeString))
5667          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.USAGECONTEXT);
5668        if ("base64Binary".equals(codeString))
5669          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASE64BINARY);
5670        if ("boolean".equals(codeString))
5671          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BOOLEAN);
5672        if ("canonical".equals(codeString))
5673          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CANONICAL);
5674        if ("code".equals(codeString))
5675          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODE);
5676        if ("date".equals(codeString))
5677          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATE);
5678        if ("dateTime".equals(codeString))
5679          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATETIME);
5680        if ("decimal".equals(codeString))
5681          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DECIMAL);
5682        if ("id".equals(codeString))
5683          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ID);
5684        if ("instant".equals(codeString))
5685          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INSTANT);
5686        if ("integer".equals(codeString))
5687          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INTEGER);
5688        if ("integer64".equals(codeString))
5689          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INTEGER64);
5690        if ("markdown".equals(codeString))
5691          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MARKDOWN);
5692        if ("oid".equals(codeString))
5693          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OID);
5694        if ("positiveInt".equals(codeString))
5695          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.POSITIVEINT);
5696        if ("string".equals(codeString))
5697          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRING);
5698        if ("time".equals(codeString))
5699          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TIME);
5700        if ("unsignedInt".equals(codeString))
5701          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.UNSIGNEDINT);
5702        if ("uri".equals(codeString))
5703          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.URI);
5704        if ("url".equals(codeString))
5705          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.URL);
5706        if ("uuid".equals(codeString))
5707          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.UUID);
5708        if ("xhtml".equals(codeString))
5709          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.XHTML);
5710        if ("Resource".equals(codeString))
5711          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESOURCE);
5712        if ("Binary".equals(codeString))
5713          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BINARY);
5714        if ("Bundle".equals(codeString))
5715          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BUNDLE);
5716        if ("DomainResource".equals(codeString))
5717          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOMAINRESOURCE);
5718        if ("Account".equals(codeString))
5719          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ACCOUNT);
5720        if ("AdministrableProductDefinition".equals(codeString))
5721          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADMINISTRABLEPRODUCTDEFINITION);
5722        if ("AdverseEvent".equals(codeString))
5723          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADVERSEEVENT);
5724        if ("AllergyIntolerance".equals(codeString))
5725          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ALLERGYINTOLERANCE);
5726        if ("Appointment".equals(codeString))
5727          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.APPOINTMENT);
5728        if ("AppointmentResponse".equals(codeString))
5729          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.APPOINTMENTRESPONSE);
5730        if ("ArtifactAssessment".equals(codeString))
5731          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ARTIFACTASSESSMENT);
5732        if ("AuditEvent".equals(codeString))
5733          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.AUDITEVENT);
5734        if ("Basic".equals(codeString))
5735          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASIC);
5736        if ("BiologicallyDerivedProduct".equals(codeString))
5737          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BIOLOGICALLYDERIVEDPRODUCT);
5738        if ("BodyStructure".equals(codeString))
5739          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BODYSTRUCTURE);
5740        if ("CanonicalResource".equals(codeString))
5741          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CANONICALRESOURCE);
5742        if ("CapabilityStatement".equals(codeString))
5743          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CAPABILITYSTATEMENT);
5744        if ("CapabilityStatement2".equals(codeString))
5745          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CAPABILITYSTATEMENT2);
5746        if ("CodeSystem".equals(codeString))
5747          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODESYSTEM);
5748        if ("CompartmentDefinition".equals(codeString))
5749          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMPARTMENTDEFINITION);
5750        if ("ExampleScenario".equals(codeString))
5751          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXAMPLESCENARIO);
5752        if ("GraphDefinition".equals(codeString))
5753          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GRAPHDEFINITION);
5754        if ("ImplementationGuide".equals(codeString))
5755          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMPLEMENTATIONGUIDE);
5756        if ("MessageDefinition".equals(codeString))
5757          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MESSAGEDEFINITION);
5758        if ("MetadataResource".equals(codeString))
5759          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.METADATARESOURCE);
5760        if ("ActivityDefinition".equals(codeString))
5761          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ACTIVITYDEFINITION);
5762        if ("ChargeItemDefinition".equals(codeString))
5763          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CHARGEITEMDEFINITION);
5764        if ("Citation".equals(codeString))
5765          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CITATION);
5766        if ("ConceptMap".equals(codeString))
5767          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONCEPTMAP);
5768        if ("ConditionDefinition".equals(codeString))
5769          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONDITIONDEFINITION);
5770        if ("EventDefinition".equals(codeString))
5771          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVENTDEFINITION);
5772        if ("Evidence".equals(codeString))
5773          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVIDENCE);
5774        if ("EvidenceReport".equals(codeString))
5775          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVIDENCEREPORT);
5776        if ("EvidenceVariable".equals(codeString))
5777          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVIDENCEVARIABLE);
5778        if ("Library".equals(codeString))
5779          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LIBRARY);
5780        if ("Measure".equals(codeString))
5781          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEASURE);
5782        if ("NamingSystem".equals(codeString))
5783          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NAMINGSYSTEM);
5784        if ("PlanDefinition".equals(codeString))
5785          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PLANDEFINITION);
5786        if ("Questionnaire".equals(codeString))
5787          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUESTIONNAIRE);
5788        if ("OperationDefinition".equals(codeString))
5789          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OPERATIONDEFINITION);
5790        if ("SearchParameter".equals(codeString))
5791          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SEARCHPARAMETER);
5792        if ("StructureDefinition".equals(codeString))
5793          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRUCTUREDEFINITION);
5794        if ("StructureMap".equals(codeString))
5795          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRUCTUREMAP);
5796        if ("SubscriptionTopic".equals(codeString))
5797          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSCRIPTIONTOPIC);
5798        if ("TerminologyCapabilities".equals(codeString))
5799          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TERMINOLOGYCAPABILITIES);
5800        if ("TestScript".equals(codeString))
5801          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TESTSCRIPT);
5802        if ("ValueSet".equals(codeString))
5803          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VALUESET);
5804        if ("CarePlan".equals(codeString))
5805          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CAREPLAN);
5806        if ("CareTeam".equals(codeString))
5807          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CARETEAM);
5808        if ("ChargeItem".equals(codeString))
5809          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CHARGEITEM);
5810        if ("Claim".equals(codeString))
5811          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLAIM);
5812        if ("ClaimResponse".equals(codeString))
5813          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLAIMRESPONSE);
5814        if ("ClinicalImpression".equals(codeString))
5815          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLINICALIMPRESSION);
5816        if ("ClinicalUseDefinition".equals(codeString))
5817          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLINICALUSEDEFINITION);
5818        if ("Communication".equals(codeString))
5819          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMMUNICATION);
5820        if ("CommunicationRequest".equals(codeString))
5821          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMMUNICATIONREQUEST);
5822        if ("Composition".equals(codeString))
5823          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMPOSITION);
5824        if ("Condition".equals(codeString))
5825          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONDITION);
5826        if ("Consent".equals(codeString))
5827          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONSENT);
5828        if ("Contract".equals(codeString))
5829          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTRACT);
5830        if ("Coverage".equals(codeString))
5831          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGE);
5832        if ("CoverageEligibilityRequest".equals(codeString))
5833          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGEELIGIBILITYREQUEST);
5834        if ("CoverageEligibilityResponse".equals(codeString))
5835          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGEELIGIBILITYRESPONSE);
5836        if ("DetectedIssue".equals(codeString))
5837          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DETECTEDISSUE);
5838        if ("Device".equals(codeString))
5839          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICE);
5840        if ("DeviceDefinition".equals(codeString))
5841          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEDEFINITION);
5842        if ("DeviceDispense".equals(codeString))
5843          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEDISPENSE);
5844        if ("DeviceMetric".equals(codeString))
5845          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEMETRIC);
5846        if ("DeviceRequest".equals(codeString))
5847          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEREQUEST);
5848        if ("DeviceUsage".equals(codeString))
5849          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEUSAGE);
5850        if ("DiagnosticReport".equals(codeString))
5851          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DIAGNOSTICREPORT);
5852        if ("DocumentManifest".equals(codeString))
5853          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOCUMENTMANIFEST);
5854        if ("DocumentReference".equals(codeString))
5855          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOCUMENTREFERENCE);
5856        if ("Encounter".equals(codeString))
5857          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENCOUNTER);
5858        if ("Endpoint".equals(codeString))
5859          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENDPOINT);
5860        if ("EnrollmentRequest".equals(codeString))
5861          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENROLLMENTREQUEST);
5862        if ("EnrollmentResponse".equals(codeString))
5863          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENROLLMENTRESPONSE);
5864        if ("EpisodeOfCare".equals(codeString))
5865          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EPISODEOFCARE);
5866        if ("ExplanationOfBenefit".equals(codeString))
5867          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXPLANATIONOFBENEFIT);
5868        if ("FamilyMemberHistory".equals(codeString))
5869          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.FAMILYMEMBERHISTORY);
5870        if ("Flag".equals(codeString))
5871          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.FLAG);
5872        if ("FormularyItem".equals(codeString))
5873          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.FORMULARYITEM);
5874        if ("Goal".equals(codeString))
5875          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GOAL);
5876        if ("Group".equals(codeString))
5877          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GROUP);
5878        if ("GuidanceResponse".equals(codeString))
5879          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GUIDANCERESPONSE);
5880        if ("HealthcareService".equals(codeString))
5881          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.HEALTHCARESERVICE);
5882        if ("ImagingSelection".equals(codeString))
5883          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMAGINGSELECTION);
5884        if ("ImagingStudy".equals(codeString))
5885          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMAGINGSTUDY);
5886        if ("Immunization".equals(codeString))
5887          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATION);
5888        if ("ImmunizationEvaluation".equals(codeString))
5889          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATIONEVALUATION);
5890        if ("ImmunizationRecommendation".equals(codeString))
5891          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATIONRECOMMENDATION);
5892        if ("Ingredient".equals(codeString))
5893          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INGREDIENT);
5894        if ("InsurancePlan".equals(codeString))
5895          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INSURANCEPLAN);
5896        if ("InventoryReport".equals(codeString))
5897          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INVENTORYREPORT);
5898        if ("Invoice".equals(codeString))
5899          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INVOICE);
5900        if ("Linkage".equals(codeString))
5901          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LINKAGE);
5902        if ("List".equals(codeString))
5903          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LIST);
5904        if ("Location".equals(codeString))
5905          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LOCATION);
5906        if ("ManufacturedItemDefinition".equals(codeString))
5907          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MANUFACTUREDITEMDEFINITION);
5908        if ("MeasureReport".equals(codeString))
5909          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEASUREREPORT);
5910        if ("Medication".equals(codeString))
5911          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATION);
5912        if ("MedicationAdministration".equals(codeString))
5913          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONADMINISTRATION);
5914        if ("MedicationDispense".equals(codeString))
5915          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONDISPENSE);
5916        if ("MedicationKnowledge".equals(codeString))
5917          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONKNOWLEDGE);
5918        if ("MedicationRequest".equals(codeString))
5919          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONREQUEST);
5920        if ("MedicationUsage".equals(codeString))
5921          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONUSAGE);
5922        if ("MedicinalProductDefinition".equals(codeString))
5923          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICINALPRODUCTDEFINITION);
5924        if ("MessageHeader".equals(codeString))
5925          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MESSAGEHEADER);
5926        if ("MolecularSequence".equals(codeString))
5927          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MOLECULARSEQUENCE);
5928        if ("NutritionIntake".equals(codeString))
5929          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NUTRITIONINTAKE);
5930        if ("NutritionOrder".equals(codeString))
5931          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NUTRITIONORDER);
5932        if ("NutritionProduct".equals(codeString))
5933          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NUTRITIONPRODUCT);
5934        if ("Observation".equals(codeString))
5935          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OBSERVATION);
5936        if ("ObservationDefinition".equals(codeString))
5937          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OBSERVATIONDEFINITION);
5938        if ("OperationOutcome".equals(codeString))
5939          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OPERATIONOUTCOME);
5940        if ("Organization".equals(codeString))
5941          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ORGANIZATION);
5942        if ("OrganizationAffiliation".equals(codeString))
5943          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ORGANIZATIONAFFILIATION);
5944        if ("PackagedProductDefinition".equals(codeString))
5945          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PACKAGEDPRODUCTDEFINITION);
5946        if ("Patient".equals(codeString))
5947          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PATIENT);
5948        if ("PaymentNotice".equals(codeString))
5949          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PAYMENTNOTICE);
5950        if ("PaymentReconciliation".equals(codeString))
5951          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PAYMENTRECONCILIATION);
5952        if ("Permission".equals(codeString))
5953          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERMISSION);
5954        if ("Person".equals(codeString))
5955          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERSON);
5956        if ("Practitioner".equals(codeString))
5957          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRACTITIONER);
5958        if ("PractitionerRole".equals(codeString))
5959          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRACTITIONERROLE);
5960        if ("Procedure".equals(codeString))
5961          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROCEDURE);
5962        if ("Provenance".equals(codeString))
5963          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROVENANCE);
5964        if ("QuestionnaireResponse".equals(codeString))
5965          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUESTIONNAIRERESPONSE);
5966        if ("RegulatedAuthorization".equals(codeString))
5967          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REGULATEDAUTHORIZATION);
5968        if ("RelatedPerson".equals(codeString))
5969          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RELATEDPERSON);
5970        if ("RequestGroup".equals(codeString))
5971          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REQUESTGROUP);
5972        if ("ResearchStudy".equals(codeString))
5973          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHSTUDY);
5974        if ("ResearchSubject".equals(codeString))
5975          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHSUBJECT);
5976        if ("RiskAssessment".equals(codeString))
5977          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RISKASSESSMENT);
5978        if ("Schedule".equals(codeString))
5979          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SCHEDULE);
5980        if ("ServiceRequest".equals(codeString))
5981          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SERVICEREQUEST);
5982        if ("Slot".equals(codeString))
5983          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SLOT);
5984        if ("Specimen".equals(codeString))
5985          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SPECIMEN);
5986        if ("SpecimenDefinition".equals(codeString))
5987          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SPECIMENDEFINITION);
5988        if ("Subscription".equals(codeString))
5989          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSCRIPTION);
5990        if ("SubscriptionStatus".equals(codeString))
5991          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSCRIPTIONSTATUS);
5992        if ("Substance".equals(codeString))
5993          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCE);
5994        if ("SubstanceDefinition".equals(codeString))
5995          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCEDEFINITION);
5996        if ("SubstanceNucleicAcid".equals(codeString))
5997          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCENUCLEICACID);
5998        if ("SubstancePolymer".equals(codeString))
5999          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCEPOLYMER);
6000        if ("SubstanceProtein".equals(codeString))
6001          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCEPROTEIN);
6002        if ("SubstanceReferenceInformation".equals(codeString))
6003          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCEREFERENCEINFORMATION);
6004        if ("SubstanceSourceMaterial".equals(codeString))
6005          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCESOURCEMATERIAL);
6006        if ("SupplyDelivery".equals(codeString))
6007          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUPPLYDELIVERY);
6008        if ("SupplyRequest".equals(codeString))
6009          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUPPLYREQUEST);
6010        if ("Task".equals(codeString))
6011          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TASK);
6012        if ("TestReport".equals(codeString))
6013          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TESTREPORT);
6014        if ("Transport".equals(codeString))
6015          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TRANSPORT);
6016        if ("VerificationResult".equals(codeString))
6017          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VERIFICATIONRESULT);
6018        if ("VisionPrescription".equals(codeString))
6019          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VISIONPRESCRIPTION);
6020        if ("Parameters".equals(codeString))
6021          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PARAMETERS);
6022        if ("Type".equals(codeString))
6023          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TYPE);
6024        if ("Any".equals(codeString))
6025          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ANY);
6026        throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'");
6027        }
6028    public String toCode(FHIRAllTypes code) {
6029      if (code == FHIRAllTypes.ADDRESS)
6030        return "Address";
6031      if (code == FHIRAllTypes.AGE)
6032        return "Age";
6033      if (code == FHIRAllTypes.ANNOTATION)
6034        return "Annotation";
6035      if (code == FHIRAllTypes.ATTACHMENT)
6036        return "Attachment";
6037      if (code == FHIRAllTypes.BACKBONEELEMENT)
6038        return "BackboneElement";
6039      if (code == FHIRAllTypes.BACKBONETYPE)
6040        return "BackboneType";
6041      if (code == FHIRAllTypes.BASE)
6042        return "Base";
6043      if (code == FHIRAllTypes.CODEABLECONCEPT)
6044        return "CodeableConcept";
6045      if (code == FHIRAllTypes.CODEABLEREFERENCE)
6046        return "CodeableReference";
6047      if (code == FHIRAllTypes.CODING)
6048        return "Coding";
6049      if (code == FHIRAllTypes.CONTACTDETAIL)
6050        return "ContactDetail";
6051      if (code == FHIRAllTypes.CONTACTPOINT)
6052        return "ContactPoint";
6053      if (code == FHIRAllTypes.CONTRIBUTOR)
6054        return "Contributor";
6055      if (code == FHIRAllTypes.COUNT)
6056        return "Count";
6057      if (code == FHIRAllTypes.DATAREQUIREMENT)
6058        return "DataRequirement";
6059      if (code == FHIRAllTypes.DATATYPE)
6060        return "DataType";
6061      if (code == FHIRAllTypes.DISTANCE)
6062        return "Distance";
6063      if (code == FHIRAllTypes.DOSAGE)
6064        return "Dosage";
6065      if (code == FHIRAllTypes.DURATION)
6066        return "Duration";
6067      if (code == FHIRAllTypes.ELEMENT)
6068        return "Element";
6069      if (code == FHIRAllTypes.ELEMENTDEFINITION)
6070        return "ElementDefinition";
6071      if (code == FHIRAllTypes.EXPRESSION)
6072        return "Expression";
6073      if (code == FHIRAllTypes.EXTENDEDCONTACTDETAIL)
6074        return "ExtendedContactDetail";
6075      if (code == FHIRAllTypes.EXTENSION)
6076        return "Extension";
6077      if (code == FHIRAllTypes.HUMANNAME)
6078        return "HumanName";
6079      if (code == FHIRAllTypes.IDENTIFIER)
6080        return "Identifier";
6081      if (code == FHIRAllTypes.MARKETINGSTATUS)
6082        return "MarketingStatus";
6083      if (code == FHIRAllTypes.META)
6084        return "Meta";
6085      if (code == FHIRAllTypes.MONEY)
6086        return "Money";
6087      if (code == FHIRAllTypes.MONEYQUANTITY)
6088        return "MoneyQuantity";
6089      if (code == FHIRAllTypes.NARRATIVE)
6090        return "Narrative";
6091      if (code == FHIRAllTypes.PARAMETERDEFINITION)
6092        return "ParameterDefinition";
6093      if (code == FHIRAllTypes.PERIOD)
6094        return "Period";
6095      if (code == FHIRAllTypes.POPULATION)
6096        return "Population";
6097      if (code == FHIRAllTypes.PRIMITIVETYPE)
6098        return "PrimitiveType";
6099      if (code == FHIRAllTypes.PRODUCTSHELFLIFE)
6100        return "ProductShelfLife";
6101      if (code == FHIRAllTypes.QUANTITY)
6102        return "Quantity";
6103      if (code == FHIRAllTypes.RANGE)
6104        return "Range";
6105      if (code == FHIRAllTypes.RATIO)
6106        return "Ratio";
6107      if (code == FHIRAllTypes.RATIORANGE)
6108        return "RatioRange";
6109      if (code == FHIRAllTypes.REFERENCE)
6110        return "Reference";
6111      if (code == FHIRAllTypes.RELATEDARTIFACT)
6112        return "RelatedArtifact";
6113      if (code == FHIRAllTypes.SAMPLEDDATA)
6114        return "SampledData";
6115      if (code == FHIRAllTypes.SIGNATURE)
6116        return "Signature";
6117      if (code == FHIRAllTypes.SIMPLEQUANTITY)
6118        return "SimpleQuantity";
6119      if (code == FHIRAllTypes.TIMING)
6120        return "Timing";
6121      if (code == FHIRAllTypes.TRIGGERDEFINITION)
6122        return "TriggerDefinition";
6123      if (code == FHIRAllTypes.USAGECONTEXT)
6124        return "UsageContext";
6125      if (code == FHIRAllTypes.BASE64BINARY)
6126        return "base64Binary";
6127      if (code == FHIRAllTypes.BOOLEAN)
6128        return "boolean";
6129      if (code == FHIRAllTypes.CANONICAL)
6130        return "canonical";
6131      if (code == FHIRAllTypes.CODE)
6132        return "code";
6133      if (code == FHIRAllTypes.DATE)
6134        return "date";
6135      if (code == FHIRAllTypes.DATETIME)
6136        return "dateTime";
6137      if (code == FHIRAllTypes.DECIMAL)
6138        return "decimal";
6139      if (code == FHIRAllTypes.ID)
6140        return "id";
6141      if (code == FHIRAllTypes.INSTANT)
6142        return "instant";
6143      if (code == FHIRAllTypes.INTEGER)
6144        return "integer";
6145      if (code == FHIRAllTypes.INTEGER64)
6146        return "integer64";
6147      if (code == FHIRAllTypes.MARKDOWN)
6148        return "markdown";
6149      if (code == FHIRAllTypes.OID)
6150        return "oid";
6151      if (code == FHIRAllTypes.POSITIVEINT)
6152        return "positiveInt";
6153      if (code == FHIRAllTypes.STRING)
6154        return "string";
6155      if (code == FHIRAllTypes.TIME)
6156        return "time";
6157      if (code == FHIRAllTypes.UNSIGNEDINT)
6158        return "unsignedInt";
6159      if (code == FHIRAllTypes.URI)
6160        return "uri";
6161      if (code == FHIRAllTypes.URL)
6162        return "url";
6163      if (code == FHIRAllTypes.UUID)
6164        return "uuid";
6165      if (code == FHIRAllTypes.XHTML)
6166        return "xhtml";
6167      if (code == FHIRAllTypes.RESOURCE)
6168        return "Resource";
6169      if (code == FHIRAllTypes.BINARY)
6170        return "Binary";
6171      if (code == FHIRAllTypes.BUNDLE)
6172        return "Bundle";
6173      if (code == FHIRAllTypes.DOMAINRESOURCE)
6174        return "DomainResource";
6175      if (code == FHIRAllTypes.ACCOUNT)
6176        return "Account";
6177      if (code == FHIRAllTypes.ADMINISTRABLEPRODUCTDEFINITION)
6178        return "AdministrableProductDefinition";
6179      if (code == FHIRAllTypes.ADVERSEEVENT)
6180        return "AdverseEvent";
6181      if (code == FHIRAllTypes.ALLERGYINTOLERANCE)
6182        return "AllergyIntolerance";
6183      if (code == FHIRAllTypes.APPOINTMENT)
6184        return "Appointment";
6185      if (code == FHIRAllTypes.APPOINTMENTRESPONSE)
6186        return "AppointmentResponse";
6187      if (code == FHIRAllTypes.ARTIFACTASSESSMENT)
6188        return "ArtifactAssessment";
6189      if (code == FHIRAllTypes.AUDITEVENT)
6190        return "AuditEvent";
6191      if (code == FHIRAllTypes.BASIC)
6192        return "Basic";
6193      if (code == FHIRAllTypes.BIOLOGICALLYDERIVEDPRODUCT)
6194        return "BiologicallyDerivedProduct";
6195      if (code == FHIRAllTypes.BODYSTRUCTURE)
6196        return "BodyStructure";
6197      if (code == FHIRAllTypes.CANONICALRESOURCE)
6198        return "CanonicalResource";
6199      if (code == FHIRAllTypes.CAPABILITYSTATEMENT)
6200        return "CapabilityStatement";
6201      if (code == FHIRAllTypes.CAPABILITYSTATEMENT2)
6202        return "CapabilityStatement2";
6203      if (code == FHIRAllTypes.CODESYSTEM)
6204        return "CodeSystem";
6205      if (code == FHIRAllTypes.COMPARTMENTDEFINITION)
6206        return "CompartmentDefinition";
6207      if (code == FHIRAllTypes.EXAMPLESCENARIO)
6208        return "ExampleScenario";
6209      if (code == FHIRAllTypes.GRAPHDEFINITION)
6210        return "GraphDefinition";
6211      if (code == FHIRAllTypes.IMPLEMENTATIONGUIDE)
6212        return "ImplementationGuide";
6213      if (code == FHIRAllTypes.MESSAGEDEFINITION)
6214        return "MessageDefinition";
6215      if (code == FHIRAllTypes.METADATARESOURCE)
6216        return "MetadataResource";
6217      if (code == FHIRAllTypes.ACTIVITYDEFINITION)
6218        return "ActivityDefinition";
6219      if (code == FHIRAllTypes.CHARGEITEMDEFINITION)
6220        return "ChargeItemDefinition";
6221      if (code == FHIRAllTypes.CITATION)
6222        return "Citation";
6223      if (code == FHIRAllTypes.CONCEPTMAP)
6224        return "ConceptMap";
6225      if (code == FHIRAllTypes.CONDITIONDEFINITION)
6226        return "ConditionDefinition";
6227      if (code == FHIRAllTypes.EVENTDEFINITION)
6228        return "EventDefinition";
6229      if (code == FHIRAllTypes.EVIDENCE)
6230        return "Evidence";
6231      if (code == FHIRAllTypes.EVIDENCEREPORT)
6232        return "EvidenceReport";
6233      if (code == FHIRAllTypes.EVIDENCEVARIABLE)
6234        return "EvidenceVariable";
6235      if (code == FHIRAllTypes.LIBRARY)
6236        return "Library";
6237      if (code == FHIRAllTypes.MEASURE)
6238        return "Measure";
6239      if (code == FHIRAllTypes.NAMINGSYSTEM)
6240        return "NamingSystem";
6241      if (code == FHIRAllTypes.PLANDEFINITION)
6242        return "PlanDefinition";
6243      if (code == FHIRAllTypes.QUESTIONNAIRE)
6244        return "Questionnaire";
6245      if (code == FHIRAllTypes.OPERATIONDEFINITION)
6246        return "OperationDefinition";
6247      if (code == FHIRAllTypes.SEARCHPARAMETER)
6248        return "SearchParameter";
6249      if (code == FHIRAllTypes.STRUCTUREDEFINITION)
6250        return "StructureDefinition";
6251      if (code == FHIRAllTypes.STRUCTUREMAP)
6252        return "StructureMap";
6253      if (code == FHIRAllTypes.SUBSCRIPTIONTOPIC)
6254        return "SubscriptionTopic";
6255      if (code == FHIRAllTypes.TERMINOLOGYCAPABILITIES)
6256        return "TerminologyCapabilities";
6257      if (code == FHIRAllTypes.TESTSCRIPT)
6258        return "TestScript";
6259      if (code == FHIRAllTypes.VALUESET)
6260        return "ValueSet";
6261      if (code == FHIRAllTypes.CAREPLAN)
6262        return "CarePlan";
6263      if (code == FHIRAllTypes.CARETEAM)
6264        return "CareTeam";
6265      if (code == FHIRAllTypes.CHARGEITEM)
6266        return "ChargeItem";
6267      if (code == FHIRAllTypes.CLAIM)
6268        return "Claim";
6269      if (code == FHIRAllTypes.CLAIMRESPONSE)
6270        return "ClaimResponse";
6271      if (code == FHIRAllTypes.CLINICALIMPRESSION)
6272        return "ClinicalImpression";
6273      if (code == FHIRAllTypes.CLINICALUSEDEFINITION)
6274        return "ClinicalUseDefinition";
6275      if (code == FHIRAllTypes.COMMUNICATION)
6276        return "Communication";
6277      if (code == FHIRAllTypes.COMMUNICATIONREQUEST)
6278        return "CommunicationRequest";
6279      if (code == FHIRAllTypes.COMPOSITION)
6280        return "Composition";
6281      if (code == FHIRAllTypes.CONDITION)
6282        return "Condition";
6283      if (code == FHIRAllTypes.CONSENT)
6284        return "Consent";
6285      if (code == FHIRAllTypes.CONTRACT)
6286        return "Contract";
6287      if (code == FHIRAllTypes.COVERAGE)
6288        return "Coverage";
6289      if (code == FHIRAllTypes.COVERAGEELIGIBILITYREQUEST)
6290        return "CoverageEligibilityRequest";
6291      if (code == FHIRAllTypes.COVERAGEELIGIBILITYRESPONSE)
6292        return "CoverageEligibilityResponse";
6293      if (code == FHIRAllTypes.DETECTEDISSUE)
6294        return "DetectedIssue";
6295      if (code == FHIRAllTypes.DEVICE)
6296        return "Device";
6297      if (code == FHIRAllTypes.DEVICEDEFINITION)
6298        return "DeviceDefinition";
6299      if (code == FHIRAllTypes.DEVICEDISPENSE)
6300        return "DeviceDispense";
6301      if (code == FHIRAllTypes.DEVICEMETRIC)
6302        return "DeviceMetric";
6303      if (code == FHIRAllTypes.DEVICEREQUEST)
6304        return "DeviceRequest";
6305      if (code == FHIRAllTypes.DEVICEUSAGE)
6306        return "DeviceUsage";
6307      if (code == FHIRAllTypes.DIAGNOSTICREPORT)
6308        return "DiagnosticReport";
6309      if (code == FHIRAllTypes.DOCUMENTMANIFEST)
6310        return "DocumentManifest";
6311      if (code == FHIRAllTypes.DOCUMENTREFERENCE)
6312        return "DocumentReference";
6313      if (code == FHIRAllTypes.ENCOUNTER)
6314        return "Encounter";
6315      if (code == FHIRAllTypes.ENDPOINT)
6316        return "Endpoint";
6317      if (code == FHIRAllTypes.ENROLLMENTREQUEST)
6318        return "EnrollmentRequest";
6319      if (code == FHIRAllTypes.ENROLLMENTRESPONSE)
6320        return "EnrollmentResponse";
6321      if (code == FHIRAllTypes.EPISODEOFCARE)
6322        return "EpisodeOfCare";
6323      if (code == FHIRAllTypes.EXPLANATIONOFBENEFIT)
6324        return "ExplanationOfBenefit";
6325      if (code == FHIRAllTypes.FAMILYMEMBERHISTORY)
6326        return "FamilyMemberHistory";
6327      if (code == FHIRAllTypes.FLAG)
6328        return "Flag";
6329      if (code == FHIRAllTypes.FORMULARYITEM)
6330        return "FormularyItem";
6331      if (code == FHIRAllTypes.GOAL)
6332        return "Goal";
6333      if (code == FHIRAllTypes.GROUP)
6334        return "Group";
6335      if (code == FHIRAllTypes.GUIDANCERESPONSE)
6336        return "GuidanceResponse";
6337      if (code == FHIRAllTypes.HEALTHCARESERVICE)
6338        return "HealthcareService";
6339      if (code == FHIRAllTypes.IMAGINGSELECTION)
6340        return "ImagingSelection";
6341      if (code == FHIRAllTypes.IMAGINGSTUDY)
6342        return "ImagingStudy";
6343      if (code == FHIRAllTypes.IMMUNIZATION)
6344        return "Immunization";
6345      if (code == FHIRAllTypes.IMMUNIZATIONEVALUATION)
6346        return "ImmunizationEvaluation";
6347      if (code == FHIRAllTypes.IMMUNIZATIONRECOMMENDATION)
6348        return "ImmunizationRecommendation";
6349      if (code == FHIRAllTypes.INGREDIENT)
6350        return "Ingredient";
6351      if (code == FHIRAllTypes.INSURANCEPLAN)
6352        return "InsurancePlan";
6353      if (code == FHIRAllTypes.INVENTORYREPORT)
6354        return "InventoryReport";
6355      if (code == FHIRAllTypes.INVOICE)
6356        return "Invoice";
6357      if (code == FHIRAllTypes.LINKAGE)
6358        return "Linkage";
6359      if (code == FHIRAllTypes.LIST)
6360        return "List";
6361      if (code == FHIRAllTypes.LOCATION)
6362        return "Location";
6363      if (code == FHIRAllTypes.MANUFACTUREDITEMDEFINITION)
6364        return "ManufacturedItemDefinition";
6365      if (code == FHIRAllTypes.MEASUREREPORT)
6366        return "MeasureReport";
6367      if (code == FHIRAllTypes.MEDICATION)
6368        return "Medication";
6369      if (code == FHIRAllTypes.MEDICATIONADMINISTRATION)
6370        return "MedicationAdministration";
6371      if (code == FHIRAllTypes.MEDICATIONDISPENSE)
6372        return "MedicationDispense";
6373      if (code == FHIRAllTypes.MEDICATIONKNOWLEDGE)
6374        return "MedicationKnowledge";
6375      if (code == FHIRAllTypes.MEDICATIONREQUEST)
6376        return "MedicationRequest";
6377      if (code == FHIRAllTypes.MEDICATIONUSAGE)
6378        return "MedicationUsage";
6379      if (code == FHIRAllTypes.MEDICINALPRODUCTDEFINITION)
6380        return "MedicinalProductDefinition";
6381      if (code == FHIRAllTypes.MESSAGEHEADER)
6382        return "MessageHeader";
6383      if (code == FHIRAllTypes.MOLECULARSEQUENCE)
6384        return "MolecularSequence";
6385      if (code == FHIRAllTypes.NUTRITIONINTAKE)
6386        return "NutritionIntake";
6387      if (code == FHIRAllTypes.NUTRITIONORDER)
6388        return "NutritionOrder";
6389      if (code == FHIRAllTypes.NUTRITIONPRODUCT)
6390        return "NutritionProduct";
6391      if (code == FHIRAllTypes.OBSERVATION)
6392        return "Observation";
6393      if (code == FHIRAllTypes.OBSERVATIONDEFINITION)
6394        return "ObservationDefinition";
6395      if (code == FHIRAllTypes.OPERATIONOUTCOME)
6396        return "OperationOutcome";
6397      if (code == FHIRAllTypes.ORGANIZATION)
6398        return "Organization";
6399      if (code == FHIRAllTypes.ORGANIZATIONAFFILIATION)
6400        return "OrganizationAffiliation";
6401      if (code == FHIRAllTypes.PACKAGEDPRODUCTDEFINITION)
6402        return "PackagedProductDefinition";
6403      if (code == FHIRAllTypes.PATIENT)
6404        return "Patient";
6405      if (code == FHIRAllTypes.PAYMENTNOTICE)
6406        return "PaymentNotice";
6407      if (code == FHIRAllTypes.PAYMENTRECONCILIATION)
6408        return "PaymentReconciliation";
6409      if (code == FHIRAllTypes.PERMISSION)
6410        return "Permission";
6411      if (code == FHIRAllTypes.PERSON)
6412        return "Person";
6413      if (code == FHIRAllTypes.PRACTITIONER)
6414        return "Practitioner";
6415      if (code == FHIRAllTypes.PRACTITIONERROLE)
6416        return "PractitionerRole";
6417      if (code == FHIRAllTypes.PROCEDURE)
6418        return "Procedure";
6419      if (code == FHIRAllTypes.PROVENANCE)
6420        return "Provenance";
6421      if (code == FHIRAllTypes.QUESTIONNAIRERESPONSE)
6422        return "QuestionnaireResponse";
6423      if (code == FHIRAllTypes.REGULATEDAUTHORIZATION)
6424        return "RegulatedAuthorization";
6425      if (code == FHIRAllTypes.RELATEDPERSON)
6426        return "RelatedPerson";
6427      if (code == FHIRAllTypes.REQUESTGROUP)
6428        return "RequestGroup";
6429      if (code == FHIRAllTypes.RESEARCHSTUDY)
6430        return "ResearchStudy";
6431      if (code == FHIRAllTypes.RESEARCHSUBJECT)
6432        return "ResearchSubject";
6433      if (code == FHIRAllTypes.RISKASSESSMENT)
6434        return "RiskAssessment";
6435      if (code == FHIRAllTypes.SCHEDULE)
6436        return "Schedule";
6437      if (code == FHIRAllTypes.SERVICEREQUEST)
6438        return "ServiceRequest";
6439      if (code == FHIRAllTypes.SLOT)
6440        return "Slot";
6441      if (code == FHIRAllTypes.SPECIMEN)
6442        return "Specimen";
6443      if (code == FHIRAllTypes.SPECIMENDEFINITION)
6444        return "SpecimenDefinition";
6445      if (code == FHIRAllTypes.SUBSCRIPTION)
6446        return "Subscription";
6447      if (code == FHIRAllTypes.SUBSCRIPTIONSTATUS)
6448        return "SubscriptionStatus";
6449      if (code == FHIRAllTypes.SUBSTANCE)
6450        return "Substance";
6451      if (code == FHIRAllTypes.SUBSTANCEDEFINITION)
6452        return "SubstanceDefinition";
6453      if (code == FHIRAllTypes.SUBSTANCENUCLEICACID)
6454        return "SubstanceNucleicAcid";
6455      if (code == FHIRAllTypes.SUBSTANCEPOLYMER)
6456        return "SubstancePolymer";
6457      if (code == FHIRAllTypes.SUBSTANCEPROTEIN)
6458        return "SubstanceProtein";
6459      if (code == FHIRAllTypes.SUBSTANCEREFERENCEINFORMATION)
6460        return "SubstanceReferenceInformation";
6461      if (code == FHIRAllTypes.SUBSTANCESOURCEMATERIAL)
6462        return "SubstanceSourceMaterial";
6463      if (code == FHIRAllTypes.SUPPLYDELIVERY)
6464        return "SupplyDelivery";
6465      if (code == FHIRAllTypes.SUPPLYREQUEST)
6466        return "SupplyRequest";
6467      if (code == FHIRAllTypes.TASK)
6468        return "Task";
6469      if (code == FHIRAllTypes.TESTREPORT)
6470        return "TestReport";
6471      if (code == FHIRAllTypes.TRANSPORT)
6472        return "Transport";
6473      if (code == FHIRAllTypes.VERIFICATIONRESULT)
6474        return "VerificationResult";
6475      if (code == FHIRAllTypes.VISIONPRESCRIPTION)
6476        return "VisionPrescription";
6477      if (code == FHIRAllTypes.PARAMETERS)
6478        return "Parameters";
6479      if (code == FHIRAllTypes.TYPE)
6480        return "Type";
6481      if (code == FHIRAllTypes.ANY)
6482        return "Any";
6483      return "?";
6484      }
6485    public String toSystem(FHIRAllTypes code) {
6486      return code.getSystem();
6487      }
6488    }
6489
6490    public enum FHIRVersion {
6491        /**
6492         * Oldest archived version of FHIR.
6493         */
6494        _0_01, 
6495        /**
6496         * 1st Draft for Comment (Sept 2012 Ballot).
6497         */
6498        _0_05, 
6499        /**
6500         * 2nd Draft for Comment (January 2013 Ballot).
6501         */
6502        _0_06, 
6503        /**
6504         * DSTU 1 Ballot version.
6505         */
6506        _0_11, 
6507        /**
6508         * DSTU 1 version.
6509         */
6510        _0_0, 
6511        /**
6512         * DSTU 1 Official version.
6513         */
6514        _0_0_80, 
6515        /**
6516         * DSTU 1 Official version Technical Errata #1.
6517         */
6518        _0_0_81, 
6519        /**
6520         * DSTU 1 Official version Technical Errata #2.
6521        */
6522        _0_0_82, 
6523        /**
6524         * January 2015 Ballot.
6525         */
6526        _0_4, 
6527        /**
6528         * Draft For Comment (January 2015 Ballot).
6529         */
6530        _0_4_0, 
6531        /**
6532         * May 2015 Ballot.
6533         */
6534        _0_5, 
6535        /**
6536         * DSTU 2 Ballot version (May 2015 Ballot).
6537         */
6538        _0_5_0, 
6539        /**
6540         * DSTU 2 version.
6541         */
6542        _1_0, 
6543        /**
6544         * DSTU 2 QA Preview + CQIF Ballot (Sep 2015).
6545         */
6546        _1_0_0, 
6547        /**
6548         * DSTU 2 (Official version).
6549         */
6550        _1_0_1, 
6551        /**
6552         * DSTU 2 (Official version) with 1 technical errata.
6553         */
6554        _1_0_2, 
6555        /**
6556         * GAO Ballot version.
6557         */
6558        _1_1, 
6559        /**
6560         * GAO Ballot + draft changes to main FHIR standard.
6561         */
6562        _1_1_0, 
6563        /**
6564         * Connectathon 12 (Montreal) version.
6565         */
6566        _1_4, 
6567        /**
6568         * CQF on FHIR Ballot + Connectathon 12 (Montreal).
6569         */
6570        _1_4_0, 
6571        /**
6572         * Connectathon 13 (Baltimore) version.
6573         */
6574        _1_6, 
6575        /**
6576         * FHIR STU3 Ballot + Connectathon 13 (Baltimore).
6577         */
6578        _1_6_0, 
6579        /**
6580         * Connectathon 14 (San Antonio) version.
6581         */
6582        _1_8, 
6583        /**
6584         * FHIR STU3 Candidate + Connectathon 14 (San Antonio).
6585         */
6586        _1_8_0, 
6587        /**
6588         * STU3 version.
6589         */
6590        _3_0, 
6591        /**
6592         * FHIR Release 3 (STU).
6593         */
6594        _3_0_0, 
6595        /**
6596         * FHIR Release 3 (STU) with 1 technical errata.
6597         */
6598        _3_0_1, 
6599        /**
6600         * FHIR Release 3 (STU) with 2 technical errata.
6601         */
6602        _3_0_2, 
6603        /**
6604         * R4 Ballot #1 version.
6605         */
6606        _3_3, 
6607        /**
6608         * R4 Ballot #1 + Connectaton 18 (Cologne).
6609         */
6610        _3_3_0, 
6611        /**
6612         * R4 Ballot #2 version.
6613         */
6614        _3_5, 
6615        /**
6616         * R4 Ballot #2 + Connectathon 19 (Baltimore).
6617         */
6618        _3_5_0, 
6619        /**
6620         * R4 version.
6621         */
6622        _4_0, 
6623        /**
6624         * FHIR Release 4 (Normative + STU).
6625         */
6626        _4_0_0, 
6627        /**
6628         * FHIR Release 4 (Normative + STU) with 1 technical errata.
6629         */
6630        _4_0_1, 
6631        /**
6632         * R4B Ballot #1 version.
6633         */
6634        _4_1, 
6635        /**
6636         * R4B Ballot #1 + Connectathon 27 (Virtual).
6637         */
6638        _4_1_0, 
6639        /**
6640         * R5 Preview #1 version.
6641         */
6642        _4_2, 
6643        /**
6644         * R5 Preview #1 + Connectathon 23 (Sydney).
6645         */
6646        _4_2_0, 
6647        /**
6648         * R4B version.
6649         */
6650        _4_3, 
6651        /**
6652         * FHIR Release 4B (Normative + STU).
6653         */
6654        _4_3_0, 
6655        /**
6656         * R5 Preview #2 version.
6657         */
6658        _4_4, 
6659        /**
6660         * R5 Preview #2 + Connectathon 24 (Virtual).
6661         */
6662        _4_4_0, 
6663        /**
6664         * R5 Preview #3 version.
6665         */
6666        _4_5, 
6667        /**
6668         * R5 Preview #3 + Connectathon 25 (Virtual).
6669         */
6670        _4_5_0, 
6671        /**
6672         * R5 Draft Ballot version.
6673         */
6674        _4_6, 
6675        /**
6676         * R5 Draft Ballot + Connectathon 27 (Virtual).
6677         */
6678        _4_6_0, 
6679        /**
6680         * R4B CIBuild
6681         */
6682        _4_3_0CIBUILD, 
6683        /**
6684         * R4B Snapshot1
6685         */
6686        _4_3_0SNAPSHOT1, 
6687        /**
6688         * R5
6689         */
6690        _5_0, 
6691        /**
6692         * R5
6693         */
6694        _5_0_0, 
6695        /**
6696         * R5 CIBuild
6697         */
6698        _5_0_0CIBUILD, 
6699        /**
6700         * R5 Snapshot1
6701         */
6702        _5_0_0SNAPSHOT1,
6703        /**
6704         * R5 Snapshot2
6705         */
6706        _5_0_0SNAPSHOT2,
6707      /**
6708         * added to help the parsers
6709         */
6710        NULL;
6711        public static FHIRVersion fromCode(String codeString) throws FHIRException {
6712            if (codeString == null || "".equals(codeString))
6713                return null;
6714        if ("0.01".equals(codeString))
6715          return _0_01;
6716        if ("0.05".equals(codeString))
6717          return _0_05;
6718        if ("0.06".equals(codeString))
6719          return _0_06;
6720        if ("0.11".equals(codeString))
6721          return _0_11;
6722        if ("0.0".equals(codeString))
6723          return _0_0;
6724        if ("0.0.80".equals(codeString))
6725          return _0_0_80;
6726        if ("0.0.81".equals(codeString))
6727          return _0_0_81;
6728        if ("0.0.82".equals(codeString))
6729          return _0_0_82;
6730        if ("0.4".equals(codeString))
6731          return _0_4;
6732        if ("0.4.0".equals(codeString))
6733          return _0_4_0;
6734        if ("0.5".equals(codeString))
6735          return _0_5;
6736        if ("0.5.0".equals(codeString))
6737          return _0_5_0;
6738        if ("1.0".equals(codeString))
6739          return _1_0;
6740        if ("1.0.0".equals(codeString))
6741          return _1_0_0;
6742        if ("1.0.1".equals(codeString))
6743          return _1_0_1;
6744        if ("1.0.2".equals(codeString))
6745          return _1_0_2;
6746        if ("1.1".equals(codeString))
6747          return _1_1;
6748        if ("1.1.0".equals(codeString))
6749          return _1_1_0;
6750        if ("1.4".equals(codeString))
6751          return _1_4;
6752        if ("1.4.0".equals(codeString))
6753          return _1_4_0;
6754        if ("1.6".equals(codeString))
6755          return _1_6;
6756        if ("1.6.0".equals(codeString))
6757          return _1_6_0;
6758        if ("1.8".equals(codeString))
6759          return _1_8;
6760        if ("1.8.0".equals(codeString))
6761          return _1_8_0;
6762        if ("3.0".equals(codeString))
6763          return _3_0;
6764        if ("3.0.0".equals(codeString))
6765          return _3_0_0;
6766        if ("3.0.1".equals(codeString))
6767          return _3_0_1;
6768        if ("3.0.2".equals(codeString))
6769          return _3_0_2;
6770        if ("3.3".equals(codeString))
6771          return _3_3;
6772        if ("3.3.0".equals(codeString))
6773          return _3_3_0;
6774        if ("3.5".equals(codeString))
6775          return _3_5;
6776        if ("3.5.0".equals(codeString))
6777          return _3_5_0;
6778        if ("4.0".equals(codeString))
6779          return _4_0;
6780        if ("4.0.0".equals(codeString))
6781          return _4_0_0;
6782        if ("4.0.1".equals(codeString))
6783          return _4_0_1;
6784        if ("4.1".equals(codeString))
6785          return _4_1;
6786        if ("4.1.0".equals(codeString))
6787          return _4_1_0;
6788        if ("4.2".equals(codeString))
6789          return _4_2;
6790        if ("4.2.0".equals(codeString))
6791          return _4_2_0;
6792        if ("4.3".equals(codeString))
6793          return _4_3;
6794        if ("4.3.0".equals(codeString))
6795          return _4_3_0;
6796        if ("4.4".equals(codeString))
6797          return _4_4;
6798        if ("4.4.0".equals(codeString))
6799          return _4_4_0;
6800        if ("4.5".equals(codeString))
6801          return _4_5;
6802        if ("4.5.0".equals(codeString))
6803          return _4_5_0;
6804        if ("4.6".equals(codeString))
6805          return _4_6;
6806        if ("4.6.0".equals(codeString))
6807          return _4_6_0;
6808        if ("4.3.0-cibuild".equals(codeString))
6809          return _4_3_0CIBUILD;
6810        if ("4.3.0-snapshot1".equals(codeString))
6811          return _4_3_0SNAPSHOT1;
6812        if ("5.0".equals(codeString))
6813          return _5_0;
6814        if ("5.0.0".equals(codeString))
6815          return _5_0_0;
6816        if ("5.0.0-cibuild".equals(codeString))
6817          return _5_0_0CIBUILD;
6818        if ("5.0.0-snapshot1".equals(codeString))
6819          return _5_0_0SNAPSHOT1;
6820        if ("5.0.0-snapshot2".equals(codeString))
6821          return _5_0_0SNAPSHOT2;
6822        throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'");
6823        }
6824        public String toCode() {
6825          switch (this) {
6826            case _0_01: return "0.01";
6827            case _0_05: return "0.05";
6828            case _0_06: return "0.06";
6829            case _0_11: return "0.11";
6830            case _0_0: return "0.0";
6831            case _0_0_80: return "0.0.80";
6832            case _0_0_81: return "0.0.81";
6833            case _0_0_82: return "0.0.82";
6834            case _0_4: return "0.4";
6835            case _0_4_0: return "0.4.0";
6836            case _0_5: return "0.5";
6837            case _0_5_0: return "0.5.0";
6838            case _1_0: return "1.0";
6839            case _1_0_0: return "1.0.0";
6840            case _1_0_1: return "1.0.1";
6841            case _1_0_2: return "1.0.2";
6842            case _1_1: return "1.1";
6843            case _1_1_0: return "1.1.0";
6844            case _1_4: return "1.4";
6845            case _1_4_0: return "1.4.0";
6846            case _1_6: return "1.6";
6847            case _1_6_0: return "1.6.0";
6848            case _1_8: return "1.8";
6849            case _1_8_0: return "1.8.0";
6850            case _3_0: return "3.0";
6851            case _3_0_0: return "3.0.0";
6852            case _3_0_1: return "3.0.1";
6853            case _3_0_2: return "3.0.2";
6854            case _3_3: return "3.3";
6855            case _3_3_0: return "3.3.0";
6856            case _3_5: return "3.5";
6857            case _3_5_0: return "3.5.0";
6858            case _4_0: return "4.0";
6859            case _4_0_0: return "4.0.0";
6860            case _4_0_1: return "4.0.1";
6861            case _4_1: return "4.1";
6862            case _4_1_0: return "4.1.0";
6863            case _4_2: return "4.2";
6864            case _4_2_0: return "4.2.0";
6865            case _4_3: return "4.3";
6866            case _4_3_0: return "4.3.0";
6867            case _4_4: return "4.4";
6868            case _4_4_0: return "4.4.0";
6869            case _4_5: return "4.5";
6870            case _4_5_0: return "4.5.0";
6871            case _4_6: return "4.6";
6872            case _4_6_0: return "4.6.0";
6873            case _4_3_0CIBUILD: return "4.3.0-cibuild";
6874            case _4_3_0SNAPSHOT1: return "4.3.0-snapshot1";
6875            case _5_0: return "5.0";
6876            case _5_0_0: return "5.0.0";
6877            case _5_0_0CIBUILD: return "5.0.0-cibuild";
6878            case _5_0_0SNAPSHOT1: return "5.0.0-snapshot1";
6879            case _5_0_0SNAPSHOT2: return "5.0.0-snapshot2";
6880            case NULL: return null;
6881            default: return "?";
6882          }
6883        }
6884        public String getSystem() {
6885          switch (this) {
6886            case _0_01: return "http://hl7.org/fhir/FHIR-version";
6887            case _0_05: return "http://hl7.org/fhir/FHIR-version";
6888            case _0_06: return "http://hl7.org/fhir/FHIR-version";
6889            case _0_11: return "http://hl7.org/fhir/FHIR-version";
6890            case _0_0: return "http://hl7.org/fhir/FHIR-version";
6891            case _0_0_80: return "http://hl7.org/fhir/FHIR-version";
6892            case _0_0_81: return "http://hl7.org/fhir/FHIR-version";
6893            case _0_0_82: return "http://hl7.org/fhir/FHIR-version";
6894            case _0_4: return "http://hl7.org/fhir/FHIR-version";
6895            case _0_4_0: return "http://hl7.org/fhir/FHIR-version";
6896            case _0_5: return "http://hl7.org/fhir/FHIR-version";
6897            case _0_5_0: return "http://hl7.org/fhir/FHIR-version";
6898            case _1_0: return "http://hl7.org/fhir/FHIR-version";
6899            case _1_0_0: return "http://hl7.org/fhir/FHIR-version";
6900            case _1_0_1: return "http://hl7.org/fhir/FHIR-version";
6901            case _1_0_2: return "http://hl7.org/fhir/FHIR-version";
6902            case _1_1: return "http://hl7.org/fhir/FHIR-version";
6903            case _1_1_0: return "http://hl7.org/fhir/FHIR-version";
6904            case _1_4: return "http://hl7.org/fhir/FHIR-version";
6905            case _1_4_0: return "http://hl7.org/fhir/FHIR-version";
6906            case _1_6: return "http://hl7.org/fhir/FHIR-version";
6907            case _1_6_0: return "http://hl7.org/fhir/FHIR-version";
6908            case _1_8: return "http://hl7.org/fhir/FHIR-version";
6909            case _1_8_0: return "http://hl7.org/fhir/FHIR-version";
6910            case _3_0: return "http://hl7.org/fhir/FHIR-version";
6911            case _3_0_0: return "http://hl7.org/fhir/FHIR-version";
6912            case _3_0_1: return "http://hl7.org/fhir/FHIR-version";
6913            case _3_0_2: return "http://hl7.org/fhir/FHIR-version";
6914            case _3_3: return "http://hl7.org/fhir/FHIR-version";
6915            case _3_3_0: return "http://hl7.org/fhir/FHIR-version";
6916            case _3_5: return "http://hl7.org/fhir/FHIR-version";
6917            case _3_5_0: return "http://hl7.org/fhir/FHIR-version";
6918            case _4_0: return "http://hl7.org/fhir/FHIR-version";
6919            case _4_0_0: return "http://hl7.org/fhir/FHIR-version";
6920            case _4_0_1: return "http://hl7.org/fhir/FHIR-version";
6921            case _4_1: return "http://hl7.org/fhir/FHIR-version";
6922            case _4_1_0: return "http://hl7.org/fhir/FHIR-version";
6923            case _4_2: return "http://hl7.org/fhir/FHIR-version";
6924            case _4_2_0: return "http://hl7.org/fhir/FHIR-version";
6925            case _4_3: return "http://hl7.org/fhir/FHIR-version";
6926            case _4_3_0: return "http://hl7.org/fhir/FHIR-version";
6927            case _4_4: return "http://hl7.org/fhir/FHIR-version";
6928            case _4_4_0: return "http://hl7.org/fhir/FHIR-version";
6929            case _4_5: return "http://hl7.org/fhir/FHIR-version";
6930            case _4_5_0: return "http://hl7.org/fhir/FHIR-version";
6931            case _4_6: return "http://hl7.org/fhir/FHIR-version";
6932            case _4_6_0: return "http://hl7.org/fhir/FHIR-version";
6933            case _4_3_0CIBUILD: return "http://hl7.org/fhir/FHIR-version";
6934            case _4_3_0SNAPSHOT1: return "http://hl7.org/fhir/FHIR-version";
6935            case _5_0: return "http://hl7.org/fhir/FHIR-version";
6936            case _5_0_0: return "http://hl7.org/fhir/FHIR-version";
6937            case _5_0_0CIBUILD: return "http://hl7.org/fhir/FHIR-version";
6938            case _5_0_0SNAPSHOT1: return "http://hl7.org/fhir/FHIR-version";
6939            case _5_0_0SNAPSHOT2: return "http://hl7.org/fhir/FHIR-version";
6940            case NULL: return null;
6941            default: return "?";
6942          }
6943        }
6944        public String getDefinition() {
6945          switch (this) {
6946            case _0_01: return "Oldest archived version of FHIR.";
6947            case _0_05: return "1st Draft for Comment (Sept 2012 Ballot).";
6948            case _0_06: return "2nd Draft for Comment (January 2013 Ballot).";
6949            case _0_11: return "DSTU 1 Ballot version.";
6950            case _0_0: return "DSTU 1 version.";
6951            case _0_0_80: return "DSTU 1 Official version.";
6952            case _0_0_81: return "DSTU 1 Official version Technical Errata #1.";
6953            case _0_0_82: return "DSTU 1 Official version Technical Errata #2.";
6954            case _0_4: return "January 2015 Ballot.";
6955            case _0_4_0: return "Draft For Comment (January 2015 Ballot).";
6956            case _0_5: return "May 2015 Ballot.";
6957            case _0_5_0: return "DSTU 2 Ballot version (May 2015 Ballot).";
6958            case _1_0: return "DSTU 2 version.";
6959            case _1_0_0: return "DSTU 2 QA Preview + CQIF Ballot (Sep 2015).";
6960            case _1_0_1: return "DSTU 2 (Official version).";
6961            case _1_0_2: return "DSTU 2 (Official version) with 1 technical errata.";
6962            case _1_1: return "GAO Ballot version.";
6963            case _1_1_0: return "GAO Ballot + draft changes to main FHIR standard.";
6964            case _1_4: return "Connectathon 12 (Montreal) version.";
6965            case _1_4_0: return "CQF on FHIR Ballot + Connectathon 12 (Montreal).";
6966            case _1_6: return "Connectathon 13 (Baltimore) version.";
6967            case _1_6_0: return "FHIR STU3 Ballot + Connectathon 13 (Baltimore).";
6968            case _1_8: return "Connectathon 14 (San Antonio) version.";
6969            case _1_8_0: return "FHIR STU3 Candidate + Connectathon 14 (San Antonio).";
6970            case _3_0: return "STU3 version.";
6971            case _3_0_0: return "FHIR Release 3 (STU).";
6972            case _3_0_1: return "FHIR Release 3 (STU) with 1 technical errata.";
6973            case _3_0_2: return "FHIR Release 3 (STU) with 2 technical errata.";
6974            case _3_3: return "R4 Ballot #1 version.";
6975            case _3_3_0: return "R4 Ballot #1 + Connectaton 18 (Cologne).";
6976            case _3_5: return "R4 Ballot #2 version.";
6977            case _3_5_0: return "R4 Ballot #2 + Connectathon 19 (Baltimore).";
6978            case _4_0: return "R4 version.";
6979            case _4_0_0: return "FHIR Release 4 (Normative + STU).";
6980            case _4_0_1: return "FHIR Release 4 (Normative + STU) with 1 technical errata.";
6981            case _4_1: return "R4B Ballot #1 version.";
6982            case _4_1_0: return "R4B Ballot #1 + Connectathon 27 (Virtual).";
6983            case _4_2: return "R5 Preview #1 version.";
6984            case _4_2_0: return "R5 Preview #1 + Connectathon 23 (Sydney).";
6985            case _4_3: return "R4B version.";
6986            case _4_3_0: return "FHIR Release 4B (Normative + STU).";
6987            case _4_4: return "R5 Preview #2 version.";
6988            case _4_4_0: return "R5 Preview #2 + Connectathon 24 (Virtual).";
6989            case _4_5: return "R5 Preview #3 version.";
6990            case _4_5_0: return "R5 Preview #3 + Connectathon 25 (Virtual).";
6991            case _4_6: return "R5 Draft Ballot version.";
6992            case _4_6_0: return "R5 Draft Ballot + Connectathon 27 (Virtual).";
6993            case _4_3_0CIBUILD: return "R4B CIBuild";
6994            case _4_3_0SNAPSHOT1: return "R4B Snapshot1";
6995            case _5_0: return "R5";
6996            case _5_0_0: return "R5";
6997            case _5_0_0CIBUILD: return "R5 CIBuild";
6998            case _5_0_0SNAPSHOT1: return "R5 Snapshot1";
6999            case _5_0_0SNAPSHOT2: return "R5 Snapshot2";
7000            case NULL: return null;
7001            default: return "?";
7002          }
7003        }
7004        public String getDisplay() {
7005          switch (this) {
7006            case _0_01: return "0.01";
7007            case _0_05: return "0.05";
7008            case _0_06: return "0.06";
7009            case _0_11: return "0.11";
7010            case _0_0: return "0.0";
7011            case _0_0_80: return "0.0.80";
7012            case _0_0_81: return "0.0.81";
7013            case _0_0_82: return "0.0.82";
7014            case _0_4: return "0.4";
7015            case _0_4_0: return "0.4.0";
7016            case _0_5: return "0.5";
7017            case _0_5_0: return "0.5.0";
7018            case _1_0: return "1.0";
7019            case _1_0_0: return "1.0.0";
7020            case _1_0_1: return "1.0.1";
7021            case _1_0_2: return "1.0.2";
7022            case _1_1: return "1.1";
7023            case _1_1_0: return "1.1.0";
7024            case _1_4: return "1.4";
7025            case _1_4_0: return "1.4.0";
7026            case _1_6: return "1.6";
7027            case _1_6_0: return "1.6.0";
7028            case _1_8: return "1.8";
7029            case _1_8_0: return "1.8.0";
7030            case _3_0: return "3.0";
7031            case _3_0_0: return "3.0.0";
7032            case _3_0_1: return "3.0.1";
7033            case _3_0_2: return "3.0.2";
7034            case _3_3: return "3.3";
7035            case _3_3_0: return "3.3.0";
7036            case _3_5: return "3.5";
7037            case _3_5_0: return "3.5.0";
7038            case _4_0: return "4.0";
7039            case _4_0_0: return "4.0.0";
7040            case _4_0_1: return "4.0.1";
7041            case _4_1: return "4.1";
7042            case _4_1_0: return "4.1.0";
7043            case _4_2: return "4.2";
7044            case _4_2_0: return "4.2.0";
7045            case _4_3: return "4.3";
7046            case _4_3_0: return "4.3.0";
7047            case _4_4: return "4.4";
7048            case _4_4_0: return "4.4.0";
7049            case _4_5: return "4.5";
7050            case _4_5_0: return "4.5.0";
7051            case _4_6: return "4.6";
7052            case _4_6_0: return "4.6.0";
7053            case _4_3_0CIBUILD: return "4.3.0-cibuild";
7054            case _4_3_0SNAPSHOT1: return "4.3.0-snapshot1";
7055            case _5_0: return "5.0";
7056            case _5_0_0: return "5.0.0";
7057            case _5_0_0CIBUILD: return "5.0.0-cibuild";
7058            case _5_0_0SNAPSHOT1: return "5.0.0-snapshot1";
7059            case _5_0_0SNAPSHOT2: return "5.0.0-snapshot2";
7060            case NULL: return null;
7061            default: return "?";
7062          }
7063        }
7064        
7065// manual code from configuration.txt:
7066//public String toCode(int len) {
7067//          return toCode().substring(0, len);
7068//        }
7069//
7070//        public static boolean isR4Plus(String version) {
7071//           return version != null && (version.startsWith("4.") || version.startsWith("5.") || "current".equals(version));
7072//        }
7073//        
7074        public static boolean isValidCode(String codeString) {
7075          return Utilities.existsInList(codeString, "0.01", "0.05", "0.06", "0.11", "0.0.80", "0.0.81" ,"0.0.82", "0.4.0", "0.5.0",
7076              "1.0.0", "1.0.1", "1.0.2", "1.1.0", "1.4.0", "1.6.0", "1.8.0", "3.0.0", "3.0.1", "3.0.2", "3.3.0", "3.5.0", 
7077              "4.0.0", "4.0.1", "4.1.0" ,"4.2.0" ,"4.3.0-snapshot1" ,"4.3.0-cibuild" ,"4.3.0",  "5.0.0", "5.0.0-cibuild", "5.0.0-snapshot1", "5.0.0-snapshot2");
7078        }
7079
7080
7081//        @Override
7082//        public String toString() {
7083//          return toCode();
7084//        }
7085//        
7086//        
7087//        public boolean isR4B() {
7088//          return toCode().startsWith("4.1");
7089//        }
7090        
7091// end addition
7092    }
7093
7094  public static class FHIRVersionEnumFactory implements EnumFactory<FHIRVersion> {
7095    public FHIRVersion fromCode(String codeString) throws IllegalArgumentException {
7096      if (codeString == null || "".equals(codeString))
7097            if (codeString == null || "".equals(codeString))
7098                return null;
7099        if ("0.01".equals(codeString))
7100          return FHIRVersion._0_01;
7101        if ("0.05".equals(codeString))
7102          return FHIRVersion._0_05;
7103        if ("0.06".equals(codeString))
7104          return FHIRVersion._0_06;
7105        if ("0.11".equals(codeString))
7106          return FHIRVersion._0_11;
7107        if ("0.0".equals(codeString))
7108          return FHIRVersion._0_0;
7109        if ("0.0.80".equals(codeString))
7110          return FHIRVersion._0_0_80;
7111        if ("0.0.81".equals(codeString))
7112          return FHIRVersion._0_0_81;
7113        if ("0.0.82".equals(codeString))
7114          return FHIRVersion._0_0_82;
7115        if ("0.4".equals(codeString))
7116          return FHIRVersion._0_4;
7117        if ("0.4.0".equals(codeString))
7118          return FHIRVersion._0_4_0;
7119        if ("0.5".equals(codeString))
7120          return FHIRVersion._0_5;
7121        if ("0.5.0".equals(codeString))
7122          return FHIRVersion._0_5_0;
7123        if ("1.0".equals(codeString))
7124          return FHIRVersion._1_0;
7125        if ("1.0.0".equals(codeString))
7126          return FHIRVersion._1_0_0;
7127        if ("1.0.1".equals(codeString))
7128          return FHIRVersion._1_0_1;
7129        if ("1.0.2".equals(codeString))
7130          return FHIRVersion._1_0_2;
7131        if ("1.1".equals(codeString))
7132          return FHIRVersion._1_1;
7133        if ("1.1.0".equals(codeString))
7134          return FHIRVersion._1_1_0;
7135        if ("1.4".equals(codeString))
7136          return FHIRVersion._1_4;
7137        if ("1.4.0".equals(codeString))
7138          return FHIRVersion._1_4_0;
7139        if ("1.6".equals(codeString))
7140          return FHIRVersion._1_6;
7141        if ("1.6.0".equals(codeString))
7142          return FHIRVersion._1_6_0;
7143        if ("1.8".equals(codeString))
7144          return FHIRVersion._1_8;
7145        if ("1.8.0".equals(codeString))
7146          return FHIRVersion._1_8_0;
7147        if ("3.0".equals(codeString))
7148          return FHIRVersion._3_0;
7149        if ("3.0.0".equals(codeString))
7150          return FHIRVersion._3_0_0;
7151        if ("3.0.1".equals(codeString))
7152          return FHIRVersion._3_0_1;
7153        if ("3.0.2".equals(codeString))
7154          return FHIRVersion._3_0_2;
7155        if ("3.3".equals(codeString))
7156          return FHIRVersion._3_3;
7157        if ("3.3.0".equals(codeString))
7158          return FHIRVersion._3_3_0;
7159        if ("3.5".equals(codeString))
7160          return FHIRVersion._3_5;
7161        if ("3.5.0".equals(codeString))
7162          return FHIRVersion._3_5_0;
7163        if ("4.0".equals(codeString))
7164          return FHIRVersion._4_0;
7165        if ("4.0.0".equals(codeString))
7166          return FHIRVersion._4_0_0;
7167        if ("4.0.1".equals(codeString))
7168          return FHIRVersion._4_0_1;
7169        if ("4.1".equals(codeString))
7170          return FHIRVersion._4_1;
7171        if ("4.1.0".equals(codeString))
7172          return FHIRVersion._4_1_0;
7173        if ("4.2".equals(codeString))
7174          return FHIRVersion._4_2;
7175        if ("4.2.0".equals(codeString))
7176          return FHIRVersion._4_2_0;
7177        if ("4.3".equals(codeString))
7178          return FHIRVersion._4_3;
7179        if ("4.3.0".equals(codeString))
7180          return FHIRVersion._4_3_0;
7181        if ("4.4".equals(codeString))
7182          return FHIRVersion._4_4;
7183        if ("4.4.0".equals(codeString))
7184          return FHIRVersion._4_4_0;
7185        if ("4.5".equals(codeString))
7186          return FHIRVersion._4_5;
7187        if ("4.5.0".equals(codeString))
7188          return FHIRVersion._4_5_0;
7189        if ("4.6".equals(codeString))
7190          return FHIRVersion._4_6;
7191        if ("4.6.0".equals(codeString))
7192          return FHIRVersion._4_6_0;
7193        if ("4.3.0-cibuild".equals(codeString))
7194          return FHIRVersion._4_3_0CIBUILD;
7195        if ("4.3.0-snapshot1".equals(codeString))
7196          return FHIRVersion._4_3_0SNAPSHOT1;
7197        if ("5.0".equals(codeString))
7198          return FHIRVersion._5_0;
7199        if ("5.0.0".equals(codeString))
7200          return FHIRVersion._5_0_0;
7201        if ("5.0.0-cibuild".equals(codeString))
7202          return FHIRVersion._5_0_0CIBUILD;
7203        if ("5.0.0-snapshot1".equals(codeString))
7204          return FHIRVersion._5_0_0SNAPSHOT1;
7205        if ("5.0.0-snapshot2".equals(codeString))
7206          return FHIRVersion._5_0_0SNAPSHOT2;
7207        throw new IllegalArgumentException("Unknown FHIRVersion code '"+codeString+"'");
7208        }
7209        public Enumeration<FHIRVersion> fromType(Base code) throws FHIRException {
7210          if (code == null)
7211            return null;
7212          if (code.isEmpty())
7213            return new Enumeration<FHIRVersion>(this);
7214          String codeString = ((PrimitiveType) code).asStringValue();
7215          if (codeString == null || "".equals(codeString))
7216            return null;
7217        if ("0.01".equals(codeString))
7218          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_01);
7219        if ("0.05".equals(codeString))
7220          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_05);
7221        if ("0.06".equals(codeString))
7222          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_06);
7223        if ("0.11".equals(codeString))
7224          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_11);
7225        if ("0.0".equals(codeString))
7226          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0);
7227        if ("0.0.80".equals(codeString))
7228          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_80);
7229        if ("0.0.81".equals(codeString))
7230          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_81);
7231        if ("0.0.82".equals(codeString))
7232          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_82);
7233        if ("0.4".equals(codeString))
7234          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_4);
7235        if ("0.4.0".equals(codeString))
7236          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_4_0);
7237        if ("0.5".equals(codeString))
7238          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_5);
7239        if ("0.5.0".equals(codeString))
7240          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_5_0);
7241        if ("1.0".equals(codeString))
7242          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0);
7243        if ("1.0.0".equals(codeString))
7244          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_0);
7245        if ("1.0.1".equals(codeString))
7246          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_1);
7247        if ("1.0.2".equals(codeString))
7248          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_2);
7249        if ("1.1".equals(codeString))
7250          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_1);
7251        if ("1.1.0".equals(codeString))
7252          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_1_0);
7253        if ("1.4".equals(codeString))
7254          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_4);
7255        if ("1.4.0".equals(codeString))
7256          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_4_0);
7257        if ("1.6".equals(codeString))
7258          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_6);
7259        if ("1.6.0".equals(codeString))
7260          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_6_0);
7261        if ("1.8".equals(codeString))
7262          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_8);
7263        if ("1.8.0".equals(codeString))
7264          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_8_0);
7265        if ("3.0".equals(codeString))
7266          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0);
7267        if ("3.0.0".equals(codeString))
7268          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_0);
7269        if ("3.0.1".equals(codeString))
7270          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_1);
7271        if ("3.0.2".equals(codeString))
7272          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_2);
7273        if ("3.3".equals(codeString))
7274          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_3);
7275        if ("3.3.0".equals(codeString))
7276          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_3_0);
7277        if ("3.5".equals(codeString))
7278          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_5);
7279        if ("3.5.0".equals(codeString))
7280          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_5_0);
7281        if ("4.0".equals(codeString))
7282          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_0);
7283        if ("4.0.0".equals(codeString))
7284          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_0_0);
7285        if ("4.0.1".equals(codeString))
7286          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_0_1);
7287        if ("4.1".equals(codeString))
7288          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_1);
7289        if ("4.1.0".equals(codeString))
7290          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_1_0);
7291        if ("4.2".equals(codeString))
7292          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_2);
7293        if ("4.2.0".equals(codeString))
7294          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_2_0);
7295        if ("4.3".equals(codeString))
7296          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3);
7297        if ("4.3.0".equals(codeString))
7298          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3_0);
7299        if ("4.4".equals(codeString))
7300          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_4);
7301        if ("4.4.0".equals(codeString))
7302          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_4_0);
7303        if ("4.5".equals(codeString))
7304          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_5);
7305        if ("4.5.0".equals(codeString))
7306          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_5_0);
7307        if ("4.6".equals(codeString))
7308          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_6);
7309        if ("4.6.0".equals(codeString))
7310          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_6_0);
7311        if ("4.3.0-cibuild".equals(codeString))
7312          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3_0CIBUILD);
7313        if ("4.3.0-snapshot1".equals(codeString))
7314          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_3_0SNAPSHOT1);
7315        if ("5.0".equals(codeString))
7316          return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0);
7317        if ("5.0.0".equals(codeString))
7318          return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0);
7319        if ("5.0.0-cibuild".equals(codeString))
7320          return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0CIBUILD);
7321        if ("5.0.0-snapshot1".equals(codeString))
7322          return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0SNAPSHOT1);
7323          if ("5.0.0-snapshot2".equals(codeString))
7324            return new Enumeration<FHIRVersion>(this, FHIRVersion._5_0_0SNAPSHOT2);
7325        throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'");
7326        }
7327    public String toCode(FHIRVersion code) {
7328      if (code == FHIRVersion._0_01)
7329        return "0.01";
7330      if (code == FHIRVersion._0_05)
7331        return "0.05";
7332      if (code == FHIRVersion._0_06)
7333        return "0.06";
7334      if (code == FHIRVersion._0_11)
7335        return "0.11";
7336      if (code == FHIRVersion._0_0)
7337        return "0.0";
7338      if (code == FHIRVersion._0_0_80)
7339        return "0.0.80";
7340      if (code == FHIRVersion._0_0_81)
7341        return "0.0.81";
7342      if (code == FHIRVersion._0_0_82)
7343        return "0.0.82";
7344      if (code == FHIRVersion._0_4)
7345        return "0.4";
7346      if (code == FHIRVersion._0_4_0)
7347        return "0.4.0";
7348      if (code == FHIRVersion._0_5)
7349        return "0.5";
7350      if (code == FHIRVersion._0_5_0)
7351        return "0.5.0";
7352      if (code == FHIRVersion._1_0)
7353        return "1.0";
7354      if (code == FHIRVersion._1_0_0)
7355        return "1.0.0";
7356      if (code == FHIRVersion._1_0_1)
7357        return "1.0.1";
7358      if (code == FHIRVersion._1_0_2)
7359        return "1.0.2";
7360      if (code == FHIRVersion._1_1)
7361        return "1.1";
7362      if (code == FHIRVersion._1_1_0)
7363        return "1.1.0";
7364      if (code == FHIRVersion._1_4)
7365        return "1.4";
7366      if (code == FHIRVersion._1_4_0)
7367        return "1.4.0";
7368      if (code == FHIRVersion._1_6)
7369        return "1.6";
7370      if (code == FHIRVersion._1_6_0)
7371        return "1.6.0";
7372      if (code == FHIRVersion._1_8)
7373        return "1.8";
7374      if (code == FHIRVersion._1_8_0)
7375        return "1.8.0";
7376      if (code == FHIRVersion._3_0)
7377        return "3.0";
7378      if (code == FHIRVersion._3_0_0)
7379        return "3.0.0";
7380      if (code == FHIRVersion._3_0_1)
7381        return "3.0.1";
7382      if (code == FHIRVersion._3_0_2)
7383        return "3.0.2";
7384      if (code == FHIRVersion._3_3)
7385        return "3.3";
7386      if (code == FHIRVersion._3_3_0)
7387        return "3.3.0";
7388      if (code == FHIRVersion._3_5)
7389        return "3.5";
7390      if (code == FHIRVersion._3_5_0)
7391        return "3.5.0";
7392      if (code == FHIRVersion._4_0)
7393        return "4.0";
7394      if (code == FHIRVersion._4_0_0)
7395        return "4.0.0";
7396      if (code == FHIRVersion._4_0_1)
7397        return "4.0.1";
7398      if (code == FHIRVersion._4_1)
7399        return "4.1";
7400      if (code == FHIRVersion._4_1_0)
7401        return "4.1.0";
7402      if (code == FHIRVersion._4_2)
7403        return "4.2";
7404      if (code == FHIRVersion._4_2_0)
7405        return "4.2.0";
7406      if (code == FHIRVersion._4_3)
7407        return "4.3";
7408      if (code == FHIRVersion._4_3_0)
7409        return "4.3.0";
7410      if (code == FHIRVersion._4_4)
7411        return "4.4";
7412      if (code == FHIRVersion._4_4_0)
7413        return "4.4.0";
7414      if (code == FHIRVersion._4_5)
7415        return "4.5";
7416      if (code == FHIRVersion._4_5_0)
7417        return "4.5.0";
7418      if (code == FHIRVersion._4_6)
7419        return "4.6";
7420      if (code == FHIRVersion._4_6_0)
7421        return "4.6.0";
7422      if (code == FHIRVersion._4_3_0CIBUILD)
7423        return "4.3.0-cibuild";
7424      if (code == FHIRVersion._4_3_0SNAPSHOT1)
7425        return "4.3.0-snapshot1";
7426      if (code == FHIRVersion._5_0)
7427        return "5.0";
7428      if (code == FHIRVersion._5_0_0)
7429        return "5.0.0";
7430      if (code == FHIRVersion._5_0_0CIBUILD)
7431        return "5.0.0-cibuild";
7432      if (code == FHIRVersion._5_0_0SNAPSHOT1)
7433        return "5.0.0-snapshot1";
7434      if (code == FHIRVersion._5_0_0SNAPSHOT2)
7435        return "5.0.0-snapshot2";
7436      return "?";
7437      }
7438    public String toSystem(FHIRVersion code) {
7439      return code.getSystem();
7440      }
7441    }
7442
7443    public enum FilterOperator {
7444        /**
7445         * The specified property of the code equals the provided value.
7446         */
7447        EQUAL, 
7448        /**
7449         * 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).
7450         */
7451        ISA, 
7452        /**
7453         * 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).
7454         */
7455        DESCENDENTOF, 
7456        /**
7457         * The specified property of the code does not have an is-a relationship with the provided value.
7458         */
7459        ISNOTA, 
7460        /**
7461         * The specified property of the code  matches the regex specified in the provided value.
7462         */
7463        REGEX, 
7464        /**
7465         * The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list).
7466         */
7467        IN, 
7468        /**
7469         * The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list).
7470         */
7471        NOTIN, 
7472        /**
7473         * 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).
7474         */
7475        GENERALIZES, 
7476        /**
7477         * 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.
7478         */
7479        CHILDOF, 
7480        /**
7481         * 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.
7482         */
7483        DESCENDENTLEAF, 
7484        /**
7485         * 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).
7486         */
7487        EXISTS, 
7488        /**
7489         * added to help the parsers
7490         */
7491        NULL;
7492        public static FilterOperator fromCode(String codeString) throws FHIRException {
7493            if (codeString == null || "".equals(codeString))
7494                return null;
7495        if ("=".equals(codeString))
7496          return EQUAL;
7497        if ("is-a".equals(codeString))
7498          return ISA;
7499        if ("descendent-of".equals(codeString))
7500          return DESCENDENTOF;
7501        if ("is-not-a".equals(codeString))
7502          return ISNOTA;
7503        if ("regex".equals(codeString))
7504          return REGEX;
7505        if ("in".equals(codeString))
7506          return IN;
7507        if ("not-in".equals(codeString))
7508          return NOTIN;
7509        if ("generalizes".equals(codeString))
7510          return GENERALIZES;
7511        if ("child-of".equals(codeString))
7512          return CHILDOF;
7513        if ("descendent-leaf".equals(codeString))
7514          return DESCENDENTLEAF;
7515        if ("exists".equals(codeString))
7516          return EXISTS;
7517        throw new FHIRException("Unknown FilterOperator code '"+codeString+"'");
7518        }
7519        public String toCode() {
7520          switch (this) {
7521            case EQUAL: return "=";
7522            case ISA: return "is-a";
7523            case DESCENDENTOF: return "descendent-of";
7524            case ISNOTA: return "is-not-a";
7525            case REGEX: return "regex";
7526            case IN: return "in";
7527            case NOTIN: return "not-in";
7528            case GENERALIZES: return "generalizes";
7529            case CHILDOF: return "child-of";
7530            case DESCENDENTLEAF: return "descendent-leaf";
7531            case EXISTS: return "exists";
7532            case NULL: return null;
7533            default: return "?";
7534          }
7535        }
7536        public String getSystem() {
7537          switch (this) {
7538            case EQUAL: return "http://hl7.org/fhir/filter-operator";
7539            case ISA: return "http://hl7.org/fhir/filter-operator";
7540            case DESCENDENTOF: return "http://hl7.org/fhir/filter-operator";
7541            case ISNOTA: return "http://hl7.org/fhir/filter-operator";
7542            case REGEX: return "http://hl7.org/fhir/filter-operator";
7543            case IN: return "http://hl7.org/fhir/filter-operator";
7544            case NOTIN: return "http://hl7.org/fhir/filter-operator";
7545            case GENERALIZES: return "http://hl7.org/fhir/filter-operator";
7546            case CHILDOF: return "http://hl7.org/fhir/filter-operator";
7547            case DESCENDENTLEAF: return "http://hl7.org/fhir/filter-operator";
7548            case EXISTS: return "http://hl7.org/fhir/filter-operator";
7549            case NULL: return null;
7550            default: return "?";
7551          }
7552        }
7553        public String getDefinition() {
7554          switch (this) {
7555            case EQUAL: return "The specified property of the code equals the provided value.";
7556            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).";
7557            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).";
7558            case ISNOTA: return "The specified property of the code does not have an is-a relationship with the provided value.";
7559            case REGEX: return "The specified property of the code  matches the regex specified in the provided value.";
7560            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).";
7561            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).";
7562            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).";
7563            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.";
7564            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.";
7565            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).";
7566            case NULL: return null;
7567            default: return "?";
7568          }
7569        }
7570        public String getDisplay() {
7571          switch (this) {
7572            case EQUAL: return "Equals";
7573            case ISA: return "Is A (by subsumption)";
7574            case DESCENDENTOF: return "Descendent Of (by subsumption)";
7575            case ISNOTA: return "Not (Is A) (by subsumption)";
7576            case REGEX: return "Regular Expression";
7577            case IN: return "In Set";
7578            case NOTIN: return "Not in Set";
7579            case GENERALIZES: return "Generalizes (by Subsumption)";
7580            case CHILDOF: return "Child Of";
7581            case DESCENDENTLEAF: return "Descendent Leaf";
7582            case EXISTS: return "Exists";
7583            case NULL: return null;
7584            default: return "?";
7585          }
7586        }
7587    }
7588
7589  public static class FilterOperatorEnumFactory implements EnumFactory<FilterOperator> {
7590    public FilterOperator fromCode(String codeString) throws IllegalArgumentException {
7591      if (codeString == null || "".equals(codeString))
7592            if (codeString == null || "".equals(codeString))
7593                return null;
7594        if ("=".equals(codeString))
7595          return FilterOperator.EQUAL;
7596        if ("is-a".equals(codeString))
7597          return FilterOperator.ISA;
7598        if ("descendent-of".equals(codeString))
7599          return FilterOperator.DESCENDENTOF;
7600        if ("is-not-a".equals(codeString))
7601          return FilterOperator.ISNOTA;
7602        if ("regex".equals(codeString))
7603          return FilterOperator.REGEX;
7604        if ("in".equals(codeString))
7605          return FilterOperator.IN;
7606        if ("not-in".equals(codeString))
7607          return FilterOperator.NOTIN;
7608        if ("generalizes".equals(codeString))
7609          return FilterOperator.GENERALIZES;
7610        if ("child-of".equals(codeString))
7611          return FilterOperator.CHILDOF;
7612        if ("descendent-leaf".equals(codeString))
7613          return FilterOperator.DESCENDENTLEAF;
7614        if ("exists".equals(codeString))
7615          return FilterOperator.EXISTS;
7616        throw new IllegalArgumentException("Unknown FilterOperator code '"+codeString+"'");
7617        }
7618        public Enumeration<FilterOperator> fromType(Base code) throws FHIRException {
7619          if (code == null)
7620            return null;
7621          if (code.isEmpty())
7622            return new Enumeration<FilterOperator>(this);
7623          String codeString = ((PrimitiveType) code).asStringValue();
7624          if (codeString == null || "".equals(codeString))
7625            return null;
7626        if ("=".equals(codeString))
7627          return new Enumeration<FilterOperator>(this, FilterOperator.EQUAL);
7628        if ("is-a".equals(codeString))
7629          return new Enumeration<FilterOperator>(this, FilterOperator.ISA);
7630        if ("descendent-of".equals(codeString))
7631          return new Enumeration<FilterOperator>(this, FilterOperator.DESCENDENTOF);
7632        if ("is-not-a".equals(codeString))
7633          return new Enumeration<FilterOperator>(this, FilterOperator.ISNOTA);
7634        if ("regex".equals(codeString))
7635          return new Enumeration<FilterOperator>(this, FilterOperator.REGEX);
7636        if ("in".equals(codeString))
7637          return new Enumeration<FilterOperator>(this, FilterOperator.IN);
7638        if ("not-in".equals(codeString))
7639          return new Enumeration<FilterOperator>(this, FilterOperator.NOTIN);
7640        if ("generalizes".equals(codeString))
7641          return new Enumeration<FilterOperator>(this, FilterOperator.GENERALIZES);
7642        if ("child-of".equals(codeString))
7643          return new Enumeration<FilterOperator>(this, FilterOperator.CHILDOF);
7644        if ("descendent-leaf".equals(codeString))
7645          return new Enumeration<FilterOperator>(this, FilterOperator.DESCENDENTLEAF);
7646        if ("exists".equals(codeString))
7647          return new Enumeration<FilterOperator>(this, FilterOperator.EXISTS);
7648        throw new FHIRException("Unknown FilterOperator code '"+codeString+"'");
7649        }
7650    public String toCode(FilterOperator code) {
7651      if (code == FilterOperator.EQUAL)
7652        return "=";
7653      if (code == FilterOperator.ISA)
7654        return "is-a";
7655      if (code == FilterOperator.DESCENDENTOF)
7656        return "descendent-of";
7657      if (code == FilterOperator.ISNOTA)
7658        return "is-not-a";
7659      if (code == FilterOperator.REGEX)
7660        return "regex";
7661      if (code == FilterOperator.IN)
7662        return "in";
7663      if (code == FilterOperator.NOTIN)
7664        return "not-in";
7665      if (code == FilterOperator.GENERALIZES)
7666        return "generalizes";
7667      if (code == FilterOperator.CHILDOF)
7668        return "child-of";
7669      if (code == FilterOperator.DESCENDENTLEAF)
7670        return "descendent-leaf";
7671      if (code == FilterOperator.EXISTS)
7672        return "exists";
7673      return "?";
7674      }
7675    public String toSystem(FilterOperator code) {
7676      return code.getSystem();
7677      }
7678    }
7679
7680    public enum FinancialResourceStatusCodes {
7681        /**
7682         * The instance is currently in-force.
7683         */
7684        ACTIVE, 
7685        /**
7686         * The instance is withdrawn, rescinded or reversed.
7687         */
7688        CANCELLED, 
7689        /**
7690         * A new instance the contents of which is not complete.
7691         */
7692        DRAFT, 
7693        /**
7694         * The instance was entered in error.
7695         */
7696        ENTEREDINERROR, 
7697        /**
7698         * added to help the parsers
7699         */
7700        NULL;
7701        public static FinancialResourceStatusCodes fromCode(String codeString) throws FHIRException {
7702            if (codeString == null || "".equals(codeString))
7703                return null;
7704        if ("active".equals(codeString))
7705          return ACTIVE;
7706        if ("cancelled".equals(codeString))
7707          return CANCELLED;
7708        if ("draft".equals(codeString))
7709          return DRAFT;
7710        if ("entered-in-error".equals(codeString))
7711          return ENTEREDINERROR;
7712        throw new FHIRException("Unknown FinancialResourceStatusCodes code '"+codeString+"'");
7713        }
7714        public String toCode() {
7715          switch (this) {
7716            case ACTIVE: return "active";
7717            case CANCELLED: return "cancelled";
7718            case DRAFT: return "draft";
7719            case ENTEREDINERROR: return "entered-in-error";
7720            case NULL: return null;
7721            default: return "?";
7722          }
7723        }
7724        public String getSystem() {
7725          switch (this) {
7726            case ACTIVE: return "http://hl7.org/fhir/fm-status";
7727            case CANCELLED: return "http://hl7.org/fhir/fm-status";
7728            case DRAFT: return "http://hl7.org/fhir/fm-status";
7729            case ENTEREDINERROR: return "http://hl7.org/fhir/fm-status";
7730            case NULL: return null;
7731            default: return "?";
7732          }
7733        }
7734        public String getDefinition() {
7735          switch (this) {
7736            case ACTIVE: return "The instance is currently in-force.";
7737            case CANCELLED: return "The instance is withdrawn, rescinded or reversed.";
7738            case DRAFT: return "A new instance the contents of which is not complete.";
7739            case ENTEREDINERROR: return "The instance was entered in error.";
7740            case NULL: return null;
7741            default: return "?";
7742          }
7743        }
7744        public String getDisplay() {
7745          switch (this) {
7746            case ACTIVE: return "Active";
7747            case CANCELLED: return "Cancelled";
7748            case DRAFT: return "Draft";
7749            case ENTEREDINERROR: return "Entered in Error";
7750            case NULL: return null;
7751            default: return "?";
7752          }
7753        }
7754    }
7755
7756  public static class FinancialResourceStatusCodesEnumFactory implements EnumFactory<FinancialResourceStatusCodes> {
7757    public FinancialResourceStatusCodes fromCode(String codeString) throws IllegalArgumentException {
7758      if (codeString == null || "".equals(codeString))
7759            if (codeString == null || "".equals(codeString))
7760                return null;
7761        if ("active".equals(codeString))
7762          return FinancialResourceStatusCodes.ACTIVE;
7763        if ("cancelled".equals(codeString))
7764          return FinancialResourceStatusCodes.CANCELLED;
7765        if ("draft".equals(codeString))
7766          return FinancialResourceStatusCodes.DRAFT;
7767        if ("entered-in-error".equals(codeString))
7768          return FinancialResourceStatusCodes.ENTEREDINERROR;
7769        throw new IllegalArgumentException("Unknown FinancialResourceStatusCodes code '"+codeString+"'");
7770        }
7771        public Enumeration<FinancialResourceStatusCodes> fromType(Base code) throws FHIRException {
7772          if (code == null)
7773            return null;
7774          if (code.isEmpty())
7775            return new Enumeration<FinancialResourceStatusCodes>(this);
7776          String codeString = ((PrimitiveType) code).asStringValue();
7777          if (codeString == null || "".equals(codeString))
7778            return null;
7779        if ("active".equals(codeString))
7780          return new Enumeration<FinancialResourceStatusCodes>(this, FinancialResourceStatusCodes.ACTIVE);
7781        if ("cancelled".equals(codeString))
7782          return new Enumeration<FinancialResourceStatusCodes>(this, FinancialResourceStatusCodes.CANCELLED);
7783        if ("draft".equals(codeString))
7784          return new Enumeration<FinancialResourceStatusCodes>(this, FinancialResourceStatusCodes.DRAFT);
7785        if ("entered-in-error".equals(codeString))
7786          return new Enumeration<FinancialResourceStatusCodes>(this, FinancialResourceStatusCodes.ENTEREDINERROR);
7787        throw new FHIRException("Unknown FinancialResourceStatusCodes code '"+codeString+"'");
7788        }
7789    public String toCode(FinancialResourceStatusCodes code) {
7790      if (code == FinancialResourceStatusCodes.ACTIVE)
7791        return "active";
7792      if (code == FinancialResourceStatusCodes.CANCELLED)
7793        return "cancelled";
7794      if (code == FinancialResourceStatusCodes.DRAFT)
7795        return "draft";
7796      if (code == FinancialResourceStatusCodes.ENTEREDINERROR)
7797        return "entered-in-error";
7798      return "?";
7799      }
7800    public String toSystem(FinancialResourceStatusCodes code) {
7801      return code.getSystem();
7802      }
7803    }
7804
7805    public enum InvoicePriceComponentType {
7806        /**
7807         * the amount is the base price used for calculating the total price before applying surcharges, discount or taxes.
7808         */
7809        BASE, 
7810        /**
7811         * the amount is a surcharge applied on the base price.
7812         */
7813        SURCHARGE, 
7814        /**
7815         * the amount is a deduction applied on the base price.
7816         */
7817        DEDUCTION, 
7818        /**
7819         * the amount is a discount applied on the base price.
7820         */
7821        DISCOUNT, 
7822        /**
7823         * the amount is the tax component of the total price.
7824         */
7825        TAX, 
7826        /**
7827         * the amount is of informational character, it has not been applied in the calculation of the total price.
7828         */
7829        INFORMATIONAL, 
7830        /**
7831         * added to help the parsers
7832         */
7833        NULL;
7834        public static InvoicePriceComponentType fromCode(String codeString) throws FHIRException {
7835            if (codeString == null || "".equals(codeString))
7836                return null;
7837        if ("base".equals(codeString))
7838          return BASE;
7839        if ("surcharge".equals(codeString))
7840          return SURCHARGE;
7841        if ("deduction".equals(codeString))
7842          return DEDUCTION;
7843        if ("discount".equals(codeString))
7844          return DISCOUNT;
7845        if ("tax".equals(codeString))
7846          return TAX;
7847        if ("informational".equals(codeString))
7848          return INFORMATIONAL;
7849        throw new FHIRException("Unknown InvoicePriceComponentType code '"+codeString+"'");
7850        }
7851        public String toCode() {
7852          switch (this) {
7853            case BASE: return "base";
7854            case SURCHARGE: return "surcharge";
7855            case DEDUCTION: return "deduction";
7856            case DISCOUNT: return "discount";
7857            case TAX: return "tax";
7858            case INFORMATIONAL: return "informational";
7859            case NULL: return null;
7860            default: return "?";
7861          }
7862        }
7863        public String getSystem() {
7864          switch (this) {
7865            case BASE: return "http://hl7.org/fhir/invoice-priceComponentType";
7866            case SURCHARGE: return "http://hl7.org/fhir/invoice-priceComponentType";
7867            case DEDUCTION: return "http://hl7.org/fhir/invoice-priceComponentType";
7868            case DISCOUNT: return "http://hl7.org/fhir/invoice-priceComponentType";
7869            case TAX: return "http://hl7.org/fhir/invoice-priceComponentType";
7870            case INFORMATIONAL: return "http://hl7.org/fhir/invoice-priceComponentType";
7871            case NULL: return null;
7872            default: return "?";
7873          }
7874        }
7875        public String getDefinition() {
7876          switch (this) {
7877            case BASE: return "the amount is the base price used for calculating the total price before applying surcharges, discount or taxes.";
7878            case SURCHARGE: return "the amount is a surcharge applied on the base price.";
7879            case DEDUCTION: return "the amount is a deduction applied on the base price.";
7880            case DISCOUNT: return "the amount is a discount applied on the base price.";
7881            case TAX: return "the amount is the tax component of the total price.";
7882            case INFORMATIONAL: return "the amount is of informational character, it has not been applied in the calculation of the total price.";
7883            case NULL: return null;
7884            default: return "?";
7885          }
7886        }
7887        public String getDisplay() {
7888          switch (this) {
7889            case BASE: return "base price";
7890            case SURCHARGE: return "surcharge";
7891            case DEDUCTION: return "deduction";
7892            case DISCOUNT: return "discount";
7893            case TAX: return "tax";
7894            case INFORMATIONAL: return "informational";
7895            case NULL: return null;
7896            default: return "?";
7897          }
7898        }
7899    }
7900
7901  public static class InvoicePriceComponentTypeEnumFactory implements EnumFactory<InvoicePriceComponentType> {
7902    public InvoicePriceComponentType fromCode(String codeString) throws IllegalArgumentException {
7903      if (codeString == null || "".equals(codeString))
7904            if (codeString == null || "".equals(codeString))
7905                return null;
7906        if ("base".equals(codeString))
7907          return InvoicePriceComponentType.BASE;
7908        if ("surcharge".equals(codeString))
7909          return InvoicePriceComponentType.SURCHARGE;
7910        if ("deduction".equals(codeString))
7911          return InvoicePriceComponentType.DEDUCTION;
7912        if ("discount".equals(codeString))
7913          return InvoicePriceComponentType.DISCOUNT;
7914        if ("tax".equals(codeString))
7915          return InvoicePriceComponentType.TAX;
7916        if ("informational".equals(codeString))
7917          return InvoicePriceComponentType.INFORMATIONAL;
7918        throw new IllegalArgumentException("Unknown InvoicePriceComponentType code '"+codeString+"'");
7919        }
7920        public Enumeration<InvoicePriceComponentType> fromType(Base code) throws FHIRException {
7921          if (code == null)
7922            return null;
7923          if (code.isEmpty())
7924            return new Enumeration<InvoicePriceComponentType>(this);
7925          String codeString = ((PrimitiveType) code).asStringValue();
7926          if (codeString == null || "".equals(codeString))
7927            return null;
7928        if ("base".equals(codeString))
7929          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.BASE);
7930        if ("surcharge".equals(codeString))
7931          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.SURCHARGE);
7932        if ("deduction".equals(codeString))
7933          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.DEDUCTION);
7934        if ("discount".equals(codeString))
7935          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.DISCOUNT);
7936        if ("tax".equals(codeString))
7937          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.TAX);
7938        if ("informational".equals(codeString))
7939          return new Enumeration<InvoicePriceComponentType>(this, InvoicePriceComponentType.INFORMATIONAL);
7940        throw new FHIRException("Unknown InvoicePriceComponentType code '"+codeString+"'");
7941        }
7942    public String toCode(InvoicePriceComponentType code) {
7943      if (code == InvoicePriceComponentType.BASE)
7944        return "base";
7945      if (code == InvoicePriceComponentType.SURCHARGE)
7946        return "surcharge";
7947      if (code == InvoicePriceComponentType.DEDUCTION)
7948        return "deduction";
7949      if (code == InvoicePriceComponentType.DISCOUNT)
7950        return "discount";
7951      if (code == InvoicePriceComponentType.TAX)
7952        return "tax";
7953      if (code == InvoicePriceComponentType.INFORMATIONAL)
7954        return "informational";
7955      return "?";
7956      }
7957    public String toSystem(InvoicePriceComponentType code) {
7958      return code.getSystem();
7959      }
7960    }
7961
7962    public enum ListMode {
7963        /**
7964         * This list is the master list, maintained in an ongoing fashion with regular updates as the real world list it is tracking changes.
7965         */
7966        WORKING, 
7967        /**
7968         * This list was prepared as a snapshot. It should not be assumed to be current.
7969         */
7970        SNAPSHOT, 
7971        /**
7972         * 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.
7973         */
7974        CHANGES, 
7975        /**
7976         * added to help the parsers
7977         */
7978        NULL;
7979        public static ListMode fromCode(String codeString) throws FHIRException {
7980            if (codeString == null || "".equals(codeString))
7981                return null;
7982        if ("working".equals(codeString))
7983          return WORKING;
7984        if ("snapshot".equals(codeString))
7985          return SNAPSHOT;
7986        if ("changes".equals(codeString))
7987          return CHANGES;
7988        throw new FHIRException("Unknown ListMode code '"+codeString+"'");
7989        }
7990        public String toCode() {
7991          switch (this) {
7992            case WORKING: return "working";
7993            case SNAPSHOT: return "snapshot";
7994            case CHANGES: return "changes";
7995            case NULL: return null;
7996            default: return "?";
7997          }
7998        }
7999        public String getSystem() {
8000          switch (this) {
8001            case WORKING: return "http://hl7.org/fhir/list-mode";
8002            case SNAPSHOT: return "http://hl7.org/fhir/list-mode";
8003            case CHANGES: return "http://hl7.org/fhir/list-mode";
8004            case NULL: return null;
8005            default: return "?";
8006          }
8007        }
8008        public String getDefinition() {
8009          switch (this) {
8010            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.";
8011            case SNAPSHOT: return "This list was prepared as a snapshot. It should not be assumed to be current.";
8012            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.";
8013            case NULL: return null;
8014            default: return "?";
8015          }
8016        }
8017        public String getDisplay() {
8018          switch (this) {
8019            case WORKING: return "Working List";
8020            case SNAPSHOT: return "Snapshot List";
8021            case CHANGES: return "Change List";
8022            case NULL: return null;
8023            default: return "?";
8024          }
8025        }
8026    }
8027
8028  public static class ListModeEnumFactory implements EnumFactory<ListMode> {
8029    public ListMode fromCode(String codeString) throws IllegalArgumentException {
8030      if (codeString == null || "".equals(codeString))
8031            if (codeString == null || "".equals(codeString))
8032                return null;
8033        if ("working".equals(codeString))
8034          return ListMode.WORKING;
8035        if ("snapshot".equals(codeString))
8036          return ListMode.SNAPSHOT;
8037        if ("changes".equals(codeString))
8038          return ListMode.CHANGES;
8039        throw new IllegalArgumentException("Unknown ListMode code '"+codeString+"'");
8040        }
8041        public Enumeration<ListMode> fromType(Base code) throws FHIRException {
8042          if (code == null)
8043            return null;
8044          if (code.isEmpty())
8045            return new Enumeration<ListMode>(this);
8046          String codeString = ((PrimitiveType) code).asStringValue();
8047          if (codeString == null || "".equals(codeString))
8048            return null;
8049        if ("working".equals(codeString))
8050          return new Enumeration<ListMode>(this, ListMode.WORKING);
8051        if ("snapshot".equals(codeString))
8052          return new Enumeration<ListMode>(this, ListMode.SNAPSHOT);
8053        if ("changes".equals(codeString))
8054          return new Enumeration<ListMode>(this, ListMode.CHANGES);
8055        throw new FHIRException("Unknown ListMode code '"+codeString+"'");
8056        }
8057    public String toCode(ListMode code) {
8058      if (code == ListMode.WORKING)
8059        return "working";
8060      if (code == ListMode.SNAPSHOT)
8061        return "snapshot";
8062      if (code == ListMode.CHANGES)
8063        return "changes";
8064      return "?";
8065      }
8066    public String toSystem(ListMode code) {
8067      return code.getSystem();
8068      }
8069    }
8070
8071    public enum MeasureImprovementNotation {
8072        /**
8073         * Improvement is indicated as an increase in the score or measurement (e.g. Higher score indicates better quality).
8074         */
8075        INCREASE, 
8076        /**
8077         * Improvement is indicated as a decrease in the score or measurement (e.g. Lower score indicates better quality).
8078         */
8079        DECREASE, 
8080        /**
8081         * added to help the parsers
8082         */
8083        NULL;
8084        public static MeasureImprovementNotation fromCode(String codeString) throws FHIRException {
8085            if (codeString == null || "".equals(codeString))
8086                return null;
8087        if ("increase".equals(codeString))
8088          return INCREASE;
8089        if ("decrease".equals(codeString))
8090          return DECREASE;
8091        throw new FHIRException("Unknown MeasureImprovementNotation code '"+codeString+"'");
8092        }
8093        public String toCode() {
8094          switch (this) {
8095            case INCREASE: return "increase";
8096            case DECREASE: return "decrease";
8097            case NULL: return null;
8098            default: return "?";
8099          }
8100        }
8101        public String getSystem() {
8102          switch (this) {
8103            case INCREASE: return "http://terminology.hl7.org/CodeSystem/measure-improvement-notation";
8104            case DECREASE: return "http://terminology.hl7.org/CodeSystem/measure-improvement-notation";
8105            case NULL: return null;
8106            default: return "?";
8107          }
8108        }
8109        public String getDefinition() {
8110          switch (this) {
8111            case INCREASE: return "Improvement is indicated as an increase in the score or measurement (e.g. Higher score indicates better quality).";
8112            case DECREASE: return "Improvement is indicated as a decrease in the score or measurement (e.g. Lower score indicates better quality).";
8113            case NULL: return null;
8114            default: return "?";
8115          }
8116        }
8117        public String getDisplay() {
8118          switch (this) {
8119            case INCREASE: return "Increased score indicates improvement";
8120            case DECREASE: return "Decreased score indicates improvement";
8121            case NULL: return null;
8122            default: return "?";
8123          }
8124        }
8125    }
8126
8127  public static class MeasureImprovementNotationEnumFactory implements EnumFactory<MeasureImprovementNotation> {
8128    public MeasureImprovementNotation fromCode(String codeString) throws IllegalArgumentException {
8129      if (codeString == null || "".equals(codeString))
8130            if (codeString == null || "".equals(codeString))
8131                return null;
8132        if ("increase".equals(codeString))
8133          return MeasureImprovementNotation.INCREASE;
8134        if ("decrease".equals(codeString))
8135          return MeasureImprovementNotation.DECREASE;
8136        throw new IllegalArgumentException("Unknown MeasureImprovementNotation code '"+codeString+"'");
8137        }
8138        public Enumeration<MeasureImprovementNotation> fromType(Base code) throws FHIRException {
8139          if (code == null)
8140            return null;
8141          if (code.isEmpty())
8142            return new Enumeration<MeasureImprovementNotation>(this);
8143          String codeString = ((PrimitiveType) code).asStringValue();
8144          if (codeString == null || "".equals(codeString))
8145            return null;
8146        if ("increase".equals(codeString))
8147          return new Enumeration<MeasureImprovementNotation>(this, MeasureImprovementNotation.INCREASE);
8148        if ("decrease".equals(codeString))
8149          return new Enumeration<MeasureImprovementNotation>(this, MeasureImprovementNotation.DECREASE);
8150        throw new FHIRException("Unknown MeasureImprovementNotation code '"+codeString+"'");
8151        }
8152    public String toCode(MeasureImprovementNotation code) {
8153      if (code == MeasureImprovementNotation.INCREASE)
8154        return "increase";
8155      if (code == MeasureImprovementNotation.DECREASE)
8156        return "decrease";
8157      return "?";
8158      }
8159    public String toSystem(MeasureImprovementNotation code) {
8160      return code.getSystem();
8161      }
8162    }
8163
8164    public enum MimeTypes {
8165        /**
8166         * added to help the parsers
8167         */
8168        NULL;
8169        public static MimeTypes fromCode(String codeString) throws FHIRException {
8170            if (codeString == null || "".equals(codeString))
8171                return null;
8172        throw new FHIRException("Unknown MimeTypes code '"+codeString+"'");
8173        }
8174        public String toCode() {
8175          switch (this) {
8176            case NULL: return null;
8177            default: return "?";
8178          }
8179        }
8180        public String getSystem() {
8181          switch (this) {
8182            case NULL: return null;
8183            default: return "?";
8184          }
8185        }
8186        public String getDefinition() {
8187          switch (this) {
8188            case NULL: return null;
8189            default: return "?";
8190          }
8191        }
8192        public String getDisplay() {
8193          switch (this) {
8194            case NULL: return null;
8195            default: return "?";
8196          }
8197        }
8198    }
8199
8200  public static class MimeTypesEnumFactory implements EnumFactory<MimeTypes> {
8201    public MimeTypes fromCode(String codeString) throws IllegalArgumentException {
8202      if (codeString == null || "".equals(codeString))
8203            if (codeString == null || "".equals(codeString))
8204                return null;
8205        throw new IllegalArgumentException("Unknown MimeTypes code '"+codeString+"'");
8206        }
8207        public Enumeration<MimeTypes> fromType(Base code) throws FHIRException {
8208          if (code == null)
8209            return null;
8210          if (code.isEmpty())
8211            return new Enumeration<MimeTypes>(this);
8212          String codeString = ((PrimitiveType) code).asStringValue();
8213          if (codeString == null || "".equals(codeString))
8214            return null;
8215        throw new FHIRException("Unknown MimeTypes code '"+codeString+"'");
8216        }
8217    public String toCode(MimeTypes code) {
8218      return "?";
8219      }
8220    public String toSystem(MimeTypes code) {
8221      return code.getSystem();
8222      }
8223    }
8224
8225    public enum NoteType {
8226        /**
8227         * Display the note.
8228         */
8229        DISPLAY, 
8230        /**
8231         * Print the note on the form.
8232         */
8233        PRINT, 
8234        /**
8235         * Print the note for the operator.
8236         */
8237        PRINTOPER, 
8238        /**
8239         * added to help the parsers
8240         */
8241        NULL;
8242        public static NoteType fromCode(String codeString) throws FHIRException {
8243            if (codeString == null || "".equals(codeString))
8244                return null;
8245        if ("display".equals(codeString))
8246          return DISPLAY;
8247        if ("print".equals(codeString))
8248          return PRINT;
8249        if ("printoper".equals(codeString))
8250          return PRINTOPER;
8251        throw new FHIRException("Unknown NoteType code '"+codeString+"'");
8252        }
8253        public String toCode() {
8254          switch (this) {
8255            case DISPLAY: return "display";
8256            case PRINT: return "print";
8257            case PRINTOPER: return "printoper";
8258            case NULL: return null;
8259            default: return "?";
8260          }
8261        }
8262        public String getSystem() {
8263          switch (this) {
8264            case DISPLAY: return "http://hl7.org/fhir/note-type";
8265            case PRINT: return "http://hl7.org/fhir/note-type";
8266            case PRINTOPER: return "http://hl7.org/fhir/note-type";
8267            case NULL: return null;
8268            default: return "?";
8269          }
8270        }
8271        public String getDefinition() {
8272          switch (this) {
8273            case DISPLAY: return "Display the note.";
8274            case PRINT: return "Print the note on the form.";
8275            case PRINTOPER: return "Print the note for the operator.";
8276            case NULL: return null;
8277            default: return "?";
8278          }
8279        }
8280        public String getDisplay() {
8281          switch (this) {
8282            case DISPLAY: return "Display";
8283            case PRINT: return "Print (Form)";
8284            case PRINTOPER: return "Print (Operator)";
8285            case NULL: return null;
8286            default: return "?";
8287          }
8288        }
8289    }
8290
8291  public static class NoteTypeEnumFactory implements EnumFactory<NoteType> {
8292    public NoteType fromCode(String codeString) throws IllegalArgumentException {
8293      if (codeString == null || "".equals(codeString))
8294            if (codeString == null || "".equals(codeString))
8295                return null;
8296        if ("display".equals(codeString))
8297          return NoteType.DISPLAY;
8298        if ("print".equals(codeString))
8299          return NoteType.PRINT;
8300        if ("printoper".equals(codeString))
8301          return NoteType.PRINTOPER;
8302        throw new IllegalArgumentException("Unknown NoteType code '"+codeString+"'");
8303        }
8304        public Enumeration<NoteType> fromType(Base code) throws FHIRException {
8305          if (code == null)
8306            return null;
8307          if (code.isEmpty())
8308            return new Enumeration<NoteType>(this);
8309          String codeString = ((PrimitiveType) code).asStringValue();
8310          if (codeString == null || "".equals(codeString))
8311            return null;
8312        if ("display".equals(codeString))
8313          return new Enumeration<NoteType>(this, NoteType.DISPLAY);
8314        if ("print".equals(codeString))
8315          return new Enumeration<NoteType>(this, NoteType.PRINT);
8316        if ("printoper".equals(codeString))
8317          return new Enumeration<NoteType>(this, NoteType.PRINTOPER);
8318        throw new FHIRException("Unknown NoteType code '"+codeString+"'");
8319        }
8320    public String toCode(NoteType code) {
8321      if (code == NoteType.DISPLAY)
8322        return "display";
8323      if (code == NoteType.PRINT)
8324        return "print";
8325      if (code == NoteType.PRINTOPER)
8326        return "printoper";
8327      return "?";
8328      }
8329    public String toSystem(NoteType code) {
8330      return code.getSystem();
8331      }
8332    }
8333
8334    public enum ObservationStatus {
8335        /**
8336         * The existence of the observation is registered, but there is no result yet available.
8337         */
8338        REGISTERED, 
8339        /**
8340         * This is an initial or interim observation: data may be incomplete or unverified.
8341         */
8342        PRELIMINARY, 
8343        /**
8344         * 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.
8345         */
8346        FINAL, 
8347        /**
8348         * Subsequent to being Final, the observation has been modified subsequent.  This includes updates/new information and corrections.
8349         */
8350        AMENDED, 
8351        /**
8352         * Subsequent to being Final, the observation has been modified to correct an error in the test result.
8353         */
8354        CORRECTED, 
8355        /**
8356         * The observation is unavailable because the measurement was not started or not completed (also sometimes called "aborted").
8357         */
8358        CANCELLED, 
8359        /**
8360         * 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".).
8361         */
8362        ENTEREDINERROR, 
8363        /**
8364         * 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.
8365         */
8366        UNKNOWN, 
8367        /**
8368         * added to help the parsers
8369         */
8370        NULL;
8371        public static ObservationStatus fromCode(String codeString) throws FHIRException {
8372            if (codeString == null || "".equals(codeString))
8373                return null;
8374        if ("registered".equals(codeString))
8375          return REGISTERED;
8376        if ("preliminary".equals(codeString))
8377          return PRELIMINARY;
8378        if ("final".equals(codeString))
8379          return FINAL;
8380        if ("amended".equals(codeString))
8381          return AMENDED;
8382        if ("corrected".equals(codeString))
8383          return CORRECTED;
8384        if ("cancelled".equals(codeString))
8385          return CANCELLED;
8386        if ("entered-in-error".equals(codeString))
8387          return ENTEREDINERROR;
8388        if ("unknown".equals(codeString))
8389          return UNKNOWN;
8390        throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'");
8391        }
8392        public String toCode() {
8393          switch (this) {
8394            case REGISTERED: return "registered";
8395            case PRELIMINARY: return "preliminary";
8396            case FINAL: return "final";
8397            case AMENDED: return "amended";
8398            case CORRECTED: return "corrected";
8399            case CANCELLED: return "cancelled";
8400            case ENTEREDINERROR: return "entered-in-error";
8401            case UNKNOWN: return "unknown";
8402            case NULL: return null;
8403            default: return "?";
8404          }
8405        }
8406        public String getSystem() {
8407          switch (this) {
8408            case REGISTERED: return "http://hl7.org/fhir/observation-status";
8409            case PRELIMINARY: return "http://hl7.org/fhir/observation-status";
8410            case FINAL: return "http://hl7.org/fhir/observation-status";
8411            case AMENDED: return "http://hl7.org/fhir/observation-status";
8412            case CORRECTED: return "http://hl7.org/fhir/observation-status";
8413            case CANCELLED: return "http://hl7.org/fhir/observation-status";
8414            case ENTEREDINERROR: return "http://hl7.org/fhir/observation-status";
8415            case UNKNOWN: return "http://hl7.org/fhir/observation-status";
8416            case NULL: return null;
8417            default: return "?";
8418          }
8419        }
8420        public String getDefinition() {
8421          switch (this) {
8422            case REGISTERED: return "The existence of the observation is registered, but there is no result yet available.";
8423            case PRELIMINARY: return "This is an initial or interim observation: data may be incomplete or unverified.";
8424            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.";
8425            case AMENDED: return "Subsequent to being Final, the observation has been modified subsequent.  This includes updates/new information and corrections.";
8426            case CORRECTED: return "Subsequent to being Final, the observation has been modified to correct an error in the test result.";
8427            case CANCELLED: return "The observation is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\").";
8428            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\".).";
8429            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.";
8430            case NULL: return null;
8431            default: return "?";
8432          }
8433        }
8434        public String getDisplay() {
8435          switch (this) {
8436            case REGISTERED: return "Registered";
8437            case PRELIMINARY: return "Preliminary";
8438            case FINAL: return "Final";
8439            case AMENDED: return "Amended";
8440            case CORRECTED: return "Corrected";
8441            case CANCELLED: return "Cancelled";
8442            case ENTEREDINERROR: return "Entered in Error";
8443            case UNKNOWN: return "Unknown";
8444            case NULL: return null;
8445            default: return "?";
8446          }
8447        }
8448    }
8449
8450  public static class ObservationStatusEnumFactory implements EnumFactory<ObservationStatus> {
8451    public ObservationStatus fromCode(String codeString) throws IllegalArgumentException {
8452      if (codeString == null || "".equals(codeString))
8453            if (codeString == null || "".equals(codeString))
8454                return null;
8455        if ("registered".equals(codeString))
8456          return ObservationStatus.REGISTERED;
8457        if ("preliminary".equals(codeString))
8458          return ObservationStatus.PRELIMINARY;
8459        if ("final".equals(codeString))
8460          return ObservationStatus.FINAL;
8461        if ("amended".equals(codeString))
8462          return ObservationStatus.AMENDED;
8463        if ("corrected".equals(codeString))
8464          return ObservationStatus.CORRECTED;
8465        if ("cancelled".equals(codeString))
8466          return ObservationStatus.CANCELLED;
8467        if ("entered-in-error".equals(codeString))
8468          return ObservationStatus.ENTEREDINERROR;
8469        if ("unknown".equals(codeString))
8470          return ObservationStatus.UNKNOWN;
8471        throw new IllegalArgumentException("Unknown ObservationStatus code '"+codeString+"'");
8472        }
8473        public Enumeration<ObservationStatus> fromType(Base code) throws FHIRException {
8474          if (code == null)
8475            return null;
8476          if (code.isEmpty())
8477            return new Enumeration<ObservationStatus>(this);
8478          String codeString = ((PrimitiveType) code).asStringValue();
8479          if (codeString == null || "".equals(codeString))
8480            return null;
8481        if ("registered".equals(codeString))
8482          return new Enumeration<ObservationStatus>(this, ObservationStatus.REGISTERED);
8483        if ("preliminary".equals(codeString))
8484          return new Enumeration<ObservationStatus>(this, ObservationStatus.PRELIMINARY);
8485        if ("final".equals(codeString))
8486          return new Enumeration<ObservationStatus>(this, ObservationStatus.FINAL);
8487        if ("amended".equals(codeString))
8488          return new Enumeration<ObservationStatus>(this, ObservationStatus.AMENDED);
8489        if ("corrected".equals(codeString))
8490          return new Enumeration<ObservationStatus>(this, ObservationStatus.CORRECTED);
8491        if ("cancelled".equals(codeString))
8492          return new Enumeration<ObservationStatus>(this, ObservationStatus.CANCELLED);
8493        if ("entered-in-error".equals(codeString))
8494          return new Enumeration<ObservationStatus>(this, ObservationStatus.ENTEREDINERROR);
8495        if ("unknown".equals(codeString))
8496          return new Enumeration<ObservationStatus>(this, ObservationStatus.UNKNOWN);
8497        throw new FHIRException("Unknown ObservationStatus code '"+codeString+"'");
8498        }
8499    public String toCode(ObservationStatus code) {
8500      if (code == ObservationStatus.REGISTERED)
8501        return "registered";
8502      if (code == ObservationStatus.PRELIMINARY)
8503        return "preliminary";
8504      if (code == ObservationStatus.FINAL)
8505        return "final";
8506      if (code == ObservationStatus.AMENDED)
8507        return "amended";
8508      if (code == ObservationStatus.CORRECTED)
8509        return "corrected";
8510      if (code == ObservationStatus.CANCELLED)
8511        return "cancelled";
8512      if (code == ObservationStatus.ENTEREDINERROR)
8513        return "entered-in-error";
8514      if (code == ObservationStatus.UNKNOWN)
8515        return "unknown";
8516      return "?";
8517      }
8518    public String toSystem(ObservationStatus code) {
8519      return code.getSystem();
8520      }
8521    }
8522
8523    public enum OperationParameterUse {
8524        /**
8525         * This is an input parameter.
8526         */
8527        IN, 
8528        /**
8529         * This is an output parameter.
8530         */
8531        OUT, 
8532        /**
8533         * added to help the parsers
8534         */
8535        NULL;
8536        public static OperationParameterUse fromCode(String codeString) throws FHIRException {
8537            if (codeString == null || "".equals(codeString))
8538                return null;
8539        if ("in".equals(codeString))
8540          return IN;
8541        if ("out".equals(codeString))
8542          return OUT;
8543        throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'");
8544        }
8545        public String toCode() {
8546          switch (this) {
8547            case IN: return "in";
8548            case OUT: return "out";
8549            case NULL: return null;
8550            default: return "?";
8551          }
8552        }
8553        public String getSystem() {
8554          switch (this) {
8555            case IN: return "http://hl7.org/fhir/operation-parameter-use";
8556            case OUT: return "http://hl7.org/fhir/operation-parameter-use";
8557            case NULL: return null;
8558            default: return "?";
8559          }
8560        }
8561        public String getDefinition() {
8562          switch (this) {
8563            case IN: return "This is an input parameter.";
8564            case OUT: return "This is an output parameter.";
8565            case NULL: return null;
8566            default: return "?";
8567          }
8568        }
8569        public String getDisplay() {
8570          switch (this) {
8571            case IN: return "In";
8572            case OUT: return "Out";
8573            case NULL: return null;
8574            default: return "?";
8575          }
8576        }
8577    }
8578
8579  public static class OperationParameterUseEnumFactory implements EnumFactory<OperationParameterUse> {
8580    public OperationParameterUse fromCode(String codeString) throws IllegalArgumentException {
8581      if (codeString == null || "".equals(codeString))
8582            if (codeString == null || "".equals(codeString))
8583                return null;
8584        if ("in".equals(codeString))
8585          return OperationParameterUse.IN;
8586        if ("out".equals(codeString))
8587          return OperationParameterUse.OUT;
8588        throw new IllegalArgumentException("Unknown OperationParameterUse code '"+codeString+"'");
8589        }
8590        public Enumeration<OperationParameterUse> fromType(Base code) throws FHIRException {
8591          if (code == null)
8592            return null;
8593          if (code.isEmpty())
8594            return new Enumeration<OperationParameterUse>(this);
8595          String codeString = ((PrimitiveType) code).asStringValue();
8596          if (codeString == null || "".equals(codeString))
8597            return null;
8598        if ("in".equals(codeString))
8599          return new Enumeration<OperationParameterUse>(this, OperationParameterUse.IN);
8600        if ("out".equals(codeString))
8601          return new Enumeration<OperationParameterUse>(this, OperationParameterUse.OUT);
8602        throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'");
8603        }
8604    public String toCode(OperationParameterUse code) {
8605      if (code == OperationParameterUse.IN)
8606        return "in";
8607      if (code == OperationParameterUse.OUT)
8608        return "out";
8609      return "?";
8610      }
8611    public String toSystem(OperationParameterUse code) {
8612      return code.getSystem();
8613      }
8614    }
8615
8616    public enum ParticipationStatus {
8617        /**
8618         * The participant has accepted the appointment.
8619         */
8620        ACCEPTED, 
8621        /**
8622         * The participant has declined the appointment and will not participate in the appointment.
8623         */
8624        DECLINED, 
8625        /**
8626         * 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.
8627         */
8628        TENTATIVE, 
8629        /**
8630         * The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses.
8631         */
8632        NEEDSACTION, 
8633        /**
8634         * added to help the parsers
8635         */
8636        NULL;
8637        public static ParticipationStatus fromCode(String codeString) throws FHIRException {
8638            if (codeString == null || "".equals(codeString))
8639                return null;
8640        if ("accepted".equals(codeString))
8641          return ACCEPTED;
8642        if ("declined".equals(codeString))
8643          return DECLINED;
8644        if ("tentative".equals(codeString))
8645          return TENTATIVE;
8646        if ("needs-action".equals(codeString))
8647          return NEEDSACTION;
8648        throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'");
8649        }
8650        public String toCode() {
8651          switch (this) {
8652            case ACCEPTED: return "accepted";
8653            case DECLINED: return "declined";
8654            case TENTATIVE: return "tentative";
8655            case NEEDSACTION: return "needs-action";
8656            case NULL: return null;
8657            default: return "?";
8658          }
8659        }
8660        public String getSystem() {
8661          switch (this) {
8662            case ACCEPTED: return "http://hl7.org/fhir/participationstatus";
8663            case DECLINED: return "http://hl7.org/fhir/participationstatus";
8664            case TENTATIVE: return "http://hl7.org/fhir/participationstatus";
8665            case NEEDSACTION: return "http://hl7.org/fhir/participationstatus";
8666            case NULL: return null;
8667            default: return "?";
8668          }
8669        }
8670        public String getDefinition() {
8671          switch (this) {
8672            case ACCEPTED: return "The participant has accepted the appointment.";
8673            case DECLINED: return "The participant has declined the appointment and will not participate in the appointment.";
8674            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.";
8675            case NEEDSACTION: return "The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses.";
8676            case NULL: return null;
8677            default: return "?";
8678          }
8679        }
8680        public String getDisplay() {
8681          switch (this) {
8682            case ACCEPTED: return "Accepted";
8683            case DECLINED: return "Declined";
8684            case TENTATIVE: return "Tentative";
8685            case NEEDSACTION: return "Needs Action";
8686            case NULL: return null;
8687            default: return "?";
8688          }
8689        }
8690    }
8691
8692  public static class ParticipationStatusEnumFactory implements EnumFactory<ParticipationStatus> {
8693    public ParticipationStatus fromCode(String codeString) throws IllegalArgumentException {
8694      if (codeString == null || "".equals(codeString))
8695            if (codeString == null || "".equals(codeString))
8696                return null;
8697        if ("accepted".equals(codeString))
8698          return ParticipationStatus.ACCEPTED;
8699        if ("declined".equals(codeString))
8700          return ParticipationStatus.DECLINED;
8701        if ("tentative".equals(codeString))
8702          return ParticipationStatus.TENTATIVE;
8703        if ("needs-action".equals(codeString))
8704          return ParticipationStatus.NEEDSACTION;
8705        throw new IllegalArgumentException("Unknown ParticipationStatus code '"+codeString+"'");
8706        }
8707        public Enumeration<ParticipationStatus> fromType(Base code) throws FHIRException {
8708          if (code == null)
8709            return null;
8710          if (code.isEmpty())
8711            return new Enumeration<ParticipationStatus>(this);
8712          String codeString = ((PrimitiveType) code).asStringValue();
8713          if (codeString == null || "".equals(codeString))
8714            return null;
8715        if ("accepted".equals(codeString))
8716          return new Enumeration<ParticipationStatus>(this, ParticipationStatus.ACCEPTED);
8717        if ("declined".equals(codeString))
8718          return new Enumeration<ParticipationStatus>(this, ParticipationStatus.DECLINED);
8719        if ("tentative".equals(codeString))
8720          return new Enumeration<ParticipationStatus>(this, ParticipationStatus.TENTATIVE);
8721        if ("needs-action".equals(codeString))
8722          return new Enumeration<ParticipationStatus>(this, ParticipationStatus.NEEDSACTION);
8723        throw new FHIRException("Unknown ParticipationStatus code '"+codeString+"'");
8724        }
8725    public String toCode(ParticipationStatus code) {
8726      if (code == ParticipationStatus.ACCEPTED)
8727        return "accepted";
8728      if (code == ParticipationStatus.DECLINED)
8729