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