001package org.hl7.fhir.r4.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Thu, Dec 27, 2018 10:06-0500 for FHIR v4.0.0
033
034
035import org.hl7.fhir.instance.model.api.*;
036import org.hl7.fhir.exceptions.FHIRException;
037
038public class Enumerations {
039
040// In here: 
041//   AbstractType: A list of the base types defined by this version of the FHIR specification - types that are defined, but for which only specializations actually are created.
042//   AdministrativeGender: The gender of a person used for administrative purposes.
043//   AgeUnits: A valueSet of UCUM codes for representing age value units.
044//   BindingStrength: Indication of the degree of conformance expectations associated with a binding.
045//   ConceptMapEquivalence: The degree of equivalence between concepts.
046//   DataAbsentReason: Used to specify why the normally expected content of the data element is missing.
047//   DataType: A version specific list of the data types defined by the FHIR specification for use as an element  type (any of the FHIR defined data types).
048//   DefinitionResourceType: A list of all the definition resource types defined in this version of the FHIR specification.
049//   DocumentReferenceStatus: The status of the document reference.
050//   EventResourceType: A list of all the event resource types defined in this version of the FHIR specification.
051//   FHIRAllTypes: A list of all the concrete types defined in this version of the FHIR specification - Abstract Types, Data Types and Resource Types.
052//   FHIRDefinedType: A list of all the concrete types defined in this version of the FHIR specification - Data Types and Resource Types.
053//   FHIRVersion: All published FHIR Versions.
054//   KnowledgeResourceType: A list of all the knowledge resource types defined in this version of the FHIR specification.
055//   MessageEvent: One of the message events defined as part of this version of FHIR.
056//   NoteType: The presentation types of notes.
057//   PublicationStatus: The lifecycle status of an artifact.
058//   RemittanceOutcome: The outcome of the processing.
059//   RequestResourceType: A list of all the request resource types defined in this version of the FHIR specification.
060//   ResourceType: One of the resource types defined as part of this version of FHIR.
061//   SearchParamType: Data types allowed to be used for search parameters.
062//   SpecialValues: A set of generally useful codes defined so they can be included in value sets.
063
064
065    public enum AbstractType {
066        /**
067         * A place holder that means any kind of data type
068         */
069        TYPE, 
070        /**
071         * A place holder that means any kind of resource
072         */
073        ANY, 
074        /**
075         * added to help the parsers
076         */
077        NULL;
078        public static AbstractType fromCode(String codeString) throws FHIRException {
079            if (codeString == null || "".equals(codeString))
080                return null;
081        if ("Type".equals(codeString))
082          return TYPE;
083        if ("Any".equals(codeString))
084          return ANY;
085        throw new FHIRException("Unknown AbstractType code '"+codeString+"'");
086        }
087        public String toCode() {
088          switch (this) {
089            case TYPE: return "Type";
090            case ANY: return "Any";
091            default: return "?";
092          }
093        }
094        public String getSystem() {
095          switch (this) {
096            case TYPE: return "http://hl7.org/fhir/abstract-types";
097            case ANY: return "http://hl7.org/fhir/abstract-types";
098            default: return "?";
099          }
100        }
101        public String getDefinition() {
102          switch (this) {
103            case TYPE: return "A place holder that means any kind of data type";
104            case ANY: return "A place holder that means any kind of resource";
105            default: return "?";
106          }
107        }
108        public String getDisplay() {
109          switch (this) {
110            case TYPE: return "Type";
111            case ANY: return "Any";
112            default: return "?";
113          }
114        }
115    }
116
117  public static class AbstractTypeEnumFactory implements EnumFactory<AbstractType> {
118    public AbstractType fromCode(String codeString) throws IllegalArgumentException {
119      if (codeString == null || "".equals(codeString))
120            if (codeString == null || "".equals(codeString))
121                return null;
122        if ("Type".equals(codeString))
123          return AbstractType.TYPE;
124        if ("Any".equals(codeString))
125          return AbstractType.ANY;
126        throw new IllegalArgumentException("Unknown AbstractType code '"+codeString+"'");
127        }
128        public Enumeration<AbstractType> fromType(Base code) throws FHIRException {
129          if (code == null)
130            return null;
131          if (code.isEmpty())
132            return new Enumeration<AbstractType>(this);
133          String codeString = ((PrimitiveType) code).asStringValue();
134          if (codeString == null || "".equals(codeString))
135            return null;
136        if ("Type".equals(codeString))
137          return new Enumeration<AbstractType>(this, AbstractType.TYPE);
138        if ("Any".equals(codeString))
139          return new Enumeration<AbstractType>(this, AbstractType.ANY);
140        throw new FHIRException("Unknown AbstractType code '"+codeString+"'");
141        }
142    public String toCode(AbstractType code) {
143      if (code == AbstractType.TYPE)
144        return "Type";
145      if (code == AbstractType.ANY)
146        return "Any";
147      return "?";
148      }
149    public String toSystem(AbstractType code) {
150      return code.getSystem();
151      }
152    }
153
154    public enum AdministrativeGender {
155        /**
156         * Male.
157         */
158        MALE, 
159        /**
160         * Female.
161         */
162        FEMALE, 
163        /**
164         * Other.
165         */
166        OTHER, 
167        /**
168         * Unknown.
169         */
170        UNKNOWN, 
171        /**
172         * added to help the parsers
173         */
174        NULL;
175        public static AdministrativeGender fromCode(String codeString) throws FHIRException {
176            if (codeString == null || "".equals(codeString))
177                return null;
178        if ("male".equals(codeString))
179          return MALE;
180        if ("female".equals(codeString))
181          return FEMALE;
182        if ("other".equals(codeString))
183          return OTHER;
184        if ("unknown".equals(codeString))
185          return UNKNOWN;
186        throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'");
187        }
188        public String toCode() {
189          switch (this) {
190            case MALE: return "male";
191            case FEMALE: return "female";
192            case OTHER: return "other";
193            case UNKNOWN: return "unknown";
194            default: return "?";
195          }
196        }
197        public String getSystem() {
198          switch (this) {
199            case MALE: return "http://hl7.org/fhir/administrative-gender";
200            case FEMALE: return "http://hl7.org/fhir/administrative-gender";
201            case OTHER: return "http://hl7.org/fhir/administrative-gender";
202            case UNKNOWN: return "http://hl7.org/fhir/administrative-gender";
203            default: return "?";
204          }
205        }
206        public String getDefinition() {
207          switch (this) {
208            case MALE: return "Male.";
209            case FEMALE: return "Female.";
210            case OTHER: return "Other.";
211            case UNKNOWN: return "Unknown.";
212            default: return "?";
213          }
214        }
215        public String getDisplay() {
216          switch (this) {
217            case MALE: return "Male";
218            case FEMALE: return "Female";
219            case OTHER: return "Other";
220            case UNKNOWN: return "Unknown";
221            default: return "?";
222          }
223        }
224    }
225
226  public static class AdministrativeGenderEnumFactory implements EnumFactory<AdministrativeGender> {
227    public AdministrativeGender fromCode(String codeString) throws IllegalArgumentException {
228      if (codeString == null || "".equals(codeString))
229            if (codeString == null || "".equals(codeString))
230                return null;
231        if ("male".equals(codeString))
232          return AdministrativeGender.MALE;
233        if ("female".equals(codeString))
234          return AdministrativeGender.FEMALE;
235        if ("other".equals(codeString))
236          return AdministrativeGender.OTHER;
237        if ("unknown".equals(codeString))
238          return AdministrativeGender.UNKNOWN;
239        throw new IllegalArgumentException("Unknown AdministrativeGender code '"+codeString+"'");
240        }
241        public Enumeration<AdministrativeGender> fromType(Base code) throws FHIRException {
242          if (code == null)
243            return null;
244          if (code.isEmpty())
245            return new Enumeration<AdministrativeGender>(this);
246          String codeString = ((PrimitiveType) code).asStringValue();
247          if (codeString == null || "".equals(codeString))
248            return null;
249        if ("male".equals(codeString))
250          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.MALE);
251        if ("female".equals(codeString))
252          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.FEMALE);
253        if ("other".equals(codeString))
254          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.OTHER);
255        if ("unknown".equals(codeString))
256          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.UNKNOWN);
257        throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'");
258        }
259    public String toCode(AdministrativeGender code) {
260      if (code == AdministrativeGender.MALE)
261        return "male";
262      if (code == AdministrativeGender.FEMALE)
263        return "female";
264      if (code == AdministrativeGender.OTHER)
265        return "other";
266      if (code == AdministrativeGender.UNKNOWN)
267        return "unknown";
268      return "?";
269      }
270    public String toSystem(AdministrativeGender code) {
271      return code.getSystem();
272      }
273    }
274
275    public enum AgeUnits {
276        /**
277         * null
278         */
279        MIN, 
280        /**
281         * null
282         */
283        H, 
284        /**
285         * null
286         */
287        D, 
288        /**
289         * null
290         */
291        WK, 
292        /**
293         * null
294         */
295        MO, 
296        /**
297         * null
298         */
299        A, 
300        /**
301         * added to help the parsers
302         */
303        NULL;
304        public static AgeUnits fromCode(String codeString) throws FHIRException {
305            if (codeString == null || "".equals(codeString))
306                return null;
307        if ("min".equals(codeString))
308          return MIN;
309        if ("h".equals(codeString))
310          return H;
311        if ("d".equals(codeString))
312          return D;
313        if ("wk".equals(codeString))
314          return WK;
315        if ("mo".equals(codeString))
316          return MO;
317        if ("a".equals(codeString))
318          return A;
319        throw new FHIRException("Unknown AgeUnits code '"+codeString+"'");
320        }
321        public String toCode() {
322          switch (this) {
323            case MIN: return "min";
324            case H: return "h";
325            case D: return "d";
326            case WK: return "wk";
327            case MO: return "mo";
328            case A: return "a";
329            default: return "?";
330          }
331        }
332        public String getSystem() {
333          switch (this) {
334            case MIN: return "http://unitsofmeasure.org";
335            case H: return "http://unitsofmeasure.org";
336            case D: return "http://unitsofmeasure.org";
337            case WK: return "http://unitsofmeasure.org";
338            case MO: return "http://unitsofmeasure.org";
339            case A: return "http://unitsofmeasure.org";
340            default: return "?";
341          }
342        }
343        public String getDefinition() {
344          switch (this) {
345            case MIN: return "";
346            case H: return "";
347            case D: return "";
348            case WK: return "";
349            case MO: return "";
350            case A: return "";
351            default: return "?";
352          }
353        }
354        public String getDisplay() {
355          switch (this) {
356            case MIN: return "Minute";
357            case H: return "Hour";
358            case D: return "Day";
359            case WK: return "Week";
360            case MO: return "Month";
361            case A: return "Year";
362            default: return "?";
363          }
364        }
365    }
366
367  public static class AgeUnitsEnumFactory implements EnumFactory<AgeUnits> {
368    public AgeUnits fromCode(String codeString) throws IllegalArgumentException {
369      if (codeString == null || "".equals(codeString))
370            if (codeString == null || "".equals(codeString))
371                return null;
372        if ("min".equals(codeString))
373          return AgeUnits.MIN;
374        if ("h".equals(codeString))
375          return AgeUnits.H;
376        if ("d".equals(codeString))
377          return AgeUnits.D;
378        if ("wk".equals(codeString))
379          return AgeUnits.WK;
380        if ("mo".equals(codeString))
381          return AgeUnits.MO;
382        if ("a".equals(codeString))
383          return AgeUnits.A;
384        throw new IllegalArgumentException("Unknown AgeUnits code '"+codeString+"'");
385        }
386        public Enumeration<AgeUnits> fromType(Base code) throws FHIRException {
387          if (code == null)
388            return null;
389          if (code.isEmpty())
390            return new Enumeration<AgeUnits>(this);
391          String codeString = ((PrimitiveType) code).asStringValue();
392          if (codeString == null || "".equals(codeString))
393            return null;
394        if ("min".equals(codeString))
395          return new Enumeration<AgeUnits>(this, AgeUnits.MIN);
396        if ("h".equals(codeString))
397          return new Enumeration<AgeUnits>(this, AgeUnits.H);
398        if ("d".equals(codeString))
399          return new Enumeration<AgeUnits>(this, AgeUnits.D);
400        if ("wk".equals(codeString))
401          return new Enumeration<AgeUnits>(this, AgeUnits.WK);
402        if ("mo".equals(codeString))
403          return new Enumeration<AgeUnits>(this, AgeUnits.MO);
404        if ("a".equals(codeString))
405          return new Enumeration<AgeUnits>(this, AgeUnits.A);
406        throw new FHIRException("Unknown AgeUnits code '"+codeString+"'");
407        }
408    public String toCode(AgeUnits code) {
409      if (code == AgeUnits.MIN)
410        return "min";
411      if (code == AgeUnits.H)
412        return "h";
413      if (code == AgeUnits.D)
414        return "d";
415      if (code == AgeUnits.WK)
416        return "wk";
417      if (code == AgeUnits.MO)
418        return "mo";
419      if (code == AgeUnits.A)
420        return "a";
421      return "?";
422      }
423    public String toSystem(AgeUnits code) {
424      return code.getSystem();
425      }
426    }
427
428    public enum BindingStrength {
429        /**
430         * To be conformant, the concept in this element SHALL be from the specified value set.
431         */
432        REQUIRED, 
433        /**
434         * 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.
435         */
436        EXTENSIBLE, 
437        /**
438         * Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant.
439         */
440        PREFERRED, 
441        /**
442         * 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.
443         */
444        EXAMPLE, 
445        /**
446         * added to help the parsers
447         */
448        NULL;
449        public static BindingStrength fromCode(String codeString) throws FHIRException {
450            if (codeString == null || "".equals(codeString))
451                return null;
452        if ("required".equals(codeString))
453          return REQUIRED;
454        if ("extensible".equals(codeString))
455          return EXTENSIBLE;
456        if ("preferred".equals(codeString))
457          return PREFERRED;
458        if ("example".equals(codeString))
459          return EXAMPLE;
460        throw new FHIRException("Unknown BindingStrength code '"+codeString+"'");
461        }
462        public String toCode() {
463          switch (this) {
464            case REQUIRED: return "required";
465            case EXTENSIBLE: return "extensible";
466            case PREFERRED: return "preferred";
467            case EXAMPLE: return "example";
468            default: return "?";
469          }
470        }
471        public String getSystem() {
472          switch (this) {
473            case REQUIRED: return "http://hl7.org/fhir/binding-strength";
474            case EXTENSIBLE: return "http://hl7.org/fhir/binding-strength";
475            case PREFERRED: return "http://hl7.org/fhir/binding-strength";
476            case EXAMPLE: return "http://hl7.org/fhir/binding-strength";
477            default: return "?";
478          }
479        }
480        public String getDefinition() {
481          switch (this) {
482            case REQUIRED: return "To be conformant, the concept in this element SHALL be from the specified value set.";
483            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.";
484            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.";
485            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.";
486            default: return "?";
487          }
488        }
489        public String getDisplay() {
490          switch (this) {
491            case REQUIRED: return "Required";
492            case EXTENSIBLE: return "Extensible";
493            case PREFERRED: return "Preferred";
494            case EXAMPLE: return "Example";
495            default: return "?";
496          }
497        }
498    }
499
500  public static class BindingStrengthEnumFactory implements EnumFactory<BindingStrength> {
501    public BindingStrength fromCode(String codeString) throws IllegalArgumentException {
502      if (codeString == null || "".equals(codeString))
503            if (codeString == null || "".equals(codeString))
504                return null;
505        if ("required".equals(codeString))
506          return BindingStrength.REQUIRED;
507        if ("extensible".equals(codeString))
508          return BindingStrength.EXTENSIBLE;
509        if ("preferred".equals(codeString))
510          return BindingStrength.PREFERRED;
511        if ("example".equals(codeString))
512          return BindingStrength.EXAMPLE;
513        throw new IllegalArgumentException("Unknown BindingStrength code '"+codeString+"'");
514        }
515        public Enumeration<BindingStrength> fromType(Base code) throws FHIRException {
516          if (code == null)
517            return null;
518          if (code.isEmpty())
519            return new Enumeration<BindingStrength>(this);
520          String codeString = ((PrimitiveType) code).asStringValue();
521          if (codeString == null || "".equals(codeString))
522            return null;
523        if ("required".equals(codeString))
524          return new Enumeration<BindingStrength>(this, BindingStrength.REQUIRED);
525        if ("extensible".equals(codeString))
526          return new Enumeration<BindingStrength>(this, BindingStrength.EXTENSIBLE);
527        if ("preferred".equals(codeString))
528          return new Enumeration<BindingStrength>(this, BindingStrength.PREFERRED);
529        if ("example".equals(codeString))
530          return new Enumeration<BindingStrength>(this, BindingStrength.EXAMPLE);
531        throw new FHIRException("Unknown BindingStrength code '"+codeString+"'");
532        }
533    public String toCode(BindingStrength code) {
534      if (code == BindingStrength.REQUIRED)
535        return "required";
536      if (code == BindingStrength.EXTENSIBLE)
537        return "extensible";
538      if (code == BindingStrength.PREFERRED)
539        return "preferred";
540      if (code == BindingStrength.EXAMPLE)
541        return "example";
542      return "?";
543      }
544    public String toSystem(BindingStrength code) {
545      return code.getSystem();
546      }
547    }
548
549    public enum ConceptMapEquivalence {
550        /**
551         * The concepts are related to each other, and have at least some overlap in meaning, but the exact relationship is not known.
552         */
553        RELATEDTO, 
554        /**
555         * The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical).
556         */
557        EQUIVALENT, 
558        /**
559         * The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identical or irrelevant (i.e. intentionally identical).
560         */
561        EQUAL, 
562        /**
563         * The target mapping is wider in meaning than the source concept.
564         */
565        WIDER, 
566        /**
567         * The target mapping subsumes the meaning of the source concept (e.g. the source is-a target).
568         */
569        SUBSUMES, 
570        /**
571         * The target mapping is narrower in meaning than the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.
572         */
573        NARROWER, 
574        /**
575         * The target mapping specializes the meaning of the source concept (e.g. the target is-a source).
576         */
577        SPECIALIZES, 
578        /**
579         * The target mapping overlaps with the source concept, but both source and target cover additional meaning, or the definitions are imprecise and it is uncertain whether they have the same boundaries to their meaning. The sense in which the mapping is inexact SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.
580         */
581        INEXACT, 
582        /**
583         * There is no match for this concept in the target code system.
584         */
585        UNMATCHED, 
586        /**
587         * This is an explicit assertion that there is no mapping between the source and target concept.
588         */
589        DISJOINT, 
590        /**
591         * added to help the parsers
592         */
593        NULL;
594        public static ConceptMapEquivalence fromCode(String codeString) throws FHIRException {
595            if (codeString == null || "".equals(codeString))
596                return null;
597        if ("relatedto".equals(codeString))
598          return RELATEDTO;
599        if ("equivalent".equals(codeString))
600          return EQUIVALENT;
601        if ("equal".equals(codeString))
602          return EQUAL;
603        if ("wider".equals(codeString))
604          return WIDER;
605        if ("subsumes".equals(codeString))
606          return SUBSUMES;
607        if ("narrower".equals(codeString))
608          return NARROWER;
609        if ("specializes".equals(codeString))
610          return SPECIALIZES;
611        if ("inexact".equals(codeString))
612          return INEXACT;
613        if ("unmatched".equals(codeString))
614          return UNMATCHED;
615        if ("disjoint".equals(codeString))
616          return DISJOINT;
617        throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'");
618        }
619        public String toCode() {
620          switch (this) {
621            case RELATEDTO: return "relatedto";
622            case EQUIVALENT: return "equivalent";
623            case EQUAL: return "equal";
624            case WIDER: return "wider";
625            case SUBSUMES: return "subsumes";
626            case NARROWER: return "narrower";
627            case SPECIALIZES: return "specializes";
628            case INEXACT: return "inexact";
629            case UNMATCHED: return "unmatched";
630            case DISJOINT: return "disjoint";
631            default: return "?";
632          }
633        }
634        public String getSystem() {
635          switch (this) {
636            case RELATEDTO: return "http://hl7.org/fhir/concept-map-equivalence";
637            case EQUIVALENT: return "http://hl7.org/fhir/concept-map-equivalence";
638            case EQUAL: return "http://hl7.org/fhir/concept-map-equivalence";
639            case WIDER: return "http://hl7.org/fhir/concept-map-equivalence";
640            case SUBSUMES: return "http://hl7.org/fhir/concept-map-equivalence";
641            case NARROWER: return "http://hl7.org/fhir/concept-map-equivalence";
642            case SPECIALIZES: return "http://hl7.org/fhir/concept-map-equivalence";
643            case INEXACT: return "http://hl7.org/fhir/concept-map-equivalence";
644            case UNMATCHED: return "http://hl7.org/fhir/concept-map-equivalence";
645            case DISJOINT: return "http://hl7.org/fhir/concept-map-equivalence";
646            default: return "?";
647          }
648        }
649        public String getDefinition() {
650          switch (this) {
651            case RELATEDTO: return "The concepts are related to each other, and have at least some overlap in meaning, but the exact relationship is not known.";
652            case EQUIVALENT: return "The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical).";
653            case EQUAL: return "The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identical or irrelevant (i.e. intentionally identical).";
654            case WIDER: return "The target mapping is wider in meaning than the source concept.";
655            case SUBSUMES: return "The target mapping subsumes the meaning of the source concept (e.g. the source is-a target).";
656            case NARROWER: return "The target mapping is narrower in meaning than the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.";
657            case SPECIALIZES: return "The target mapping specializes the meaning of the source concept (e.g. the target is-a source).";
658            case INEXACT: return "The target mapping overlaps with the source concept, but both source and target cover additional meaning, or the definitions are imprecise and it is uncertain whether they have the same boundaries to their meaning. The sense in which the mapping is inexact SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.";
659            case UNMATCHED: return "There is no match for this concept in the target code system.";
660            case DISJOINT: return "This is an explicit assertion that there is no mapping between the source and target concept.";
661            default: return "?";
662          }
663        }
664        public String getDisplay() {
665          switch (this) {
666            case RELATEDTO: return "Related To";
667            case EQUIVALENT: return "Equivalent";
668            case EQUAL: return "Equal";
669            case WIDER: return "Wider";
670            case SUBSUMES: return "Subsumes";
671            case NARROWER: return "Narrower";
672            case SPECIALIZES: return "Specializes";
673            case INEXACT: return "Inexact";
674            case UNMATCHED: return "Unmatched";
675            case DISJOINT: return "Disjoint";
676            default: return "?";
677          }
678        }
679    }
680
681  public static class ConceptMapEquivalenceEnumFactory implements EnumFactory<ConceptMapEquivalence> {
682    public ConceptMapEquivalence fromCode(String codeString) throws IllegalArgumentException {
683      if (codeString == null || "".equals(codeString))
684            if (codeString == null || "".equals(codeString))
685                return null;
686        if ("relatedto".equals(codeString))
687          return ConceptMapEquivalence.RELATEDTO;
688        if ("equivalent".equals(codeString))
689          return ConceptMapEquivalence.EQUIVALENT;
690        if ("equal".equals(codeString))
691          return ConceptMapEquivalence.EQUAL;
692        if ("wider".equals(codeString))
693          return ConceptMapEquivalence.WIDER;
694        if ("subsumes".equals(codeString))
695          return ConceptMapEquivalence.SUBSUMES;
696        if ("narrower".equals(codeString))
697          return ConceptMapEquivalence.NARROWER;
698        if ("specializes".equals(codeString))
699          return ConceptMapEquivalence.SPECIALIZES;
700        if ("inexact".equals(codeString))
701          return ConceptMapEquivalence.INEXACT;
702        if ("unmatched".equals(codeString))
703          return ConceptMapEquivalence.UNMATCHED;
704        if ("disjoint".equals(codeString))
705          return ConceptMapEquivalence.DISJOINT;
706        throw new IllegalArgumentException("Unknown ConceptMapEquivalence code '"+codeString+"'");
707        }
708        public Enumeration<ConceptMapEquivalence> fromType(Base code) throws FHIRException {
709          if (code == null)
710            return null;
711          if (code.isEmpty())
712            return new Enumeration<ConceptMapEquivalence>(this);
713          String codeString = ((PrimitiveType) code).asStringValue();
714          if (codeString == null || "".equals(codeString))
715            return null;
716        if ("relatedto".equals(codeString))
717          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.RELATEDTO);
718        if ("equivalent".equals(codeString))
719          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.EQUIVALENT);
720        if ("equal".equals(codeString))
721          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.EQUAL);
722        if ("wider".equals(codeString))
723          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.WIDER);
724        if ("subsumes".equals(codeString))
725          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.SUBSUMES);
726        if ("narrower".equals(codeString))
727          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.NARROWER);
728        if ("specializes".equals(codeString))
729          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.SPECIALIZES);
730        if ("inexact".equals(codeString))
731          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.INEXACT);
732        if ("unmatched".equals(codeString))
733          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.UNMATCHED);
734        if ("disjoint".equals(codeString))
735          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.DISJOINT);
736        throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'");
737        }
738    public String toCode(ConceptMapEquivalence code) {
739      if (code == ConceptMapEquivalence.RELATEDTO)
740        return "relatedto";
741      if (code == ConceptMapEquivalence.EQUIVALENT)
742        return "equivalent";
743      if (code == ConceptMapEquivalence.EQUAL)
744        return "equal";
745      if (code == ConceptMapEquivalence.WIDER)
746        return "wider";
747      if (code == ConceptMapEquivalence.SUBSUMES)
748        return "subsumes";
749      if (code == ConceptMapEquivalence.NARROWER)
750        return "narrower";
751      if (code == ConceptMapEquivalence.SPECIALIZES)
752        return "specializes";
753      if (code == ConceptMapEquivalence.INEXACT)
754        return "inexact";
755      if (code == ConceptMapEquivalence.UNMATCHED)
756        return "unmatched";
757      if (code == ConceptMapEquivalence.DISJOINT)
758        return "disjoint";
759      return "?";
760      }
761    public String toSystem(ConceptMapEquivalence code) {
762      return code.getSystem();
763      }
764    }
765
766    public enum DataAbsentReason {
767        /**
768         * The value is expected to exist but is not known.
769         */
770        UNKNOWN, 
771        /**
772         * The source was asked but does not know the value.
773         */
774        ASKEDUNKNOWN, 
775        /**
776         * There is reason to expect (from the workflow) that the value may become known.
777         */
778        TEMPUNKNOWN, 
779        /**
780         * The workflow didn't lead to this value being known.
781         */
782        NOTASKED, 
783        /**
784         * The source was asked but declined to answer.
785         */
786        ASKEDDECLINED, 
787        /**
788         * The information is not available due to security, privacy or related reasons.
789         */
790        MASKED, 
791        /**
792         * There is no proper value for this element (e.g. last menstrual period for a male).
793         */
794        NOTAPPLICABLE, 
795        /**
796         * The source system wasn't capable of supporting this element.
797         */
798        UNSUPPORTED, 
799        /**
800         * The content of the data is represented in the resource narrative.
801         */
802        ASTEXT, 
803        /**
804         * Some system or workflow process error means that the information is not available.
805         */
806        ERROR, 
807        /**
808         * The numeric value is undefined or unrepresentable due to a floating point processing error.
809         */
810        NOTANUMBER, 
811        /**
812         * The numeric value is excessively low and unrepresentable due to a floating point processing error.
813         */
814        NEGATIVEINFINITY, 
815        /**
816         * The numeric value is excessively high and unrepresentable due to a floating point processing error.
817         */
818        POSITIVEINFINITY, 
819        /**
820         * The value is not available because the observation procedure (test, etc.) was not performed.
821         */
822        NOTPERFORMED, 
823        /**
824         * The value is not permitted in this context (e.g. due to profiles, or the base data types).
825         */
826        NOTPERMITTED, 
827        /**
828         * added to help the parsers
829         */
830        NULL;
831        public static DataAbsentReason fromCode(String codeString) throws FHIRException {
832            if (codeString == null || "".equals(codeString))
833                return null;
834        if ("unknown".equals(codeString))
835          return UNKNOWN;
836        if ("asked-unknown".equals(codeString))
837          return ASKEDUNKNOWN;
838        if ("temp-unknown".equals(codeString))
839          return TEMPUNKNOWN;
840        if ("not-asked".equals(codeString))
841          return NOTASKED;
842        if ("asked-declined".equals(codeString))
843          return ASKEDDECLINED;
844        if ("masked".equals(codeString))
845          return MASKED;
846        if ("not-applicable".equals(codeString))
847          return NOTAPPLICABLE;
848        if ("unsupported".equals(codeString))
849          return UNSUPPORTED;
850        if ("as-text".equals(codeString))
851          return ASTEXT;
852        if ("error".equals(codeString))
853          return ERROR;
854        if ("not-a-number".equals(codeString))
855          return NOTANUMBER;
856        if ("negative-infinity".equals(codeString))
857          return NEGATIVEINFINITY;
858        if ("positive-infinity".equals(codeString))
859          return POSITIVEINFINITY;
860        if ("not-performed".equals(codeString))
861          return NOTPERFORMED;
862        if ("not-permitted".equals(codeString))
863          return NOTPERMITTED;
864        throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'");
865        }
866        public String toCode() {
867          switch (this) {
868            case UNKNOWN: return "unknown";
869            case ASKEDUNKNOWN: return "asked-unknown";
870            case TEMPUNKNOWN: return "temp-unknown";
871            case NOTASKED: return "not-asked";
872            case ASKEDDECLINED: return "asked-declined";
873            case MASKED: return "masked";
874            case NOTAPPLICABLE: return "not-applicable";
875            case UNSUPPORTED: return "unsupported";
876            case ASTEXT: return "as-text";
877            case ERROR: return "error";
878            case NOTANUMBER: return "not-a-number";
879            case NEGATIVEINFINITY: return "negative-infinity";
880            case POSITIVEINFINITY: return "positive-infinity";
881            case NOTPERFORMED: return "not-performed";
882            case NOTPERMITTED: return "not-permitted";
883            default: return "?";
884          }
885        }
886        public String getSystem() {
887          switch (this) {
888            case UNKNOWN: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
889            case ASKEDUNKNOWN: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
890            case TEMPUNKNOWN: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
891            case NOTASKED: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
892            case ASKEDDECLINED: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
893            case MASKED: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
894            case NOTAPPLICABLE: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
895            case UNSUPPORTED: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
896            case ASTEXT: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
897            case ERROR: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
898            case NOTANUMBER: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
899            case NEGATIVEINFINITY: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
900            case POSITIVEINFINITY: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
901            case NOTPERFORMED: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
902            case NOTPERMITTED: return "http://terminology.hl7.org/CodeSystem/data-absent-reason";
903            default: return "?";
904          }
905        }
906        public String getDefinition() {
907          switch (this) {
908            case UNKNOWN: return "The value is expected to exist but is not known.";
909            case ASKEDUNKNOWN: return "The source was asked but does not know the value.";
910            case TEMPUNKNOWN: return "There is reason to expect (from the workflow) that the value may become known.";
911            case NOTASKED: return "The workflow didn't lead to this value being known.";
912            case ASKEDDECLINED: return "The source was asked but declined to answer.";
913            case MASKED: return "The information is not available due to security, privacy or related reasons.";
914            case NOTAPPLICABLE: return "There is no proper value for this element (e.g. last menstrual period for a male).";
915            case UNSUPPORTED: return "The source system wasn't capable of supporting this element.";
916            case ASTEXT: return "The content of the data is represented in the resource narrative.";
917            case ERROR: return "Some system or workflow process error means that the information is not available.";
918            case NOTANUMBER: return "The numeric value is undefined or unrepresentable due to a floating point processing error.";
919            case NEGATIVEINFINITY: return "The numeric value is excessively low and unrepresentable due to a floating point processing error.";
920            case POSITIVEINFINITY: return "The numeric value is excessively high and unrepresentable due to a floating point processing error.";
921            case NOTPERFORMED: return "The value is not available because the observation procedure (test, etc.) was not performed.";
922            case NOTPERMITTED: return "The value is not permitted in this context (e.g. due to profiles, or the base data types).";
923            default: return "?";
924          }
925        }
926        public String getDisplay() {
927          switch (this) {
928            case UNKNOWN: return "Unknown";
929            case ASKEDUNKNOWN: return "Asked But Unknown";
930            case TEMPUNKNOWN: return "Temporarily Unknown";
931            case NOTASKED: return "Not Asked";
932            case ASKEDDECLINED: return "Asked But Declined";
933            case MASKED: return "Masked";
934            case NOTAPPLICABLE: return "Not Applicable";
935            case UNSUPPORTED: return "Unsupported";
936            case ASTEXT: return "As Text";
937            case ERROR: return "Error";
938            case NOTANUMBER: return "Not a Number (NaN)";
939            case NEGATIVEINFINITY: return "Negative Infinity (NINF)";
940            case POSITIVEINFINITY: return "Positive Infinity (PINF)";
941            case NOTPERFORMED: return "Not Performed";
942            case NOTPERMITTED: return "Not Permitted";
943            default: return "?";
944          }
945        }
946    }
947
948  public static class DataAbsentReasonEnumFactory implements EnumFactory<DataAbsentReason> {
949    public DataAbsentReason fromCode(String codeString) throws IllegalArgumentException {
950      if (codeString == null || "".equals(codeString))
951            if (codeString == null || "".equals(codeString))
952                return null;
953        if ("unknown".equals(codeString))
954          return DataAbsentReason.UNKNOWN;
955        if ("asked-unknown".equals(codeString))
956          return DataAbsentReason.ASKEDUNKNOWN;
957        if ("temp-unknown".equals(codeString))
958          return DataAbsentReason.TEMPUNKNOWN;
959        if ("not-asked".equals(codeString))
960          return DataAbsentReason.NOTASKED;
961        if ("asked-declined".equals(codeString))
962          return DataAbsentReason.ASKEDDECLINED;
963        if ("masked".equals(codeString))
964          return DataAbsentReason.MASKED;
965        if ("not-applicable".equals(codeString))
966          return DataAbsentReason.NOTAPPLICABLE;
967        if ("unsupported".equals(codeString))
968          return DataAbsentReason.UNSUPPORTED;
969        if ("as-text".equals(codeString))
970          return DataAbsentReason.ASTEXT;
971        if ("error".equals(codeString))
972          return DataAbsentReason.ERROR;
973        if ("not-a-number".equals(codeString))
974          return DataAbsentReason.NOTANUMBER;
975        if ("negative-infinity".equals(codeString))
976          return DataAbsentReason.NEGATIVEINFINITY;
977        if ("positive-infinity".equals(codeString))
978          return DataAbsentReason.POSITIVEINFINITY;
979        if ("not-performed".equals(codeString))
980          return DataAbsentReason.NOTPERFORMED;
981        if ("not-permitted".equals(codeString))
982          return DataAbsentReason.NOTPERMITTED;
983        throw new IllegalArgumentException("Unknown DataAbsentReason code '"+codeString+"'");
984        }
985        public Enumeration<DataAbsentReason> fromType(Base code) throws FHIRException {
986          if (code == null)
987            return null;
988          if (code.isEmpty())
989            return new Enumeration<DataAbsentReason>(this);
990          String codeString = ((PrimitiveType) code).asStringValue();
991          if (codeString == null || "".equals(codeString))
992            return null;
993        if ("unknown".equals(codeString))
994          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.UNKNOWN);
995        if ("asked-unknown".equals(codeString))
996          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.ASKEDUNKNOWN);
997        if ("temp-unknown".equals(codeString))
998          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.TEMPUNKNOWN);
999        if ("not-asked".equals(codeString))
1000          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.NOTASKED);
1001        if ("asked-declined".equals(codeString))
1002          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.ASKEDDECLINED);
1003        if ("masked".equals(codeString))
1004          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.MASKED);
1005        if ("not-applicable".equals(codeString))
1006          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.NOTAPPLICABLE);
1007        if ("unsupported".equals(codeString))
1008          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.UNSUPPORTED);
1009        if ("as-text".equals(codeString))
1010          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.ASTEXT);
1011        if ("error".equals(codeString))
1012          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.ERROR);
1013        if ("not-a-number".equals(codeString))
1014          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.NOTANUMBER);
1015        if ("negative-infinity".equals(codeString))
1016          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.NEGATIVEINFINITY);
1017        if ("positive-infinity".equals(codeString))
1018          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.POSITIVEINFINITY);
1019        if ("not-performed".equals(codeString))
1020          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.NOTPERFORMED);
1021        if ("not-permitted".equals(codeString))
1022          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.NOTPERMITTED);
1023        throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'");
1024        }
1025    public String toCode(DataAbsentReason code) {
1026      if (code == DataAbsentReason.UNKNOWN)
1027        return "unknown";
1028      if (code == DataAbsentReason.ASKEDUNKNOWN)
1029        return "asked-unknown";
1030      if (code == DataAbsentReason.TEMPUNKNOWN)
1031        return "temp-unknown";
1032      if (code == DataAbsentReason.NOTASKED)
1033        return "not-asked";
1034      if (code == DataAbsentReason.ASKEDDECLINED)
1035        return "asked-declined";
1036      if (code == DataAbsentReason.MASKED)
1037        return "masked";
1038      if (code == DataAbsentReason.NOTAPPLICABLE)
1039        return "not-applicable";
1040      if (code == DataAbsentReason.UNSUPPORTED)
1041        return "unsupported";
1042      if (code == DataAbsentReason.ASTEXT)
1043        return "as-text";
1044      if (code == DataAbsentReason.ERROR)
1045        return "error";
1046      if (code == DataAbsentReason.NOTANUMBER)
1047        return "not-a-number";
1048      if (code == DataAbsentReason.NEGATIVEINFINITY)
1049        return "negative-infinity";
1050      if (code == DataAbsentReason.POSITIVEINFINITY)
1051        return "positive-infinity";
1052      if (code == DataAbsentReason.NOTPERFORMED)
1053        return "not-performed";
1054      if (code == DataAbsentReason.NOTPERMITTED)
1055        return "not-permitted";
1056      return "?";
1057      }
1058    public String toSystem(DataAbsentReason code) {
1059      return code.getSystem();
1060      }
1061    }
1062
1063    public enum DataType {
1064        /**
1065         * 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.
1066         */
1067        ADDRESS, 
1068        /**
1069         * A duration of time during which an organism (or a process) has existed.
1070         */
1071        AGE, 
1072        /**
1073         * A  text note which also  contains information about who made the statement and when.
1074         */
1075        ANNOTATION, 
1076        /**
1077         * For referring to data content defined in other formats.
1078         */
1079        ATTACHMENT, 
1080        /**
1081         * Base definition for all elements that are defined inside a resource - but not those in a data type.
1082         */
1083        BACKBONEELEMENT, 
1084        /**
1085         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
1086         */
1087        CODEABLECONCEPT, 
1088        /**
1089         * A reference to a code defined by a terminology system.
1090         */
1091        CODING, 
1092        /**
1093         * Specifies contact information for a person or organization.
1094         */
1095        CONTACTDETAIL, 
1096        /**
1097         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
1098         */
1099        CONTACTPOINT, 
1100        /**
1101         * A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.
1102         */
1103        CONTRIBUTOR, 
1104        /**
1105         * 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.
1106         */
1107        COUNT, 
1108        /**
1109         * Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.
1110         */
1111        DATAREQUIREMENT, 
1112        /**
1113         * A length - a value with a unit that is a physical distance.
1114         */
1115        DISTANCE, 
1116        /**
1117         * Indicates how the medication is/was taken or should be taken by the patient.
1118         */
1119        DOSAGE, 
1120        /**
1121         * A length of time.
1122         */
1123        DURATION, 
1124        /**
1125         * Base definition for all elements in a resource.
1126         */
1127        ELEMENT, 
1128        /**
1129         * Captures constraints on each element within the resource, profile, or extension.
1130         */
1131        ELEMENTDEFINITION, 
1132        /**
1133         * 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.
1134         */
1135        EXPRESSION, 
1136        /**
1137         * Optional Extension Element - found in all resources.
1138         */
1139        EXTENSION, 
1140        /**
1141         * A human's name with the ability to identify parts and usage.
1142         */
1143        HUMANNAME, 
1144        /**
1145         * An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.
1146         */
1147        IDENTIFIER, 
1148        /**
1149         * 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.
1150         */
1151        MARKETINGSTATUS, 
1152        /**
1153         * 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.
1154         */
1155        META, 
1156        /**
1157         * An amount of economic utility in some recognized currency.
1158         */
1159        MONEY, 
1160        /**
1161         * null
1162         */
1163        MONEYQUANTITY, 
1164        /**
1165         * A human-readable summary of the resource conveying the essential clinical and business information for the resource.
1166         */
1167        NARRATIVE, 
1168        /**
1169         * 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.
1170         */
1171        PARAMETERDEFINITION, 
1172        /**
1173         * A time period defined by a start and end date and optionally time.
1174         */
1175        PERIOD, 
1176        /**
1177         * A populatioof people with some set of grouping criteria.
1178         */
1179        POPULATION, 
1180        /**
1181         * 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.
1182         */
1183        PRODCHARACTERISTIC, 
1184        /**
1185         * The shelf-life and storage information for a medicinal product item or container can be described using this class.
1186         */
1187        PRODUCTSHELFLIFE, 
1188        /**
1189         * 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.
1190         */
1191        QUANTITY, 
1192        /**
1193         * A set of ordered Quantities defined by a low and high limit.
1194         */
1195        RANGE, 
1196        /**
1197         * A relationship of two Quantity values - expressed as a numerator and a denominator.
1198         */
1199        RATIO, 
1200        /**
1201         * A reference from one resource to another.
1202         */
1203        REFERENCE, 
1204        /**
1205         * Related artifacts such as additional documentation, justification, or bibliographic references.
1206         */
1207        RELATEDARTIFACT, 
1208        /**
1209         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
1210         */
1211        SAMPLEDDATA, 
1212        /**
1213         * 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.
1214         */
1215        SIGNATURE, 
1216        /**
1217         * null
1218         */
1219        SIMPLEQUANTITY, 
1220        /**
1221         * Chemical substances are a single substance type whose primary defining element is the molecular structure. Chemical substances shall be defined on the basis of their complete covalent molecular structure; the presence of a salt (counter-ion) and/or solvates (water, alcohols) is also captured. Purity, grade, physical form or particle size are not taken into account in the definition of a chemical substance or in the assignment of a Substance ID.
1222         */
1223        SUBSTANCEAMOUNT, 
1224        /**
1225         * 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.
1226         */
1227        TIMING, 
1228        /**
1229         * A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.
1230         */
1231        TRIGGERDEFINITION, 
1232        /**
1233         * 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).
1234         */
1235        USAGECONTEXT, 
1236        /**
1237         * A stream of bytes
1238         */
1239        BASE64BINARY, 
1240        /**
1241         * Value of "true" or "false"
1242         */
1243        BOOLEAN, 
1244        /**
1245         * A URI that is a reference to a canonical URL on a FHIR resource
1246         */
1247        CANONICAL, 
1248        /**
1249         * 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
1250         */
1251        CODE, 
1252        /**
1253         * A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.
1254         */
1255        DATE, 
1256        /**
1257         * A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.
1258         */
1259        DATETIME, 
1260        /**
1261         * A rational number with implicit precision
1262         */
1263        DECIMAL, 
1264        /**
1265         * 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.
1266         */
1267        ID, 
1268        /**
1269         * An instant in time - known at least to the second
1270         */
1271        INSTANT, 
1272        /**
1273         * A whole number
1274         */
1275        INTEGER, 
1276        /**
1277         * A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine
1278         */
1279        MARKDOWN, 
1280        /**
1281         * An OID represented as a URI
1282         */
1283        OID, 
1284        /**
1285         * An integer with a value that is positive (e.g. >0)
1286         */
1287        POSITIVEINT, 
1288        /**
1289         * A sequence of Unicode characters
1290         */
1291        STRING, 
1292        /**
1293         * A time during the day, with no date specified
1294         */
1295        TIME, 
1296        /**
1297         * An integer with a value that is not negative (e.g. >= 0)
1298         */
1299        UNSIGNEDINT, 
1300        /**
1301         * String of characters used to identify a name or a resource
1302         */
1303        URI, 
1304        /**
1305         * A URI that is a literal reference
1306         */
1307        URL, 
1308        /**
1309         * A UUID, represented as a URI
1310         */
1311        UUID, 
1312        /**
1313         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
1314         */
1315        XHTML, 
1316        /**
1317         * added to help the parsers
1318         */
1319        NULL;
1320        public static DataType fromCode(String codeString) throws FHIRException {
1321            if (codeString == null || "".equals(codeString))
1322                return null;
1323        if ("Address".equals(codeString))
1324          return ADDRESS;
1325        if ("Age".equals(codeString))
1326          return AGE;
1327        if ("Annotation".equals(codeString))
1328          return ANNOTATION;
1329        if ("Attachment".equals(codeString))
1330          return ATTACHMENT;
1331        if ("BackboneElement".equals(codeString))
1332          return BACKBONEELEMENT;
1333        if ("CodeableConcept".equals(codeString))
1334          return CODEABLECONCEPT;
1335        if ("Coding".equals(codeString))
1336          return CODING;
1337        if ("ContactDetail".equals(codeString))
1338          return CONTACTDETAIL;
1339        if ("ContactPoint".equals(codeString))
1340          return CONTACTPOINT;
1341        if ("Contributor".equals(codeString))
1342          return CONTRIBUTOR;
1343        if ("Count".equals(codeString))
1344          return COUNT;
1345        if ("DataRequirement".equals(codeString))
1346          return DATAREQUIREMENT;
1347        if ("Distance".equals(codeString))
1348          return DISTANCE;
1349        if ("Dosage".equals(codeString))
1350          return DOSAGE;
1351        if ("Duration".equals(codeString))
1352          return DURATION;
1353        if ("Element".equals(codeString))
1354          return ELEMENT;
1355        if ("ElementDefinition".equals(codeString))
1356          return ELEMENTDEFINITION;
1357        if ("Expression".equals(codeString))
1358          return EXPRESSION;
1359        if ("Extension".equals(codeString))
1360          return EXTENSION;
1361        if ("HumanName".equals(codeString))
1362          return HUMANNAME;
1363        if ("Identifier".equals(codeString))
1364          return IDENTIFIER;
1365        if ("MarketingStatus".equals(codeString))
1366          return MARKETINGSTATUS;
1367        if ("Meta".equals(codeString))
1368          return META;
1369        if ("Money".equals(codeString))
1370          return MONEY;
1371        if ("MoneyQuantity".equals(codeString))
1372          return MONEYQUANTITY;
1373        if ("Narrative".equals(codeString))
1374          return NARRATIVE;
1375        if ("ParameterDefinition".equals(codeString))
1376          return PARAMETERDEFINITION;
1377        if ("Period".equals(codeString))
1378          return PERIOD;
1379        if ("Population".equals(codeString))
1380          return POPULATION;
1381        if ("ProdCharacteristic".equals(codeString))
1382          return PRODCHARACTERISTIC;
1383        if ("ProductShelfLife".equals(codeString))
1384          return PRODUCTSHELFLIFE;
1385        if ("Quantity".equals(codeString))
1386          return QUANTITY;
1387        if ("Range".equals(codeString))
1388          return RANGE;
1389        if ("Ratio".equals(codeString))
1390          return RATIO;
1391        if ("Reference".equals(codeString))
1392          return REFERENCE;
1393        if ("RelatedArtifact".equals(codeString))
1394          return RELATEDARTIFACT;
1395        if ("SampledData".equals(codeString))
1396          return SAMPLEDDATA;
1397        if ("Signature".equals(codeString))
1398          return SIGNATURE;
1399        if ("SimpleQuantity".equals(codeString))
1400          return SIMPLEQUANTITY;
1401        if ("SubstanceAmount".equals(codeString))
1402          return SUBSTANCEAMOUNT;
1403        if ("Timing".equals(codeString))
1404          return TIMING;
1405        if ("TriggerDefinition".equals(codeString))
1406          return TRIGGERDEFINITION;
1407        if ("UsageContext".equals(codeString))
1408          return USAGECONTEXT;
1409        if ("base64Binary".equals(codeString))
1410          return BASE64BINARY;
1411        if ("boolean".equals(codeString))
1412          return BOOLEAN;
1413        if ("canonical".equals(codeString))
1414          return CANONICAL;
1415        if ("code".equals(codeString))
1416          return CODE;
1417        if ("date".equals(codeString))
1418          return DATE;
1419        if ("dateTime".equals(codeString))
1420          return DATETIME;
1421        if ("decimal".equals(codeString))
1422          return DECIMAL;
1423        if ("id".equals(codeString))
1424          return ID;
1425        if ("instant".equals(codeString))
1426          return INSTANT;
1427        if ("integer".equals(codeString))
1428          return INTEGER;
1429        if ("markdown".equals(codeString))
1430          return MARKDOWN;
1431        if ("oid".equals(codeString))
1432          return OID;
1433        if ("positiveInt".equals(codeString))
1434          return POSITIVEINT;
1435        if ("string".equals(codeString))
1436          return STRING;
1437        if ("time".equals(codeString))
1438          return TIME;
1439        if ("unsignedInt".equals(codeString))
1440          return UNSIGNEDINT;
1441        if ("uri".equals(codeString))
1442          return URI;
1443        if ("url".equals(codeString))
1444          return URL;
1445        if ("uuid".equals(codeString))
1446          return UUID;
1447        if ("xhtml".equals(codeString))
1448          return XHTML;
1449        throw new FHIRException("Unknown DataType code '"+codeString+"'");
1450        }
1451        public String toCode() {
1452          switch (this) {
1453            case ADDRESS: return "Address";
1454            case AGE: return "Age";
1455            case ANNOTATION: return "Annotation";
1456            case ATTACHMENT: return "Attachment";
1457            case BACKBONEELEMENT: return "BackboneElement";
1458            case CODEABLECONCEPT: return "CodeableConcept";
1459            case CODING: return "Coding";
1460            case CONTACTDETAIL: return "ContactDetail";
1461            case CONTACTPOINT: return "ContactPoint";
1462            case CONTRIBUTOR: return "Contributor";
1463            case COUNT: return "Count";
1464            case DATAREQUIREMENT: return "DataRequirement";
1465            case DISTANCE: return "Distance";
1466            case DOSAGE: return "Dosage";
1467            case DURATION: return "Duration";
1468            case ELEMENT: return "Element";
1469            case ELEMENTDEFINITION: return "ElementDefinition";
1470            case EXPRESSION: return "Expression";
1471            case EXTENSION: return "Extension";
1472            case HUMANNAME: return "HumanName";
1473            case IDENTIFIER: return "Identifier";
1474            case MARKETINGSTATUS: return "MarketingStatus";
1475            case META: return "Meta";
1476            case MONEY: return "Money";
1477            case MONEYQUANTITY: return "MoneyQuantity";
1478            case NARRATIVE: return "Narrative";
1479            case PARAMETERDEFINITION: return "ParameterDefinition";
1480            case PERIOD: return "Period";
1481            case POPULATION: return "Population";
1482            case PRODCHARACTERISTIC: return "ProdCharacteristic";
1483            case PRODUCTSHELFLIFE: return "ProductShelfLife";
1484            case QUANTITY: return "Quantity";
1485            case RANGE: return "Range";
1486            case RATIO: return "Ratio";
1487            case REFERENCE: return "Reference";
1488            case RELATEDARTIFACT: return "RelatedArtifact";
1489            case SAMPLEDDATA: return "SampledData";
1490            case SIGNATURE: return "Signature";
1491            case SIMPLEQUANTITY: return "SimpleQuantity";
1492            case SUBSTANCEAMOUNT: return "SubstanceAmount";
1493            case TIMING: return "Timing";
1494            case TRIGGERDEFINITION: return "TriggerDefinition";
1495            case USAGECONTEXT: return "UsageContext";
1496            case BASE64BINARY: return "base64Binary";
1497            case BOOLEAN: return "boolean";
1498            case CANONICAL: return "canonical";
1499            case CODE: return "code";
1500            case DATE: return "date";
1501            case DATETIME: return "dateTime";
1502            case DECIMAL: return "decimal";
1503            case ID: return "id";
1504            case INSTANT: return "instant";
1505            case INTEGER: return "integer";
1506            case MARKDOWN: return "markdown";
1507            case OID: return "oid";
1508            case POSITIVEINT: return "positiveInt";
1509            case STRING: return "string";
1510            case TIME: return "time";
1511            case UNSIGNEDINT: return "unsignedInt";
1512            case URI: return "uri";
1513            case URL: return "url";
1514            case UUID: return "uuid";
1515            case XHTML: return "xhtml";
1516            default: return "?";
1517          }
1518        }
1519        public String getSystem() {
1520          switch (this) {
1521            case ADDRESS: return "http://hl7.org/fhir/data-types";
1522            case AGE: return "http://hl7.org/fhir/data-types";
1523            case ANNOTATION: return "http://hl7.org/fhir/data-types";
1524            case ATTACHMENT: return "http://hl7.org/fhir/data-types";
1525            case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types";
1526            case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types";
1527            case CODING: return "http://hl7.org/fhir/data-types";
1528            case CONTACTDETAIL: return "http://hl7.org/fhir/data-types";
1529            case CONTACTPOINT: return "http://hl7.org/fhir/data-types";
1530            case CONTRIBUTOR: return "http://hl7.org/fhir/data-types";
1531            case COUNT: return "http://hl7.org/fhir/data-types";
1532            case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types";
1533            case DISTANCE: return "http://hl7.org/fhir/data-types";
1534            case DOSAGE: return "http://hl7.org/fhir/data-types";
1535            case DURATION: return "http://hl7.org/fhir/data-types";
1536            case ELEMENT: return "http://hl7.org/fhir/data-types";
1537            case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types";
1538            case EXPRESSION: return "http://hl7.org/fhir/data-types";
1539            case EXTENSION: return "http://hl7.org/fhir/data-types";
1540            case HUMANNAME: return "http://hl7.org/fhir/data-types";
1541            case IDENTIFIER: return "http://hl7.org/fhir/data-types";
1542            case MARKETINGSTATUS: return "http://hl7.org/fhir/data-types";
1543            case META: return "http://hl7.org/fhir/data-types";
1544            case MONEY: return "http://hl7.org/fhir/data-types";
1545            case MONEYQUANTITY: return "http://hl7.org/fhir/data-types";
1546            case NARRATIVE: return "http://hl7.org/fhir/data-types";
1547            case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types";
1548            case PERIOD: return "http://hl7.org/fhir/data-types";
1549            case POPULATION: return "http://hl7.org/fhir/data-types";
1550            case PRODCHARACTERISTIC: return "http://hl7.org/fhir/data-types";
1551            case PRODUCTSHELFLIFE: return "http://hl7.org/fhir/data-types";
1552            case QUANTITY: return "http://hl7.org/fhir/data-types";
1553            case RANGE: return "http://hl7.org/fhir/data-types";
1554            case RATIO: return "http://hl7.org/fhir/data-types";
1555            case REFERENCE: return "http://hl7.org/fhir/data-types";
1556            case RELATEDARTIFACT: return "http://hl7.org/fhir/data-types";
1557            case SAMPLEDDATA: return "http://hl7.org/fhir/data-types";
1558            case SIGNATURE: return "http://hl7.org/fhir/data-types";
1559            case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types";
1560            case SUBSTANCEAMOUNT: return "http://hl7.org/fhir/data-types";
1561            case TIMING: return "http://hl7.org/fhir/data-types";
1562            case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types";
1563            case USAGECONTEXT: return "http://hl7.org/fhir/data-types";
1564            case BASE64BINARY: return "http://hl7.org/fhir/data-types";
1565            case BOOLEAN: return "http://hl7.org/fhir/data-types";
1566            case CANONICAL: return "http://hl7.org/fhir/data-types";
1567            case CODE: return "http://hl7.org/fhir/data-types";
1568            case DATE: return "http://hl7.org/fhir/data-types";
1569            case DATETIME: return "http://hl7.org/fhir/data-types";
1570            case DECIMAL: return "http://hl7.org/fhir/data-types";
1571            case ID: return "http://hl7.org/fhir/data-types";
1572            case INSTANT: return "http://hl7.org/fhir/data-types";
1573            case INTEGER: return "http://hl7.org/fhir/data-types";
1574            case MARKDOWN: return "http://hl7.org/fhir/data-types";
1575            case OID: return "http://hl7.org/fhir/data-types";
1576            case POSITIVEINT: return "http://hl7.org/fhir/data-types";
1577            case STRING: return "http://hl7.org/fhir/data-types";
1578            case TIME: return "http://hl7.org/fhir/data-types";
1579            case UNSIGNEDINT: return "http://hl7.org/fhir/data-types";
1580            case URI: return "http://hl7.org/fhir/data-types";
1581            case URL: return "http://hl7.org/fhir/data-types";
1582            case UUID: return "http://hl7.org/fhir/data-types";
1583            case XHTML: return "http://hl7.org/fhir/data-types";
1584            default: return "?";
1585          }
1586        }
1587        public String getDefinition() {
1588          switch (this) {
1589            case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.";
1590            case AGE: return "A duration of time during which an organism (or a process) has existed.";
1591            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
1592            case ATTACHMENT: return "For referring to data content defined in other formats.";
1593            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
1594            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
1595            case CODING: return "A reference to a code defined by a terminology system.";
1596            case CONTACTDETAIL: return "Specifies contact information for a person or organization.";
1597            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
1598            case CONTRIBUTOR: return "A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.";
1599            case COUNT: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
1600            case DATAREQUIREMENT: return "Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.";
1601            case DISTANCE: return "A length - a value with a unit that is a physical distance.";
1602            case DOSAGE: return "Indicates how the medication is/was taken or should be taken by the patient.";
1603            case DURATION: return "A length of time.";
1604            case ELEMENT: return "Base definition for all elements in a resource.";
1605            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
1606            case EXPRESSION: return "A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used.";
1607            case EXTENSION: return "Optional Extension Element - found in all resources.";
1608            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
1609            case IDENTIFIER: return "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.";
1610            case MARKETINGSTATUS: return "The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.";
1611            case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.";
1612            case MONEY: return "An amount of economic utility in some recognized currency.";
1613            case MONEYQUANTITY: return "";
1614            case NARRATIVE: return "A human-readable summary of the resource conveying the essential clinical and business information for the resource.";
1615            case PARAMETERDEFINITION: return "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.";
1616            case PERIOD: return "A time period defined by a start and end date and optionally time.";
1617            case POPULATION: return "A populatioof people with some set of grouping criteria.";
1618            case PRODCHARACTERISTIC: return "The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.";
1619            case PRODUCTSHELFLIFE: return "The shelf-life and storage information for a medicinal product item or container can be described using this class.";
1620            case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
1621            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
1622            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
1623            case REFERENCE: return "A reference from one resource to another.";
1624            case RELATEDARTIFACT: return "Related artifacts such as additional documentation, justification, or bibliographic references.";
1625            case SAMPLEDDATA: return "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.";
1626            case SIGNATURE: return "A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.";
1627            case SIMPLEQUANTITY: return "";
1628            case SUBSTANCEAMOUNT: return "Chemical substances are a single substance type whose primary defining element is the molecular structure. Chemical substances shall be defined on the basis of their complete covalent molecular structure; the presence of a salt (counter-ion) and/or solvates (water, alcohols) is also captured. Purity, grade, physical form or particle size are not taken into account in the definition of a chemical substance or in the assignment of a Substance ID.";
1629            case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.";
1630            case TRIGGERDEFINITION: return "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.";
1631            case USAGECONTEXT: return "Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).";
1632            case BASE64BINARY: return "A stream of bytes";
1633            case BOOLEAN: return "Value of \"true\" or \"false\"";
1634            case CANONICAL: return "A URI that is a reference to a canonical URL on a FHIR resource";
1635            case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents";
1636            case DATE: return "A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.";
1637            case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.";
1638            case DECIMAL: return "A rational number with implicit precision";
1639            case ID: return "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.";
1640            case INSTANT: return "An instant in time - known at least to the second";
1641            case INTEGER: return "A whole number";
1642            case MARKDOWN: return "A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine";
1643            case OID: return "An OID represented as a URI";
1644            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
1645            case STRING: return "A sequence of Unicode characters";
1646            case TIME: return "A time during the day, with no date specified";
1647            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
1648            case URI: return "String of characters used to identify a name or a resource";
1649            case URL: return "A URI that is a literal reference";
1650            case UUID: return "A UUID, represented as a URI";
1651            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
1652            default: return "?";
1653          }
1654        }
1655        public String getDisplay() {
1656          switch (this) {
1657            case ADDRESS: return "Address";
1658            case AGE: return "Age";
1659            case ANNOTATION: return "Annotation";
1660            case ATTACHMENT: return "Attachment";
1661            case BACKBONEELEMENT: return "BackboneElement";
1662            case CODEABLECONCEPT: return "CodeableConcept";
1663            case CODING: return "Coding";
1664            case CONTACTDETAIL: return "ContactDetail";
1665            case CONTACTPOINT: return "ContactPoint";
1666            case CONTRIBUTOR: return "Contributor";
1667            case COUNT: return "Count";
1668            case DATAREQUIREMENT: return "DataRequirement";
1669            case DISTANCE: return "Distance";
1670            case DOSAGE: return "Dosage";
1671            case DURATION: return "Duration";
1672            case ELEMENT: return "Element";
1673            case ELEMENTDEFINITION: return "ElementDefinition";
1674            case EXPRESSION: return "Expression";
1675            case EXTENSION: return "Extension";
1676            case HUMANNAME: return "HumanName";
1677            case IDENTIFIER: return "Identifier";
1678            case MARKETINGSTATUS: return "MarketingStatus";
1679            case META: return "Meta";
1680            case MONEY: return "Money";
1681            case MONEYQUANTITY: return "MoneyQuantity";
1682            case NARRATIVE: return "Narrative";
1683            case PARAMETERDEFINITION: return "ParameterDefinition";
1684            case PERIOD: return "Period";
1685            case POPULATION: return "Population";
1686            case PRODCHARACTERISTIC: return "ProdCharacteristic";
1687            case PRODUCTSHELFLIFE: return "ProductShelfLife";
1688            case QUANTITY: return "Quantity";
1689            case RANGE: return "Range";
1690            case RATIO: return "Ratio";
1691            case REFERENCE: return "Reference";
1692            case RELATEDARTIFACT: return "RelatedArtifact";
1693            case SAMPLEDDATA: return "SampledData";
1694            case SIGNATURE: return "Signature";
1695            case SIMPLEQUANTITY: return "SimpleQuantity";
1696            case SUBSTANCEAMOUNT: return "SubstanceAmount";
1697            case TIMING: return "Timing";
1698            case TRIGGERDEFINITION: return "TriggerDefinition";
1699            case USAGECONTEXT: return "UsageContext";
1700            case BASE64BINARY: return "base64Binary";
1701            case BOOLEAN: return "boolean";
1702            case CANONICAL: return "canonical";
1703            case CODE: return "code";
1704            case DATE: return "date";
1705            case DATETIME: return "dateTime";
1706            case DECIMAL: return "decimal";
1707            case ID: return "id";
1708            case INSTANT: return "instant";
1709            case INTEGER: return "integer";
1710            case MARKDOWN: return "markdown";
1711            case OID: return "oid";
1712            case POSITIVEINT: return "positiveInt";
1713            case STRING: return "string";
1714            case TIME: return "time";
1715            case UNSIGNEDINT: return "unsignedInt";
1716            case URI: return "uri";
1717            case URL: return "url";
1718            case UUID: return "uuid";
1719            case XHTML: return "XHTML";
1720            default: return "?";
1721          }
1722        }
1723    }
1724
1725  public static class DataTypeEnumFactory implements EnumFactory<DataType> {
1726    public DataType fromCode(String codeString) throws IllegalArgumentException {
1727      if (codeString == null || "".equals(codeString))
1728            if (codeString == null || "".equals(codeString))
1729                return null;
1730        if ("Address".equals(codeString))
1731          return DataType.ADDRESS;
1732        if ("Age".equals(codeString))
1733          return DataType.AGE;
1734        if ("Annotation".equals(codeString))
1735          return DataType.ANNOTATION;
1736        if ("Attachment".equals(codeString))
1737          return DataType.ATTACHMENT;
1738        if ("BackboneElement".equals(codeString))
1739          return DataType.BACKBONEELEMENT;
1740        if ("CodeableConcept".equals(codeString))
1741          return DataType.CODEABLECONCEPT;
1742        if ("Coding".equals(codeString))
1743          return DataType.CODING;
1744        if ("ContactDetail".equals(codeString))
1745          return DataType.CONTACTDETAIL;
1746        if ("ContactPoint".equals(codeString))
1747          return DataType.CONTACTPOINT;
1748        if ("Contributor".equals(codeString))
1749          return DataType.CONTRIBUTOR;
1750        if ("Count".equals(codeString))
1751          return DataType.COUNT;
1752        if ("DataRequirement".equals(codeString))
1753          return DataType.DATAREQUIREMENT;
1754        if ("Distance".equals(codeString))
1755          return DataType.DISTANCE;
1756        if ("Dosage".equals(codeString))
1757          return DataType.DOSAGE;
1758        if ("Duration".equals(codeString))
1759          return DataType.DURATION;
1760        if ("Element".equals(codeString))
1761          return DataType.ELEMENT;
1762        if ("ElementDefinition".equals(codeString))
1763          return DataType.ELEMENTDEFINITION;
1764        if ("Expression".equals(codeString))
1765          return DataType.EXPRESSION;
1766        if ("Extension".equals(codeString))
1767          return DataType.EXTENSION;
1768        if ("HumanName".equals(codeString))
1769          return DataType.HUMANNAME;
1770        if ("Identifier".equals(codeString))
1771          return DataType.IDENTIFIER;
1772        if ("MarketingStatus".equals(codeString))
1773          return DataType.MARKETINGSTATUS;
1774        if ("Meta".equals(codeString))
1775          return DataType.META;
1776        if ("Money".equals(codeString))
1777          return DataType.MONEY;
1778        if ("MoneyQuantity".equals(codeString))
1779          return DataType.MONEYQUANTITY;
1780        if ("Narrative".equals(codeString))
1781          return DataType.NARRATIVE;
1782        if ("ParameterDefinition".equals(codeString))
1783          return DataType.PARAMETERDEFINITION;
1784        if ("Period".equals(codeString))
1785          return DataType.PERIOD;
1786        if ("Population".equals(codeString))
1787          return DataType.POPULATION;
1788        if ("ProdCharacteristic".equals(codeString))
1789          return DataType.PRODCHARACTERISTIC;
1790        if ("ProductShelfLife".equals(codeString))
1791          return DataType.PRODUCTSHELFLIFE;
1792        if ("Quantity".equals(codeString))
1793          return DataType.QUANTITY;
1794        if ("Range".equals(codeString))
1795          return DataType.RANGE;
1796        if ("Ratio".equals(codeString))
1797          return DataType.RATIO;
1798        if ("Reference".equals(codeString))
1799          return DataType.REFERENCE;
1800        if ("RelatedArtifact".equals(codeString))
1801          return DataType.RELATEDARTIFACT;
1802        if ("SampledData".equals(codeString))
1803          return DataType.SAMPLEDDATA;
1804        if ("Signature".equals(codeString))
1805          return DataType.SIGNATURE;
1806        if ("SimpleQuantity".equals(codeString))
1807          return DataType.SIMPLEQUANTITY;
1808        if ("SubstanceAmount".equals(codeString))
1809          return DataType.SUBSTANCEAMOUNT;
1810        if ("Timing".equals(codeString))
1811          return DataType.TIMING;
1812        if ("TriggerDefinition".equals(codeString))
1813          return DataType.TRIGGERDEFINITION;
1814        if ("UsageContext".equals(codeString))
1815          return DataType.USAGECONTEXT;
1816        if ("base64Binary".equals(codeString))
1817          return DataType.BASE64BINARY;
1818        if ("boolean".equals(codeString))
1819          return DataType.BOOLEAN;
1820        if ("canonical".equals(codeString))
1821          return DataType.CANONICAL;
1822        if ("code".equals(codeString))
1823          return DataType.CODE;
1824        if ("date".equals(codeString))
1825          return DataType.DATE;
1826        if ("dateTime".equals(codeString))
1827          return DataType.DATETIME;
1828        if ("decimal".equals(codeString))
1829          return DataType.DECIMAL;
1830        if ("id".equals(codeString))
1831          return DataType.ID;
1832        if ("instant".equals(codeString))
1833          return DataType.INSTANT;
1834        if ("integer".equals(codeString))
1835          return DataType.INTEGER;
1836        if ("markdown".equals(codeString))
1837          return DataType.MARKDOWN;
1838        if ("oid".equals(codeString))
1839          return DataType.OID;
1840        if ("positiveInt".equals(codeString))
1841          return DataType.POSITIVEINT;
1842        if ("string".equals(codeString))
1843          return DataType.STRING;
1844        if ("time".equals(codeString))
1845          return DataType.TIME;
1846        if ("unsignedInt".equals(codeString))
1847          return DataType.UNSIGNEDINT;
1848        if ("uri".equals(codeString))
1849          return DataType.URI;
1850        if ("url".equals(codeString))
1851          return DataType.URL;
1852        if ("uuid".equals(codeString))
1853          return DataType.UUID;
1854        if ("xhtml".equals(codeString))
1855          return DataType.XHTML;
1856        throw new IllegalArgumentException("Unknown DataType code '"+codeString+"'");
1857        }
1858        public Enumeration<DataType> fromType(Base code) throws FHIRException {
1859          if (code == null)
1860            return null;
1861          if (code.isEmpty())
1862            return new Enumeration<DataType>(this);
1863          String codeString = ((PrimitiveType) code).asStringValue();
1864          if (codeString == null || "".equals(codeString))
1865            return null;
1866        if ("Address".equals(codeString))
1867          return new Enumeration<DataType>(this, DataType.ADDRESS);
1868        if ("Age".equals(codeString))
1869          return new Enumeration<DataType>(this, DataType.AGE);
1870        if ("Annotation".equals(codeString))
1871          return new Enumeration<DataType>(this, DataType.ANNOTATION);
1872        if ("Attachment".equals(codeString))
1873          return new Enumeration<DataType>(this, DataType.ATTACHMENT);
1874        if ("BackboneElement".equals(codeString))
1875          return new Enumeration<DataType>(this, DataType.BACKBONEELEMENT);
1876        if ("CodeableConcept".equals(codeString))
1877          return new Enumeration<DataType>(this, DataType.CODEABLECONCEPT);
1878        if ("Coding".equals(codeString))
1879          return new Enumeration<DataType>(this, DataType.CODING);
1880        if ("ContactDetail".equals(codeString))
1881          return new Enumeration<DataType>(this, DataType.CONTACTDETAIL);
1882        if ("ContactPoint".equals(codeString))
1883          return new Enumeration<DataType>(this, DataType.CONTACTPOINT);
1884        if ("Contributor".equals(codeString))
1885          return new Enumeration<DataType>(this, DataType.CONTRIBUTOR);
1886        if ("Count".equals(codeString))
1887          return new Enumeration<DataType>(this, DataType.COUNT);
1888        if ("DataRequirement".equals(codeString))
1889          return new Enumeration<DataType>(this, DataType.DATAREQUIREMENT);
1890        if ("Distance".equals(codeString))
1891          return new Enumeration<DataType>(this, DataType.DISTANCE);
1892        if ("Dosage".equals(codeString))
1893          return new Enumeration<DataType>(this, DataType.DOSAGE);
1894        if ("Duration".equals(codeString))
1895          return new Enumeration<DataType>(this, DataType.DURATION);
1896        if ("Element".equals(codeString))
1897          return new Enumeration<DataType>(this, DataType.ELEMENT);
1898        if ("ElementDefinition".equals(codeString))
1899          return new Enumeration<DataType>(this, DataType.ELEMENTDEFINITION);
1900        if ("Expression".equals(codeString))
1901          return new Enumeration<DataType>(this, DataType.EXPRESSION);
1902        if ("Extension".equals(codeString))
1903          return new Enumeration<DataType>(this, DataType.EXTENSION);
1904        if ("HumanName".equals(codeString))
1905          return new Enumeration<DataType>(this, DataType.HUMANNAME);
1906        if ("Identifier".equals(codeString))
1907          return new Enumeration<DataType>(this, DataType.IDENTIFIER);
1908        if ("MarketingStatus".equals(codeString))
1909          return new Enumeration<DataType>(this, DataType.MARKETINGSTATUS);
1910        if ("Meta".equals(codeString))
1911          return new Enumeration<DataType>(this, DataType.META);
1912        if ("Money".equals(codeString))
1913          return new Enumeration<DataType>(this, DataType.MONEY);
1914        if ("MoneyQuantity".equals(codeString))
1915          return new Enumeration<DataType>(this, DataType.MONEYQUANTITY);
1916        if ("Narrative".equals(codeString))
1917          return new Enumeration<DataType>(this, DataType.NARRATIVE);
1918        if ("ParameterDefinition".equals(codeString))
1919          return new Enumeration<DataType>(this, DataType.PARAMETERDEFINITION);
1920        if ("Period".equals(codeString))
1921          return new Enumeration<DataType>(this, DataType.PERIOD);
1922        if ("Population".equals(codeString))
1923          return new Enumeration<DataType>(this, DataType.POPULATION);
1924        if ("ProdCharacteristic".equals(codeString))
1925          return new Enumeration<DataType>(this, DataType.PRODCHARACTERISTIC);
1926        if ("ProductShelfLife".equals(codeString))
1927          return new Enumeration<DataType>(this, DataType.PRODUCTSHELFLIFE);
1928        if ("Quantity".equals(codeString))
1929          return new Enumeration<DataType>(this, DataType.QUANTITY);
1930        if ("Range".equals(codeString))
1931          return new Enumeration<DataType>(this, DataType.RANGE);
1932        if ("Ratio".equals(codeString))
1933          return new Enumeration<DataType>(this, DataType.RATIO);
1934        if ("Reference".equals(codeString))
1935          return new Enumeration<DataType>(this, DataType.REFERENCE);
1936        if ("RelatedArtifact".equals(codeString))
1937          return new Enumeration<DataType>(this, DataType.RELATEDARTIFACT);
1938        if ("SampledData".equals(codeString))
1939          return new Enumeration<DataType>(this, DataType.SAMPLEDDATA);
1940        if ("Signature".equals(codeString))
1941          return new Enumeration<DataType>(this, DataType.SIGNATURE);
1942        if ("SimpleQuantity".equals(codeString))
1943          return new Enumeration<DataType>(this, DataType.SIMPLEQUANTITY);
1944        if ("SubstanceAmount".equals(codeString))
1945          return new Enumeration<DataType>(this, DataType.SUBSTANCEAMOUNT);
1946        if ("Timing".equals(codeString))
1947          return new Enumeration<DataType>(this, DataType.TIMING);
1948        if ("TriggerDefinition".equals(codeString))
1949          return new Enumeration<DataType>(this, DataType.TRIGGERDEFINITION);
1950        if ("UsageContext".equals(codeString))
1951          return new Enumeration<DataType>(this, DataType.USAGECONTEXT);
1952        if ("base64Binary".equals(codeString))
1953          return new Enumeration<DataType>(this, DataType.BASE64BINARY);
1954        if ("boolean".equals(codeString))
1955          return new Enumeration<DataType>(this, DataType.BOOLEAN);
1956        if ("canonical".equals(codeString))
1957          return new Enumeration<DataType>(this, DataType.CANONICAL);
1958        if ("code".equals(codeString))
1959          return new Enumeration<DataType>(this, DataType.CODE);
1960        if ("date".equals(codeString))
1961          return new Enumeration<DataType>(this, DataType.DATE);
1962        if ("dateTime".equals(codeString))
1963          return new Enumeration<DataType>(this, DataType.DATETIME);
1964        if ("decimal".equals(codeString))
1965          return new Enumeration<DataType>(this, DataType.DECIMAL);
1966        if ("id".equals(codeString))
1967          return new Enumeration<DataType>(this, DataType.ID);
1968        if ("instant".equals(codeString))
1969          return new Enumeration<DataType>(this, DataType.INSTANT);
1970        if ("integer".equals(codeString))
1971          return new Enumeration<DataType>(this, DataType.INTEGER);
1972        if ("markdown".equals(codeString))
1973          return new Enumeration<DataType>(this, DataType.MARKDOWN);
1974        if ("oid".equals(codeString))
1975          return new Enumeration<DataType>(this, DataType.OID);
1976        if ("positiveInt".equals(codeString))
1977          return new Enumeration<DataType>(this, DataType.POSITIVEINT);
1978        if ("string".equals(codeString))
1979          return new Enumeration<DataType>(this, DataType.STRING);
1980        if ("time".equals(codeString))
1981          return new Enumeration<DataType>(this, DataType.TIME);
1982        if ("unsignedInt".equals(codeString))
1983          return new Enumeration<DataType>(this, DataType.UNSIGNEDINT);
1984        if ("uri".equals(codeString))
1985          return new Enumeration<DataType>(this, DataType.URI);
1986        if ("url".equals(codeString))
1987          return new Enumeration<DataType>(this, DataType.URL);
1988        if ("uuid".equals(codeString))
1989          return new Enumeration<DataType>(this, DataType.UUID);
1990        if ("xhtml".equals(codeString))
1991          return new Enumeration<DataType>(this, DataType.XHTML);
1992        throw new FHIRException("Unknown DataType code '"+codeString+"'");
1993        }
1994    public String toCode(DataType code) {
1995      if (code == DataType.ADDRESS)
1996        return "Address";
1997      if (code == DataType.AGE)
1998        return "Age";
1999      if (code == DataType.ANNOTATION)
2000        return "Annotation";
2001      if (code == DataType.ATTACHMENT)
2002        return "Attachment";
2003      if (code == DataType.BACKBONEELEMENT)
2004        return "BackboneElement";
2005      if (code == DataType.CODEABLECONCEPT)
2006        return "CodeableConcept";
2007      if (code == DataType.CODING)
2008        return "Coding";
2009      if (code == DataType.CONTACTDETAIL)
2010        return "ContactDetail";
2011      if (code == DataType.CONTACTPOINT)
2012        return "ContactPoint";
2013      if (code == DataType.CONTRIBUTOR)
2014        return "Contributor";
2015      if (code == DataType.COUNT)
2016        return "Count";
2017      if (code == DataType.DATAREQUIREMENT)
2018        return "DataRequirement";
2019      if (code == DataType.DISTANCE)
2020        return "Distance";
2021      if (code == DataType.DOSAGE)
2022        return "Dosage";
2023      if (code == DataType.DURATION)
2024        return "Duration";
2025      if (code == DataType.ELEMENT)
2026        return "Element";
2027      if (code == DataType.ELEMENTDEFINITION)
2028        return "ElementDefinition";
2029      if (code == DataType.EXPRESSION)
2030        return "Expression";
2031      if (code == DataType.EXTENSION)
2032        return "Extension";
2033      if (code == DataType.HUMANNAME)
2034        return "HumanName";
2035      if (code == DataType.IDENTIFIER)
2036        return "Identifier";
2037      if (code == DataType.MARKETINGSTATUS)
2038        return "MarketingStatus";
2039      if (code == DataType.META)
2040        return "Meta";
2041      if (code == DataType.MONEY)
2042        return "Money";
2043      if (code == DataType.MONEYQUANTITY)
2044        return "MoneyQuantity";
2045      if (code == DataType.NARRATIVE)
2046        return "Narrative";
2047      if (code == DataType.PARAMETERDEFINITION)
2048        return "ParameterDefinition";
2049      if (code == DataType.PERIOD)
2050        return "Period";
2051      if (code == DataType.POPULATION)
2052        return "Population";
2053      if (code == DataType.PRODCHARACTERISTIC)
2054        return "ProdCharacteristic";
2055      if (code == DataType.PRODUCTSHELFLIFE)
2056        return "ProductShelfLife";
2057      if (code == DataType.QUANTITY)
2058        return "Quantity";
2059      if (code == DataType.RANGE)
2060        return "Range";
2061      if (code == DataType.RATIO)
2062        return "Ratio";
2063      if (code == DataType.REFERENCE)
2064        return "Reference";
2065      if (code == DataType.RELATEDARTIFACT)
2066        return "RelatedArtifact";
2067      if (code == DataType.SAMPLEDDATA)
2068        return "SampledData";
2069      if (code == DataType.SIGNATURE)
2070        return "Signature";
2071      if (code == DataType.SIMPLEQUANTITY)
2072        return "SimpleQuantity";
2073      if (code == DataType.SUBSTANCEAMOUNT)
2074        return "SubstanceAmount";
2075      if (code == DataType.TIMING)
2076        return "Timing";
2077      if (code == DataType.TRIGGERDEFINITION)
2078        return "TriggerDefinition";
2079      if (code == DataType.USAGECONTEXT)
2080        return "UsageContext";
2081      if (code == DataType.BASE64BINARY)
2082        return "base64Binary";
2083      if (code == DataType.BOOLEAN)
2084        return "boolean";
2085      if (code == DataType.CANONICAL)
2086        return "canonical";
2087      if (code == DataType.CODE)
2088        return "code";
2089      if (code == DataType.DATE)
2090        return "date";
2091      if (code == DataType.DATETIME)
2092        return "dateTime";
2093      if (code == DataType.DECIMAL)
2094        return "decimal";
2095      if (code == DataType.ID)
2096        return "id";
2097      if (code == DataType.INSTANT)
2098        return "instant";
2099      if (code == DataType.INTEGER)
2100        return "integer";
2101      if (code == DataType.MARKDOWN)
2102        return "markdown";
2103      if (code == DataType.OID)
2104        return "oid";
2105      if (code == DataType.POSITIVEINT)
2106        return "positiveInt";
2107      if (code == DataType.STRING)
2108        return "string";
2109      if (code == DataType.TIME)
2110        return "time";
2111      if (code == DataType.UNSIGNEDINT)
2112        return "unsignedInt";
2113      if (code == DataType.URI)
2114        return "uri";
2115      if (code == DataType.URL)
2116        return "url";
2117      if (code == DataType.UUID)
2118        return "uuid";
2119      if (code == DataType.XHTML)
2120        return "xhtml";
2121      return "?";
2122      }
2123    public String toSystem(DataType code) {
2124      return code.getSystem();
2125      }
2126    }
2127
2128    public enum DefinitionResourceType {
2129        /**
2130         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
2131         */
2132        ACTIVITYDEFINITION, 
2133        /**
2134         * The EventDefinition resource provides a reusable description of when a particular event can occur.
2135         */
2136        EVENTDEFINITION, 
2137        /**
2138         * The Measure resource provides the definition of a quality measure.
2139         */
2140        MEASURE, 
2141        /**
2142         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
2143         */
2144        OPERATIONDEFINITION, 
2145        /**
2146         * 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 artifacts such as clinical decision support rules, order sets and protocols.
2147         */
2148        PLANDEFINITION, 
2149        /**
2150         * 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.
2151         */
2152        QUESTIONNAIRE, 
2153        /**
2154         * added to help the parsers
2155         */
2156        NULL;
2157        public static DefinitionResourceType fromCode(String codeString) throws FHIRException {
2158            if (codeString == null || "".equals(codeString))
2159                return null;
2160        if ("ActivityDefinition".equals(codeString))
2161          return ACTIVITYDEFINITION;
2162        if ("EventDefinition".equals(codeString))
2163          return EVENTDEFINITION;
2164        if ("Measure".equals(codeString))
2165          return MEASURE;
2166        if ("OperationDefinition".equals(codeString))
2167          return OPERATIONDEFINITION;
2168        if ("PlanDefinition".equals(codeString))
2169          return PLANDEFINITION;
2170        if ("Questionnaire".equals(codeString))
2171          return QUESTIONNAIRE;
2172        throw new FHIRException("Unknown DefinitionResourceType code '"+codeString+"'");
2173        }
2174        public String toCode() {
2175          switch (this) {
2176            case ACTIVITYDEFINITION: return "ActivityDefinition";
2177            case EVENTDEFINITION: return "EventDefinition";
2178            case MEASURE: return "Measure";
2179            case OPERATIONDEFINITION: return "OperationDefinition";
2180            case PLANDEFINITION: return "PlanDefinition";
2181            case QUESTIONNAIRE: return "Questionnaire";
2182            default: return "?";
2183          }
2184        }
2185        public String getSystem() {
2186          switch (this) {
2187            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/definition-resource-types";
2188            case EVENTDEFINITION: return "http://hl7.org/fhir/definition-resource-types";
2189            case MEASURE: return "http://hl7.org/fhir/definition-resource-types";
2190            case OPERATIONDEFINITION: return "http://hl7.org/fhir/definition-resource-types";
2191            case PLANDEFINITION: return "http://hl7.org/fhir/definition-resource-types";
2192            case QUESTIONNAIRE: return "http://hl7.org/fhir/definition-resource-types";
2193            default: return "?";
2194          }
2195        }
2196        public String getDefinition() {
2197          switch (this) {
2198            case ACTIVITYDEFINITION: return "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.";
2199            case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur.";
2200            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
2201            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
2202            case PLANDEFINITION: return "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.";
2203            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.";
2204            default: return "?";
2205          }
2206        }
2207        public String getDisplay() {
2208          switch (this) {
2209            case ACTIVITYDEFINITION: return "ActivityDefinition";
2210            case EVENTDEFINITION: return "EventDefinition";
2211            case MEASURE: return "Measure";
2212            case OPERATIONDEFINITION: return "OperationDefinition";
2213            case PLANDEFINITION: return "PlanDefinition";
2214            case QUESTIONNAIRE: return "Questionnaire";
2215            default: return "?";
2216          }
2217        }
2218    }
2219
2220  public static class DefinitionResourceTypeEnumFactory implements EnumFactory<DefinitionResourceType> {
2221    public DefinitionResourceType fromCode(String codeString) throws IllegalArgumentException {
2222      if (codeString == null || "".equals(codeString))
2223            if (codeString == null || "".equals(codeString))
2224                return null;
2225        if ("ActivityDefinition".equals(codeString))
2226          return DefinitionResourceType.ACTIVITYDEFINITION;
2227        if ("EventDefinition".equals(codeString))
2228          return DefinitionResourceType.EVENTDEFINITION;
2229        if ("Measure".equals(codeString))
2230          return DefinitionResourceType.MEASURE;
2231        if ("OperationDefinition".equals(codeString))
2232          return DefinitionResourceType.OPERATIONDEFINITION;
2233        if ("PlanDefinition".equals(codeString))
2234          return DefinitionResourceType.PLANDEFINITION;
2235        if ("Questionnaire".equals(codeString))
2236          return DefinitionResourceType.QUESTIONNAIRE;
2237        throw new IllegalArgumentException("Unknown DefinitionResourceType code '"+codeString+"'");
2238        }
2239        public Enumeration<DefinitionResourceType> fromType(Base code) throws FHIRException {
2240          if (code == null)
2241            return null;
2242          if (code.isEmpty())
2243            return new Enumeration<DefinitionResourceType>(this);
2244          String codeString = ((PrimitiveType) code).asStringValue();
2245          if (codeString == null || "".equals(codeString))
2246            return null;
2247        if ("ActivityDefinition".equals(codeString))
2248          return new Enumeration<DefinitionResourceType>(this, DefinitionResourceType.ACTIVITYDEFINITION);
2249        if ("EventDefinition".equals(codeString))
2250          return new Enumeration<DefinitionResourceType>(this, DefinitionResourceType.EVENTDEFINITION);
2251        if ("Measure".equals(codeString))
2252          return new Enumeration<DefinitionResourceType>(this, DefinitionResourceType.MEASURE);
2253        if ("OperationDefinition".equals(codeString))
2254          return new Enumeration<DefinitionResourceType>(this, DefinitionResourceType.OPERATIONDEFINITION);
2255        if ("PlanDefinition".equals(codeString))
2256          return new Enumeration<DefinitionResourceType>(this, DefinitionResourceType.PLANDEFINITION);
2257        if ("Questionnaire".equals(codeString))
2258          return new Enumeration<DefinitionResourceType>(this, DefinitionResourceType.QUESTIONNAIRE);
2259        throw new FHIRException("Unknown DefinitionResourceType code '"+codeString+"'");
2260        }
2261    public String toCode(DefinitionResourceType code) {
2262      if (code == DefinitionResourceType.ACTIVITYDEFINITION)
2263        return "ActivityDefinition";
2264      if (code == DefinitionResourceType.EVENTDEFINITION)
2265        return "EventDefinition";
2266      if (code == DefinitionResourceType.MEASURE)
2267        return "Measure";
2268      if (code == DefinitionResourceType.OPERATIONDEFINITION)
2269        return "OperationDefinition";
2270      if (code == DefinitionResourceType.PLANDEFINITION)
2271        return "PlanDefinition";
2272      if (code == DefinitionResourceType.QUESTIONNAIRE)
2273        return "Questionnaire";
2274      return "?";
2275      }
2276    public String toSystem(DefinitionResourceType code) {
2277      return code.getSystem();
2278      }
2279    }
2280
2281    public enum DocumentReferenceStatus {
2282        /**
2283         * This is the current reference for this document.
2284         */
2285        CURRENT, 
2286        /**
2287         * This reference has been superseded by another reference.
2288         */
2289        SUPERSEDED, 
2290        /**
2291         * This reference was created in error.
2292         */
2293        ENTEREDINERROR, 
2294        /**
2295         * added to help the parsers
2296         */
2297        NULL;
2298        public static DocumentReferenceStatus fromCode(String codeString) throws FHIRException {
2299            if (codeString == null || "".equals(codeString))
2300                return null;
2301        if ("current".equals(codeString))
2302          return CURRENT;
2303        if ("superseded".equals(codeString))
2304          return SUPERSEDED;
2305        if ("entered-in-error".equals(codeString))
2306          return ENTEREDINERROR;
2307        throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'");
2308        }
2309        public String toCode() {
2310          switch (this) {
2311            case CURRENT: return "current";
2312            case SUPERSEDED: return "superseded";
2313            case ENTEREDINERROR: return "entered-in-error";
2314            default: return "?";
2315          }
2316        }
2317        public String getSystem() {
2318          switch (this) {
2319            case CURRENT: return "http://hl7.org/fhir/document-reference-status";
2320            case SUPERSEDED: return "http://hl7.org/fhir/document-reference-status";
2321            case ENTEREDINERROR: return "http://hl7.org/fhir/document-reference-status";
2322            default: return "?";
2323          }
2324        }
2325        public String getDefinition() {
2326          switch (this) {
2327            case CURRENT: return "This is the current reference for this document.";
2328            case SUPERSEDED: return "This reference has been superseded by another reference.";
2329            case ENTEREDINERROR: return "This reference was created in error.";
2330            default: return "?";
2331          }
2332        }
2333        public String getDisplay() {
2334          switch (this) {
2335            case CURRENT: return "Current";
2336            case SUPERSEDED: return "Superseded";
2337            case ENTEREDINERROR: return "Entered in Error";
2338            default: return "?";
2339          }
2340        }
2341    }
2342
2343  public static class DocumentReferenceStatusEnumFactory implements EnumFactory<DocumentReferenceStatus> {
2344    public DocumentReferenceStatus fromCode(String codeString) throws IllegalArgumentException {
2345      if (codeString == null || "".equals(codeString))
2346            if (codeString == null || "".equals(codeString))
2347                return null;
2348        if ("current".equals(codeString))
2349          return DocumentReferenceStatus.CURRENT;
2350        if ("superseded".equals(codeString))
2351          return DocumentReferenceStatus.SUPERSEDED;
2352        if ("entered-in-error".equals(codeString))
2353          return DocumentReferenceStatus.ENTEREDINERROR;
2354        throw new IllegalArgumentException("Unknown DocumentReferenceStatus code '"+codeString+"'");
2355        }
2356        public Enumeration<DocumentReferenceStatus> fromType(Base code) throws FHIRException {
2357          if (code == null)
2358            return null;
2359          if (code.isEmpty())
2360            return new Enumeration<DocumentReferenceStatus>(this);
2361          String codeString = ((PrimitiveType) code).asStringValue();
2362          if (codeString == null || "".equals(codeString))
2363            return null;
2364        if ("current".equals(codeString))
2365          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.CURRENT);
2366        if ("superseded".equals(codeString))
2367          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.SUPERSEDED);
2368        if ("entered-in-error".equals(codeString))
2369          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.ENTEREDINERROR);
2370        throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'");
2371        }
2372    public String toCode(DocumentReferenceStatus code) {
2373      if (code == DocumentReferenceStatus.CURRENT)
2374        return "current";
2375      if (code == DocumentReferenceStatus.SUPERSEDED)
2376        return "superseded";
2377      if (code == DocumentReferenceStatus.ENTEREDINERROR)
2378        return "entered-in-error";
2379      return "?";
2380      }
2381    public String toSystem(DocumentReferenceStatus code) {
2382      return code.getSystem();
2383      }
2384    }
2385
2386    public enum EventResourceType {
2387        /**
2388         * Item containing charge code(s) associated with the provision of healthcare provider products.
2389         */
2390        CHARGEITEM, 
2391        /**
2392         * Remittance resource.
2393         */
2394        CLAIMRESPONSE, 
2395        /**
2396         * A clinical assessment performed when planning treatments and management strategies for a patient.
2397         */
2398        CLINICALIMPRESSION, 
2399        /**
2400         * A record of information transmitted from a sender to a receiver.
2401         */
2402        COMMUNICATION, 
2403        /**
2404         * A set of resources composed into a single coherent clinical statement with clinical attestation.
2405         */
2406        COMPOSITION, 
2407        /**
2408         * Detailed information about conditions, problems or diagnoses.
2409         */
2410        CONDITION, 
2411        /**
2412         * A healthcare consumer's policy choices to permits or denies recipients or roles to perform actions for specific purposes and periods of time.
2413         */
2414        CONSENT, 
2415        /**
2416         * Insurance or medical plan or a payment agreement.
2417         */
2418        COVERAGE, 
2419        /**
2420         * Record of use of a device.
2421         */
2422        DEVICEUSESTATEMENT, 
2423        /**
2424         * A Diagnostic report - a combination of request information, atomic results, images, interpretation, as well as formatted reports.
2425         */
2426        DIAGNOSTICREPORT, 
2427        /**
2428         * A list that defines a set of documents.
2429         */
2430        DOCUMENTMANIFEST, 
2431        /**
2432         * A reference to a document.
2433         */
2434        DOCUMENTREFERENCE, 
2435        /**
2436         * An interaction during which services are provided to the patient.
2437         */
2438        ENCOUNTER, 
2439        /**
2440         * EnrollmentResponse resource.
2441         */
2442        ENROLLMENTRESPONSE, 
2443        /**
2444         * An association of a Patient with an Organization and  Healthcare Provider(s) for a period of time that the Organization assumes some level of responsibility.
2445         */
2446        EPISODEOFCARE, 
2447        /**
2448         * Explanation of Benefit resource.
2449         */
2450        EXPLANATIONOFBENEFIT, 
2451        /**
2452         * Information about patient's relatives, relevant for patient.
2453         */
2454        FAMILYMEMBERHISTORY, 
2455        /**
2456         * The formal response to a guidance request.
2457         */
2458        GUIDANCERESPONSE, 
2459        /**
2460         * A set of images produced in single study (one or more series of references images).
2461         */
2462        IMAGINGSTUDY, 
2463        /**
2464         * Immunization event information.
2465         */
2466        IMMUNIZATION, 
2467        /**
2468         * Results of a measure evaluation.
2469         */
2470        MEASUREREPORT, 
2471        /**
2472         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
2473         */
2474        MEDIA, 
2475        /**
2476         * Administration of medication to a patient.
2477         */
2478        MEDICATIONADMINISTRATION, 
2479        /**
2480         * Dispensing a medication to a named patient.
2481         */
2482        MEDICATIONDISPENSE, 
2483        /**
2484         * Record of medication being taken by a patient.
2485         */
2486        MEDICATIONSTATEMENT, 
2487        /**
2488         * Measurements and simple assertions.
2489         */
2490        OBSERVATION, 
2491        /**
2492         * PaymentNotice request.
2493         */
2494        PAYMENTNOTICE, 
2495        /**
2496         * PaymentReconciliation resource.
2497         */
2498        PAYMENTRECONCILIATION, 
2499        /**
2500         * An action that is being or was performed on a patient.
2501         */
2502        PROCEDURE, 
2503        /**
2504         * ProcessResponse resource.
2505         */
2506        PROCESSRESPONSE, 
2507        /**
2508         * A structured set of questions and their answers.
2509         */
2510        QUESTIONNAIRERESPONSE, 
2511        /**
2512         * Potential outcomes for a subject with likelihood.
2513         */
2514        RISKASSESSMENT, 
2515        /**
2516         * Delivery of bulk Supplies.
2517         */
2518        SUPPLYDELIVERY, 
2519        /**
2520         * A task to be performed.
2521         */
2522        TASK, 
2523        /**
2524         * added to help the parsers
2525         */
2526        NULL;
2527        public static EventResourceType fromCode(String codeString) throws FHIRException {
2528            if (codeString == null || "".equals(codeString))
2529                return null;
2530        if ("ChargeItem".equals(codeString))
2531          return CHARGEITEM;
2532        if ("ClaimResponse".equals(codeString))
2533          return CLAIMRESPONSE;
2534        if ("ClinicalImpression".equals(codeString))
2535          return CLINICALIMPRESSION;
2536        if ("Communication".equals(codeString))
2537          return COMMUNICATION;
2538        if ("Composition".equals(codeString))
2539          return COMPOSITION;
2540        if ("Condition".equals(codeString))
2541          return CONDITION;
2542        if ("Consent".equals(codeString))
2543          return CONSENT;
2544        if ("Coverage".equals(codeString))
2545          return COVERAGE;
2546        if ("DeviceUseStatement".equals(codeString))
2547          return DEVICEUSESTATEMENT;
2548        if ("DiagnosticReport".equals(codeString))
2549          return DIAGNOSTICREPORT;
2550        if ("DocumentManifest".equals(codeString))
2551          return DOCUMENTMANIFEST;
2552        if ("DocumentReference".equals(codeString))
2553          return DOCUMENTREFERENCE;
2554        if ("Encounter".equals(codeString))
2555          return ENCOUNTER;
2556        if ("EnrollmentResponse".equals(codeString))
2557          return ENROLLMENTRESPONSE;
2558        if ("EpisodeOfCare".equals(codeString))
2559          return EPISODEOFCARE;
2560        if ("ExplanationOfBenefit".equals(codeString))
2561          return EXPLANATIONOFBENEFIT;
2562        if ("FamilyMemberHistory".equals(codeString))
2563          return FAMILYMEMBERHISTORY;
2564        if ("GuidanceResponse".equals(codeString))
2565          return GUIDANCERESPONSE;
2566        if ("ImagingStudy".equals(codeString))
2567          return IMAGINGSTUDY;
2568        if ("Immunization".equals(codeString))
2569          return IMMUNIZATION;
2570        if ("MeasureReport".equals(codeString))
2571          return MEASUREREPORT;
2572        if ("Media".equals(codeString))
2573          return MEDIA;
2574        if ("MedicationAdministration".equals(codeString))
2575          return MEDICATIONADMINISTRATION;
2576        if ("MedicationDispense".equals(codeString))
2577          return MEDICATIONDISPENSE;
2578        if ("MedicationStatement".equals(codeString))
2579          return MEDICATIONSTATEMENT;
2580        if ("Observation".equals(codeString))
2581          return OBSERVATION;
2582        if ("PaymentNotice".equals(codeString))
2583          return PAYMENTNOTICE;
2584        if ("PaymentReconciliation".equals(codeString))
2585          return PAYMENTRECONCILIATION;
2586        if ("Procedure".equals(codeString))
2587          return PROCEDURE;
2588        if ("ProcessResponse".equals(codeString))
2589          return PROCESSRESPONSE;
2590        if ("QuestionnaireResponse".equals(codeString))
2591          return QUESTIONNAIRERESPONSE;
2592        if ("RiskAssessment".equals(codeString))
2593          return RISKASSESSMENT;
2594        if ("SupplyDelivery".equals(codeString))
2595          return SUPPLYDELIVERY;
2596        if ("Task".equals(codeString))
2597          return TASK;
2598        throw new FHIRException("Unknown EventResourceType code '"+codeString+"'");
2599        }
2600        public String toCode() {
2601          switch (this) {
2602            case CHARGEITEM: return "ChargeItem";
2603            case CLAIMRESPONSE: return "ClaimResponse";
2604            case CLINICALIMPRESSION: return "ClinicalImpression";
2605            case COMMUNICATION: return "Communication";
2606            case COMPOSITION: return "Composition";
2607            case CONDITION: return "Condition";
2608            case CONSENT: return "Consent";
2609            case COVERAGE: return "Coverage";
2610            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
2611            case DIAGNOSTICREPORT: return "DiagnosticReport";
2612            case DOCUMENTMANIFEST: return "DocumentManifest";
2613            case DOCUMENTREFERENCE: return "DocumentReference";
2614            case ENCOUNTER: return "Encounter";
2615            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
2616            case EPISODEOFCARE: return "EpisodeOfCare";
2617            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
2618            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
2619            case GUIDANCERESPONSE: return "GuidanceResponse";
2620            case IMAGINGSTUDY: return "ImagingStudy";
2621            case IMMUNIZATION: return "Immunization";
2622            case MEASUREREPORT: return "MeasureReport";
2623            case MEDIA: return "Media";
2624            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
2625            case MEDICATIONDISPENSE: return "MedicationDispense";
2626            case MEDICATIONSTATEMENT: return "MedicationStatement";
2627            case OBSERVATION: return "Observation";
2628            case PAYMENTNOTICE: return "PaymentNotice";
2629            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
2630            case PROCEDURE: return "Procedure";
2631            case PROCESSRESPONSE: return "ProcessResponse";
2632            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
2633            case RISKASSESSMENT: return "RiskAssessment";
2634            case SUPPLYDELIVERY: return "SupplyDelivery";
2635            case TASK: return "Task";
2636            default: return "?";
2637          }
2638        }
2639        public String getSystem() {
2640          switch (this) {
2641            case CHARGEITEM: return "http://hl7.org/fhir/event-resource-types";
2642            case CLAIMRESPONSE: return "http://hl7.org/fhir/event-resource-types";
2643            case CLINICALIMPRESSION: return "http://hl7.org/fhir/event-resource-types";
2644            case COMMUNICATION: return "http://hl7.org/fhir/event-resource-types";
2645            case COMPOSITION: return "http://hl7.org/fhir/event-resource-types";
2646            case CONDITION: return "http://hl7.org/fhir/event-resource-types";
2647            case CONSENT: return "http://hl7.org/fhir/event-resource-types";
2648            case COVERAGE: return "http://hl7.org/fhir/event-resource-types";
2649            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/event-resource-types";
2650            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/event-resource-types";
2651            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/event-resource-types";
2652            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/event-resource-types";
2653            case ENCOUNTER: return "http://hl7.org/fhir/event-resource-types";
2654            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/event-resource-types";
2655            case EPISODEOFCARE: return "http://hl7.org/fhir/event-resource-types";
2656            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/event-resource-types";
2657            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/event-resource-types";
2658            case GUIDANCERESPONSE: return "http://hl7.org/fhir/event-resource-types";
2659            case IMAGINGSTUDY: return "http://hl7.org/fhir/event-resource-types";
2660            case IMMUNIZATION: return "http://hl7.org/fhir/event-resource-types";
2661            case MEASUREREPORT: return "http://hl7.org/fhir/event-resource-types";
2662            case MEDIA: return "http://hl7.org/fhir/event-resource-types";
2663            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/event-resource-types";
2664            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/event-resource-types";
2665            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/event-resource-types";
2666            case OBSERVATION: return "http://hl7.org/fhir/event-resource-types";
2667            case PAYMENTNOTICE: return "http://hl7.org/fhir/event-resource-types";
2668            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/event-resource-types";
2669            case PROCEDURE: return "http://hl7.org/fhir/event-resource-types";
2670            case PROCESSRESPONSE: return "http://hl7.org/fhir/event-resource-types";
2671            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/event-resource-types";
2672            case RISKASSESSMENT: return "http://hl7.org/fhir/event-resource-types";
2673            case SUPPLYDELIVERY: return "http://hl7.org/fhir/event-resource-types";
2674            case TASK: return "http://hl7.org/fhir/event-resource-types";
2675            default: return "?";
2676          }
2677        }
2678        public String getDefinition() {
2679          switch (this) {
2680            case CHARGEITEM: return "Item containing charge code(s) associated with the provision of healthcare provider products.";
2681            case CLAIMRESPONSE: return "Remittance resource.";
2682            case CLINICALIMPRESSION: return "A clinical assessment performed when planning treatments and management strategies for a patient.";
2683            case COMMUNICATION: return "A record of information transmitted from a sender to a receiver.";
2684            case COMPOSITION: return "A set of resources composed into a single coherent clinical statement with clinical attestation.";
2685            case CONDITION: return "Detailed information about conditions, problems or diagnoses.";
2686            case CONSENT: return "A healthcare consumer's policy choices to permits or denies recipients or roles to perform actions for specific purposes and periods of time.";
2687            case COVERAGE: return "Insurance or medical plan or a payment agreement.";
2688            case DEVICEUSESTATEMENT: return "Record of use of a device.";
2689            case DIAGNOSTICREPORT: return "A Diagnostic report - a combination of request information, atomic results, images, interpretation, as well as formatted reports.";
2690            case DOCUMENTMANIFEST: return "A list that defines a set of documents.";
2691            case DOCUMENTREFERENCE: return "A reference to a document.";
2692            case ENCOUNTER: return "An interaction during which services are provided to the patient.";
2693            case ENROLLMENTRESPONSE: return "EnrollmentResponse resource.";
2694            case EPISODEOFCARE: return "An association of a Patient with an Organization and  Healthcare Provider(s) for a period of time that the Organization assumes some level of responsibility.";
2695            case EXPLANATIONOFBENEFIT: return "Explanation of Benefit resource.";
2696            case FAMILYMEMBERHISTORY: return "Information about patient's relatives, relevant for patient.";
2697            case GUIDANCERESPONSE: return "The formal response to a guidance request.";
2698            case IMAGINGSTUDY: return "A set of images produced in single study (one or more series of references images).";
2699            case IMMUNIZATION: return "Immunization event information.";
2700            case MEASUREREPORT: return "Results of a measure evaluation.";
2701            case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.";
2702            case MEDICATIONADMINISTRATION: return "Administration of medication to a patient.";
2703            case MEDICATIONDISPENSE: return "Dispensing a medication to a named patient.";
2704            case MEDICATIONSTATEMENT: return "Record of medication being taken by a patient.";
2705            case OBSERVATION: return "Measurements and simple assertions.";
2706            case PAYMENTNOTICE: return "PaymentNotice request.";
2707            case PAYMENTRECONCILIATION: return "PaymentReconciliation resource.";
2708            case PROCEDURE: return "An action that is being or was performed on a patient.";
2709            case PROCESSRESPONSE: return "ProcessResponse resource.";
2710            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers.";
2711            case RISKASSESSMENT: return "Potential outcomes for a subject with likelihood.";
2712            case SUPPLYDELIVERY: return "Delivery of bulk Supplies.";
2713            case TASK: return "A task to be performed.";
2714            default: return "?";
2715          }
2716        }
2717        public String getDisplay() {
2718          switch (this) {
2719            case CHARGEITEM: return "ChargeItem";
2720            case CLAIMRESPONSE: return "ClaimResponse";
2721            case CLINICALIMPRESSION: return "ClinicalImpression";
2722            case COMMUNICATION: return "Communication";
2723            case COMPOSITION: return "Composition";
2724            case CONDITION: return "Condition";
2725            case CONSENT: return "Consent";
2726            case COVERAGE: return "Coverage";
2727            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
2728            case DIAGNOSTICREPORT: return "DiagnosticReport";
2729            case DOCUMENTMANIFEST: return "DocumentManifest";
2730            case DOCUMENTREFERENCE: return "DocumentReference";
2731            case ENCOUNTER: return "Encounter";
2732            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
2733            case EPISODEOFCARE: return "EpisodeOfCare";
2734            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
2735            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
2736            case GUIDANCERESPONSE: return "GuidanceResponse";
2737            case IMAGINGSTUDY: return "ImagingStudy";
2738            case IMMUNIZATION: return "Immunization";
2739            case MEASUREREPORT: return "MeasureReport";
2740            case MEDIA: return "Media";
2741            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
2742            case MEDICATIONDISPENSE: return "MedicationDispense";
2743            case MEDICATIONSTATEMENT: return "MedicationStatement";
2744            case OBSERVATION: return "Observation";
2745            case PAYMENTNOTICE: return "PaymentNotice";
2746            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
2747            case PROCEDURE: return "Procedure";
2748            case PROCESSRESPONSE: return "ProcessResponse";
2749            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
2750            case RISKASSESSMENT: return "RiskAssessment";
2751            case SUPPLYDELIVERY: return "SupplyDelivery";
2752            case TASK: return "Task";
2753            default: return "?";
2754          }
2755        }
2756    }
2757
2758  public static class EventResourceTypeEnumFactory implements EnumFactory<EventResourceType> {
2759    public EventResourceType fromCode(String codeString) throws IllegalArgumentException {
2760      if (codeString == null || "".equals(codeString))
2761            if (codeString == null || "".equals(codeString))
2762                return null;
2763        if ("ChargeItem".equals(codeString))
2764          return EventResourceType.CHARGEITEM;
2765        if ("ClaimResponse".equals(codeString))
2766          return EventResourceType.CLAIMRESPONSE;
2767        if ("ClinicalImpression".equals(codeString))
2768          return EventResourceType.CLINICALIMPRESSION;
2769        if ("Communication".equals(codeString))
2770          return EventResourceType.COMMUNICATION;
2771        if ("Composition".equals(codeString))
2772          return EventResourceType.COMPOSITION;
2773        if ("Condition".equals(codeString))
2774          return EventResourceType.CONDITION;
2775        if ("Consent".equals(codeString))
2776          return EventResourceType.CONSENT;
2777        if ("Coverage".equals(codeString))
2778          return EventResourceType.COVERAGE;
2779        if ("DeviceUseStatement".equals(codeString))
2780          return EventResourceType.DEVICEUSESTATEMENT;
2781        if ("DiagnosticReport".equals(codeString))
2782          return EventResourceType.DIAGNOSTICREPORT;
2783        if ("DocumentManifest".equals(codeString))
2784          return EventResourceType.DOCUMENTMANIFEST;
2785        if ("DocumentReference".equals(codeString))
2786          return EventResourceType.DOCUMENTREFERENCE;
2787        if ("Encounter".equals(codeString))
2788          return EventResourceType.ENCOUNTER;
2789        if ("EnrollmentResponse".equals(codeString))
2790          return EventResourceType.ENROLLMENTRESPONSE;
2791        if ("EpisodeOfCare".equals(codeString))
2792          return EventResourceType.EPISODEOFCARE;
2793        if ("ExplanationOfBenefit".equals(codeString))
2794          return EventResourceType.EXPLANATIONOFBENEFIT;
2795        if ("FamilyMemberHistory".equals(codeString))
2796          return EventResourceType.FAMILYMEMBERHISTORY;
2797        if ("GuidanceResponse".equals(codeString))
2798          return EventResourceType.GUIDANCERESPONSE;
2799        if ("ImagingStudy".equals(codeString))
2800          return EventResourceType.IMAGINGSTUDY;
2801        if ("Immunization".equals(codeString))
2802          return EventResourceType.IMMUNIZATION;
2803        if ("MeasureReport".equals(codeString))
2804          return EventResourceType.MEASUREREPORT;
2805        if ("Media".equals(codeString))
2806          return EventResourceType.MEDIA;
2807        if ("MedicationAdministration".equals(codeString))
2808          return EventResourceType.MEDICATIONADMINISTRATION;
2809        if ("MedicationDispense".equals(codeString))
2810          return EventResourceType.MEDICATIONDISPENSE;
2811        if ("MedicationStatement".equals(codeString))
2812          return EventResourceType.MEDICATIONSTATEMENT;
2813        if ("Observation".equals(codeString))
2814          return EventResourceType.OBSERVATION;
2815        if ("PaymentNotice".equals(codeString))
2816          return EventResourceType.PAYMENTNOTICE;
2817        if ("PaymentReconciliation".equals(codeString))
2818          return EventResourceType.PAYMENTRECONCILIATION;
2819        if ("Procedure".equals(codeString))
2820          return EventResourceType.PROCEDURE;
2821        if ("ProcessResponse".equals(codeString))
2822          return EventResourceType.PROCESSRESPONSE;
2823        if ("QuestionnaireResponse".equals(codeString))
2824          return EventResourceType.QUESTIONNAIRERESPONSE;
2825        if ("RiskAssessment".equals(codeString))
2826          return EventResourceType.RISKASSESSMENT;
2827        if ("SupplyDelivery".equals(codeString))
2828          return EventResourceType.SUPPLYDELIVERY;
2829        if ("Task".equals(codeString))
2830          return EventResourceType.TASK;
2831        throw new IllegalArgumentException("Unknown EventResourceType code '"+codeString+"'");
2832        }
2833        public Enumeration<EventResourceType> fromType(Base code) throws FHIRException {
2834          if (code == null)
2835            return null;
2836          if (code.isEmpty())
2837            return new Enumeration<EventResourceType>(this);
2838          String codeString = ((PrimitiveType) code).asStringValue();
2839          if (codeString == null || "".equals(codeString))
2840            return null;
2841        if ("ChargeItem".equals(codeString))
2842          return new Enumeration<EventResourceType>(this, EventResourceType.CHARGEITEM);
2843        if ("ClaimResponse".equals(codeString))
2844          return new Enumeration<EventResourceType>(this, EventResourceType.CLAIMRESPONSE);
2845        if ("ClinicalImpression".equals(codeString))
2846          return new Enumeration<EventResourceType>(this, EventResourceType.CLINICALIMPRESSION);
2847        if ("Communication".equals(codeString))
2848          return new Enumeration<EventResourceType>(this, EventResourceType.COMMUNICATION);
2849        if ("Composition".equals(codeString))
2850          return new Enumeration<EventResourceType>(this, EventResourceType.COMPOSITION);
2851        if ("Condition".equals(codeString))
2852          return new Enumeration<EventResourceType>(this, EventResourceType.CONDITION);
2853        if ("Consent".equals(codeString))
2854          return new Enumeration<EventResourceType>(this, EventResourceType.CONSENT);
2855        if ("Coverage".equals(codeString))
2856          return new Enumeration<EventResourceType>(this, EventResourceType.COVERAGE);
2857        if ("DeviceUseStatement".equals(codeString))
2858          return new Enumeration<EventResourceType>(this, EventResourceType.DEVICEUSESTATEMENT);
2859        if ("DiagnosticReport".equals(codeString))
2860          return new Enumeration<EventResourceType>(this, EventResourceType.DIAGNOSTICREPORT);
2861        if ("DocumentManifest".equals(codeString))
2862          return new Enumeration<EventResourceType>(this, EventResourceType.DOCUMENTMANIFEST);
2863        if ("DocumentReference".equals(codeString))
2864          return new Enumeration<EventResourceType>(this, EventResourceType.DOCUMENTREFERENCE);
2865        if ("Encounter".equals(codeString))
2866          return new Enumeration<EventResourceType>(this, EventResourceType.ENCOUNTER);
2867        if ("EnrollmentResponse".equals(codeString))
2868          return new Enumeration<EventResourceType>(this, EventResourceType.ENROLLMENTRESPONSE);
2869        if ("EpisodeOfCare".equals(codeString))
2870          return new Enumeration<EventResourceType>(this, EventResourceType.EPISODEOFCARE);
2871        if ("ExplanationOfBenefit".equals(codeString))
2872          return new Enumeration<EventResourceType>(this, EventResourceType.EXPLANATIONOFBENEFIT);
2873        if ("FamilyMemberHistory".equals(codeString))
2874          return new Enumeration<EventResourceType>(this, EventResourceType.FAMILYMEMBERHISTORY);
2875        if ("GuidanceResponse".equals(codeString))
2876          return new Enumeration<EventResourceType>(this, EventResourceType.GUIDANCERESPONSE);
2877        if ("ImagingStudy".equals(codeString))
2878          return new Enumeration<EventResourceType>(this, EventResourceType.IMAGINGSTUDY);
2879        if ("Immunization".equals(codeString))
2880          return new Enumeration<EventResourceType>(this, EventResourceType.IMMUNIZATION);
2881        if ("MeasureReport".equals(codeString))
2882          return new Enumeration<EventResourceType>(this, EventResourceType.MEASUREREPORT);
2883        if ("Media".equals(codeString))
2884          return new Enumeration<EventResourceType>(this, EventResourceType.MEDIA);
2885        if ("MedicationAdministration".equals(codeString))
2886          return new Enumeration<EventResourceType>(this, EventResourceType.MEDICATIONADMINISTRATION);
2887        if ("MedicationDispense".equals(codeString))
2888          return new Enumeration<EventResourceType>(this, EventResourceType.MEDICATIONDISPENSE);
2889        if ("MedicationStatement".equals(codeString))
2890          return new Enumeration<EventResourceType>(this, EventResourceType.MEDICATIONSTATEMENT);
2891        if ("Observation".equals(codeString))
2892          return new Enumeration<EventResourceType>(this, EventResourceType.OBSERVATION);
2893        if ("PaymentNotice".equals(codeString))
2894          return new Enumeration<EventResourceType>(this, EventResourceType.PAYMENTNOTICE);
2895        if ("PaymentReconciliation".equals(codeString))
2896          return new Enumeration<EventResourceType>(this, EventResourceType.PAYMENTRECONCILIATION);
2897        if ("Procedure".equals(codeString))
2898          return new Enumeration<EventResourceType>(this, EventResourceType.PROCEDURE);
2899        if ("ProcessResponse".equals(codeString))
2900          return new Enumeration<EventResourceType>(this, EventResourceType.PROCESSRESPONSE);
2901        if ("QuestionnaireResponse".equals(codeString))
2902          return new Enumeration<EventResourceType>(this, EventResourceType.QUESTIONNAIRERESPONSE);
2903        if ("RiskAssessment".equals(codeString))
2904          return new Enumeration<EventResourceType>(this, EventResourceType.RISKASSESSMENT);
2905        if ("SupplyDelivery".equals(codeString))
2906          return new Enumeration<EventResourceType>(this, EventResourceType.SUPPLYDELIVERY);
2907        if ("Task".equals(codeString))
2908          return new Enumeration<EventResourceType>(this, EventResourceType.TASK);
2909        throw new FHIRException("Unknown EventResourceType code '"+codeString+"'");
2910        }
2911    public String toCode(EventResourceType code) {
2912      if (code == EventResourceType.CHARGEITEM)
2913        return "ChargeItem";
2914      if (code == EventResourceType.CLAIMRESPONSE)
2915        return "ClaimResponse";
2916      if (code == EventResourceType.CLINICALIMPRESSION)
2917        return "ClinicalImpression";
2918      if (code == EventResourceType.COMMUNICATION)
2919        return "Communication";
2920      if (code == EventResourceType.COMPOSITION)
2921        return "Composition";
2922      if (code == EventResourceType.CONDITION)
2923        return "Condition";
2924      if (code == EventResourceType.CONSENT)
2925        return "Consent";
2926      if (code == EventResourceType.COVERAGE)
2927        return "Coverage";
2928      if (code == EventResourceType.DEVICEUSESTATEMENT)
2929        return "DeviceUseStatement";
2930      if (code == EventResourceType.DIAGNOSTICREPORT)
2931        return "DiagnosticReport";
2932      if (code == EventResourceType.DOCUMENTMANIFEST)
2933        return "DocumentManifest";
2934      if (code == EventResourceType.DOCUMENTREFERENCE)
2935        return "DocumentReference";
2936      if (code == EventResourceType.ENCOUNTER)
2937        return "Encounter";
2938      if (code == EventResourceType.ENROLLMENTRESPONSE)
2939        return "EnrollmentResponse";
2940      if (code == EventResourceType.EPISODEOFCARE)
2941        return "EpisodeOfCare";
2942      if (code == EventResourceType.EXPLANATIONOFBENEFIT)
2943        return "ExplanationOfBenefit";
2944      if (code == EventResourceType.FAMILYMEMBERHISTORY)
2945        return "FamilyMemberHistory";
2946      if (code == EventResourceType.GUIDANCERESPONSE)
2947        return "GuidanceResponse";
2948      if (code == EventResourceType.IMAGINGSTUDY)
2949        return "ImagingStudy";
2950      if (code == EventResourceType.IMMUNIZATION)
2951        return "Immunization";
2952      if (code == EventResourceType.MEASUREREPORT)
2953        return "MeasureReport";
2954      if (code == EventResourceType.MEDIA)
2955        return "Media";
2956      if (code == EventResourceType.MEDICATIONADMINISTRATION)
2957        return "MedicationAdministration";
2958      if (code == EventResourceType.MEDICATIONDISPENSE)
2959        return "MedicationDispense";
2960      if (code == EventResourceType.MEDICATIONSTATEMENT)
2961        return "MedicationStatement";
2962      if (code == EventResourceType.OBSERVATION)
2963        return "Observation";
2964      if (code == EventResourceType.PAYMENTNOTICE)
2965        return "PaymentNotice";
2966      if (code == EventResourceType.PAYMENTRECONCILIATION)
2967        return "PaymentReconciliation";
2968      if (code == EventResourceType.PROCEDURE)
2969        return "Procedure";
2970      if (code == EventResourceType.PROCESSRESPONSE)
2971        return "ProcessResponse";
2972      if (code == EventResourceType.QUESTIONNAIRERESPONSE)
2973        return "QuestionnaireResponse";
2974      if (code == EventResourceType.RISKASSESSMENT)
2975        return "RiskAssessment";
2976      if (code == EventResourceType.SUPPLYDELIVERY)
2977        return "SupplyDelivery";
2978      if (code == EventResourceType.TASK)
2979        return "Task";
2980      return "?";
2981      }
2982    public String toSystem(EventResourceType code) {
2983      return code.getSystem();
2984      }
2985    }
2986
2987    public enum FHIRAllTypes {
2988        /**
2989         * 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.
2990         */
2991        ADDRESS, 
2992        /**
2993         * A duration of time during which an organism (or a process) has existed.
2994         */
2995        AGE, 
2996        /**
2997         * A  text note which also  contains information about who made the statement and when.
2998         */
2999        ANNOTATION, 
3000        /**
3001         * For referring to data content defined in other formats.
3002         */
3003        ATTACHMENT, 
3004        /**
3005         * Base definition for all elements that are defined inside a resource - but not those in a data type.
3006         */
3007        BACKBONEELEMENT, 
3008        /**
3009         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
3010         */
3011        CODEABLECONCEPT, 
3012        /**
3013         * A reference to a code defined by a terminology system.
3014         */
3015        CODING, 
3016        /**
3017         * Specifies contact information for a person or organization.
3018         */
3019        CONTACTDETAIL, 
3020        /**
3021         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
3022         */
3023        CONTACTPOINT, 
3024        /**
3025         * A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.
3026         */
3027        CONTRIBUTOR, 
3028        /**
3029         * 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.
3030         */
3031        COUNT, 
3032        /**
3033         * Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.
3034         */
3035        DATAREQUIREMENT, 
3036        /**
3037         * A length - a value with a unit that is a physical distance.
3038         */
3039        DISTANCE, 
3040        /**
3041         * Indicates how the medication is/was taken or should be taken by the patient.
3042         */
3043        DOSAGE, 
3044        /**
3045         * A length of time.
3046         */
3047        DURATION, 
3048        /**
3049         * Base definition for all elements in a resource.
3050         */
3051        ELEMENT, 
3052        /**
3053         * Captures constraints on each element within the resource, profile, or extension.
3054         */
3055        ELEMENTDEFINITION, 
3056        /**
3057         * 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.
3058         */
3059        EXPRESSION, 
3060        /**
3061         * Optional Extension Element - found in all resources.
3062         */
3063        EXTENSION, 
3064        /**
3065         * A human's name with the ability to identify parts and usage.
3066         */
3067        HUMANNAME, 
3068        /**
3069         * An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.
3070         */
3071        IDENTIFIER, 
3072        /**
3073         * 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.
3074         */
3075        MARKETINGSTATUS, 
3076        /**
3077         * 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.
3078         */
3079        META, 
3080        /**
3081         * An amount of economic utility in some recognized currency.
3082         */
3083        MONEY, 
3084        /**
3085         * null
3086         */
3087        MONEYQUANTITY, 
3088        /**
3089         * A human-readable summary of the resource conveying the essential clinical and business information for the resource.
3090         */
3091        NARRATIVE, 
3092        /**
3093         * 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.
3094         */
3095        PARAMETERDEFINITION, 
3096        /**
3097         * A time period defined by a start and end date and optionally time.
3098         */
3099        PERIOD, 
3100        /**
3101         * A populatioof people with some set of grouping criteria.
3102         */
3103        POPULATION, 
3104        /**
3105         * 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.
3106         */
3107        PRODCHARACTERISTIC, 
3108        /**
3109         * The shelf-life and storage information for a medicinal product item or container can be described using this class.
3110         */
3111        PRODUCTSHELFLIFE, 
3112        /**
3113         * 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.
3114         */
3115        QUANTITY, 
3116        /**
3117         * A set of ordered Quantities defined by a low and high limit.
3118         */
3119        RANGE, 
3120        /**
3121         * A relationship of two Quantity values - expressed as a numerator and a denominator.
3122         */
3123        RATIO, 
3124        /**
3125         * A reference from one resource to another.
3126         */
3127        REFERENCE, 
3128        /**
3129         * Related artifacts such as additional documentation, justification, or bibliographic references.
3130         */
3131        RELATEDARTIFACT, 
3132        /**
3133         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
3134         */
3135        SAMPLEDDATA, 
3136        /**
3137         * 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.
3138         */
3139        SIGNATURE, 
3140        /**
3141         * null
3142         */
3143        SIMPLEQUANTITY, 
3144        /**
3145         * Chemical substances are a single substance type whose primary defining element is the molecular structure. Chemical substances shall be defined on the basis of their complete covalent molecular structure; the presence of a salt (counter-ion) and/or solvates (water, alcohols) is also captured. Purity, grade, physical form or particle size are not taken into account in the definition of a chemical substance or in the assignment of a Substance ID.
3146         */
3147        SUBSTANCEAMOUNT, 
3148        /**
3149         * 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.
3150         */
3151        TIMING, 
3152        /**
3153         * A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.
3154         */
3155        TRIGGERDEFINITION, 
3156        /**
3157         * 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).
3158         */
3159        USAGECONTEXT, 
3160        /**
3161         * A stream of bytes
3162         */
3163        BASE64BINARY, 
3164        /**
3165         * Value of "true" or "false"
3166         */
3167        BOOLEAN, 
3168        /**
3169         * A URI that is a reference to a canonical URL on a FHIR resource
3170         */
3171        CANONICAL, 
3172        /**
3173         * 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
3174         */
3175        CODE, 
3176        /**
3177         * A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.
3178         */
3179        DATE, 
3180        /**
3181         * A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.
3182         */
3183        DATETIME, 
3184        /**
3185         * A rational number with implicit precision
3186         */
3187        DECIMAL, 
3188        /**
3189         * 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.
3190         */
3191        ID, 
3192        /**
3193         * An instant in time - known at least to the second
3194         */
3195        INSTANT, 
3196        /**
3197         * A whole number
3198         */
3199        INTEGER, 
3200        /**
3201         * A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine
3202         */
3203        MARKDOWN, 
3204        /**
3205         * An OID represented as a URI
3206         */
3207        OID, 
3208        /**
3209         * An integer with a value that is positive (e.g. >0)
3210         */
3211        POSITIVEINT, 
3212        /**
3213         * A sequence of Unicode characters
3214         */
3215        STRING, 
3216        /**
3217         * A time during the day, with no date specified
3218         */
3219        TIME, 
3220        /**
3221         * An integer with a value that is not negative (e.g. >= 0)
3222         */
3223        UNSIGNEDINT, 
3224        /**
3225         * String of characters used to identify a name or a resource
3226         */
3227        URI, 
3228        /**
3229         * A URI that is a literal reference
3230         */
3231        URL, 
3232        /**
3233         * A UUID, represented as a URI
3234         */
3235        UUID, 
3236        /**
3237         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
3238         */
3239        XHTML, 
3240        /**
3241         * 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.
3242         */
3243        ACCOUNT, 
3244        /**
3245         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
3246         */
3247        ACTIVITYDEFINITION, 
3248        /**
3249         * Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.
3250         */
3251        ADVERSEEVENT, 
3252        /**
3253         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
3254         */
3255        ALLERGYINTOLERANCE, 
3256        /**
3257         * 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).
3258         */
3259        APPOINTMENT, 
3260        /**
3261         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
3262         */
3263        APPOINTMENTRESPONSE, 
3264        /**
3265         * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.
3266         */
3267        AUDITEVENT, 
3268        /**
3269         * 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.
3270         */
3271        BASIC, 
3272        /**
3273         * 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.
3274         */
3275        BINARY, 
3276        /**
3277         * A material substance originating from a biological entity intended to be transplanted or infused
3278into another (possibly the same) biological entity.
3279         */
3280        BIOLOGICALLYDERIVEDPRODUCT, 
3281        /**
3282         * 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.
3283         */
3284        BODYSTRUCTURE, 
3285        /**
3286         * A container for a collection of resources.
3287         */
3288        BUNDLE, 
3289        /**
3290         * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
3291         */
3292        CAPABILITYSTATEMENT, 
3293        /**
3294         * 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.
3295         */
3296        CAREPLAN, 
3297        /**
3298         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
3299         */
3300        CARETEAM, 
3301        /**
3302         * Catalog entries are wrappers that contextualize items included in a catalog.
3303         */
3304        CATALOGENTRY, 
3305        /**
3306         * 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.
3307         */
3308        CHARGEITEM, 
3309        /**
3310         * 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.
3311         */
3312        CHARGEITEMDEFINITION, 
3313        /**
3314         * 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.
3315         */
3316        CLAIM, 
3317        /**
3318         * This resource provides the adjudication details from the processing of a Claim resource.
3319         */
3320        CLAIMRESPONSE, 
3321        /**
3322         * 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.
3323         */
3324        CLINICALIMPRESSION, 
3325        /**
3326         * 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.
3327         */
3328        CODESYSTEM, 
3329        /**
3330         * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.
3331         */
3332        COMMUNICATION, 
3333        /**
3334         * 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.
3335         */
3336        COMMUNICATIONREQUEST, 
3337        /**
3338         * A compartment definition that defines how resources are accessed on a server.
3339         */
3340        COMPARTMENTDEFINITION, 
3341        /**
3342         * 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.).
3343         */
3344        COMPOSITION, 
3345        /**
3346         * 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.
3347         */
3348        CONCEPTMAP, 
3349        /**
3350         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
3351         */
3352        CONDITION, 
3353        /**
3354         * A record of a healthcare consumer’s  choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.
3355         */
3356        CONSENT, 
3357        /**
3358         * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.
3359         */
3360        CONTRACT, 
3361        /**
3362         * Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.
3363         */
3364        COVERAGE, 
3365        /**
3366         * 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.
3367         */
3368        COVERAGEELIGIBILITYREQUEST, 
3369        /**
3370         * This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.
3371         */
3372        COVERAGEELIGIBILITYRESPONSE, 
3373        /**
3374         * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.
3375         */
3376        DETECTEDISSUE, 
3377        /**
3378         * A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.
3379         */
3380        DEVICE, 
3381        /**
3382         * The characteristics, operational status and capabilities of a medical-related component of a medical device.
3383         */
3384        DEVICEDEFINITION, 
3385        /**
3386         * Describes a measurement, calculation or setting capability of a medical device.
3387         */
3388        DEVICEMETRIC, 
3389        /**
3390         * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.
3391         */
3392        DEVICEREQUEST, 
3393        /**
3394         * A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.
3395         */
3396        DEVICEUSESTATEMENT, 
3397        /**
3398         * The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.
3399         */
3400        DIAGNOSTICREPORT, 
3401        /**
3402         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
3403         */
3404        DOCUMENTMANIFEST, 
3405        /**
3406         * A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.
3407         */
3408        DOCUMENTREFERENCE, 
3409        /**
3410         * A resource that includes narrative, extensions, and contained resources.
3411         */
3412        DOMAINRESOURCE, 
3413        /**
3414         * The EffectEvidenceSynthesis resource describes the difference in an outcome between exposures states in a population where the effect estimate is derived from a combination of research studies.
3415         */
3416        EFFECTEVIDENCESYNTHESIS, 
3417        /**
3418         * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.
3419         */
3420        ENCOUNTER, 
3421        /**
3422         * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.
3423         */
3424        ENDPOINT, 
3425        /**
3426         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
3427         */
3428        ENROLLMENTREQUEST, 
3429        /**
3430         * This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.
3431         */
3432        ENROLLMENTRESPONSE, 
3433        /**
3434         * 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.
3435         */
3436        EPISODEOFCARE, 
3437        /**
3438         * The EventDefinition resource provides a reusable description of when a particular event can occur.
3439         */
3440        EVENTDEFINITION, 
3441        /**
3442         * The Evidence resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.
3443         */
3444        EVIDENCE, 
3445        /**
3446         * The EvidenceVariable resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.
3447         */
3448        EVIDENCEVARIABLE, 
3449        /**
3450         * Example of workflow instance.
3451         */
3452        EXAMPLESCENARIO, 
3453        /**
3454         * 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.
3455         */
3456        EXPLANATIONOFBENEFIT, 
3457        /**
3458         * Significant health conditions for a person related to the patient relevant in the context of care for the patient.
3459         */
3460        FAMILYMEMBERHISTORY, 
3461        /**
3462         * Prospective warnings of potential issues when providing care to the patient.
3463         */
3464        FLAG, 
3465        /**
3466         * 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.
3467         */
3468        GOAL, 
3469        /**
3470         * 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.
3471         */
3472        GRAPHDEFINITION, 
3473        /**
3474         * 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.
3475         */
3476        GROUP, 
3477        /**
3478         * 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.
3479         */
3480        GUIDANCERESPONSE, 
3481        /**
3482         * The details of a healthcare service available at a location.
3483         */
3484        HEALTHCARESERVICE, 
3485        /**
3486         * 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.
3487         */
3488        IMAGINGSTUDY, 
3489        /**
3490         * 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.
3491         */
3492        IMMUNIZATION, 
3493        /**
3494         * Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those  recommendations.
3495         */
3496        IMMUNIZATIONEVALUATION, 
3497        /**
3498         * A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.
3499         */
3500        IMMUNIZATIONRECOMMENDATION, 
3501        /**
3502         * 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.
3503         */
3504        IMPLEMENTATIONGUIDE, 
3505        /**
3506         * Details of a Health Insurance product/plan provided by an organization.
3507         */
3508        INSURANCEPLAN, 
3509        /**
3510         * Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.
3511         */
3512        INVOICE, 
3513        /**
3514         * 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.
3515         */
3516        LIBRARY, 
3517        /**
3518         * Identifies two or more records (resource instances) that refer to the same real-world "occurrence".
3519         */
3520        LINKAGE, 
3521        /**
3522         * A list is a curated collection of resources.
3523         */
3524        LIST, 
3525        /**
3526         * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.
3527         */
3528        LOCATION, 
3529        /**
3530         * The Measure resource provides the definition of a quality measure.
3531         */
3532        MEASURE, 
3533        /**
3534         * The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.
3535         */
3536        MEASUREREPORT, 
3537        /**
3538         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
3539         */
3540        MEDIA, 
3541        /**
3542         * This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.
3543         */
3544        MEDICATION, 
3545        /**
3546         * 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.
3547         */
3548        MEDICATIONADMINISTRATION, 
3549        /**
3550         * 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.
3551         */
3552        MEDICATIONDISPENSE, 
3553        /**
3554         * Information about a medication that is used to support knowledge.
3555         */
3556        MEDICATIONKNOWLEDGE, 
3557        /**
3558         * 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.
3559         */
3560        MEDICATIONREQUEST, 
3561        /**
3562         * 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. 
3563
3564The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.
3565         */
3566        MEDICATIONSTATEMENT, 
3567        /**
3568         * Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).
3569         */
3570        MEDICINALPRODUCT, 
3571        /**
3572         * The regulatory authorization of a medicinal product.
3573         */
3574        MEDICINALPRODUCTAUTHORIZATION, 
3575        /**
3576         * The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.
3577         */
3578        MEDICINALPRODUCTCONTRAINDICATION, 
3579        /**
3580         * Indication for the Medicinal Product.
3581         */
3582        MEDICINALPRODUCTINDICATION, 
3583        /**
3584         * An ingredient of a manufactured item or pharmaceutical product.
3585         */
3586        MEDICINALPRODUCTINGREDIENT, 
3587        /**
3588         * The interactions of the medicinal product with other medicinal products, or other forms of interactions.
3589         */
3590        MEDICINALPRODUCTINTERACTION, 
3591        /**
3592         * The manufactured item as contained in the packaged medicinal product.
3593         */
3594        MEDICINALPRODUCTMANUFACTURED, 
3595        /**
3596         * A medicinal product in a container or package.
3597         */
3598        MEDICINALPRODUCTPACKAGED, 
3599        /**
3600         * A pharmaceutical product described in terms of its composition and dose form.
3601         */
3602        MEDICINALPRODUCTPHARMACEUTICAL, 
3603        /**
3604         * Describe the undesirable effects of the medicinal product.
3605         */
3606        MEDICINALPRODUCTUNDESIRABLEEFFECT, 
3607        /**
3608         * 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.
3609         */
3610        MESSAGEDEFINITION, 
3611        /**
3612         * 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.
3613         */
3614        MESSAGEHEADER, 
3615        /**
3616         * Raw data describing a biological sequence.
3617         */
3618        MOLECULARSEQUENCE, 
3619        /**
3620         * 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.
3621         */
3622        NAMINGSYSTEM, 
3623        /**
3624         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
3625         */
3626        NUTRITIONORDER, 
3627        /**
3628         * Measurements and simple assertions made about a patient, device or other subject.
3629         */
3630        OBSERVATION, 
3631        /**
3632         * Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.
3633         */
3634        OBSERVATIONDEFINITION, 
3635        /**
3636         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
3637         */
3638        OPERATIONDEFINITION, 
3639        /**
3640         * A collection of error, warning, or information messages that result from a system action.
3641         */
3642        OPERATIONOUTCOME, 
3643        /**
3644         * 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.
3645         */
3646        ORGANIZATION, 
3647        /**
3648         * Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.
3649         */
3650        ORGANIZATIONAFFILIATION, 
3651        /**
3652         * This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it.
3653         */
3654        PARAMETERS, 
3655        /**
3656         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
3657         */
3658        PATIENT, 
3659        /**
3660         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
3661         */
3662        PAYMENTNOTICE, 
3663        /**
3664         * This resource provides the details including amount of a payment and allocates the payment items being paid.
3665         */
3666        PAYMENTRECONCILIATION, 
3667        /**
3668         * Demographics and administrative information about a person independent of a specific health-related context.
3669         */
3670        PERSON, 
3671        /**
3672         * 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 artifacts such as clinical decision support rules, order sets and protocols.
3673         */
3674        PLANDEFINITION, 
3675        /**
3676         * A person who is directly or indirectly involved in the provisioning of healthcare.
3677         */
3678        PRACTITIONER, 
3679        /**
3680         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
3681         */
3682        PRACTITIONERROLE, 
3683        /**
3684         * An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.
3685         */
3686        PROCEDURE, 
3687        /**
3688         * 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.
3689         */
3690        PROVENANCE, 
3691        /**
3692         * 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.
3693         */
3694        QUESTIONNAIRE, 
3695        /**
3696         * 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.
3697         */
3698        QUESTIONNAIRERESPONSE, 
3699        /**
3700         * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.
3701         */
3702        RELATEDPERSON, 
3703        /**
3704         * A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one".
3705         */
3706        REQUESTGROUP, 
3707        /**
3708         * The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.
3709         */
3710        RESEARCHDEFINITION, 
3711        /**
3712         * The ResearchElementDefinition resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.
3713         */
3714        RESEARCHELEMENTDEFINITION, 
3715        /**
3716         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
3717         */
3718        RESEARCHSTUDY, 
3719        /**
3720         * A physical entity which is the primary unit of operational and/or administrative interest in a study.
3721         */
3722        RESEARCHSUBJECT, 
3723        /**
3724         * This is the base resource type for everything.
3725         */
3726        RESOURCE, 
3727        /**
3728         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
3729         */
3730        RISKASSESSMENT, 
3731        /**
3732         * The RiskEvidenceSynthesis resource describes the likelihood of an outcome in a population plus exposure state where the risk estimate is derived from a combination of research studies.
3733         */
3734        RISKEVIDENCESYNTHESIS, 
3735        /**
3736         * A container for slots of time that may be available for booking appointments.
3737         */
3738        SCHEDULE, 
3739        /**
3740         * A search parameter that defines a named search item that can be used to search/filter on a resource.
3741         */
3742        SEARCHPARAMETER, 
3743        /**
3744         * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.
3745         */
3746        SERVICEREQUEST, 
3747        /**
3748         * A slot of time on a schedule that may be available for booking appointments.
3749         */
3750        SLOT, 
3751        /**
3752         * A sample to be used for analysis.
3753         */
3754        SPECIMEN, 
3755        /**
3756         * A kind of specimen with associated set of requirements.
3757         */
3758        SPECIMENDEFINITION, 
3759        /**
3760         * 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.
3761         */
3762        STRUCTUREDEFINITION, 
3763        /**
3764         * A Map of relationships between 2 structures that can be used to transform data.
3765         */
3766        STRUCTUREMAP, 
3767        /**
3768         * The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system can take an appropriate action.
3769         */
3770        SUBSCRIPTION, 
3771        /**
3772         * A homogeneous material with a definite composition.
3773         */
3774        SUBSTANCE, 
3775        /**
3776         * 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.
3777         */
3778        SUBSTANCENUCLEICACID, 
3779        /**
3780         * Todo.
3781         */
3782        SUBSTANCEPOLYMER, 
3783        /**
3784         * 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.
3785         */
3786        SUBSTANCEPROTEIN, 
3787        /**
3788         * Todo.
3789         */
3790        SUBSTANCEREFERENCEINFORMATION, 
3791        /**
3792         * 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.
3793         */
3794        SUBSTANCESOURCEMATERIAL, 
3795        /**
3796         * The detailed description of a substance, typically at a level beyond what is used for prescribing.
3797         */
3798        SUBSTANCESPECIFICATION, 
3799        /**
3800         * Record of delivery of what is supplied.
3801         */
3802        SUPPLYDELIVERY, 
3803        /**
3804         * A record of a request for a medication, substance or device used in the healthcare setting.
3805         */
3806        SUPPLYREQUEST, 
3807        /**
3808         * A task to be performed.
3809         */
3810        TASK, 
3811        /**
3812         * 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.
3813         */
3814        TERMINOLOGYCAPABILITIES, 
3815        /**
3816         * A summary of information based on the results of executing a TestScript.
3817         */
3818        TESTREPORT, 
3819        /**
3820         * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
3821         */
3822        TESTSCRIPT, 
3823        /**
3824         * 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).
3825         */
3826        VALUESET, 
3827        /**
3828         * Describes validation requirements, source(s), status and dates for one or more elements.
3829         */
3830        VERIFICATIONRESULT, 
3831        /**
3832         * An authorization for the provision of glasses and/or contact lenses to a patient.
3833         */
3834        VISIONPRESCRIPTION, 
3835        /**
3836         * A place holder that means any kind of data type
3837         */
3838        TYPE, 
3839        /**
3840         * A place holder that means any kind of resource
3841         */
3842        ANY, 
3843        /**
3844         * added to help the parsers
3845         */
3846        NULL;
3847        public static FHIRAllTypes fromCode(String codeString) throws FHIRException {
3848            if (codeString == null || "".equals(codeString))
3849                return null;
3850        if ("Address".equals(codeString))
3851          return ADDRESS;
3852        if ("Age".equals(codeString))
3853          return AGE;
3854        if ("Annotation".equals(codeString))
3855          return ANNOTATION;
3856        if ("Attachment".equals(codeString))
3857          return ATTACHMENT;
3858        if ("BackboneElement".equals(codeString))
3859          return BACKBONEELEMENT;
3860        if ("CodeableConcept".equals(codeString))
3861          return CODEABLECONCEPT;
3862        if ("Coding".equals(codeString))
3863          return CODING;
3864        if ("ContactDetail".equals(codeString))
3865          return CONTACTDETAIL;
3866        if ("ContactPoint".equals(codeString))
3867          return CONTACTPOINT;
3868        if ("Contributor".equals(codeString))
3869          return CONTRIBUTOR;
3870        if ("Count".equals(codeString))
3871          return COUNT;
3872        if ("DataRequirement".equals(codeString))
3873          return DATAREQUIREMENT;
3874        if ("Distance".equals(codeString))
3875          return DISTANCE;
3876        if ("Dosage".equals(codeString))
3877          return DOSAGE;
3878        if ("Duration".equals(codeString))
3879          return DURATION;
3880        if ("Element".equals(codeString))
3881          return ELEMENT;
3882        if ("ElementDefinition".equals(codeString))
3883          return ELEMENTDEFINITION;
3884        if ("Expression".equals(codeString))
3885          return EXPRESSION;
3886        if ("Extension".equals(codeString))
3887          return EXTENSION;
3888        if ("HumanName".equals(codeString))
3889          return HUMANNAME;
3890        if ("Identifier".equals(codeString))
3891          return IDENTIFIER;
3892        if ("MarketingStatus".equals(codeString))
3893          return MARKETINGSTATUS;
3894        if ("Meta".equals(codeString))
3895          return META;
3896        if ("Money".equals(codeString))
3897          return MONEY;
3898        if ("MoneyQuantity".equals(codeString))
3899          return MONEYQUANTITY;
3900        if ("Narrative".equals(codeString))
3901          return NARRATIVE;
3902        if ("ParameterDefinition".equals(codeString))
3903          return PARAMETERDEFINITION;
3904        if ("Period".equals(codeString))
3905          return PERIOD;
3906        if ("Population".equals(codeString))
3907          return POPULATION;
3908        if ("ProdCharacteristic".equals(codeString))
3909          return PRODCHARACTERISTIC;
3910        if ("ProductShelfLife".equals(codeString))
3911          return PRODUCTSHELFLIFE;
3912        if ("Quantity".equals(codeString))
3913          return QUANTITY;
3914        if ("Range".equals(codeString))
3915          return RANGE;
3916        if ("Ratio".equals(codeString))
3917          return RATIO;
3918        if ("Reference".equals(codeString))
3919          return REFERENCE;
3920        if ("RelatedArtifact".equals(codeString))
3921          return RELATEDARTIFACT;
3922        if ("SampledData".equals(codeString))
3923          return SAMPLEDDATA;
3924        if ("Signature".equals(codeString))
3925          return SIGNATURE;
3926        if ("SimpleQuantity".equals(codeString))
3927          return SIMPLEQUANTITY;
3928        if ("SubstanceAmount".equals(codeString))
3929          return SUBSTANCEAMOUNT;
3930        if ("Timing".equals(codeString))
3931          return TIMING;
3932        if ("TriggerDefinition".equals(codeString))
3933          return TRIGGERDEFINITION;
3934        if ("UsageContext".equals(codeString))
3935          return USAGECONTEXT;
3936        if ("base64Binary".equals(codeString))
3937          return BASE64BINARY;
3938        if ("boolean".equals(codeString))
3939          return BOOLEAN;
3940        if ("canonical".equals(codeString))
3941          return CANONICAL;
3942        if ("code".equals(codeString))
3943          return CODE;
3944        if ("date".equals(codeString))
3945          return DATE;
3946        if ("dateTime".equals(codeString))
3947          return DATETIME;
3948        if ("decimal".equals(codeString))
3949          return DECIMAL;
3950        if ("id".equals(codeString))
3951          return ID;
3952        if ("instant".equals(codeString))
3953          return INSTANT;
3954        if ("integer".equals(codeString))
3955          return INTEGER;
3956        if ("markdown".equals(codeString))
3957          return MARKDOWN;
3958        if ("oid".equals(codeString))
3959          return OID;
3960        if ("positiveInt".equals(codeString))
3961          return POSITIVEINT;
3962        if ("string".equals(codeString))
3963          return STRING;
3964        if ("time".equals(codeString))
3965          return TIME;
3966        if ("unsignedInt".equals(codeString))
3967          return UNSIGNEDINT;
3968        if ("uri".equals(codeString))
3969          return URI;
3970        if ("url".equals(codeString))
3971          return URL;
3972        if ("uuid".equals(codeString))
3973          return UUID;
3974        if ("xhtml".equals(codeString))
3975          return XHTML;
3976        if ("Account".equals(codeString))
3977          return ACCOUNT;
3978        if ("ActivityDefinition".equals(codeString))
3979          return ACTIVITYDEFINITION;
3980        if ("AdverseEvent".equals(codeString))
3981          return ADVERSEEVENT;
3982        if ("AllergyIntolerance".equals(codeString))
3983          return ALLERGYINTOLERANCE;
3984        if ("Appointment".equals(codeString))
3985          return APPOINTMENT;
3986        if ("AppointmentResponse".equals(codeString))
3987          return APPOINTMENTRESPONSE;
3988        if ("AuditEvent".equals(codeString))
3989          return AUDITEVENT;
3990        if ("Basic".equals(codeString))
3991          return BASIC;
3992        if ("Binary".equals(codeString))
3993          return BINARY;
3994        if ("BiologicallyDerivedProduct".equals(codeString))
3995          return BIOLOGICALLYDERIVEDPRODUCT;
3996        if ("BodyStructure".equals(codeString))
3997          return BODYSTRUCTURE;
3998        if ("Bundle".equals(codeString))
3999          return BUNDLE;
4000        if ("CapabilityStatement".equals(codeString))
4001          return CAPABILITYSTATEMENT;
4002        if ("CarePlan".equals(codeString))
4003          return CAREPLAN;
4004        if ("CareTeam".equals(codeString))
4005          return CARETEAM;
4006        if ("CatalogEntry".equals(codeString))
4007          return CATALOGENTRY;
4008        if ("ChargeItem".equals(codeString))
4009          return CHARGEITEM;
4010        if ("ChargeItemDefinition".equals(codeString))
4011          return CHARGEITEMDEFINITION;
4012        if ("Claim".equals(codeString))
4013          return CLAIM;
4014        if ("ClaimResponse".equals(codeString))
4015          return CLAIMRESPONSE;
4016        if ("ClinicalImpression".equals(codeString))
4017          return CLINICALIMPRESSION;
4018        if ("CodeSystem".equals(codeString))
4019          return CODESYSTEM;
4020        if ("Communication".equals(codeString))
4021          return COMMUNICATION;
4022        if ("CommunicationRequest".equals(codeString))
4023          return COMMUNICATIONREQUEST;
4024        if ("CompartmentDefinition".equals(codeString))
4025          return COMPARTMENTDEFINITION;
4026        if ("Composition".equals(codeString))
4027          return COMPOSITION;
4028        if ("ConceptMap".equals(codeString))
4029          return CONCEPTMAP;
4030        if ("Condition".equals(codeString))
4031          return CONDITION;
4032        if ("Consent".equals(codeString))
4033          return CONSENT;
4034        if ("Contract".equals(codeString))
4035          return CONTRACT;
4036        if ("Coverage".equals(codeString))
4037          return COVERAGE;
4038        if ("CoverageEligibilityRequest".equals(codeString))
4039          return COVERAGEELIGIBILITYREQUEST;
4040        if ("CoverageEligibilityResponse".equals(codeString))
4041          return COVERAGEELIGIBILITYRESPONSE;
4042        if ("DetectedIssue".equals(codeString))
4043          return DETECTEDISSUE;
4044        if ("Device".equals(codeString))
4045          return DEVICE;
4046        if ("DeviceDefinition".equals(codeString))
4047          return DEVICEDEFINITION;
4048        if ("DeviceMetric".equals(codeString))
4049          return DEVICEMETRIC;
4050        if ("DeviceRequest".equals(codeString))
4051          return DEVICEREQUEST;
4052        if ("DeviceUseStatement".equals(codeString))
4053          return DEVICEUSESTATEMENT;
4054        if ("DiagnosticReport".equals(codeString))
4055          return DIAGNOSTICREPORT;
4056        if ("DocumentManifest".equals(codeString))
4057          return DOCUMENTMANIFEST;
4058        if ("DocumentReference".equals(codeString))
4059          return DOCUMENTREFERENCE;
4060        if ("DomainResource".equals(codeString))
4061          return DOMAINRESOURCE;
4062        if ("EffectEvidenceSynthesis".equals(codeString))
4063          return EFFECTEVIDENCESYNTHESIS;
4064        if ("Encounter".equals(codeString))
4065          return ENCOUNTER;
4066        if ("Endpoint".equals(codeString))
4067          return ENDPOINT;
4068        if ("EnrollmentRequest".equals(codeString))
4069          return ENROLLMENTREQUEST;
4070        if ("EnrollmentResponse".equals(codeString))
4071          return ENROLLMENTRESPONSE;
4072        if ("EpisodeOfCare".equals(codeString))
4073          return EPISODEOFCARE;
4074        if ("EventDefinition".equals(codeString))
4075          return EVENTDEFINITION;
4076        if ("Evidence".equals(codeString))
4077          return EVIDENCE;
4078        if ("EvidenceVariable".equals(codeString))
4079          return EVIDENCEVARIABLE;
4080        if ("ExampleScenario".equals(codeString))
4081          return EXAMPLESCENARIO;
4082        if ("ExplanationOfBenefit".equals(codeString))
4083          return EXPLANATIONOFBENEFIT;
4084        if ("FamilyMemberHistory".equals(codeString))
4085          return FAMILYMEMBERHISTORY;
4086        if ("Flag".equals(codeString))
4087          return FLAG;
4088        if ("Goal".equals(codeString))
4089          return GOAL;
4090        if ("GraphDefinition".equals(codeString))
4091          return GRAPHDEFINITION;
4092        if ("Group".equals(codeString))
4093          return GROUP;
4094        if ("GuidanceResponse".equals(codeString))
4095          return GUIDANCERESPONSE;
4096        if ("HealthcareService".equals(codeString))
4097          return HEALTHCARESERVICE;
4098        if ("ImagingStudy".equals(codeString))
4099          return IMAGINGSTUDY;
4100        if ("Immunization".equals(codeString))
4101          return IMMUNIZATION;
4102        if ("ImmunizationEvaluation".equals(codeString))
4103          return IMMUNIZATIONEVALUATION;
4104        if ("ImmunizationRecommendation".equals(codeString))
4105          return IMMUNIZATIONRECOMMENDATION;
4106        if ("ImplementationGuide".equals(codeString))
4107          return IMPLEMENTATIONGUIDE;
4108        if ("InsurancePlan".equals(codeString))
4109          return INSURANCEPLAN;
4110        if ("Invoice".equals(codeString))
4111          return INVOICE;
4112        if ("Library".equals(codeString))
4113          return LIBRARY;
4114        if ("Linkage".equals(codeString))
4115          return LINKAGE;
4116        if ("List".equals(codeString))
4117          return LIST;
4118        if ("Location".equals(codeString))
4119          return LOCATION;
4120        if ("Measure".equals(codeString))
4121          return MEASURE;
4122        if ("MeasureReport".equals(codeString))
4123          return MEASUREREPORT;
4124        if ("Media".equals(codeString))
4125          return MEDIA;
4126        if ("Medication".equals(codeString))
4127          return MEDICATION;
4128        if ("MedicationAdministration".equals(codeString))
4129          return MEDICATIONADMINISTRATION;
4130        if ("MedicationDispense".equals(codeString))
4131          return MEDICATIONDISPENSE;
4132        if ("MedicationKnowledge".equals(codeString))
4133          return MEDICATIONKNOWLEDGE;
4134        if ("MedicationRequest".equals(codeString))
4135          return MEDICATIONREQUEST;
4136        if ("MedicationStatement".equals(codeString))
4137          return MEDICATIONSTATEMENT;
4138        if ("MedicinalProduct".equals(codeString))
4139          return MEDICINALPRODUCT;
4140        if ("MedicinalProductAuthorization".equals(codeString))
4141          return MEDICINALPRODUCTAUTHORIZATION;
4142        if ("MedicinalProductContraindication".equals(codeString))
4143          return MEDICINALPRODUCTCONTRAINDICATION;
4144        if ("MedicinalProductIndication".equals(codeString))
4145          return MEDICINALPRODUCTINDICATION;
4146        if ("MedicinalProductIngredient".equals(codeString))
4147          return MEDICINALPRODUCTINGREDIENT;
4148        if ("MedicinalProductInteraction".equals(codeString))
4149          return MEDICINALPRODUCTINTERACTION;
4150        if ("MedicinalProductManufactured".equals(codeString))
4151          return MEDICINALPRODUCTMANUFACTURED;
4152        if ("MedicinalProductPackaged".equals(codeString))
4153          return MEDICINALPRODUCTPACKAGED;
4154        if ("MedicinalProductPharmaceutical".equals(codeString))
4155          return MEDICINALPRODUCTPHARMACEUTICAL;
4156        if ("MedicinalProductUndesirableEffect".equals(codeString))
4157          return MEDICINALPRODUCTUNDESIRABLEEFFECT;
4158        if ("MessageDefinition".equals(codeString))
4159          return MESSAGEDEFINITION;
4160        if ("MessageHeader".equals(codeString))
4161          return MESSAGEHEADER;
4162        if ("MolecularSequence".equals(codeString))
4163          return MOLECULARSEQUENCE;
4164        if ("NamingSystem".equals(codeString))
4165          return NAMINGSYSTEM;
4166        if ("NutritionOrder".equals(codeString))
4167          return NUTRITIONORDER;
4168        if ("Observation".equals(codeString))
4169          return OBSERVATION;
4170        if ("ObservationDefinition".equals(codeString))
4171          return OBSERVATIONDEFINITION;
4172        if ("OperationDefinition".equals(codeString))
4173          return OPERATIONDEFINITION;
4174        if ("OperationOutcome".equals(codeString))
4175          return OPERATIONOUTCOME;
4176        if ("Organization".equals(codeString))
4177          return ORGANIZATION;
4178        if ("OrganizationAffiliation".equals(codeString))
4179          return ORGANIZATIONAFFILIATION;
4180        if ("Parameters".equals(codeString))
4181          return PARAMETERS;
4182        if ("Patient".equals(codeString))
4183          return PATIENT;
4184        if ("PaymentNotice".equals(codeString))
4185          return PAYMENTNOTICE;
4186        if ("PaymentReconciliation".equals(codeString))
4187          return PAYMENTRECONCILIATION;
4188        if ("Person".equals(codeString))
4189          return PERSON;
4190        if ("PlanDefinition".equals(codeString))
4191          return PLANDEFINITION;
4192        if ("Practitioner".equals(codeString))
4193          return PRACTITIONER;
4194        if ("PractitionerRole".equals(codeString))
4195          return PRACTITIONERROLE;
4196        if ("Procedure".equals(codeString))
4197          return PROCEDURE;
4198        if ("Provenance".equals(codeString))
4199          return PROVENANCE;
4200        if ("Questionnaire".equals(codeString))
4201          return QUESTIONNAIRE;
4202        if ("QuestionnaireResponse".equals(codeString))
4203          return QUESTIONNAIRERESPONSE;
4204        if ("RelatedPerson".equals(codeString))
4205          return RELATEDPERSON;
4206        if ("RequestGroup".equals(codeString))
4207          return REQUESTGROUP;
4208        if ("ResearchDefinition".equals(codeString))
4209          return RESEARCHDEFINITION;
4210        if ("ResearchElementDefinition".equals(codeString))
4211          return RESEARCHELEMENTDEFINITION;
4212        if ("ResearchStudy".equals(codeString))
4213          return RESEARCHSTUDY;
4214        if ("ResearchSubject".equals(codeString))
4215          return RESEARCHSUBJECT;
4216        if ("Resource".equals(codeString))
4217          return RESOURCE;
4218        if ("RiskAssessment".equals(codeString))
4219          return RISKASSESSMENT;
4220        if ("RiskEvidenceSynthesis".equals(codeString))
4221          return RISKEVIDENCESYNTHESIS;
4222        if ("Schedule".equals(codeString))
4223          return SCHEDULE;
4224        if ("SearchParameter".equals(codeString))
4225          return SEARCHPARAMETER;
4226        if ("ServiceRequest".equals(codeString))
4227          return SERVICEREQUEST;
4228        if ("Slot".equals(codeString))
4229          return SLOT;
4230        if ("Specimen".equals(codeString))
4231          return SPECIMEN;
4232        if ("SpecimenDefinition".equals(codeString))
4233          return SPECIMENDEFINITION;
4234        if ("StructureDefinition".equals(codeString))
4235          return STRUCTUREDEFINITION;
4236        if ("StructureMap".equals(codeString))
4237          return STRUCTUREMAP;
4238        if ("Subscription".equals(codeString))
4239          return SUBSCRIPTION;
4240        if ("Substance".equals(codeString))
4241          return SUBSTANCE;
4242        if ("SubstanceNucleicAcid".equals(codeString))
4243          return SUBSTANCENUCLEICACID;
4244        if ("SubstancePolymer".equals(codeString))
4245          return SUBSTANCEPOLYMER;
4246        if ("SubstanceProtein".equals(codeString))
4247          return SUBSTANCEPROTEIN;
4248        if ("SubstanceReferenceInformation".equals(codeString))
4249          return SUBSTANCEREFERENCEINFORMATION;
4250        if ("SubstanceSourceMaterial".equals(codeString))
4251          return SUBSTANCESOURCEMATERIAL;
4252        if ("SubstanceSpecification".equals(codeString))
4253          return SUBSTANCESPECIFICATION;
4254        if ("SupplyDelivery".equals(codeString))
4255          return SUPPLYDELIVERY;
4256        if ("SupplyRequest".equals(codeString))
4257          return SUPPLYREQUEST;
4258        if ("Task".equals(codeString))
4259          return TASK;
4260        if ("TerminologyCapabilities".equals(codeString))
4261          return TERMINOLOGYCAPABILITIES;
4262        if ("TestReport".equals(codeString))
4263          return TESTREPORT;
4264        if ("TestScript".equals(codeString))
4265          return TESTSCRIPT;
4266        if ("ValueSet".equals(codeString))
4267          return VALUESET;
4268        if ("VerificationResult".equals(codeString))
4269          return VERIFICATIONRESULT;
4270        if ("VisionPrescription".equals(codeString))
4271          return VISIONPRESCRIPTION;
4272        if ("Type".equals(codeString))
4273          return TYPE;
4274        if ("Any".equals(codeString))
4275          return ANY;
4276        throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'");
4277        }
4278        public String toCode() {
4279          switch (this) {
4280            case ADDRESS: return "Address";
4281            case AGE: return "Age";
4282            case ANNOTATION: return "Annotation";
4283            case ATTACHMENT: return "Attachment";
4284            case BACKBONEELEMENT: return "BackboneElement";
4285            case CODEABLECONCEPT: return "CodeableConcept";
4286            case CODING: return "Coding";
4287            case CONTACTDETAIL: return "ContactDetail";
4288            case CONTACTPOINT: return "ContactPoint";
4289            case CONTRIBUTOR: return "Contributor";
4290            case COUNT: return "Count";
4291            case DATAREQUIREMENT: return "DataRequirement";
4292            case DISTANCE: return "Distance";
4293            case DOSAGE: return "Dosage";
4294            case DURATION: return "Duration";
4295            case ELEMENT: return "Element";
4296            case ELEMENTDEFINITION: return "ElementDefinition";
4297            case EXPRESSION: return "Expression";
4298            case EXTENSION: return "Extension";
4299            case HUMANNAME: return "HumanName";
4300            case IDENTIFIER: return "Identifier";
4301            case MARKETINGSTATUS: return "MarketingStatus";
4302            case META: return "Meta";
4303            case MONEY: return "Money";
4304            case MONEYQUANTITY: return "MoneyQuantity";
4305            case NARRATIVE: return "Narrative";
4306            case PARAMETERDEFINITION: return "ParameterDefinition";
4307            case PERIOD: return "Period";
4308            case POPULATION: return "Population";
4309            case PRODCHARACTERISTIC: return "ProdCharacteristic";
4310            case PRODUCTSHELFLIFE: return "ProductShelfLife";
4311            case QUANTITY: return "Quantity";
4312            case RANGE: return "Range";
4313            case RATIO: return "Ratio";
4314            case REFERENCE: return "Reference";
4315            case RELATEDARTIFACT: return "RelatedArtifact";
4316            case SAMPLEDDATA: return "SampledData";
4317            case SIGNATURE: return "Signature";
4318            case SIMPLEQUANTITY: return "SimpleQuantity";
4319            case SUBSTANCEAMOUNT: return "SubstanceAmount";
4320            case TIMING: return "Timing";
4321            case TRIGGERDEFINITION: return "TriggerDefinition";
4322            case USAGECONTEXT: return "UsageContext";
4323            case BASE64BINARY: return "base64Binary";
4324            case BOOLEAN: return "boolean";
4325            case CANONICAL: return "canonical";
4326            case CODE: return "code";
4327            case DATE: return "date";
4328            case DATETIME: return "dateTime";
4329            case DECIMAL: return "decimal";
4330            case ID: return "id";
4331            case INSTANT: return "instant";
4332            case INTEGER: return "integer";
4333            case MARKDOWN: return "markdown";
4334            case OID: return "oid";
4335            case POSITIVEINT: return "positiveInt";
4336            case STRING: return "string";
4337            case TIME: return "time";
4338            case UNSIGNEDINT: return "unsignedInt";
4339            case URI: return "uri";
4340            case URL: return "url";
4341            case UUID: return "uuid";
4342            case XHTML: return "xhtml";
4343            case ACCOUNT: return "Account";
4344            case ACTIVITYDEFINITION: return "ActivityDefinition";
4345            case ADVERSEEVENT: return "AdverseEvent";
4346            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
4347            case APPOINTMENT: return "Appointment";
4348            case APPOINTMENTRESPONSE: return "AppointmentResponse";
4349            case AUDITEVENT: return "AuditEvent";
4350            case BASIC: return "Basic";
4351            case BINARY: return "Binary";
4352            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
4353            case BODYSTRUCTURE: return "BodyStructure";
4354            case BUNDLE: return "Bundle";
4355            case CAPABILITYSTATEMENT: return "CapabilityStatement";
4356            case CAREPLAN: return "CarePlan";
4357            case CARETEAM: return "CareTeam";
4358            case CATALOGENTRY: return "CatalogEntry";
4359            case CHARGEITEM: return "ChargeItem";
4360            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
4361            case CLAIM: return "Claim";
4362            case CLAIMRESPONSE: return "ClaimResponse";
4363            case CLINICALIMPRESSION: return "ClinicalImpression";
4364            case CODESYSTEM: return "CodeSystem";
4365            case COMMUNICATION: return "Communication";
4366            case COMMUNICATIONREQUEST: return "CommunicationRequest";
4367            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
4368            case COMPOSITION: return "Composition";
4369            case CONCEPTMAP: return "ConceptMap";
4370            case CONDITION: return "Condition";
4371            case CONSENT: return "Consent";
4372            case CONTRACT: return "Contract";
4373            case COVERAGE: return "Coverage";
4374            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
4375            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
4376            case DETECTEDISSUE: return "DetectedIssue";
4377            case DEVICE: return "Device";
4378            case DEVICEDEFINITION: return "DeviceDefinition";
4379            case DEVICEMETRIC: return "DeviceMetric";
4380            case DEVICEREQUEST: return "DeviceRequest";
4381            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
4382            case DIAGNOSTICREPORT: return "DiagnosticReport";
4383            case DOCUMENTMANIFEST: return "DocumentManifest";
4384            case DOCUMENTREFERENCE: return "DocumentReference";
4385            case DOMAINRESOURCE: return "DomainResource";
4386            case EFFECTEVIDENCESYNTHESIS: return "EffectEvidenceSynthesis";
4387            case ENCOUNTER: return "Encounter";
4388            case ENDPOINT: return "Endpoint";
4389            case ENROLLMENTREQUEST: return "EnrollmentRequest";
4390            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
4391            case EPISODEOFCARE: return "EpisodeOfCare";
4392            case EVENTDEFINITION: return "EventDefinition";
4393            case EVIDENCE: return "Evidence";
4394            case EVIDENCEVARIABLE: return "EvidenceVariable";
4395            case EXAMPLESCENARIO: return "ExampleScenario";
4396            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
4397            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
4398            case FLAG: return "Flag";
4399            case GOAL: return "Goal";
4400            case GRAPHDEFINITION: return "GraphDefinition";
4401            case GROUP: return "Group";
4402            case GUIDANCERESPONSE: return "GuidanceResponse";
4403            case HEALTHCARESERVICE: return "HealthcareService";
4404            case IMAGINGSTUDY: return "ImagingStudy";
4405            case IMMUNIZATION: return "Immunization";
4406            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
4407            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
4408            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
4409            case INSURANCEPLAN: return "InsurancePlan";
4410            case INVOICE: return "Invoice";
4411            case LIBRARY: return "Library";
4412            case LINKAGE: return "Linkage";
4413            case LIST: return "List";
4414            case LOCATION: return "Location";
4415            case MEASURE: return "Measure";
4416            case MEASUREREPORT: return "MeasureReport";
4417            case MEDIA: return "Media";
4418            case MEDICATION: return "Medication";
4419            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
4420            case MEDICATIONDISPENSE: return "MedicationDispense";
4421            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
4422            case MEDICATIONREQUEST: return "MedicationRequest";
4423            case MEDICATIONSTATEMENT: return "MedicationStatement";
4424            case MEDICINALPRODUCT: return "MedicinalProduct";
4425            case MEDICINALPRODUCTAUTHORIZATION: return "MedicinalProductAuthorization";
4426            case MEDICINALPRODUCTCONTRAINDICATION: return "MedicinalProductContraindication";
4427            case MEDICINALPRODUCTINDICATION: return "MedicinalProductIndication";
4428            case MEDICINALPRODUCTINGREDIENT: return "MedicinalProductIngredient";
4429            case MEDICINALPRODUCTINTERACTION: return "MedicinalProductInteraction";
4430            case MEDICINALPRODUCTMANUFACTURED: return "MedicinalProductManufactured";
4431            case MEDICINALPRODUCTPACKAGED: return "MedicinalProductPackaged";
4432            case MEDICINALPRODUCTPHARMACEUTICAL: return "MedicinalProductPharmaceutical";
4433            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "MedicinalProductUndesirableEffect";
4434            case MESSAGEDEFINITION: return "MessageDefinition";
4435            case MESSAGEHEADER: return "MessageHeader";
4436            case MOLECULARSEQUENCE: return "MolecularSequence";
4437            case NAMINGSYSTEM: return "NamingSystem";
4438            case NUTRITIONORDER: return "NutritionOrder";
4439            case OBSERVATION: return "Observation";
4440            case OBSERVATIONDEFINITION: return "ObservationDefinition";
4441            case OPERATIONDEFINITION: return "OperationDefinition";
4442            case OPERATIONOUTCOME: return "OperationOutcome";
4443            case ORGANIZATION: return "Organization";
4444            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
4445            case PARAMETERS: return "Parameters";
4446            case PATIENT: return "Patient";
4447            case PAYMENTNOTICE: return "PaymentNotice";
4448            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
4449            case PERSON: return "Person";
4450            case PLANDEFINITION: return "PlanDefinition";
4451            case PRACTITIONER: return "Practitioner";
4452            case PRACTITIONERROLE: return "PractitionerRole";
4453            case PROCEDURE: return "Procedure";
4454            case PROVENANCE: return "Provenance";
4455            case QUESTIONNAIRE: return "Questionnaire";
4456            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
4457            case RELATEDPERSON: return "RelatedPerson";
4458            case REQUESTGROUP: return "RequestGroup";
4459            case RESEARCHDEFINITION: return "ResearchDefinition";
4460            case RESEARCHELEMENTDEFINITION: return "ResearchElementDefinition";
4461            case RESEARCHSTUDY: return "ResearchStudy";
4462            case RESEARCHSUBJECT: return "ResearchSubject";
4463            case RESOURCE: return "Resource";
4464            case RISKASSESSMENT: return "RiskAssessment";
4465            case RISKEVIDENCESYNTHESIS: return "RiskEvidenceSynthesis";
4466            case SCHEDULE: return "Schedule";
4467            case SEARCHPARAMETER: return "SearchParameter";
4468            case SERVICEREQUEST: return "ServiceRequest";
4469            case SLOT: return "Slot";
4470            case SPECIMEN: return "Specimen";
4471            case SPECIMENDEFINITION: return "SpecimenDefinition";
4472            case STRUCTUREDEFINITION: return "StructureDefinition";
4473            case STRUCTUREMAP: return "StructureMap";
4474            case SUBSCRIPTION: return "Subscription";
4475            case SUBSTANCE: return "Substance";
4476            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
4477            case SUBSTANCEPOLYMER: return "SubstancePolymer";
4478            case SUBSTANCEPROTEIN: return "SubstanceProtein";
4479            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
4480            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
4481            case SUBSTANCESPECIFICATION: return "SubstanceSpecification";
4482            case SUPPLYDELIVERY: return "SupplyDelivery";
4483            case SUPPLYREQUEST: return "SupplyRequest";
4484            case TASK: return "Task";
4485            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
4486            case TESTREPORT: return "TestReport";
4487            case TESTSCRIPT: return "TestScript";
4488            case VALUESET: return "ValueSet";
4489            case VERIFICATIONRESULT: return "VerificationResult";
4490            case VISIONPRESCRIPTION: return "VisionPrescription";
4491            case TYPE: return "Type";
4492            case ANY: return "Any";
4493            default: return "?";
4494          }
4495        }
4496        public String getSystem() {
4497          switch (this) {
4498            case ADDRESS: return "http://hl7.org/fhir/data-types";
4499            case AGE: return "http://hl7.org/fhir/data-types";
4500            case ANNOTATION: return "http://hl7.org/fhir/data-types";
4501            case ATTACHMENT: return "http://hl7.org/fhir/data-types";
4502            case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types";
4503            case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types";
4504            case CODING: return "http://hl7.org/fhir/data-types";
4505            case CONTACTDETAIL: return "http://hl7.org/fhir/data-types";
4506            case CONTACTPOINT: return "http://hl7.org/fhir/data-types";
4507            case CONTRIBUTOR: return "http://hl7.org/fhir/data-types";
4508            case COUNT: return "http://hl7.org/fhir/data-types";
4509            case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types";
4510            case DISTANCE: return "http://hl7.org/fhir/data-types";
4511            case DOSAGE: return "http://hl7.org/fhir/data-types";
4512            case DURATION: return "http://hl7.org/fhir/data-types";
4513            case ELEMENT: return "http://hl7.org/fhir/data-types";
4514            case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types";
4515            case EXPRESSION: return "http://hl7.org/fhir/data-types";
4516            case EXTENSION: return "http://hl7.org/fhir/data-types";
4517            case HUMANNAME: return "http://hl7.org/fhir/data-types";
4518            case IDENTIFIER: return "http://hl7.org/fhir/data-types";
4519            case MARKETINGSTATUS: return "http://hl7.org/fhir/data-types";
4520            case META: return "http://hl7.org/fhir/data-types";
4521            case MONEY: return "http://hl7.org/fhir/data-types";
4522            case MONEYQUANTITY: return "http://hl7.org/fhir/data-types";
4523            case NARRATIVE: return "http://hl7.org/fhir/data-types";
4524            case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types";
4525            case PERIOD: return "http://hl7.org/fhir/data-types";
4526            case POPULATION: return "http://hl7.org/fhir/data-types";
4527            case PRODCHARACTERISTIC: return "http://hl7.org/fhir/data-types";
4528            case PRODUCTSHELFLIFE: return "http://hl7.org/fhir/data-types";
4529            case QUANTITY: return "http://hl7.org/fhir/data-types";
4530            case RANGE: return "http://hl7.org/fhir/data-types";
4531            case RATIO: return "http://hl7.org/fhir/data-types";
4532            case REFERENCE: return "http://hl7.org/fhir/data-types";
4533            case RELATEDARTIFACT: return "http://hl7.org/fhir/data-types";
4534            case SAMPLEDDATA: return "http://hl7.org/fhir/data-types";
4535            case SIGNATURE: return "http://hl7.org/fhir/data-types";
4536            case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types";
4537            case SUBSTANCEAMOUNT: return "http://hl7.org/fhir/data-types";
4538            case TIMING: return "http://hl7.org/fhir/data-types";
4539            case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types";
4540            case USAGECONTEXT: return "http://hl7.org/fhir/data-types";
4541            case BASE64BINARY: return "http://hl7.org/fhir/data-types";
4542            case BOOLEAN: return "http://hl7.org/fhir/data-types";
4543            case CANONICAL: return "http://hl7.org/fhir/data-types";
4544            case CODE: return "http://hl7.org/fhir/data-types";
4545            case DATE: return "http://hl7.org/fhir/data-types";
4546            case DATETIME: return "http://hl7.org/fhir/data-types";
4547            case DECIMAL: return "http://hl7.org/fhir/data-types";
4548            case ID: return "http://hl7.org/fhir/data-types";
4549            case INSTANT: return "http://hl7.org/fhir/data-types";
4550            case INTEGER: return "http://hl7.org/fhir/data-types";
4551            case MARKDOWN: return "http://hl7.org/fhir/data-types";
4552            case OID: return "http://hl7.org/fhir/data-types";
4553            case POSITIVEINT: return "http://hl7.org/fhir/data-types";
4554            case STRING: return "http://hl7.org/fhir/data-types";
4555            case TIME: return "http://hl7.org/fhir/data-types";
4556            case UNSIGNEDINT: return "http://hl7.org/fhir/data-types";
4557            case URI: return "http://hl7.org/fhir/data-types";
4558            case URL: return "http://hl7.org/fhir/data-types";
4559            case UUID: return "http://hl7.org/fhir/data-types";
4560            case XHTML: return "http://hl7.org/fhir/data-types";
4561            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
4562            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
4563            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
4564            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
4565            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
4566            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
4567            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
4568            case BASIC: return "http://hl7.org/fhir/resource-types";
4569            case BINARY: return "http://hl7.org/fhir/resource-types";
4570            case BIOLOGICALLYDERIVEDPRODUCT: return "http://hl7.org/fhir/resource-types";
4571            case BODYSTRUCTURE: return "http://hl7.org/fhir/resource-types";
4572            case BUNDLE: return "http://hl7.org/fhir/resource-types";
4573            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
4574            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
4575            case CARETEAM: return "http://hl7.org/fhir/resource-types";
4576            case CATALOGENTRY: return "http://hl7.org/fhir/resource-types";
4577            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
4578            case CHARGEITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
4579            case CLAIM: return "http://hl7.org/fhir/resource-types";
4580            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
4581            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
4582            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
4583            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
4584            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
4585            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
4586            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
4587            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
4588            case CONDITION: return "http://hl7.org/fhir/resource-types";
4589            case CONSENT: return "http://hl7.org/fhir/resource-types";
4590            case CONTRACT: return "http://hl7.org/fhir/resource-types";
4591            case COVERAGE: return "http://hl7.org/fhir/resource-types";
4592            case COVERAGEELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
4593            case COVERAGEELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
4594            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
4595            case DEVICE: return "http://hl7.org/fhir/resource-types";
4596            case DEVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
4597            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
4598            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
4599            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types";
4600            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
4601            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
4602            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
4603            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
4604            case EFFECTEVIDENCESYNTHESIS: return "http://hl7.org/fhir/resource-types";
4605            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
4606            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
4607            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
4608            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
4609            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
4610            case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types";
4611            case EVIDENCE: return "http://hl7.org/fhir/resource-types";
4612            case EVIDENCEVARIABLE: return "http://hl7.org/fhir/resource-types";
4613            case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types";
4614            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
4615            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
4616            case FLAG: return "http://hl7.org/fhir/resource-types";
4617            case GOAL: return "http://hl7.org/fhir/resource-types";
4618            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
4619            case GROUP: return "http://hl7.org/fhir/resource-types";
4620            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
4621            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
4622            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
4623            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
4624            case IMMUNIZATIONEVALUATION: return "http://hl7.org/fhir/resource-types";
4625            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
4626            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
4627            case INSURANCEPLAN: return "http://hl7.org/fhir/resource-types";
4628            case INVOICE: return "http://hl7.org/fhir/resource-types";
4629            case LIBRARY: return "http://hl7.org/fhir/resource-types";
4630            case LINKAGE: return "http://hl7.org/fhir/resource-types";
4631            case LIST: return "http://hl7.org/fhir/resource-types";
4632            case LOCATION: return "http://hl7.org/fhir/resource-types";
4633            case MEASURE: return "http://hl7.org/fhir/resource-types";
4634            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
4635            case MEDIA: return "http://hl7.org/fhir/resource-types";
4636            case MEDICATION: return "http://hl7.org/fhir/resource-types";
4637            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
4638            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
4639            case MEDICATIONKNOWLEDGE: return "http://hl7.org/fhir/resource-types";
4640            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
4641            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types";
4642            case MEDICINALPRODUCT: return "http://hl7.org/fhir/resource-types";
4643            case MEDICINALPRODUCTAUTHORIZATION: return "http://hl7.org/fhir/resource-types";
4644            case MEDICINALPRODUCTCONTRAINDICATION: return "http://hl7.org/fhir/resource-types";
4645            case MEDICINALPRODUCTINDICATION: return "http://hl7.org/fhir/resource-types";
4646            case MEDICINALPRODUCTINGREDIENT: return "http://hl7.org/fhir/resource-types";
4647            case MEDICINALPRODUCTINTERACTION: return "http://hl7.org/fhir/resource-types";
4648            case MEDICINALPRODUCTMANUFACTURED: return "http://hl7.org/fhir/resource-types";
4649            case MEDICINALPRODUCTPACKAGED: return "http://hl7.org/fhir/resource-types";
4650            case MEDICINALPRODUCTPHARMACEUTICAL: return "http://hl7.org/fhir/resource-types";
4651            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "http://hl7.org/fhir/resource-types";
4652            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
4653            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
4654            case MOLECULARSEQUENCE: return "http://hl7.org/fhir/resource-types";
4655            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
4656            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
4657            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
4658            case OBSERVATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
4659            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
4660            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
4661            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
4662            case ORGANIZATIONAFFILIATION: return "http://hl7.org/fhir/resource-types";
4663            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
4664            case PATIENT: return "http://hl7.org/fhir/resource-types";
4665            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
4666            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
4667            case PERSON: return "http://hl7.org/fhir/resource-types";
4668            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
4669            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
4670            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
4671            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
4672            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
4673            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
4674            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
4675            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
4676            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
4677            case RESEARCHDEFINITION: return "http://hl7.org/fhir/resource-types";
4678            case RESEARCHELEMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
4679            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
4680            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
4681            case RESOURCE: return "http://hl7.org/fhir/resource-types";
4682            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
4683            case RISKEVIDENCESYNTHESIS: return "http://hl7.org/fhir/resource-types";
4684            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
4685            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
4686            case SERVICEREQUEST: return "http://hl7.org/fhir/resource-types";
4687            case SLOT: return "http://hl7.org/fhir/resource-types";
4688            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
4689            case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types";
4690            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
4691            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
4692            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
4693            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
4694            case SUBSTANCENUCLEICACID: return "http://hl7.org/fhir/resource-types";
4695            case SUBSTANCEPOLYMER: return "http://hl7.org/fhir/resource-types";
4696            case SUBSTANCEPROTEIN: return "http://hl7.org/fhir/resource-types";
4697            case SUBSTANCEREFERENCEINFORMATION: return "http://hl7.org/fhir/resource-types";
4698            case SUBSTANCESOURCEMATERIAL: return "http://hl7.org/fhir/resource-types";
4699            case SUBSTANCESPECIFICATION: return "http://hl7.org/fhir/resource-types";
4700            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
4701            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
4702            case TASK: return "http://hl7.org/fhir/resource-types";
4703            case TERMINOLOGYCAPABILITIES: return "http://hl7.org/fhir/resource-types";
4704            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
4705            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
4706            case VALUESET: return "http://hl7.org/fhir/resource-types";
4707            case VERIFICATIONRESULT: return "http://hl7.org/fhir/resource-types";
4708            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
4709            case TYPE: return "http://hl7.org/fhir/abstract-types";
4710            case ANY: return "http://hl7.org/fhir/abstract-types";
4711            default: return "?";
4712          }
4713        }
4714        public String getDefinition() {
4715          switch (this) {
4716            case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.";
4717            case AGE: return "A duration of time during which an organism (or a process) has existed.";
4718            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
4719            case ATTACHMENT: return "For referring to data content defined in other formats.";
4720            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
4721            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
4722            case CODING: return "A reference to a code defined by a terminology system.";
4723            case CONTACTDETAIL: return "Specifies contact information for a person or organization.";
4724            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
4725            case CONTRIBUTOR: return "A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.";
4726            case COUNT: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
4727            case DATAREQUIREMENT: return "Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.";
4728            case DISTANCE: return "A length - a value with a unit that is a physical distance.";
4729            case DOSAGE: return "Indicates how the medication is/was taken or should be taken by the patient.";
4730            case DURATION: return "A length of time.";
4731            case ELEMENT: return "Base definition for all elements in a resource.";
4732            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
4733            case EXPRESSION: return "A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used.";
4734            case EXTENSION: return "Optional Extension Element - found in all resources.";
4735            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
4736            case IDENTIFIER: return "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.";
4737            case MARKETINGSTATUS: return "The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.";
4738            case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.";
4739            case MONEY: return "An amount of economic utility in some recognized currency.";
4740            case MONEYQUANTITY: return "";
4741            case NARRATIVE: return "A human-readable summary of the resource conveying the essential clinical and business information for the resource.";
4742            case PARAMETERDEFINITION: return "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.";
4743            case PERIOD: return "A time period defined by a start and end date and optionally time.";
4744            case POPULATION: return "A populatioof people with some set of grouping criteria.";
4745            case PRODCHARACTERISTIC: return "The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.";
4746            case PRODUCTSHELFLIFE: return "The shelf-life and storage information for a medicinal product item or container can be described using this class.";
4747            case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
4748            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
4749            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
4750            case REFERENCE: return "A reference from one resource to another.";
4751            case RELATEDARTIFACT: return "Related artifacts such as additional documentation, justification, or bibliographic references.";
4752            case SAMPLEDDATA: return "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.";
4753            case SIGNATURE: return "A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.";
4754            case SIMPLEQUANTITY: return "";
4755            case SUBSTANCEAMOUNT: return "Chemical substances are a single substance type whose primary defining element is the molecular structure. Chemical substances shall be defined on the basis of their complete covalent molecular structure; the presence of a salt (counter-ion) and/or solvates (water, alcohols) is also captured. Purity, grade, physical form or particle size are not taken into account in the definition of a chemical substance or in the assignment of a Substance ID.";
4756            case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.";
4757            case TRIGGERDEFINITION: return "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.";
4758            case USAGECONTEXT: return "Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).";
4759            case BASE64BINARY: return "A stream of bytes";
4760            case BOOLEAN: return "Value of \"true\" or \"false\"";
4761            case CANONICAL: return "A URI that is a reference to a canonical URL on a FHIR resource";
4762            case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents";
4763            case DATE: return "A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.";
4764            case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.";
4765            case DECIMAL: return "A rational number with implicit precision";
4766            case ID: return "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.";
4767            case INSTANT: return "An instant in time - known at least to the second";
4768            case INTEGER: return "A whole number";
4769            case MARKDOWN: return "A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine";
4770            case OID: return "An OID represented as a URI";
4771            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
4772            case STRING: return "A sequence of Unicode characters";
4773            case TIME: return "A time during the day, with no date specified";
4774            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
4775            case URI: return "String of characters used to identify a name or a resource";
4776            case URL: return "A URI that is a literal reference";
4777            case UUID: return "A UUID, represented as a URI";
4778            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
4779            case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.";
4780            case ACTIVITYDEFINITION: return "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.";
4781            case ADVERSEEVENT: return "Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.";
4782            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
4783            case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).";
4784            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
4785            case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.";
4786            case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.";
4787            case BINARY: return "A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
4788            case BIOLOGICALLYDERIVEDPRODUCT: return "A material substance originating from a biological entity intended to be transplanted or infused\ninto another (possibly the same) biological entity.";
4789            case BODYSTRUCTURE: return "Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.";
4790            case BUNDLE: return "A container for a collection of resources.";
4791            case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
4792            case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.";
4793            case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.";
4794            case CATALOGENTRY: return "Catalog entries are wrappers that contextualize items included in a catalog.";
4795            case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.";
4796            case CHARGEITEMDEFINITION: return "The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.";
4797            case CLAIM: return "A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.";
4798            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
4799            case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score.";
4800            case CODESYSTEM: return "The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.";
4801            case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.";
4802            case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.";
4803            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
4804            case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).";
4805            case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.";
4806            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
4807            case CONSENT: return "A record of a healthcare consumer’s  choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.";
4808            case CONTRACT: return "Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.";
4809            case COVERAGE: return "Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.";
4810            case COVERAGEELIGIBILITYREQUEST: return "The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.";
4811            case COVERAGEELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.";
4812            case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.";
4813            case DEVICE: return "A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.";
4814            case DEVICEDEFINITION: return "The characteristics, operational status and capabilities of a medical-related component of a medical device.";
4815            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
4816            case DEVICEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.";
4817            case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.";
4818            case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.";
4819            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
4820            case DOCUMENTREFERENCE: return "A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.";
4821            case DOMAINRESOURCE: return "A resource that includes narrative, extensions, and contained resources.";
4822            case EFFECTEVIDENCESYNTHESIS: return "The EffectEvidenceSynthesis resource describes the difference in an outcome between exposures states in a population where the effect estimate is derived from a combination of research studies.";
4823            case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.";
4824            case ENDPOINT: return "The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.";
4825            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
4826            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.";
4827            case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.";
4828            case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur.";
4829            case EVIDENCE: return "The Evidence resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.";
4830            case EVIDENCEVARIABLE: return "The EvidenceVariable resource describes a \"PICO\" element that knowledge (evidence, assertion, recommendation) is about.";
4831            case EXAMPLESCENARIO: return "Example of workflow instance.";
4832            case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.";
4833            case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient.";
4834            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
4835            case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.";
4836            case GRAPHDEFINITION: return "A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.";
4837            case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.";
4838            case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.";
4839            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
4840            case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.";
4841            case IMMUNIZATION: return "Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.";
4842            case IMMUNIZATIONEVALUATION: return "Describes a comparison of an immunization event against published recommendations to determine if the administration is \"valid\" in relation to those  recommendations.";
4843            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.";
4844            case IMPLEMENTATIONGUIDE: return "A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.";
4845            case INSURANCEPLAN: return "Details of a Health Insurance product/plan provided by an organization.";
4846            case INVOICE: return "Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.";
4847            case LIBRARY: return "The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.";
4848            case LINKAGE: return "Identifies two or more records (resource instances) that refer to the same real-world \"occurrence\".";
4849            case LIST: return "A list is a curated collection of resources.";
4850            case LOCATION: return "Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.";
4851            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
4852            case MEASUREREPORT: return "The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.";
4853            case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.";
4854            case MEDICATION: return "This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.";
4855            case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.";
4856            case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.";
4857            case MEDICATIONKNOWLEDGE: return "Information about a medication that is used to support knowledge.";
4858            case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.";
4859            case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. \n\nThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.";
4860            case MEDICINALPRODUCT: return "Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).";
4861            case MEDICINALPRODUCTAUTHORIZATION: return "The regulatory authorization of a medicinal product.";
4862            case MEDICINALPRODUCTCONTRAINDICATION: return "The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.";
4863            case MEDICINALPRODUCTINDICATION: return "Indication for the Medicinal Product.";
4864            case MEDICINALPRODUCTINGREDIENT: return "An ingredient of a manufactured item or pharmaceutical product.";
4865            case MEDICINALPRODUCTINTERACTION: return "The interactions of the medicinal product with other medicinal products, or other forms of interactions.";
4866            case MEDICINALPRODUCTMANUFACTURED: return "The manufactured item as contained in the packaged medicinal product.";
4867            case MEDICINALPRODUCTPACKAGED: return "A medicinal product in a container or package.";
4868            case MEDICINALPRODUCTPHARMACEUTICAL: return "A pharmaceutical product described in terms of its composition and dose form.";
4869            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "Describe the undesirable effects of the medicinal product.";
4870            case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.";
4871            case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.";
4872            case MOLECULARSEQUENCE: return "Raw data describing a biological sequence.";
4873            case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a \"System\" used within the Identifier and Coding data types.";
4874            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
4875            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
4876            case OBSERVATIONDEFINITION: return "Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.";
4877            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
4878            case OPERATIONOUTCOME: return "A collection of error, warning, or information messages that result from a system action.";
4879            case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.";
4880            case ORGANIZATIONAFFILIATION: return "Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.";
4881            case PARAMETERS: return "This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it.";
4882            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
4883            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
4884            case PAYMENTRECONCILIATION: return "This resource provides the details including amount of a payment and allocates the payment items being paid.";
4885            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
4886            case PLANDEFINITION: return "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.";
4887            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
4888            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
4889            case PROCEDURE: return "An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.";
4890            case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.";
4891            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.";
4892            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.";
4893            case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.";
4894            case REQUESTGROUP: return "A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\".";
4895            case RESEARCHDEFINITION: return "The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.";
4896            case RESEARCHELEMENTDEFINITION: return "The ResearchElementDefinition resource describes a \"PICO\" element that knowledge (evidence, assertion, recommendation) is about.";
4897            case RESEARCHSTUDY: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
4898            case RESEARCHSUBJECT: return "A physical entity which is the primary unit of operational and/or administrative interest in a study.";
4899            case RESOURCE: return "This is the base resource type for everything.";
4900            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
4901            case RISKEVIDENCESYNTHESIS: return "The RiskEvidenceSynthesis resource describes the likelihood of an outcome in a population plus exposure state where the risk estimate is derived from a combination of research studies.";
4902            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
4903            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
4904            case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.";
4905            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
4906            case SPECIMEN: return "A sample to be used for analysis.";
4907            case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements.";
4908            case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.";
4909            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
4910            case SUBSCRIPTION: return "The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system can take an appropriate action.";
4911            case SUBSTANCE: return "A homogeneous material with a definite composition.";
4912            case SUBSTANCENUCLEICACID: return "Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction.";
4913            case SUBSTANCEPOLYMER: return "Todo.";
4914            case SUBSTANCEPROTEIN: return "A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators.";
4915            case SUBSTANCEREFERENCEINFORMATION: return "Todo.";
4916            case SUBSTANCESOURCEMATERIAL: return "Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex.";
4917            case SUBSTANCESPECIFICATION: return "The detailed description of a substance, typically at a level beyond what is used for prescribing.";
4918            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
4919            case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting.";
4920            case TASK: return "A task to be performed.";
4921            case TERMINOLOGYCAPABILITIES: return "A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
4922            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
4923            case TESTSCRIPT: return "A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.";
4924            case VALUESET: return "A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).";
4925            case VERIFICATIONRESULT: return "Describes validation requirements, source(s), status and dates for one or more elements.";
4926            case VISIONPRESCRIPTION: return "An authorization for the provision of glasses and/or contact lenses to a patient.";
4927            case TYPE: return "A place holder that means any kind of data type";
4928            case ANY: return "A place holder that means any kind of resource";
4929            default: return "?";
4930          }
4931        }
4932        public String getDisplay() {
4933          switch (this) {
4934            case ADDRESS: return "Address";
4935            case AGE: return "Age";
4936            case ANNOTATION: return "Annotation";
4937            case ATTACHMENT: return "Attachment";
4938            case BACKBONEELEMENT: return "BackboneElement";
4939            case CODEABLECONCEPT: return "CodeableConcept";
4940            case CODING: return "Coding";
4941            case CONTACTDETAIL: return "ContactDetail";
4942            case CONTACTPOINT: return "ContactPoint";
4943            case CONTRIBUTOR: return "Contributor";
4944            case COUNT: return "Count";
4945            case DATAREQUIREMENT: return "DataRequirement";
4946            case DISTANCE: return "Distance";
4947            case DOSAGE: return "Dosage";
4948            case DURATION: return "Duration";
4949            case ELEMENT: return "Element";
4950            case ELEMENTDEFINITION: return "ElementDefinition";
4951            case EXPRESSION: return "Expression";
4952            case EXTENSION: return "Extension";
4953            case HUMANNAME: return "HumanName";
4954            case IDENTIFIER: return "Identifier";
4955            case MARKETINGSTATUS: return "MarketingStatus";
4956            case META: return "Meta";
4957            case MONEY: return "Money";
4958            case MONEYQUANTITY: return "MoneyQuantity";
4959            case NARRATIVE: return "Narrative";
4960            case PARAMETERDEFINITION: return "ParameterDefinition";
4961            case PERIOD: return "Period";
4962            case POPULATION: return "Population";
4963            case PRODCHARACTERISTIC: return "ProdCharacteristic";
4964            case PRODUCTSHELFLIFE: return "ProductShelfLife";
4965            case QUANTITY: return "Quantity";
4966            case RANGE: return "Range";
4967            case RATIO: return "Ratio";
4968            case REFERENCE: return "Reference";
4969            case RELATEDARTIFACT: return "RelatedArtifact";
4970            case SAMPLEDDATA: return "SampledData";
4971            case SIGNATURE: return "Signature";
4972            case SIMPLEQUANTITY: return "SimpleQuantity";
4973            case SUBSTANCEAMOUNT: return "SubstanceAmount";
4974            case TIMING: return "Timing";
4975            case TRIGGERDEFINITION: return "TriggerDefinition";
4976            case USAGECONTEXT: return "UsageContext";
4977            case BASE64BINARY: return "base64Binary";
4978            case BOOLEAN: return "boolean";
4979            case CANONICAL: return "canonical";
4980            case CODE: return "code";
4981            case DATE: return "date";
4982            case DATETIME: return "dateTime";
4983            case DECIMAL: return "decimal";
4984            case ID: return "id";
4985            case INSTANT: return "instant";
4986            case INTEGER: return "integer";
4987            case MARKDOWN: return "markdown";
4988            case OID: return "oid";
4989            case POSITIVEINT: return "positiveInt";
4990            case STRING: return "string";
4991            case TIME: return "time";
4992            case UNSIGNEDINT: return "unsignedInt";
4993            case URI: return "uri";
4994            case URL: return "url";
4995            case UUID: return "uuid";
4996            case XHTML: return "XHTML";
4997            case ACCOUNT: return "Account";
4998            case ACTIVITYDEFINITION: return "ActivityDefinition";
4999            case ADVERSEEVENT: return "AdverseEvent";
5000            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
5001            case APPOINTMENT: return "Appointment";
5002            case APPOINTMENTRESPONSE: return "AppointmentResponse";
5003            case AUDITEVENT: return "AuditEvent";
5004            case BASIC: return "Basic";
5005            case BINARY: return "Binary";
5006            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
5007            case BODYSTRUCTURE: return "BodyStructure";
5008            case BUNDLE: return "Bundle";
5009            case CAPABILITYSTATEMENT: return "CapabilityStatement";
5010            case CAREPLAN: return "CarePlan";
5011            case CARETEAM: return "CareTeam";
5012            case CATALOGENTRY: return "CatalogEntry";
5013            case CHARGEITEM: return "ChargeItem";
5014            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
5015            case CLAIM: return "Claim";
5016            case CLAIMRESPONSE: return "ClaimResponse";
5017            case CLINICALIMPRESSION: return "ClinicalImpression";
5018            case CODESYSTEM: return "CodeSystem";
5019            case COMMUNICATION: return "Communication";
5020            case COMMUNICATIONREQUEST: return "CommunicationRequest";
5021            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
5022            case COMPOSITION: return "Composition";
5023            case CONCEPTMAP: return "ConceptMap";
5024            case CONDITION: return "Condition";
5025            case CONSENT: return "Consent";
5026            case CONTRACT: return "Contract";
5027            case COVERAGE: return "Coverage";
5028            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
5029            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
5030            case DETECTEDISSUE: return "DetectedIssue";
5031            case DEVICE: return "Device";
5032            case DEVICEDEFINITION: return "DeviceDefinition";
5033            case DEVICEMETRIC: return "DeviceMetric";
5034            case DEVICEREQUEST: return "DeviceRequest";
5035            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
5036            case DIAGNOSTICREPORT: return "DiagnosticReport";
5037            case DOCUMENTMANIFEST: return "DocumentManifest";
5038            case DOCUMENTREFERENCE: return "DocumentReference";
5039            case DOMAINRESOURCE: return "DomainResource";
5040            case EFFECTEVIDENCESYNTHESIS: return "EffectEvidenceSynthesis";
5041            case ENCOUNTER: return "Encounter";
5042            case ENDPOINT: return "Endpoint";
5043            case ENROLLMENTREQUEST: return "EnrollmentRequest";
5044            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
5045            case EPISODEOFCARE: return "EpisodeOfCare";
5046            case EVENTDEFINITION: return "EventDefinition";
5047            case EVIDENCE: return "Evidence";
5048            case EVIDENCEVARIABLE: return "EvidenceVariable";
5049            case EXAMPLESCENARIO: return "ExampleScenario";
5050            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
5051            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
5052            case FLAG: return "Flag";
5053            case GOAL: return "Goal";
5054            case GRAPHDEFINITION: return "GraphDefinition";
5055            case GROUP: return "Group";
5056            case GUIDANCERESPONSE: return "GuidanceResponse";
5057            case HEALTHCARESERVICE: return "HealthcareService";
5058            case IMAGINGSTUDY: return "ImagingStudy";
5059            case IMMUNIZATION: return "Immunization";
5060            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
5061            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
5062            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
5063            case INSURANCEPLAN: return "InsurancePlan";
5064            case INVOICE: return "Invoice";
5065            case LIBRARY: return "Library";
5066            case LINKAGE: return "Linkage";
5067            case LIST: return "List";
5068            case LOCATION: return "Location";
5069            case MEASURE: return "Measure";
5070            case MEASUREREPORT: return "MeasureReport";
5071            case MEDIA: return "Media";
5072            case MEDICATION: return "Medication";
5073            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
5074            case MEDICATIONDISPENSE: return "MedicationDispense";
5075            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
5076            case MEDICATIONREQUEST: return "MedicationRequest";
5077            case MEDICATIONSTATEMENT: return "MedicationStatement";
5078            case MEDICINALPRODUCT: return "MedicinalProduct";
5079            case MEDICINALPRODUCTAUTHORIZATION: return "MedicinalProductAuthorization";
5080            case MEDICINALPRODUCTCONTRAINDICATION: return "MedicinalProductContraindication";
5081            case MEDICINALPRODUCTINDICATION: return "MedicinalProductIndication";
5082            case MEDICINALPRODUCTINGREDIENT: return "MedicinalProductIngredient";
5083            case MEDICINALPRODUCTINTERACTION: return "MedicinalProductInteraction";
5084            case MEDICINALPRODUCTMANUFACTURED: return "MedicinalProductManufactured";
5085            case MEDICINALPRODUCTPACKAGED: return "MedicinalProductPackaged";
5086            case MEDICINALPRODUCTPHARMACEUTICAL: return "MedicinalProductPharmaceutical";
5087            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "MedicinalProductUndesirableEffect";
5088            case MESSAGEDEFINITION: return "MessageDefinition";
5089            case MESSAGEHEADER: return "MessageHeader";
5090            case MOLECULARSEQUENCE: return "MolecularSequence";
5091            case NAMINGSYSTEM: return "NamingSystem";
5092            case NUTRITIONORDER: return "NutritionOrder";
5093            case OBSERVATION: return "Observation";
5094            case OBSERVATIONDEFINITION: return "ObservationDefinition";
5095            case OPERATIONDEFINITION: return "OperationDefinition";
5096            case OPERATIONOUTCOME: return "OperationOutcome";
5097            case ORGANIZATION: return "Organization";
5098            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
5099            case PARAMETERS: return "Parameters";
5100            case PATIENT: return "Patient";
5101            case PAYMENTNOTICE: return "PaymentNotice";
5102            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
5103            case PERSON: return "Person";
5104            case PLANDEFINITION: return "PlanDefinition";
5105            case PRACTITIONER: return "Practitioner";
5106            case PRACTITIONERROLE: return "PractitionerRole";
5107            case PROCEDURE: return "Procedure";
5108            case PROVENANCE: return "Provenance";
5109            case QUESTIONNAIRE: return "Questionnaire";
5110            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
5111            case RELATEDPERSON: return "RelatedPerson";
5112            case REQUESTGROUP: return "RequestGroup";
5113            case RESEARCHDEFINITION: return "ResearchDefinition";
5114            case RESEARCHELEMENTDEFINITION: return "ResearchElementDefinition";
5115            case RESEARCHSTUDY: return "ResearchStudy";
5116            case RESEARCHSUBJECT: return "ResearchSubject";
5117            case RESOURCE: return "Resource";
5118            case RISKASSESSMENT: return "RiskAssessment";
5119            case RISKEVIDENCESYNTHESIS: return "RiskEvidenceSynthesis";
5120            case SCHEDULE: return "Schedule";
5121            case SEARCHPARAMETER: return "SearchParameter";
5122            case SERVICEREQUEST: return "ServiceRequest";
5123            case SLOT: return "Slot";
5124            case SPECIMEN: return "Specimen";
5125            case SPECIMENDEFINITION: return "SpecimenDefinition";
5126            case STRUCTUREDEFINITION: return "StructureDefinition";
5127            case STRUCTUREMAP: return "StructureMap";
5128            case SUBSCRIPTION: return "Subscription";
5129            case SUBSTANCE: return "Substance";
5130            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
5131            case SUBSTANCEPOLYMER: return "SubstancePolymer";
5132            case SUBSTANCEPROTEIN: return "SubstanceProtein";
5133            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
5134            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
5135            case SUBSTANCESPECIFICATION: return "SubstanceSpecification";
5136            case SUPPLYDELIVERY: return "SupplyDelivery";
5137            case SUPPLYREQUEST: return "SupplyRequest";
5138            case TASK: return "Task";
5139            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
5140            case TESTREPORT: return "TestReport";
5141            case TESTSCRIPT: return "TestScript";
5142            case VALUESET: return "ValueSet";
5143            case VERIFICATIONRESULT: return "VerificationResult";
5144            case VISIONPRESCRIPTION: return "VisionPrescription";
5145            case TYPE: return "Type";
5146            case ANY: return "Any";
5147            default: return "?";
5148          }
5149        }
5150    }
5151
5152  public static class FHIRAllTypesEnumFactory implements EnumFactory<FHIRAllTypes> {
5153    public FHIRAllTypes fromCode(String codeString) throws IllegalArgumentException {
5154      if (codeString == null || "".equals(codeString))
5155            if (codeString == null || "".equals(codeString))
5156                return null;
5157        if ("Address".equals(codeString))
5158          return FHIRAllTypes.ADDRESS;
5159        if ("Age".equals(codeString))
5160          return FHIRAllTypes.AGE;
5161        if ("Annotation".equals(codeString))
5162          return FHIRAllTypes.ANNOTATION;
5163        if ("Attachment".equals(codeString))
5164          return FHIRAllTypes.ATTACHMENT;
5165        if ("BackboneElement".equals(codeString))
5166          return FHIRAllTypes.BACKBONEELEMENT;
5167        if ("CodeableConcept".equals(codeString))
5168          return FHIRAllTypes.CODEABLECONCEPT;
5169        if ("Coding".equals(codeString))
5170          return FHIRAllTypes.CODING;
5171        if ("ContactDetail".equals(codeString))
5172          return FHIRAllTypes.CONTACTDETAIL;
5173        if ("ContactPoint".equals(codeString))
5174          return FHIRAllTypes.CONTACTPOINT;
5175        if ("Contributor".equals(codeString))
5176          return FHIRAllTypes.CONTRIBUTOR;
5177        if ("Count".equals(codeString))
5178          return FHIRAllTypes.COUNT;
5179        if ("DataRequirement".equals(codeString))
5180          return FHIRAllTypes.DATAREQUIREMENT;
5181        if ("Distance".equals(codeString))
5182          return FHIRAllTypes.DISTANCE;
5183        if ("Dosage".equals(codeString))
5184          return FHIRAllTypes.DOSAGE;
5185        if ("Duration".equals(codeString))
5186          return FHIRAllTypes.DURATION;
5187        if ("Element".equals(codeString))
5188          return FHIRAllTypes.ELEMENT;
5189        if ("ElementDefinition".equals(codeString))
5190          return FHIRAllTypes.ELEMENTDEFINITION;
5191        if ("Expression".equals(codeString))
5192          return FHIRAllTypes.EXPRESSION;
5193        if ("Extension".equals(codeString))
5194          return FHIRAllTypes.EXTENSION;
5195        if ("HumanName".equals(codeString))
5196          return FHIRAllTypes.HUMANNAME;
5197        if ("Identifier".equals(codeString))
5198          return FHIRAllTypes.IDENTIFIER;
5199        if ("MarketingStatus".equals(codeString))
5200          return FHIRAllTypes.MARKETINGSTATUS;
5201        if ("Meta".equals(codeString))
5202          return FHIRAllTypes.META;
5203        if ("Money".equals(codeString))
5204          return FHIRAllTypes.MONEY;
5205        if ("MoneyQuantity".equals(codeString))
5206          return FHIRAllTypes.MONEYQUANTITY;
5207        if ("Narrative".equals(codeString))
5208          return FHIRAllTypes.NARRATIVE;
5209        if ("ParameterDefinition".equals(codeString))
5210          return FHIRAllTypes.PARAMETERDEFINITION;
5211        if ("Period".equals(codeString))
5212          return FHIRAllTypes.PERIOD;
5213        if ("Population".equals(codeString))
5214          return FHIRAllTypes.POPULATION;
5215        if ("ProdCharacteristic".equals(codeString))
5216          return FHIRAllTypes.PRODCHARACTERISTIC;
5217        if ("ProductShelfLife".equals(codeString))
5218          return FHIRAllTypes.PRODUCTSHELFLIFE;
5219        if ("Quantity".equals(codeString))
5220          return FHIRAllTypes.QUANTITY;
5221        if ("Range".equals(codeString))
5222          return FHIRAllTypes.RANGE;
5223        if ("Ratio".equals(codeString))
5224          return FHIRAllTypes.RATIO;
5225        if ("Reference".equals(codeString))
5226          return FHIRAllTypes.REFERENCE;
5227        if ("RelatedArtifact".equals(codeString))
5228          return FHIRAllTypes.RELATEDARTIFACT;
5229        if ("SampledData".equals(codeString))
5230          return FHIRAllTypes.SAMPLEDDATA;
5231        if ("Signature".equals(codeString))
5232          return FHIRAllTypes.SIGNATURE;
5233        if ("SimpleQuantity".equals(codeString))
5234          return FHIRAllTypes.SIMPLEQUANTITY;
5235        if ("SubstanceAmount".equals(codeString))
5236          return FHIRAllTypes.SUBSTANCEAMOUNT;
5237        if ("Timing".equals(codeString))
5238          return FHIRAllTypes.TIMING;
5239        if ("TriggerDefinition".equals(codeString))
5240          return FHIRAllTypes.TRIGGERDEFINITION;
5241        if ("UsageContext".equals(codeString))
5242          return FHIRAllTypes.USAGECONTEXT;
5243        if ("base64Binary".equals(codeString))
5244          return FHIRAllTypes.BASE64BINARY;
5245        if ("boolean".equals(codeString))
5246          return FHIRAllTypes.BOOLEAN;
5247        if ("canonical".equals(codeString))
5248          return FHIRAllTypes.CANONICAL;
5249        if ("code".equals(codeString))
5250          return FHIRAllTypes.CODE;
5251        if ("date".equals(codeString))
5252          return FHIRAllTypes.DATE;
5253        if ("dateTime".equals(codeString))
5254          return FHIRAllTypes.DATETIME;
5255        if ("decimal".equals(codeString))
5256          return FHIRAllTypes.DECIMAL;
5257        if ("id".equals(codeString))
5258          return FHIRAllTypes.ID;
5259        if ("instant".equals(codeString))
5260          return FHIRAllTypes.INSTANT;
5261        if ("integer".equals(codeString))
5262          return FHIRAllTypes.INTEGER;
5263        if ("markdown".equals(codeString))
5264          return FHIRAllTypes.MARKDOWN;
5265        if ("oid".equals(codeString))
5266          return FHIRAllTypes.OID;
5267        if ("positiveInt".equals(codeString))
5268          return FHIRAllTypes.POSITIVEINT;
5269        if ("string".equals(codeString))
5270          return FHIRAllTypes.STRING;
5271        if ("time".equals(codeString))
5272          return FHIRAllTypes.TIME;
5273        if ("unsignedInt".equals(codeString))
5274          return FHIRAllTypes.UNSIGNEDINT;
5275        if ("uri".equals(codeString))
5276          return FHIRAllTypes.URI;
5277        if ("url".equals(codeString))
5278          return FHIRAllTypes.URL;
5279        if ("uuid".equals(codeString))
5280          return FHIRAllTypes.UUID;
5281        if ("xhtml".equals(codeString))
5282          return FHIRAllTypes.XHTML;
5283        if ("Account".equals(codeString))
5284          return FHIRAllTypes.ACCOUNT;
5285        if ("ActivityDefinition".equals(codeString))
5286          return FHIRAllTypes.ACTIVITYDEFINITION;
5287        if ("AdverseEvent".equals(codeString))
5288          return FHIRAllTypes.ADVERSEEVENT;
5289        if ("AllergyIntolerance".equals(codeString))
5290          return FHIRAllTypes.ALLERGYINTOLERANCE;
5291        if ("Appointment".equals(codeString))
5292          return FHIRAllTypes.APPOINTMENT;
5293        if ("AppointmentResponse".equals(codeString))
5294          return FHIRAllTypes.APPOINTMENTRESPONSE;
5295        if ("AuditEvent".equals(codeString))
5296          return FHIRAllTypes.AUDITEVENT;
5297        if ("Basic".equals(codeString))
5298          return FHIRAllTypes.BASIC;
5299        if ("Binary".equals(codeString))
5300          return FHIRAllTypes.BINARY;
5301        if ("BiologicallyDerivedProduct".equals(codeString))
5302          return FHIRAllTypes.BIOLOGICALLYDERIVEDPRODUCT;
5303        if ("BodyStructure".equals(codeString))
5304          return FHIRAllTypes.BODYSTRUCTURE;
5305        if ("Bundle".equals(codeString))
5306          return FHIRAllTypes.BUNDLE;
5307        if ("CapabilityStatement".equals(codeString))
5308          return FHIRAllTypes.CAPABILITYSTATEMENT;
5309        if ("CarePlan".equals(codeString))
5310          return FHIRAllTypes.CAREPLAN;
5311        if ("CareTeam".equals(codeString))
5312          return FHIRAllTypes.CARETEAM;
5313        if ("CatalogEntry".equals(codeString))
5314          return FHIRAllTypes.CATALOGENTRY;
5315        if ("ChargeItem".equals(codeString))
5316          return FHIRAllTypes.CHARGEITEM;
5317        if ("ChargeItemDefinition".equals(codeString))
5318          return FHIRAllTypes.CHARGEITEMDEFINITION;
5319        if ("Claim".equals(codeString))
5320          return FHIRAllTypes.CLAIM;
5321        if ("ClaimResponse".equals(codeString))
5322          return FHIRAllTypes.CLAIMRESPONSE;
5323        if ("ClinicalImpression".equals(codeString))
5324          return FHIRAllTypes.CLINICALIMPRESSION;
5325        if ("CodeSystem".equals(codeString))
5326          return FHIRAllTypes.CODESYSTEM;
5327        if ("Communication".equals(codeString))
5328          return FHIRAllTypes.COMMUNICATION;
5329        if ("CommunicationRequest".equals(codeString))
5330          return FHIRAllTypes.COMMUNICATIONREQUEST;
5331        if ("CompartmentDefinition".equals(codeString))
5332          return FHIRAllTypes.COMPARTMENTDEFINITION;
5333        if ("Composition".equals(codeString))
5334          return FHIRAllTypes.COMPOSITION;
5335        if ("ConceptMap".equals(codeString))
5336          return FHIRAllTypes.CONCEPTMAP;
5337        if ("Condition".equals(codeString))
5338          return FHIRAllTypes.CONDITION;
5339        if ("Consent".equals(codeString))
5340          return FHIRAllTypes.CONSENT;
5341        if ("Contract".equals(codeString))
5342          return FHIRAllTypes.CONTRACT;
5343        if ("Coverage".equals(codeString))
5344          return FHIRAllTypes.COVERAGE;
5345        if ("CoverageEligibilityRequest".equals(codeString))
5346          return FHIRAllTypes.COVERAGEELIGIBILITYREQUEST;
5347        if ("CoverageEligibilityResponse".equals(codeString))
5348          return FHIRAllTypes.COVERAGEELIGIBILITYRESPONSE;
5349        if ("DetectedIssue".equals(codeString))
5350          return FHIRAllTypes.DETECTEDISSUE;
5351        if ("Device".equals(codeString))
5352          return FHIRAllTypes.DEVICE;
5353        if ("DeviceDefinition".equals(codeString))
5354          return FHIRAllTypes.DEVICEDEFINITION;
5355        if ("DeviceMetric".equals(codeString))
5356          return FHIRAllTypes.DEVICEMETRIC;
5357        if ("DeviceRequest".equals(codeString))
5358          return FHIRAllTypes.DEVICEREQUEST;
5359        if ("DeviceUseStatement".equals(codeString))
5360          return FHIRAllTypes.DEVICEUSESTATEMENT;
5361        if ("DiagnosticReport".equals(codeString))
5362          return FHIRAllTypes.DIAGNOSTICREPORT;
5363        if ("DocumentManifest".equals(codeString))
5364          return FHIRAllTypes.DOCUMENTMANIFEST;
5365        if ("DocumentReference".equals(codeString))
5366          return FHIRAllTypes.DOCUMENTREFERENCE;
5367        if ("DomainResource".equals(codeString))
5368          return FHIRAllTypes.DOMAINRESOURCE;
5369        if ("EffectEvidenceSynthesis".equals(codeString))
5370          return FHIRAllTypes.EFFECTEVIDENCESYNTHESIS;
5371        if ("Encounter".equals(codeString))
5372          return FHIRAllTypes.ENCOUNTER;
5373        if ("Endpoint".equals(codeString))
5374          return FHIRAllTypes.ENDPOINT;
5375        if ("EnrollmentRequest".equals(codeString))
5376          return FHIRAllTypes.ENROLLMENTREQUEST;
5377        if ("EnrollmentResponse".equals(codeString))
5378          return FHIRAllTypes.ENROLLMENTRESPONSE;
5379        if ("EpisodeOfCare".equals(codeString))
5380          return FHIRAllTypes.EPISODEOFCARE;
5381        if ("EventDefinition".equals(codeString))
5382          return FHIRAllTypes.EVENTDEFINITION;
5383        if ("Evidence".equals(codeString))
5384          return FHIRAllTypes.EVIDENCE;
5385        if ("EvidenceVariable".equals(codeString))
5386          return FHIRAllTypes.EVIDENCEVARIABLE;
5387        if ("ExampleScenario".equals(codeString))
5388          return FHIRAllTypes.EXAMPLESCENARIO;
5389        if ("ExplanationOfBenefit".equals(codeString))
5390          return FHIRAllTypes.EXPLANATIONOFBENEFIT;
5391        if ("FamilyMemberHistory".equals(codeString))
5392          return FHIRAllTypes.FAMILYMEMBERHISTORY;
5393        if ("Flag".equals(codeString))
5394          return FHIRAllTypes.FLAG;
5395        if ("Goal".equals(codeString))
5396          return FHIRAllTypes.GOAL;
5397        if ("GraphDefinition".equals(codeString))
5398          return FHIRAllTypes.GRAPHDEFINITION;
5399        if ("Group".equals(codeString))
5400          return FHIRAllTypes.GROUP;
5401        if ("GuidanceResponse".equals(codeString))
5402          return FHIRAllTypes.GUIDANCERESPONSE;
5403        if ("HealthcareService".equals(codeString))
5404          return FHIRAllTypes.HEALTHCARESERVICE;
5405        if ("ImagingStudy".equals(codeString))
5406          return FHIRAllTypes.IMAGINGSTUDY;
5407        if ("Immunization".equals(codeString))
5408          return FHIRAllTypes.IMMUNIZATION;
5409        if ("ImmunizationEvaluation".equals(codeString))
5410          return FHIRAllTypes.IMMUNIZATIONEVALUATION;
5411        if ("ImmunizationRecommendation".equals(codeString))
5412          return FHIRAllTypes.IMMUNIZATIONRECOMMENDATION;
5413        if ("ImplementationGuide".equals(codeString))
5414          return FHIRAllTypes.IMPLEMENTATIONGUIDE;
5415        if ("InsurancePlan".equals(codeString))
5416          return FHIRAllTypes.INSURANCEPLAN;
5417        if ("Invoice".equals(codeString))
5418          return FHIRAllTypes.INVOICE;
5419        if ("Library".equals(codeString))
5420          return FHIRAllTypes.LIBRARY;
5421        if ("Linkage".equals(codeString))
5422          return FHIRAllTypes.LINKAGE;
5423        if ("List".equals(codeString))
5424          return FHIRAllTypes.LIST;
5425        if ("Location".equals(codeString))
5426          return FHIRAllTypes.LOCATION;
5427        if ("Measure".equals(codeString))
5428          return FHIRAllTypes.MEASURE;
5429        if ("MeasureReport".equals(codeString))
5430          return FHIRAllTypes.MEASUREREPORT;
5431        if ("Media".equals(codeString))
5432          return FHIRAllTypes.MEDIA;
5433        if ("Medication".equals(codeString))
5434          return FHIRAllTypes.MEDICATION;
5435        if ("MedicationAdministration".equals(codeString))
5436          return FHIRAllTypes.MEDICATIONADMINISTRATION;
5437        if ("MedicationDispense".equals(codeString))
5438          return FHIRAllTypes.MEDICATIONDISPENSE;
5439        if ("MedicationKnowledge".equals(codeString))
5440          return FHIRAllTypes.MEDICATIONKNOWLEDGE;
5441        if ("MedicationRequest".equals(codeString))
5442          return FHIRAllTypes.MEDICATIONREQUEST;
5443        if ("MedicationStatement".equals(codeString))
5444          return FHIRAllTypes.MEDICATIONSTATEMENT;
5445        if ("MedicinalProduct".equals(codeString))
5446          return FHIRAllTypes.MEDICINALPRODUCT;
5447        if ("MedicinalProductAuthorization".equals(codeString))
5448          return FHIRAllTypes.MEDICINALPRODUCTAUTHORIZATION;
5449        if ("MedicinalProductContraindication".equals(codeString))
5450          return FHIRAllTypes.MEDICINALPRODUCTCONTRAINDICATION;
5451        if ("MedicinalProductIndication".equals(codeString))
5452          return FHIRAllTypes.MEDICINALPRODUCTINDICATION;
5453        if ("MedicinalProductIngredient".equals(codeString))
5454          return FHIRAllTypes.MEDICINALPRODUCTINGREDIENT;
5455        if ("MedicinalProductInteraction".equals(codeString))
5456          return FHIRAllTypes.MEDICINALPRODUCTINTERACTION;
5457        if ("MedicinalProductManufactured".equals(codeString))
5458          return FHIRAllTypes.MEDICINALPRODUCTMANUFACTURED;
5459        if ("MedicinalProductPackaged".equals(codeString))
5460          return FHIRAllTypes.MEDICINALPRODUCTPACKAGED;
5461        if ("MedicinalProductPharmaceutical".equals(codeString))
5462          return FHIRAllTypes.MEDICINALPRODUCTPHARMACEUTICAL;
5463        if ("MedicinalProductUndesirableEffect".equals(codeString))
5464          return FHIRAllTypes.MEDICINALPRODUCTUNDESIRABLEEFFECT;
5465        if ("MessageDefinition".equals(codeString))
5466          return FHIRAllTypes.MESSAGEDEFINITION;
5467        if ("MessageHeader".equals(codeString))
5468          return FHIRAllTypes.MESSAGEHEADER;
5469        if ("MolecularSequence".equals(codeString))
5470          return FHIRAllTypes.MOLECULARSEQUENCE;
5471        if ("NamingSystem".equals(codeString))
5472          return FHIRAllTypes.NAMINGSYSTEM;
5473        if ("NutritionOrder".equals(codeString))
5474          return FHIRAllTypes.NUTRITIONORDER;
5475        if ("Observation".equals(codeString))
5476          return FHIRAllTypes.OBSERVATION;
5477        if ("ObservationDefinition".equals(codeString))
5478          return FHIRAllTypes.OBSERVATIONDEFINITION;
5479        if ("OperationDefinition".equals(codeString))
5480          return FHIRAllTypes.OPERATIONDEFINITION;
5481        if ("OperationOutcome".equals(codeString))
5482          return FHIRAllTypes.OPERATIONOUTCOME;
5483        if ("Organization".equals(codeString))
5484          return FHIRAllTypes.ORGANIZATION;
5485        if ("OrganizationAffiliation".equals(codeString))
5486          return FHIRAllTypes.ORGANIZATIONAFFILIATION;
5487        if ("Parameters".equals(codeString))
5488          return FHIRAllTypes.PARAMETERS;
5489        if ("Patient".equals(codeString))
5490          return FHIRAllTypes.PATIENT;
5491        if ("PaymentNotice".equals(codeString))
5492          return FHIRAllTypes.PAYMENTNOTICE;
5493        if ("PaymentReconciliation".equals(codeString))
5494          return FHIRAllTypes.PAYMENTRECONCILIATION;
5495        if ("Person".equals(codeString))
5496          return FHIRAllTypes.PERSON;
5497        if ("PlanDefinition".equals(codeString))
5498          return FHIRAllTypes.PLANDEFINITION;
5499        if ("Practitioner".equals(codeString))
5500          return FHIRAllTypes.PRACTITIONER;
5501        if ("PractitionerRole".equals(codeString))
5502          return FHIRAllTypes.PRACTITIONERROLE;
5503        if ("Procedure".equals(codeString))
5504          return FHIRAllTypes.PROCEDURE;
5505        if ("Provenance".equals(codeString))
5506          return FHIRAllTypes.PROVENANCE;
5507        if ("Questionnaire".equals(codeString))
5508          return FHIRAllTypes.QUESTIONNAIRE;
5509        if ("QuestionnaireResponse".equals(codeString))
5510          return FHIRAllTypes.QUESTIONNAIRERESPONSE;
5511        if ("RelatedPerson".equals(codeString))
5512          return FHIRAllTypes.RELATEDPERSON;
5513        if ("RequestGroup".equals(codeString))
5514          return FHIRAllTypes.REQUESTGROUP;
5515        if ("ResearchDefinition".equals(codeString))
5516          return FHIRAllTypes.RESEARCHDEFINITION;
5517        if ("ResearchElementDefinition".equals(codeString))
5518          return FHIRAllTypes.RESEARCHELEMENTDEFINITION;
5519        if ("ResearchStudy".equals(codeString))
5520          return FHIRAllTypes.RESEARCHSTUDY;
5521        if ("ResearchSubject".equals(codeString))
5522          return FHIRAllTypes.RESEARCHSUBJECT;
5523        if ("Resource".equals(codeString))
5524          return FHIRAllTypes.RESOURCE;
5525        if ("RiskAssessment".equals(codeString))
5526          return FHIRAllTypes.RISKASSESSMENT;
5527        if ("RiskEvidenceSynthesis".equals(codeString))
5528          return FHIRAllTypes.RISKEVIDENCESYNTHESIS;
5529        if ("Schedule".equals(codeString))
5530          return FHIRAllTypes.SCHEDULE;
5531        if ("SearchParameter".equals(codeString))
5532          return FHIRAllTypes.SEARCHPARAMETER;
5533        if ("ServiceRequest".equals(codeString))
5534          return FHIRAllTypes.SERVICEREQUEST;
5535        if ("Slot".equals(codeString))
5536          return FHIRAllTypes.SLOT;
5537        if ("Specimen".equals(codeString))
5538          return FHIRAllTypes.SPECIMEN;
5539        if ("SpecimenDefinition".equals(codeString))
5540          return FHIRAllTypes.SPECIMENDEFINITION;
5541        if ("StructureDefinition".equals(codeString))
5542          return FHIRAllTypes.STRUCTUREDEFINITION;
5543        if ("StructureMap".equals(codeString))
5544          return FHIRAllTypes.STRUCTUREMAP;
5545        if ("Subscription".equals(codeString))
5546          return FHIRAllTypes.SUBSCRIPTION;
5547        if ("Substance".equals(codeString))
5548          return FHIRAllTypes.SUBSTANCE;
5549        if ("SubstanceNucleicAcid".equals(codeString))
5550          return FHIRAllTypes.SUBSTANCENUCLEICACID;
5551        if ("SubstancePolymer".equals(codeString))
5552          return FHIRAllTypes.SUBSTANCEPOLYMER;
5553        if ("SubstanceProtein".equals(codeString))
5554          return FHIRAllTypes.SUBSTANCEPROTEIN;
5555        if ("SubstanceReferenceInformation".equals(codeString))
5556          return FHIRAllTypes.SUBSTANCEREFERENCEINFORMATION;
5557        if ("SubstanceSourceMaterial".equals(codeString))
5558          return FHIRAllTypes.SUBSTANCESOURCEMATERIAL;
5559        if ("SubstanceSpecification".equals(codeString))
5560          return FHIRAllTypes.SUBSTANCESPECIFICATION;
5561        if ("SupplyDelivery".equals(codeString))
5562          return FHIRAllTypes.SUPPLYDELIVERY;
5563        if ("SupplyRequest".equals(codeString))
5564          return FHIRAllTypes.SUPPLYREQUEST;
5565        if ("Task".equals(codeString))
5566          return FHIRAllTypes.TASK;
5567        if ("TerminologyCapabilities".equals(codeString))
5568          return FHIRAllTypes.TERMINOLOGYCAPABILITIES;
5569        if ("TestReport".equals(codeString))
5570          return FHIRAllTypes.TESTREPORT;
5571        if ("TestScript".equals(codeString))
5572          return FHIRAllTypes.TESTSCRIPT;
5573        if ("ValueSet".equals(codeString))
5574          return FHIRAllTypes.VALUESET;
5575        if ("VerificationResult".equals(codeString))
5576          return FHIRAllTypes.VERIFICATIONRESULT;
5577        if ("VisionPrescription".equals(codeString))
5578          return FHIRAllTypes.VISIONPRESCRIPTION;
5579        if ("Type".equals(codeString))
5580          return FHIRAllTypes.TYPE;
5581        if ("Any".equals(codeString))
5582          return FHIRAllTypes.ANY;
5583        throw new IllegalArgumentException("Unknown FHIRAllTypes code '"+codeString+"'");
5584        }
5585        public Enumeration<FHIRAllTypes> fromType(Base code) throws FHIRException {
5586          if (code == null)
5587            return null;
5588          if (code.isEmpty())
5589            return new Enumeration<FHIRAllTypes>(this);
5590          String codeString = ((PrimitiveType) code).asStringValue();
5591          if (codeString == null || "".equals(codeString))
5592            return null;
5593        if ("Address".equals(codeString))
5594          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADDRESS);
5595        if ("Age".equals(codeString))
5596          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.AGE);
5597        if ("Annotation".equals(codeString))
5598          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ANNOTATION);
5599        if ("Attachment".equals(codeString))
5600          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ATTACHMENT);
5601        if ("BackboneElement".equals(codeString))
5602          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BACKBONEELEMENT);
5603        if ("CodeableConcept".equals(codeString))
5604          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODEABLECONCEPT);
5605        if ("Coding".equals(codeString))
5606          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODING);
5607        if ("ContactDetail".equals(codeString))
5608          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTACTDETAIL);
5609        if ("ContactPoint".equals(codeString))
5610          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTACTPOINT);
5611        if ("Contributor".equals(codeString))
5612          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTRIBUTOR);
5613        if ("Count".equals(codeString))
5614          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COUNT);
5615        if ("DataRequirement".equals(codeString))
5616          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATAREQUIREMENT);
5617        if ("Distance".equals(codeString))
5618          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DISTANCE);
5619        if ("Dosage".equals(codeString))
5620          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOSAGE);
5621        if ("Duration".equals(codeString))
5622          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DURATION);
5623        if ("Element".equals(codeString))
5624          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELEMENT);
5625        if ("ElementDefinition".equals(codeString))
5626          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELEMENTDEFINITION);
5627        if ("Expression".equals(codeString))
5628          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXPRESSION);
5629        if ("Extension".equals(codeString))
5630          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXTENSION);
5631        if ("HumanName".equals(codeString))
5632          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.HUMANNAME);
5633        if ("Identifier".equals(codeString))
5634          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IDENTIFIER);
5635        if ("MarketingStatus".equals(codeString))
5636          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MARKETINGSTATUS);
5637        if ("Meta".equals(codeString))
5638          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.META);
5639        if ("Money".equals(codeString))
5640          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MONEY);
5641        if ("MoneyQuantity".equals(codeString))
5642          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MONEYQUANTITY);
5643        if ("Narrative".equals(codeString))
5644          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NARRATIVE);
5645        if ("ParameterDefinition".equals(codeString))
5646          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PARAMETERDEFINITION);
5647        if ("Period".equals(codeString))
5648          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERIOD);
5649        if ("Population".equals(codeString))
5650          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.POPULATION);
5651        if ("ProdCharacteristic".equals(codeString))
5652          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRODCHARACTERISTIC);
5653        if ("ProductShelfLife".equals(codeString))
5654          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRODUCTSHELFLIFE);
5655        if ("Quantity".equals(codeString))
5656          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUANTITY);
5657        if ("Range".equals(codeString))
5658          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RANGE);
5659        if ("Ratio".equals(codeString))
5660          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RATIO);
5661        if ("Reference".equals(codeString))
5662          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REFERENCE);
5663        if ("RelatedArtifact".equals(codeString))
5664          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RELATEDARTIFACT);
5665        if ("SampledData".equals(codeString))
5666          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SAMPLEDDATA);
5667        if ("Signature".equals(codeString))
5668          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SIGNATURE);
5669        if ("SimpleQuantity".equals(codeString))
5670          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SIMPLEQUANTITY);
5671        if ("SubstanceAmount".equals(codeString))
5672          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCEAMOUNT);
5673        if ("Timing".equals(codeString))
5674          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TIMING);
5675        if ("TriggerDefinition".equals(codeString))
5676          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TRIGGERDEFINITION);
5677        if ("UsageContext".equals(codeString))
5678          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.USAGECONTEXT);
5679        if ("base64Binary".equals(codeString))
5680          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASE64BINARY);
5681        if ("boolean".equals(codeString))
5682          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BOOLEAN);
5683        if ("canonical".equals(codeString))
5684          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CANONICAL);
5685        if ("code".equals(codeString))
5686          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODE);
5687        if ("date".equals(codeString))
5688          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATE);
5689        if ("dateTime".equals(codeString))
5690          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATETIME);
5691        if ("decimal".equals(codeString))
5692          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DECIMAL);
5693        if ("id".equals(codeString))
5694          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ID);
5695        if ("instant".equals(codeString))
5696          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INSTANT);
5697        if ("integer".equals(codeString))
5698          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INTEGER);
5699        if ("markdown".equals(codeString))
5700          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MARKDOWN);
5701        if ("oid".equals(codeString))
5702          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OID);
5703        if ("positiveInt".equals(codeString))
5704          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.POSITIVEINT);
5705        if ("string".equals(codeString))
5706          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRING);
5707        if ("time".equals(codeString))
5708          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TIME);
5709        if ("unsignedInt".equals(codeString))
5710          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.UNSIGNEDINT);
5711        if ("uri".equals(codeString))
5712          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.URI);
5713        if ("url".equals(codeString))
5714          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.URL);
5715        if ("uuid".equals(codeString))
5716          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.UUID);
5717        if ("xhtml".equals(codeString))
5718          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.XHTML);
5719        if ("Account".equals(codeString))
5720          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ACCOUNT);
5721        if ("ActivityDefinition".equals(codeString))
5722          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ACTIVITYDEFINITION);
5723        if ("AdverseEvent".equals(codeString))
5724          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADVERSEEVENT);
5725        if ("AllergyIntolerance".equals(codeString))
5726          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ALLERGYINTOLERANCE);
5727        if ("Appointment".equals(codeString))
5728          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.APPOINTMENT);
5729        if ("AppointmentResponse".equals(codeString))
5730          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.APPOINTMENTRESPONSE);
5731        if ("AuditEvent".equals(codeString))
5732          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.AUDITEVENT);
5733        if ("Basic".equals(codeString))
5734          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASIC);
5735        if ("Binary".equals(codeString))
5736          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BINARY);
5737        if ("BiologicallyDerivedProduct".equals(codeString))
5738          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BIOLOGICALLYDERIVEDPRODUCT);
5739        if ("BodyStructure".equals(codeString))
5740          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BODYSTRUCTURE);
5741        if ("Bundle".equals(codeString))
5742          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BUNDLE);
5743        if ("CapabilityStatement".equals(codeString))
5744          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CAPABILITYSTATEMENT);
5745        if ("CarePlan".equals(codeString))
5746          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CAREPLAN);
5747        if ("CareTeam".equals(codeString))
5748          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CARETEAM);
5749        if ("CatalogEntry".equals(codeString))
5750          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CATALOGENTRY);
5751        if ("ChargeItem".equals(codeString))
5752          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CHARGEITEM);
5753        if ("ChargeItemDefinition".equals(codeString))
5754          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CHARGEITEMDEFINITION);
5755        if ("Claim".equals(codeString))
5756          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLAIM);
5757        if ("ClaimResponse".equals(codeString))
5758          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLAIMRESPONSE);
5759        if ("ClinicalImpression".equals(codeString))
5760          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLINICALIMPRESSION);
5761        if ("CodeSystem".equals(codeString))
5762          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODESYSTEM);
5763        if ("Communication".equals(codeString))
5764          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMMUNICATION);
5765        if ("CommunicationRequest".equals(codeString))
5766          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMMUNICATIONREQUEST);
5767        if ("CompartmentDefinition".equals(codeString))
5768          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMPARTMENTDEFINITION);
5769        if ("Composition".equals(codeString))
5770          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMPOSITION);
5771        if ("ConceptMap".equals(codeString))
5772          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONCEPTMAP);
5773        if ("Condition".equals(codeString))
5774          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONDITION);
5775        if ("Consent".equals(codeString))
5776          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONSENT);
5777        if ("Contract".equals(codeString))
5778          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTRACT);
5779        if ("Coverage".equals(codeString))
5780          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGE);
5781        if ("CoverageEligibilityRequest".equals(codeString))
5782          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGEELIGIBILITYREQUEST);
5783        if ("CoverageEligibilityResponse".equals(codeString))
5784          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGEELIGIBILITYRESPONSE);
5785        if ("DetectedIssue".equals(codeString))
5786          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DETECTEDISSUE);
5787        if ("Device".equals(codeString))
5788          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICE);
5789        if ("DeviceDefinition".equals(codeString))
5790          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEDEFINITION);
5791        if ("DeviceMetric".equals(codeString))
5792          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEMETRIC);
5793        if ("DeviceRequest".equals(codeString))
5794          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEREQUEST);
5795        if ("DeviceUseStatement".equals(codeString))
5796          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEUSESTATEMENT);
5797        if ("DiagnosticReport".equals(codeString))
5798          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DIAGNOSTICREPORT);
5799        if ("DocumentManifest".equals(codeString))
5800          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOCUMENTMANIFEST);
5801        if ("DocumentReference".equals(codeString))
5802          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOCUMENTREFERENCE);
5803        if ("DomainResource".equals(codeString))
5804          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOMAINRESOURCE);
5805        if ("EffectEvidenceSynthesis".equals(codeString))
5806          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EFFECTEVIDENCESYNTHESIS);
5807        if ("Encounter".equals(codeString))
5808          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENCOUNTER);
5809        if ("Endpoint".equals(codeString))
5810          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENDPOINT);
5811        if ("EnrollmentRequest".equals(codeString))
5812          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENROLLMENTREQUEST);
5813        if ("EnrollmentResponse".equals(codeString))
5814          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENROLLMENTRESPONSE);
5815        if ("EpisodeOfCare".equals(codeString))
5816          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EPISODEOFCARE);
5817        if ("EventDefinition".equals(codeString))
5818          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVENTDEFINITION);
5819        if ("Evidence".equals(codeString))
5820          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVIDENCE);
5821        if ("EvidenceVariable".equals(codeString))
5822          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EVIDENCEVARIABLE);
5823        if ("ExampleScenario".equals(codeString))
5824          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXAMPLESCENARIO);
5825        if ("ExplanationOfBenefit".equals(codeString))
5826          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXPLANATIONOFBENEFIT);
5827        if ("FamilyMemberHistory".equals(codeString))
5828          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.FAMILYMEMBERHISTORY);
5829        if ("Flag".equals(codeString))
5830          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.FLAG);
5831        if ("Goal".equals(codeString))
5832          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GOAL);
5833        if ("GraphDefinition".equals(codeString))
5834          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GRAPHDEFINITION);
5835        if ("Group".equals(codeString))
5836          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GROUP);
5837        if ("GuidanceResponse".equals(codeString))
5838          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GUIDANCERESPONSE);
5839        if ("HealthcareService".equals(codeString))
5840          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.HEALTHCARESERVICE);
5841        if ("ImagingStudy".equals(codeString))
5842          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMAGINGSTUDY);
5843        if ("Immunization".equals(codeString))
5844          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATION);
5845        if ("ImmunizationEvaluation".equals(codeString))
5846          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATIONEVALUATION);
5847        if ("ImmunizationRecommendation".equals(codeString))
5848          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATIONRECOMMENDATION);
5849        if ("ImplementationGuide".equals(codeString))
5850          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMPLEMENTATIONGUIDE);
5851        if ("InsurancePlan".equals(codeString))
5852          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INSURANCEPLAN);
5853        if ("Invoice".equals(codeString))
5854          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INVOICE);
5855        if ("Library".equals(codeString))
5856          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LIBRARY);
5857        if ("Linkage".equals(codeString))
5858          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LINKAGE);
5859        if ("List".equals(codeString))
5860          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LIST);
5861        if ("Location".equals(codeString))
5862          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LOCATION);
5863        if ("Measure".equals(codeString))
5864          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEASURE);
5865        if ("MeasureReport".equals(codeString))
5866          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEASUREREPORT);
5867        if ("Media".equals(codeString))
5868          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDIA);
5869        if ("Medication".equals(codeString))
5870          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATION);
5871        if ("MedicationAdministration".equals(codeString))
5872          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONADMINISTRATION);
5873        if ("MedicationDispense".equals(codeString))
5874          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONDISPENSE);
5875        if ("MedicationKnowledge".equals(codeString))
5876          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONKNOWLEDGE);
5877        if ("MedicationRequest".equals(codeString))
5878          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONREQUEST);
5879        if ("MedicationStatement".equals(codeString))
5880          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONSTATEMENT);
5881        if ("MedicinalProduct".equals(codeString))
5882          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICINALPRODUCT);
5883        if ("MedicinalProductAuthorization".equals(codeString))
5884          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICINALPRODUCTAUTHORIZATION);
5885        if ("MedicinalProductContraindication".equals(codeString))
5886          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICINALPRODUCTCONTRAINDICATION);
5887        if ("MedicinalProductIndication".equals(codeString))
5888          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICINALPRODUCTINDICATION);
5889        if ("MedicinalProductIngredient".equals(codeString))
5890          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICINALPRODUCTINGREDIENT);
5891        if ("MedicinalProductInteraction".equals(codeString))
5892          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICINALPRODUCTINTERACTION);
5893        if ("MedicinalProductManufactured".equals(codeString))
5894          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICINALPRODUCTMANUFACTURED);
5895        if ("MedicinalProductPackaged".equals(codeString))
5896          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICINALPRODUCTPACKAGED);
5897        if ("MedicinalProductPharmaceutical".equals(codeString))
5898          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICINALPRODUCTPHARMACEUTICAL);
5899        if ("MedicinalProductUndesirableEffect".equals(codeString))
5900          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICINALPRODUCTUNDESIRABLEEFFECT);
5901        if ("MessageDefinition".equals(codeString))
5902          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MESSAGEDEFINITION);
5903        if ("MessageHeader".equals(codeString))
5904          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MESSAGEHEADER);
5905        if ("MolecularSequence".equals(codeString))
5906          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MOLECULARSEQUENCE);
5907        if ("NamingSystem".equals(codeString))
5908          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NAMINGSYSTEM);
5909        if ("NutritionOrder".equals(codeString))
5910          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NUTRITIONORDER);
5911        if ("Observation".equals(codeString))
5912          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OBSERVATION);
5913        if ("ObservationDefinition".equals(codeString))
5914          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OBSERVATIONDEFINITION);
5915        if ("OperationDefinition".equals(codeString))
5916          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OPERATIONDEFINITION);
5917        if ("OperationOutcome".equals(codeString))
5918          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OPERATIONOUTCOME);
5919        if ("Organization".equals(codeString))
5920          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ORGANIZATION);
5921        if ("OrganizationAffiliation".equals(codeString))
5922          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ORGANIZATIONAFFILIATION);
5923        if ("Parameters".equals(codeString))
5924          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PARAMETERS);
5925        if ("Patient".equals(codeString))
5926          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PATIENT);
5927        if ("PaymentNotice".equals(codeString))
5928          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PAYMENTNOTICE);
5929        if ("PaymentReconciliation".equals(codeString))
5930          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PAYMENTRECONCILIATION);
5931        if ("Person".equals(codeString))
5932          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERSON);
5933        if ("PlanDefinition".equals(codeString))
5934          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PLANDEFINITION);
5935        if ("Practitioner".equals(codeString))
5936          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRACTITIONER);
5937        if ("PractitionerRole".equals(codeString))
5938          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRACTITIONERROLE);
5939        if ("Procedure".equals(codeString))
5940          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROCEDURE);
5941        if ("Provenance".equals(codeString))
5942          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROVENANCE);
5943        if ("Questionnaire".equals(codeString))
5944          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUESTIONNAIRE);
5945        if ("QuestionnaireResponse".equals(codeString))
5946          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUESTIONNAIRERESPONSE);
5947        if ("RelatedPerson".equals(codeString))
5948          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RELATEDPERSON);
5949        if ("RequestGroup".equals(codeString))
5950          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REQUESTGROUP);
5951        if ("ResearchDefinition".equals(codeString))
5952          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHDEFINITION);
5953        if ("ResearchElementDefinition".equals(codeString))
5954          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHELEMENTDEFINITION);
5955        if ("ResearchStudy".equals(codeString))
5956          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHSTUDY);
5957        if ("ResearchSubject".equals(codeString))
5958          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHSUBJECT);
5959        if ("Resource".equals(codeString))
5960          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESOURCE);
5961        if ("RiskAssessment".equals(codeString))
5962          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RISKASSESSMENT);
5963        if ("RiskEvidenceSynthesis".equals(codeString))
5964          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RISKEVIDENCESYNTHESIS);
5965        if ("Schedule".equals(codeString))
5966          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SCHEDULE);
5967        if ("SearchParameter".equals(codeString))
5968          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SEARCHPARAMETER);
5969        if ("ServiceRequest".equals(codeString))
5970          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SERVICEREQUEST);
5971        if ("Slot".equals(codeString))
5972          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SLOT);
5973        if ("Specimen".equals(codeString))
5974          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SPECIMEN);
5975        if ("SpecimenDefinition".equals(codeString))
5976          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SPECIMENDEFINITION);
5977        if ("StructureDefinition".equals(codeString))
5978          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRUCTUREDEFINITION);
5979        if ("StructureMap".equals(codeString))
5980          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRUCTUREMAP);
5981        if ("Subscription".equals(codeString))
5982          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSCRIPTION);
5983        if ("Substance".equals(codeString))
5984          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCE);
5985        if ("SubstanceNucleicAcid".equals(codeString))
5986          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCENUCLEICACID);
5987        if ("SubstancePolymer".equals(codeString))
5988          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCEPOLYMER);
5989        if ("SubstanceProtein".equals(codeString))
5990          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCEPROTEIN);
5991        if ("SubstanceReferenceInformation".equals(codeString))
5992          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCEREFERENCEINFORMATION);
5993        if ("SubstanceSourceMaterial".equals(codeString))
5994          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCESOURCEMATERIAL);
5995        if ("SubstanceSpecification".equals(codeString))
5996          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCESPECIFICATION);
5997        if ("SupplyDelivery".equals(codeString))
5998          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUPPLYDELIVERY);
5999        if ("SupplyRequest".equals(codeString))
6000          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUPPLYREQUEST);
6001        if ("Task".equals(codeString))
6002          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TASK);
6003        if ("TerminologyCapabilities".equals(codeString))
6004          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TERMINOLOGYCAPABILITIES);
6005        if ("TestReport".equals(codeString))
6006          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TESTREPORT);
6007        if ("TestScript".equals(codeString))
6008          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TESTSCRIPT);
6009        if ("ValueSet".equals(codeString))
6010          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VALUESET);
6011        if ("VerificationResult".equals(codeString))
6012          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VERIFICATIONRESULT);
6013        if ("VisionPrescription".equals(codeString))
6014          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VISIONPRESCRIPTION);
6015        if ("Type".equals(codeString))
6016          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TYPE);
6017        if ("Any".equals(codeString))
6018          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ANY);
6019        throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'");
6020        }
6021    public String toCode(FHIRAllTypes code) {
6022      if (code == FHIRAllTypes.ADDRESS)
6023        return "Address";
6024      if (code == FHIRAllTypes.AGE)
6025        return "Age";
6026      if (code == FHIRAllTypes.ANNOTATION)
6027        return "Annotation";
6028      if (code == FHIRAllTypes.ATTACHMENT)
6029        return "Attachment";
6030      if (code == FHIRAllTypes.BACKBONEELEMENT)
6031        return "BackboneElement";
6032      if (code == FHIRAllTypes.CODEABLECONCEPT)
6033        return "CodeableConcept";
6034      if (code == FHIRAllTypes.CODING)
6035        return "Coding";
6036      if (code == FHIRAllTypes.CONTACTDETAIL)
6037        return "ContactDetail";
6038      if (code == FHIRAllTypes.CONTACTPOINT)
6039        return "ContactPoint";
6040      if (code == FHIRAllTypes.CONTRIBUTOR)
6041        return "Contributor";
6042      if (code == FHIRAllTypes.COUNT)
6043        return "Count";
6044      if (code == FHIRAllTypes.DATAREQUIREMENT)
6045        return "DataRequirement";
6046      if (code == FHIRAllTypes.DISTANCE)
6047        return "Distance";
6048      if (code == FHIRAllTypes.DOSAGE)
6049        return "Dosage";
6050      if (code == FHIRAllTypes.DURATION)
6051        return "Duration";
6052      if (code == FHIRAllTypes.ELEMENT)
6053        return "Element";
6054      if (code == FHIRAllTypes.ELEMENTDEFINITION)
6055        return "ElementDefinition";
6056      if (code == FHIRAllTypes.EXPRESSION)
6057        return "Expression";
6058      if (code == FHIRAllTypes.EXTENSION)
6059        return "Extension";
6060      if (code == FHIRAllTypes.HUMANNAME)
6061        return "HumanName";
6062      if (code == FHIRAllTypes.IDENTIFIER)
6063        return "Identifier";
6064      if (code == FHIRAllTypes.MARKETINGSTATUS)
6065        return "MarketingStatus";
6066      if (code == FHIRAllTypes.META)
6067        return "Meta";
6068      if (code == FHIRAllTypes.MONEY)
6069        return "Money";
6070      if (code == FHIRAllTypes.MONEYQUANTITY)
6071        return "MoneyQuantity";
6072      if (code == FHIRAllTypes.NARRATIVE)
6073        return "Narrative";
6074      if (code == FHIRAllTypes.PARAMETERDEFINITION)
6075        return "ParameterDefinition";
6076      if (code == FHIRAllTypes.PERIOD)
6077        return "Period";
6078      if (code == FHIRAllTypes.POPULATION)
6079        return "Population";
6080      if (code == FHIRAllTypes.PRODCHARACTERISTIC)
6081        return "ProdCharacteristic";
6082      if (code == FHIRAllTypes.PRODUCTSHELFLIFE)
6083        return "ProductShelfLife";
6084      if (code == FHIRAllTypes.QUANTITY)
6085        return "Quantity";
6086      if (code == FHIRAllTypes.RANGE)
6087        return "Range";
6088      if (code == FHIRAllTypes.RATIO)
6089        return "Ratio";
6090      if (code == FHIRAllTypes.REFERENCE)
6091        return "Reference";
6092      if (code == FHIRAllTypes.RELATEDARTIFACT)
6093        return "RelatedArtifact";
6094      if (code == FHIRAllTypes.SAMPLEDDATA)
6095        return "SampledData";
6096      if (code == FHIRAllTypes.SIGNATURE)
6097        return "Signature";
6098      if (code == FHIRAllTypes.SIMPLEQUANTITY)
6099        return "SimpleQuantity";
6100      if (code == FHIRAllTypes.SUBSTANCEAMOUNT)
6101        return "SubstanceAmount";
6102      if (code == FHIRAllTypes.TIMING)
6103        return "Timing";
6104      if (code == FHIRAllTypes.TRIGGERDEFINITION)
6105        return "TriggerDefinition";
6106      if (code == FHIRAllTypes.USAGECONTEXT)
6107        return "UsageContext";
6108      if (code == FHIRAllTypes.BASE64BINARY)
6109        return "base64Binary";
6110      if (code == FHIRAllTypes.BOOLEAN)
6111        return "boolean";
6112      if (code == FHIRAllTypes.CANONICAL)
6113        return "canonical";
6114      if (code == FHIRAllTypes.CODE)
6115        return "code";
6116      if (code == FHIRAllTypes.DATE)
6117        return "date";
6118      if (code == FHIRAllTypes.DATETIME)
6119        return "dateTime";
6120      if (code == FHIRAllTypes.DECIMAL)
6121        return "decimal";
6122      if (code == FHIRAllTypes.ID)
6123        return "id";
6124      if (code == FHIRAllTypes.INSTANT)
6125        return "instant";
6126      if (code == FHIRAllTypes.INTEGER)
6127        return "integer";
6128      if (code == FHIRAllTypes.MARKDOWN)
6129        return "markdown";
6130      if (code == FHIRAllTypes.OID)
6131        return "oid";
6132      if (code == FHIRAllTypes.POSITIVEINT)
6133        return "positiveInt";
6134      if (code == FHIRAllTypes.STRING)
6135        return "string";
6136      if (code == FHIRAllTypes.TIME)
6137        return "time";
6138      if (code == FHIRAllTypes.UNSIGNEDINT)
6139        return "unsignedInt";
6140      if (code == FHIRAllTypes.URI)
6141        return "uri";
6142      if (code == FHIRAllTypes.URL)
6143        return "url";
6144      if (code == FHIRAllTypes.UUID)
6145        return "uuid";
6146      if (code == FHIRAllTypes.XHTML)
6147        return "xhtml";
6148      if (code == FHIRAllTypes.ACCOUNT)
6149        return "Account";
6150      if (code == FHIRAllTypes.ACTIVITYDEFINITION)
6151        return "ActivityDefinition";
6152      if (code == FHIRAllTypes.ADVERSEEVENT)
6153        return "AdverseEvent";
6154      if (code == FHIRAllTypes.ALLERGYINTOLERANCE)
6155        return "AllergyIntolerance";
6156      if (code == FHIRAllTypes.APPOINTMENT)
6157        return "Appointment";
6158      if (code == FHIRAllTypes.APPOINTMENTRESPONSE)
6159        return "AppointmentResponse";
6160      if (code == FHIRAllTypes.AUDITEVENT)
6161        return "AuditEvent";
6162      if (code == FHIRAllTypes.BASIC)
6163        return "Basic";
6164      if (code == FHIRAllTypes.BINARY)
6165        return "Binary";
6166      if (code == FHIRAllTypes.BIOLOGICALLYDERIVEDPRODUCT)
6167        return "BiologicallyDerivedProduct";
6168      if (code == FHIRAllTypes.BODYSTRUCTURE)
6169        return "BodyStructure";
6170      if (code == FHIRAllTypes.BUNDLE)
6171        return "Bundle";
6172      if (code == FHIRAllTypes.CAPABILITYSTATEMENT)
6173        return "CapabilityStatement";
6174      if (code == FHIRAllTypes.CAREPLAN)
6175        return "CarePlan";
6176      if (code == FHIRAllTypes.CARETEAM)
6177        return "CareTeam";
6178      if (code == FHIRAllTypes.CATALOGENTRY)
6179        return "CatalogEntry";
6180      if (code == FHIRAllTypes.CHARGEITEM)
6181        return "ChargeItem";
6182      if (code == FHIRAllTypes.CHARGEITEMDEFINITION)
6183        return "ChargeItemDefinition";
6184      if (code == FHIRAllTypes.CLAIM)
6185        return "Claim";
6186      if (code == FHIRAllTypes.CLAIMRESPONSE)
6187        return "ClaimResponse";
6188      if (code == FHIRAllTypes.CLINICALIMPRESSION)
6189        return "ClinicalImpression";
6190      if (code == FHIRAllTypes.CODESYSTEM)
6191        return "CodeSystem";
6192      if (code == FHIRAllTypes.COMMUNICATION)
6193        return "Communication";
6194      if (code == FHIRAllTypes.COMMUNICATIONREQUEST)
6195        return "CommunicationRequest";
6196      if (code == FHIRAllTypes.COMPARTMENTDEFINITION)
6197        return "CompartmentDefinition";
6198      if (code == FHIRAllTypes.COMPOSITION)
6199        return "Composition";
6200      if (code == FHIRAllTypes.CONCEPTMAP)
6201        return "ConceptMap";
6202      if (code == FHIRAllTypes.CONDITION)
6203        return "Condition";
6204      if (code == FHIRAllTypes.CONSENT)
6205        return "Consent";
6206      if (code == FHIRAllTypes.CONTRACT)
6207        return "Contract";
6208      if (code == FHIRAllTypes.COVERAGE)
6209        return "Coverage";
6210      if (code == FHIRAllTypes.COVERAGEELIGIBILITYREQUEST)
6211        return "CoverageEligibilityRequest";
6212      if (code == FHIRAllTypes.COVERAGEELIGIBILITYRESPONSE)
6213        return "CoverageEligibilityResponse";
6214      if (code == FHIRAllTypes.DETECTEDISSUE)
6215        return "DetectedIssue";
6216      if (code == FHIRAllTypes.DEVICE)
6217        return "Device";
6218      if (code == FHIRAllTypes.DEVICEDEFINITION)
6219        return "DeviceDefinition";
6220      if (code == FHIRAllTypes.DEVICEMETRIC)
6221        return "DeviceMetric";
6222      if (code == FHIRAllTypes.DEVICEREQUEST)
6223        return "DeviceRequest";
6224      if (code == FHIRAllTypes.DEVICEUSESTATEMENT)
6225        return "DeviceUseStatement";
6226      if (code == FHIRAllTypes.DIAGNOSTICREPORT)
6227        return "DiagnosticReport";
6228      if (code == FHIRAllTypes.DOCUMENTMANIFEST)
6229        return "DocumentManifest";
6230      if (code == FHIRAllTypes.DOCUMENTREFERENCE)
6231        return "DocumentReference";
6232      if (code == FHIRAllTypes.DOMAINRESOURCE)
6233        return "DomainResource";
6234      if (code == FHIRAllTypes.EFFECTEVIDENCESYNTHESIS)
6235        return "EffectEvidenceSynthesis";
6236      if (code == FHIRAllTypes.ENCOUNTER)
6237        return "Encounter";
6238      if (code == FHIRAllTypes.ENDPOINT)
6239        return "Endpoint";
6240      if (code == FHIRAllTypes.ENROLLMENTREQUEST)
6241        return "EnrollmentRequest";
6242      if (code == FHIRAllTypes.ENROLLMENTRESPONSE)
6243        return "EnrollmentResponse";
6244      if (code == FHIRAllTypes.EPISODEOFCARE)
6245        return "EpisodeOfCare";
6246      if (code == FHIRAllTypes.EVENTDEFINITION)
6247        return "EventDefinition";
6248      if (code == FHIRAllTypes.EVIDENCE)
6249        return "Evidence";
6250      if (code == FHIRAllTypes.EVIDENCEVARIABLE)
6251        return "EvidenceVariable";
6252      if (code == FHIRAllTypes.EXAMPLESCENARIO)
6253        return "ExampleScenario";
6254      if (code == FHIRAllTypes.EXPLANATIONOFBENEFIT)
6255        return "ExplanationOfBenefit";
6256      if (code == FHIRAllTypes.FAMILYMEMBERHISTORY)
6257        return "FamilyMemberHistory";
6258      if (code == FHIRAllTypes.FLAG)
6259        return "Flag";
6260      if (code == FHIRAllTypes.GOAL)
6261        return "Goal";
6262      if (code == FHIRAllTypes.GRAPHDEFINITION)
6263        return "GraphDefinition";
6264      if (code == FHIRAllTypes.GROUP)
6265        return "Group";
6266      if (code == FHIRAllTypes.GUIDANCERESPONSE)
6267        return "GuidanceResponse";
6268      if (code == FHIRAllTypes.HEALTHCARESERVICE)
6269        return "HealthcareService";
6270      if (code == FHIRAllTypes.IMAGINGSTUDY)
6271        return "ImagingStudy";
6272      if (code == FHIRAllTypes.IMMUNIZATION)
6273        return "Immunization";
6274      if (code == FHIRAllTypes.IMMUNIZATIONEVALUATION)
6275        return "ImmunizationEvaluation";
6276      if (code == FHIRAllTypes.IMMUNIZATIONRECOMMENDATION)
6277        return "ImmunizationRecommendation";
6278      if (code == FHIRAllTypes.IMPLEMENTATIONGUIDE)
6279        return "ImplementationGuide";
6280      if (code == FHIRAllTypes.INSURANCEPLAN)
6281        return "InsurancePlan";
6282      if (code == FHIRAllTypes.INVOICE)
6283        return "Invoice";
6284      if (code == FHIRAllTypes.LIBRARY)
6285        return "Library";
6286      if (code == FHIRAllTypes.LINKAGE)
6287        return "Linkage";
6288      if (code == FHIRAllTypes.LIST)
6289        return "List";
6290      if (code == FHIRAllTypes.LOCATION)
6291        return "Location";
6292      if (code == FHIRAllTypes.MEASURE)
6293        return "Measure";
6294      if (code == FHIRAllTypes.MEASUREREPORT)
6295        return "MeasureReport";
6296      if (code == FHIRAllTypes.MEDIA)
6297        return "Media";
6298      if (code == FHIRAllTypes.MEDICATION)
6299        return "Medication";
6300      if (code == FHIRAllTypes.MEDICATIONADMINISTRATION)
6301        return "MedicationAdministration";
6302      if (code == FHIRAllTypes.MEDICATIONDISPENSE)
6303        return "MedicationDispense";
6304      if (code == FHIRAllTypes.MEDICATIONKNOWLEDGE)
6305        return "MedicationKnowledge";
6306      if (code == FHIRAllTypes.MEDICATIONREQUEST)
6307        return "MedicationRequest";
6308      if (code == FHIRAllTypes.MEDICATIONSTATEMENT)
6309        return "MedicationStatement";
6310      if (code == FHIRAllTypes.MEDICINALPRODUCT)
6311        return "MedicinalProduct";
6312      if (code == FHIRAllTypes.MEDICINALPRODUCTAUTHORIZATION)
6313        return "MedicinalProductAuthorization";
6314      if (code == FHIRAllTypes.MEDICINALPRODUCTCONTRAINDICATION)
6315        return "MedicinalProductContraindication";
6316      if (code == FHIRAllTypes.MEDICINALPRODUCTINDICATION)
6317        return "MedicinalProductIndication";
6318      if (code == FHIRAllTypes.MEDICINALPRODUCTINGREDIENT)
6319        return "MedicinalProductIngredient";
6320      if (code == FHIRAllTypes.MEDICINALPRODUCTINTERACTION)
6321        return "MedicinalProductInteraction";
6322      if (code == FHIRAllTypes.MEDICINALPRODUCTMANUFACTURED)
6323        return "MedicinalProductManufactured";
6324      if (code == FHIRAllTypes.MEDICINALPRODUCTPACKAGED)
6325        return "MedicinalProductPackaged";
6326      if (code == FHIRAllTypes.MEDICINALPRODUCTPHARMACEUTICAL)
6327        return "MedicinalProductPharmaceutical";
6328      if (code == FHIRAllTypes.MEDICINALPRODUCTUNDESIRABLEEFFECT)
6329        return "MedicinalProductUndesirableEffect";
6330      if (code == FHIRAllTypes.MESSAGEDEFINITION)
6331        return "MessageDefinition";
6332      if (code == FHIRAllTypes.MESSAGEHEADER)
6333        return "MessageHeader";
6334      if (code == FHIRAllTypes.MOLECULARSEQUENCE)
6335        return "MolecularSequence";
6336      if (code == FHIRAllTypes.NAMINGSYSTEM)
6337        return "NamingSystem";
6338      if (code == FHIRAllTypes.NUTRITIONORDER)
6339        return "NutritionOrder";
6340      if (code == FHIRAllTypes.OBSERVATION)
6341        return "Observation";
6342      if (code == FHIRAllTypes.OBSERVATIONDEFINITION)
6343        return "ObservationDefinition";
6344      if (code == FHIRAllTypes.OPERATIONDEFINITION)
6345        return "OperationDefinition";
6346      if (code == FHIRAllTypes.OPERATIONOUTCOME)
6347        return "OperationOutcome";
6348      if (code == FHIRAllTypes.ORGANIZATION)
6349        return "Organization";
6350      if (code == FHIRAllTypes.ORGANIZATIONAFFILIATION)
6351        return "OrganizationAffiliation";
6352      if (code == FHIRAllTypes.PARAMETERS)
6353        return "Parameters";
6354      if (code == FHIRAllTypes.PATIENT)
6355        return "Patient";
6356      if (code == FHIRAllTypes.PAYMENTNOTICE)
6357        return "PaymentNotice";
6358      if (code == FHIRAllTypes.PAYMENTRECONCILIATION)
6359        return "PaymentReconciliation";
6360      if (code == FHIRAllTypes.PERSON)
6361        return "Person";
6362      if (code == FHIRAllTypes.PLANDEFINITION)
6363        return "PlanDefinition";
6364      if (code == FHIRAllTypes.PRACTITIONER)
6365        return "Practitioner";
6366      if (code == FHIRAllTypes.PRACTITIONERROLE)
6367        return "PractitionerRole";
6368      if (code == FHIRAllTypes.PROCEDURE)
6369        return "Procedure";
6370      if (code == FHIRAllTypes.PROVENANCE)
6371        return "Provenance";
6372      if (code == FHIRAllTypes.QUESTIONNAIRE)
6373        return "Questionnaire";
6374      if (code == FHIRAllTypes.QUESTIONNAIRERESPONSE)
6375        return "QuestionnaireResponse";
6376      if (code == FHIRAllTypes.RELATEDPERSON)
6377        return "RelatedPerson";
6378      if (code == FHIRAllTypes.REQUESTGROUP)
6379        return "RequestGroup";
6380      if (code == FHIRAllTypes.RESEARCHDEFINITION)
6381        return "ResearchDefinition";
6382      if (code == FHIRAllTypes.RESEARCHELEMENTDEFINITION)
6383        return "ResearchElementDefinition";
6384      if (code == FHIRAllTypes.RESEARCHSTUDY)
6385        return "ResearchStudy";
6386      if (code == FHIRAllTypes.RESEARCHSUBJECT)
6387        return "ResearchSubject";
6388      if (code == FHIRAllTypes.RESOURCE)
6389        return "Resource";
6390      if (code == FHIRAllTypes.RISKASSESSMENT)
6391        return "RiskAssessment";
6392      if (code == FHIRAllTypes.RISKEVIDENCESYNTHESIS)
6393        return "RiskEvidenceSynthesis";
6394      if (code == FHIRAllTypes.SCHEDULE)
6395        return "Schedule";
6396      if (code == FHIRAllTypes.SEARCHPARAMETER)
6397        return "SearchParameter";
6398      if (code == FHIRAllTypes.SERVICEREQUEST)
6399        return "ServiceRequest";
6400      if (code == FHIRAllTypes.SLOT)
6401        return "Slot";
6402      if (code == FHIRAllTypes.SPECIMEN)
6403        return "Specimen";
6404      if (code == FHIRAllTypes.SPECIMENDEFINITION)
6405        return "SpecimenDefinition";
6406      if (code == FHIRAllTypes.STRUCTUREDEFINITION)
6407        return "StructureDefinition";
6408      if (code == FHIRAllTypes.STRUCTUREMAP)
6409        return "StructureMap";
6410      if (code == FHIRAllTypes.SUBSCRIPTION)
6411        return "Subscription";
6412      if (code == FHIRAllTypes.SUBSTANCE)
6413        return "Substance";
6414      if (code == FHIRAllTypes.SUBSTANCENUCLEICACID)
6415        return "SubstanceNucleicAcid";
6416      if (code == FHIRAllTypes.SUBSTANCEPOLYMER)
6417        return "SubstancePolymer";
6418      if (code == FHIRAllTypes.SUBSTANCEPROTEIN)
6419        return "SubstanceProtein";
6420      if (code == FHIRAllTypes.SUBSTANCEREFERENCEINFORMATION)
6421        return "SubstanceReferenceInformation";
6422      if (code == FHIRAllTypes.SUBSTANCESOURCEMATERIAL)
6423        return "SubstanceSourceMaterial";
6424      if (code == FHIRAllTypes.SUBSTANCESPECIFICATION)
6425        return "SubstanceSpecification";
6426      if (code == FHIRAllTypes.SUPPLYDELIVERY)
6427        return "SupplyDelivery";
6428      if (code == FHIRAllTypes.SUPPLYREQUEST)
6429        return "SupplyRequest";
6430      if (code == FHIRAllTypes.TASK)
6431        return "Task";
6432      if (code == FHIRAllTypes.TERMINOLOGYCAPABILITIES)
6433        return "TerminologyCapabilities";
6434      if (code == FHIRAllTypes.TESTREPORT)
6435        return "TestReport";
6436      if (code == FHIRAllTypes.TESTSCRIPT)
6437        return "TestScript";
6438      if (code == FHIRAllTypes.VALUESET)
6439        return "ValueSet";
6440      if (code == FHIRAllTypes.VERIFICATIONRESULT)
6441        return "VerificationResult";
6442      if (code == FHIRAllTypes.VISIONPRESCRIPTION)
6443        return "VisionPrescription";
6444      if (code == FHIRAllTypes.TYPE)
6445        return "Type";
6446      if (code == FHIRAllTypes.ANY)
6447        return "Any";
6448      return "?";
6449      }
6450    public String toSystem(FHIRAllTypes code) {
6451      return code.getSystem();
6452      }
6453    }
6454
6455    public enum FHIRDefinedType {
6456        /**
6457         * 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.
6458         */
6459        ADDRESS, 
6460        /**
6461         * A duration of time during which an organism (or a process) has existed.
6462         */
6463        AGE, 
6464        /**
6465         * A  text note which also  contains information about who made the statement and when.
6466         */
6467        ANNOTATION, 
6468        /**
6469         * For referring to data content defined in other formats.
6470         */
6471        ATTACHMENT, 
6472        /**
6473         * Base definition for all elements that are defined inside a resource - but not those in a data type.
6474         */
6475        BACKBONEELEMENT, 
6476        /**
6477         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
6478         */
6479        CODEABLECONCEPT, 
6480        /**
6481         * A reference to a code defined by a terminology system.
6482         */
6483        CODING, 
6484        /**
6485         * Specifies contact information for a person or organization.
6486         */
6487        CONTACTDETAIL, 
6488        /**
6489         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
6490         */
6491        CONTACTPOINT, 
6492        /**
6493         * A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.
6494         */
6495        CONTRIBUTOR, 
6496        /**
6497         * 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.
6498         */
6499        COUNT, 
6500        /**
6501         * Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.
6502         */
6503        DATAREQUIREMENT, 
6504        /**
6505         * A length - a value with a unit that is a physical distance.
6506         */
6507        DISTANCE, 
6508        /**
6509         * Indicates how the medication is/was taken or should be taken by the patient.
6510         */
6511        DOSAGE, 
6512        /**
6513         * A length of time.
6514         */
6515        DURATION, 
6516        /**
6517         * Base definition for all elements in a resource.
6518         */
6519        ELEMENT, 
6520        /**
6521         * Captures constraints on each element within the resource, profile, or extension.
6522         */
6523        ELEMENTDEFINITION, 
6524        /**
6525         * 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.
6526         */
6527        EXPRESSION, 
6528        /**
6529         * Optional Extension Element - found in all resources.
6530         */
6531        EXTENSION, 
6532        /**
6533         * A human's name with the ability to identify parts and usage.
6534         */
6535        HUMANNAME, 
6536        /**
6537         * An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.
6538         */
6539        IDENTIFIER, 
6540        /**
6541         * 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.
6542         */
6543        MARKETINGSTATUS, 
6544        /**
6545         * 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.
6546         */
6547        META, 
6548        /**
6549         * An amount of economic utility in some recognized currency.
6550         */
6551        MONEY, 
6552        /**
6553         * null
6554         */
6555        MONEYQUANTITY, 
6556        /**
6557         * A human-readable summary of the resource conveying the essential clinical and business information for the resource.
6558         */
6559        NARRATIVE, 
6560        /**
6561         * 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.
6562         */
6563        PARAMETERDEFINITION, 
6564        /**
6565         * A time period defined by a start and end date and optionally time.
6566         */
6567        PERIOD, 
6568        /**
6569         * A populatioof people with some set of grouping criteria.
6570         */
6571        POPULATION, 
6572        /**
6573         * 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.
6574         */
6575        PRODCHARACTERISTIC, 
6576        /**
6577         * The shelf-life and storage information for a medicinal product item or container can be described using this class.
6578         */
6579        PRODUCTSHELFLIFE, 
6580        /**
6581         * 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.
6582         */
6583        QUANTITY, 
6584        /**
6585         * A set of ordered Quantities defined by a low and high limit.
6586         */
6587        RANGE, 
6588        /**
6589         * A relationship of two Quantity values - expressed as a numerator and a denominator.
6590         */
6591        RATIO, 
6592        /**
6593         * A reference from one resource to another.
6594         */
6595        REFERENCE, 
6596        /**
6597         * Related artifacts such as additional documentation, justification, or bibliographic references.
6598         */
6599        RELATEDARTIFACT, 
6600        /**
6601         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
6602         */
6603        SAMPLEDDATA, 
6604        /**
6605         * 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.
6606         */
6607        SIGNATURE, 
6608        /**
6609         * null
6610         */
6611        SIMPLEQUANTITY, 
6612        /**
6613         * Chemical substances are a single substance type whose primary defining element is the molecular structure. Chemical substances shall be defined on the basis of their complete covalent molecular structure; the presence of a salt (counter-ion) and/or solvates (water, alcohols) is also captured. Purity, grade, physical form or particle size are not taken into account in the definition of a chemical substance or in the assignment of a Substance ID.
6614         */
6615        SUBSTANCEAMOUNT, 
6616        /**
6617         * 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.
6618         */
6619        TIMING, 
6620        /**
6621         * A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.
6622         */
6623        TRIGGERDEFINITION, 
6624        /**
6625         * 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).
6626         */
6627        USAGECONTEXT, 
6628        /**
6629         * A stream of bytes
6630         */
6631        BASE64BINARY, 
6632        /**
6633         * Value of "true" or "false"
6634         */
6635        BOOLEAN, 
6636        /**
6637         * A URI that is a reference to a canonical URL on a FHIR resource
6638         */
6639        CANONICAL, 
6640        /**
6641         * 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
6642         */
6643        CODE, 
6644        /**
6645         * A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.
6646         */
6647        DATE, 
6648        /**
6649         * A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.
6650         */
6651        DATETIME, 
6652        /**
6653         * A rational number with implicit precision
6654         */
6655        DECIMAL, 
6656        /**
6657         * 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.
6658         */
6659        ID, 
6660        /**
6661         * An instant in time - known at least to the second
6662         */
6663        INSTANT, 
6664        /**
6665         * A whole number
6666         */
6667        INTEGER, 
6668        /**
6669         * A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine
6670         */
6671        MARKDOWN, 
6672        /**
6673         * An OID represented as a URI
6674         */
6675        OID, 
6676        /**
6677         * An integer with a value that is positive (e.g. >0)
6678         */
6679        POSITIVEINT, 
6680        /**
6681         * A sequence of Unicode characters
6682         */
6683        STRING, 
6684        /**
6685         * A time during the day, with no date specified
6686         */
6687        TIME, 
6688        /**
6689         * An integer with a value that is not negative (e.g. >= 0)
6690         */
6691        UNSIGNEDINT, 
6692        /**
6693         * String of characters used to identify a name or a resource
6694         */
6695        URI, 
6696        /**
6697         * A URI that is a literal reference
6698         */
6699        URL, 
6700        /**
6701         * A UUID, represented as a URI
6702         */
6703        UUID, 
6704        /**
6705         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
6706         */
6707        XHTML, 
6708        /**
6709         * 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.
6710         */
6711        ACCOUNT, 
6712        /**
6713         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
6714         */
6715        ACTIVITYDEFINITION, 
6716        /**
6717         * Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.
6718         */
6719        ADVERSEEVENT, 
6720        /**
6721         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
6722         */
6723        ALLERGYINTOLERANCE, 
6724        /**
6725         * 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).
6726         */
6727        APPOINTMENT, 
6728        /**
6729         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
6730         */
6731        APPOINTMENTRESPONSE, 
6732        /**
6733         * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.
6734         */
6735        AUDITEVENT, 
6736        /**
6737         * 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.
6738         */
6739        BASIC, 
6740        /**
6741         * 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.
6742         */
6743        BINARY, 
6744        /**
6745         * A material substance originating from a biological entity intended to be transplanted or infused
6746into another (possibly the same) biological entity.
6747         */
6748        BIOLOGICALLYDERIVEDPRODUCT, 
6749        /**
6750         * 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.
6751         */
6752        BODYSTRUCTURE, 
6753        /**
6754         * A container for a collection of resources.
6755         */
6756        BUNDLE, 
6757        /**
6758         * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
6759         */
6760        CAPABILITYSTATEMENT, 
6761        /**
6762         * 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.
6763         */
6764        CAREPLAN, 
6765        /**
6766         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
6767         */
6768        CARETEAM, 
6769        /**
6770         * Catalog entries are wrappers that contextualize items included in a catalog.
6771         */
6772        CATALOGENTRY, 
6773        /**
6774         * 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.
6775         */
6776        CHARGEITEM, 
6777        /**
6778         * 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.
6779         */
6780        CHARGEITEMDEFINITION, 
6781        /**
6782         * 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.
6783         */
6784        CLAIM, 
6785        /**
6786         * This resource provides the adjudication details from the processing of a Claim resource.
6787         */
6788        CLAIMRESPONSE, 
6789        /**
6790         * 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.
6791         */
6792        CLINICALIMPRESSION, 
6793        /**
6794         * 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.
6795         */
6796        CODESYSTEM, 
6797        /**
6798         * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.
6799         */
6800        COMMUNICATION, 
6801        /**
6802         * 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.
6803         */
6804        COMMUNICATIONREQUEST, 
6805        /**
6806         * A compartment definition that defines how resources are accessed on a server.
6807         */
6808        COMPARTMENTDEFINITION, 
6809        /**
6810         * 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.).
6811         */
6812        COMPOSITION, 
6813        /**
6814         * 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.
6815         */
6816        CONCEPTMAP, 
6817        /**
6818         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
6819         */
6820        CONDITION, 
6821        /**
6822         * A record of a healthcare consumer’s  choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.
6823         */
6824        CONSENT, 
6825        /**
6826         * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.
6827         */
6828        CONTRACT, 
6829        /**
6830         * Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.
6831         */
6832        COVERAGE, 
6833        /**
6834         * 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.
6835         */
6836        COVERAGEELIGIBILITYREQUEST, 
6837        /**
6838         * This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.
6839         */
6840        COVERAGEELIGIBILITYRESPONSE, 
6841        /**
6842         * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.
6843         */
6844        DETECTEDISSUE, 
6845        /**
6846         * A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.
6847         */
6848        DEVICE, 
6849        /**
6850         * The characteristics, operational status and capabilities of a medical-related component of a medical device.
6851         */
6852        DEVICEDEFINITION, 
6853        /**
6854         * Describes a measurement, calculation or setting capability of a medical device.
6855         */
6856        DEVICEMETRIC, 
6857        /**
6858         * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.
6859         */
6860        DEVICEREQUEST, 
6861        /**
6862         * A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.
6863         */
6864        DEVICEUSESTATEMENT, 
6865        /**
6866         * The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.
6867         */
6868        DIAGNOSTICREPORT, 
6869        /**
6870         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
6871         */
6872        DOCUMENTMANIFEST, 
6873        /**
6874         * A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.
6875         */
6876        DOCUMENTREFERENCE, 
6877        /**
6878         * A resource that includes narrative, extensions, and contained resources.
6879         */
6880        DOMAINRESOURCE, 
6881        /**
6882         * The EffectEvidenceSynthesis resource describes the difference in an outcome between exposures states in a population where the effect estimate is derived from a combination of research studies.
6883         */
6884        EFFECTEVIDENCESYNTHESIS, 
6885        /**
6886         * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.
6887         */
6888        ENCOUNTER, 
6889        /**
6890         * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.
6891         */
6892        ENDPOINT, 
6893        /**
6894         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
6895         */
6896        ENROLLMENTREQUEST, 
6897        /**
6898         * This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.
6899         */
6900        ENROLLMENTRESPONSE, 
6901        /**
6902         * 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.
6903         */
6904        EPISODEOFCARE, 
6905        /**
6906         * The EventDefinition resource provides a reusable description of when a particular event can occur.
6907         */
6908        EVENTDEFINITION, 
6909        /**
6910         * The Evidence resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.
6911         */
6912        EVIDENCE, 
6913        /**
6914         * The EvidenceVariable resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.
6915         */
6916        EVIDENCEVARIABLE, 
6917        /**
6918         * Example of workflow instance.
6919         */
6920        EXAMPLESCENARIO, 
6921        /**
6922         * 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.
6923         */
6924        EXPLANATIONOFBENEFIT, 
6925        /**
6926         * Significant health conditions for a person related to the patient relevant in the context of care for the patient.
6927         */
6928        FAMILYMEMBERHISTORY, 
6929        /**
6930         * Prospective warnings of potential issues when providing care to the patient.
6931         */
6932        FLAG, 
6933        /**
6934         * 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.
6935         */
6936        GOAL, 
6937        /**
6938         * 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.
6939         */
6940        GRAPHDEFINITION, 
6941        /**
6942         * 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.
6943         */
6944        GROUP, 
6945        /**
6946         * 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.
6947         */
6948        GUIDANCERESPONSE, 
6949        /**
6950         * The details of a healthcare service available at a location.
6951         */
6952        HEALTHCARESERVICE, 
6953        /**
6954         * 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.
6955         */
6956        IMAGINGSTUDY, 
6957        /**
6958         * 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.
6959         */
6960        IMMUNIZATION, 
6961        /**
6962         * Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those  recommendations.
6963         */
6964        IMMUNIZATIONEVALUATION, 
6965        /**
6966         * A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.
6967         */
6968        IMMUNIZATIONRECOMMENDATION, 
6969        /**
6970         * 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.
6971         */
6972        IMPLEMENTATIONGUIDE, 
6973        /**
6974         * Details of a Health Insurance product/plan provided by an organization.
6975         */
6976        INSURANCEPLAN, 
6977        /**
6978         * Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.
6979         */
6980        INVOICE, 
6981        /**
6982         * 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.
6983         */
6984        LIBRARY, 
6985        /**
6986         * Identifies two or more records (resource instances) that refer to the same real-world "occurrence".
6987         */
6988        LINKAGE, 
6989        /**
6990         * A list is a curated collection of resources.
6991         */
6992        LIST, 
6993        /**
6994         * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.
6995         */
6996        LOCATION, 
6997        /**
6998         * The Measure resource provides the definition of a quality measure.
6999         */
7000        MEASURE, 
7001        /**
7002         * The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.
7003         */
7004        MEASUREREPORT, 
7005        /**
7006         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
7007         */
7008        MEDIA, 
7009        /**
7010         * This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.
7011         */
7012        MEDICATION, 
7013        /**
7014         * 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.
7015         */
7016        MEDICATIONADMINISTRATION, 
7017        /**
7018         * 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.
7019         */
7020        MEDICATIONDISPENSE, 
7021        /**
7022         * Information about a medication that is used to support knowledge.
7023         */
7024        MEDICATIONKNOWLEDGE, 
7025        /**
7026         * 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.
7027         */
7028        MEDICATIONREQUEST, 
7029        /**
7030         * 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. 
7031
7032The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.
7033         */
7034        MEDICATIONSTATEMENT, 
7035        /**
7036         * Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).
7037         */
7038        MEDICINALPRODUCT, 
7039        /**
7040         * The regulatory authorization of a medicinal product.
7041         */
7042        MEDICINALPRODUCTAUTHORIZATION, 
7043        /**
7044         * The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.
7045         */
7046        MEDICINALPRODUCTCONTRAINDICATION, 
7047        /**
7048         * Indication for the Medicinal Product.
7049         */
7050        MEDICINALPRODUCTINDICATION, 
7051        /**
7052         * An ingredient of a manufactured item or pharmaceutical product.
7053         */
7054        MEDICINALPRODUCTINGREDIENT, 
7055        /**
7056         * The interactions of the medicinal product with other medicinal products, or other forms of interactions.
7057         */
7058        MEDICINALPRODUCTINTERACTION, 
7059        /**
7060         * The manufactured item as contained in the packaged medicinal product.
7061         */
7062        MEDICINALPRODUCTMANUFACTURED, 
7063        /**
7064         * A medicinal product in a container or package.
7065         */
7066        MEDICINALPRODUCTPACKAGED, 
7067        /**
7068         * A pharmaceutical product described in terms of its composition and dose form.
7069         */
7070        MEDICINALPRODUCTPHARMACEUTICAL, 
7071        /**
7072         * Describe the undesirable effects of the medicinal product.
7073         */
7074        MEDICINALPRODUCTUNDESIRABLEEFFECT, 
7075        /**
7076         * 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.
7077         */
7078        MESSAGEDEFINITION, 
7079        /**
7080         * 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.
7081         */
7082        MESSAGEHEADER, 
7083        /**
7084         * Raw data describing a biological sequence.
7085         */
7086        MOLECULARSEQUENCE, 
7087        /**
7088         * 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.
7089         */
7090        NAMINGSYSTEM, 
7091        /**
7092         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
7093         */
7094        NUTRITIONORDER, 
7095        /**
7096         * Measurements and simple assertions made about a patient, device or other subject.
7097         */
7098        OBSERVATION, 
7099        /**
7100         * Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.
7101         */
7102        OBSERVATIONDEFINITION, 
7103        /**
7104         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
7105         */
7106        OPERATIONDEFINITION, 
7107        /**
7108         * A collection of error, warning, or information messages that result from a system action.
7109         */
7110        OPERATIONOUTCOME, 
7111        /**
7112         * 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.
7113         */
7114        ORGANIZATION, 
7115        /**
7116         * Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.
7117         */
7118        ORGANIZATIONAFFILIATION, 
7119        /**
7120         * This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it.
7121         */
7122        PARAMETERS, 
7123        /**
7124         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
7125         */
7126        PATIENT, 
7127        /**
7128         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
7129         */
7130        PAYMENTNOTICE, 
7131        /**
7132         * This resource provides the details including amount of a payment and allocates the payment items being paid.
7133         */
7134        PAYMENTRECONCILIATION, 
7135        /**
7136         * Demographics and administrative information about a person independent of a specific health-related context.
7137         */
7138        PERSON, 
7139        /**
7140         * 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 artifacts such as clinical decision support rules, order sets and protocols.
7141         */
7142        PLANDEFINITION, 
7143        /**
7144         * A person who is directly or indirectly involved in the provisioning of healthcare.
7145         */
7146        PRACTITIONER, 
7147        /**
7148         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
7149         */
7150        PRACTITIONERROLE, 
7151        /**
7152         * An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.
7153         */
7154        PROCEDURE, 
7155        /**
7156         * 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.
7157         */
7158        PROVENANCE, 
7159        /**
7160         * 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.
7161         */
7162        QUESTIONNAIRE, 
7163        /**
7164         * 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.
7165         */
7166        QUESTIONNAIRERESPONSE, 
7167        /**
7168         * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.
7169         */
7170        RELATEDPERSON, 
7171        /**
7172         * A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one".
7173         */
7174        REQUESTGROUP, 
7175        /**
7176         * The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.
7177         */
7178        RESEARCHDEFINITION, 
7179        /**
7180         * The ResearchElementDefinition resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.
7181         */
7182        RESEARCHELEMENTDEFINITION, 
7183        /**
7184         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
7185         */
7186        RESEARCHSTUDY, 
7187        /**
7188         * A physical entity which is the primary unit of operational and/or administrative interest in a study.
7189         */
7190        RESEARCHSUBJECT, 
7191        /**
7192         * This is the base resource type for everything.
7193         */
7194        RESOURCE, 
7195        /**
7196         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
7197         */
7198        RISKASSESSMENT, 
7199        /**
7200         * The RiskEvidenceSynthesis resource describes the likelihood of an outcome in a population plus exposure state where the risk estimate is derived from a combination of research studies.
7201         */
7202        RISKEVIDENCESYNTHESIS, 
7203        /**
7204         * A container for slots of time that may be available for booking appointments.
7205         */
7206        SCHEDULE, 
7207        /**
7208         * A search parameter that defines a named search item that can be used to search/filter on a resource.
7209         */
7210        SEARCHPARAMETER, 
7211        /**
7212         * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.
7213         */
7214        SERVICEREQUEST, 
7215        /**
7216         * A slot of time on a schedule that may be available for booking appointments.
7217         */
7218        SLOT, 
7219        /**
7220         * A sample to be used for analysis.
7221         */
7222        SPECIMEN, 
7223        /**
7224         * A kind of specimen with associated set of requirements.
7225         */
7226        SPECIMENDEFINITION, 
7227        /**
7228         * 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.
7229         */
7230        STRUCTUREDEFINITION, 
7231        /**
7232         * A Map of relationships between 2 structures that can be used to transform data.
7233         */
7234        STRUCTUREMAP, 
7235        /**
7236         * The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system can take an appropriate action.
7237         */
7238        SUBSCRIPTION, 
7239        /**
7240         * A homogeneous material with a definite composition.
7241         */
7242        SUBSTANCE, 
7243        /**
7244         * 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.
7245         */
7246        SUBSTANCENUCLEICACID, 
7247        /**
7248         * Todo.
7249         */
7250        SUBSTANCEPOLYMER, 
7251        /**
7252         * 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.
7253         */
7254        SUBSTANCEPROTEIN, 
7255        /**
7256         * Todo.
7257         */
7258        SUBSTANCEREFERENCEINFORMATION, 
7259        /**
7260         * 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.
7261         */
7262        SUBSTANCESOURCEMATERIAL, 
7263        /**
7264         * The detailed description of a substance, typically at a level beyond what is used for prescribing.
7265         */
7266        SUBSTANCESPECIFICATION, 
7267        /**
7268         * Record of delivery of what is supplied.
7269         */
7270        SUPPLYDELIVERY, 
7271        /**
7272         * A record of a request for a medication, substance or device used in the healthcare setting.
7273         */
7274        SUPPLYREQUEST, 
7275        /**
7276         * A task to be performed.
7277         */
7278        TASK, 
7279        /**
7280         * 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.
7281         */
7282        TERMINOLOGYCAPABILITIES, 
7283        /**
7284         * A summary of information based on the results of executing a TestScript.
7285         */
7286        TESTREPORT, 
7287        /**
7288         * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
7289         */
7290        TESTSCRIPT, 
7291        /**
7292         * 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).
7293         */
7294        VALUESET, 
7295        /**
7296         * Describes validation requirements, source(s), status and dates for one or more elements.
7297         */
7298        VERIFICATIONRESULT, 
7299        /**
7300         * An authorization for the provision of glasses and/or contact lenses to a patient.
7301         */
7302        VISIONPRESCRIPTION, 
7303        /**
7304         * added to help the parsers
7305         */
7306        NULL;
7307        public static FHIRDefinedType fromCode(String codeString) throws FHIRException {
7308            if (codeString == null || "".equals(codeString))
7309                return null;
7310        if ("Address".equals(codeString))
7311          return ADDRESS;
7312        if ("Age".equals(codeString))
7313          return AGE;
7314        if ("Annotation".equals(codeString))
7315          return ANNOTATION;
7316        if ("Attachment".equals(codeString))
7317          return ATTACHMENT;
7318        if ("BackboneElement".equals(codeString))
7319          return BACKBONEELEMENT;
7320        if ("CodeableConcept".equals(codeString))
7321          return CODEABLECONCEPT;
7322        if ("Coding".equals(codeString))
7323          return CODING;
7324        if ("ContactDetail".equals(codeString))
7325          return CONTACTDETAIL;
7326        if ("ContactPoint".equals(codeString))
7327          return CONTACTPOINT;
7328        if ("Contributor".equals(codeString))
7329          return CONTRIBUTOR;
7330        if ("Count".equals(codeString))
7331          return COUNT;
7332        if ("DataRequirement".equals(codeString))
7333          return DATAREQUIREMENT;
7334        if ("Distance".equals(codeString))
7335          return DISTANCE;
7336        if ("Dosage".equals(codeString))
7337          return DOSAGE;
7338        if ("Duration".equals(codeString))
7339          return DURATION;
7340        if ("Element".equals(codeString))
7341          return ELEMENT;
7342        if ("ElementDefinition".equals(codeString))
7343          return ELEMENTDEFINITION;
7344        if ("Expression".equals(codeString))
7345          return EXPRESSION;
7346        if ("Extension".equals(codeString))
7347          return EXTENSION;
7348        if ("HumanName".equals(codeString))
7349          return HUMANNAME;
7350        if ("Identifier".equals(codeString))
7351          return IDENTIFIER;
7352        if ("MarketingStatus".equals(codeString))
7353          return MARKETINGSTATUS;
7354        if ("Meta".equals(codeString))
7355          return META;
7356        if ("Money".equals(codeString))
7357          return MONEY;
7358        if ("MoneyQuantity".equals(codeString))
7359          return MONEYQUANTITY;
7360        if ("Narrative".equals(codeString))
7361          return NARRATIVE;
7362        if ("ParameterDefinition".equals(codeString))
7363          return PARAMETERDEFINITION;
7364        if ("Period".equals(codeString))
7365          return PERIOD;
7366        if ("Population".equals(codeString))
7367          return POPULATION;
7368        if ("ProdCharacteristic".equals(codeString))
7369          return PRODCHARACTERISTIC;
7370        if ("ProductShelfLife".equals(codeString))
7371          return PRODUCTSHELFLIFE;
7372        if ("Quantity".equals(codeString))
7373          return QUANTITY;
7374        if ("Range".equals(codeString))
7375          return RANGE;
7376        if ("Ratio".equals(codeString))
7377          return RATIO;
7378        if ("Reference".equals(codeString))
7379          return REFERENCE;
7380        if ("RelatedArtifact".equals(codeString))
7381          return RELATEDARTIFACT;
7382        if ("SampledData".equals(codeString))
7383          return SAMPLEDDATA;
7384        if ("Signature".equals(codeString))
7385          return SIGNATURE;
7386        if ("SimpleQuantity".equals(codeString))
7387          return SIMPLEQUANTITY;
7388        if ("SubstanceAmount".equals(codeString))
7389          return SUBSTANCEAMOUNT;
7390        if ("Timing".equals(codeString))
7391          return TIMING;
7392        if ("TriggerDefinition".equals(codeString))
7393          return TRIGGERDEFINITION;
7394        if ("UsageContext".equals(codeString))
7395          return USAGECONTEXT;
7396        if ("base64Binary".equals(codeString))
7397          return BASE64BINARY;
7398        if ("boolean".equals(codeString))
7399          return BOOLEAN;
7400        if ("canonical".equals(codeString))
7401          return CANONICAL;
7402        if ("code".equals(codeString))
7403          return CODE;
7404        if ("date".equals(codeString))
7405          return DATE;
7406        if ("dateTime".equals(codeString))
7407          return DATETIME;
7408        if ("decimal".equals(codeString))
7409          return DECIMAL;
7410        if ("id".equals(codeString))
7411          return ID;
7412        if ("instant".equals(codeString))
7413          return INSTANT;
7414        if ("integer".equals(codeString))
7415          return INTEGER;
7416        if ("markdown".equals(codeString))
7417          return MARKDOWN;
7418        if ("oid".equals(codeString))
7419          return OID;
7420        if ("positiveInt".equals(codeString))
7421          return POSITIVEINT;
7422        if ("string".equals(codeString))
7423          return STRING;
7424        if ("time".equals(codeString))
7425          return TIME;
7426        if ("unsignedInt".equals(codeString))
7427          return UNSIGNEDINT;
7428        if ("uri".equals(codeString))
7429          return URI;
7430        if ("url".equals(codeString))
7431          return URL;
7432        if ("uuid".equals(codeString))
7433          return UUID;
7434        if ("xhtml".equals(codeString))
7435          return XHTML;
7436        if ("Account".equals(codeString))
7437          return ACCOUNT;
7438        if ("ActivityDefinition".equals(codeString))
7439          return ACTIVITYDEFINITION;
7440        if ("AdverseEvent".equals(codeString))
7441          return ADVERSEEVENT;
7442        if ("AllergyIntolerance".equals(codeString))
7443          return ALLERGYINTOLERANCE;
7444        if ("Appointment".equals(codeString))
7445          return APPOINTMENT;
7446        if ("AppointmentResponse".equals(codeString))
7447          return APPOINTMENTRESPONSE;
7448        if ("AuditEvent".equals(codeString))
7449          return AUDITEVENT;
7450        if ("Basic".equals(codeString))
7451          return BASIC;
7452        if ("Binary".equals(codeString))
7453          return BINARY;
7454        if ("BiologicallyDerivedProduct".equals(codeString))
7455          return BIOLOGICALLYDERIVEDPRODUCT;
7456        if ("BodyStructure".equals(codeString))
7457          return BODYSTRUCTURE;
7458        if ("Bundle".equals(codeString))
7459          return BUNDLE;
7460        if ("CapabilityStatement".equals(codeString))
7461          return CAPABILITYSTATEMENT;
7462        if ("CarePlan".equals(codeString))
7463          return CAREPLAN;
7464        if ("CareTeam".equals(codeString))
7465          return CARETEAM;
7466        if ("CatalogEntry".equals(codeString))
7467          return CATALOGENTRY;
7468        if ("ChargeItem".equals(codeString))
7469          return CHARGEITEM;
7470        if ("ChargeItemDefinition".equals(codeString))
7471          return CHARGEITEMDEFINITION;
7472        if ("Claim".equals(codeString))
7473          return CLAIM;
7474        if ("ClaimResponse".equals(codeString))
7475          return CLAIMRESPONSE;
7476        if ("ClinicalImpression".equals(codeString))
7477          return CLINICALIMPRESSION;
7478        if ("CodeSystem".equals(codeString))
7479          return CODESYSTEM;
7480        if ("Communication".equals(codeString))
7481          return COMMUNICATION;
7482        if ("CommunicationRequest".equals(codeString))
7483          return COMMUNICATIONREQUEST;
7484        if ("CompartmentDefinition".equals(codeString))
7485          return COMPARTMENTDEFINITION;
7486        if ("Composition".equals(codeString))
7487          return COMPOSITION;
7488        if ("ConceptMap".equals(codeString))
7489          return CONCEPTMAP;
7490        if ("Condition".equals(codeString))
7491          return CONDITION;
7492        if ("Consent".equals(codeString))
7493          return CONSENT;
7494        if ("Contract".equals(codeString))
7495          return CONTRACT;
7496        if ("Coverage".equals(codeString))
7497          return COVERAGE;
7498        if ("CoverageEligibilityRequest".equals(codeString))
7499          return COVERAGEELIGIBILITYREQUEST;
7500        if ("CoverageEligibilityResponse".equals(codeString))
7501          return COVERAGEELIGIBILITYRESPONSE;
7502        if ("DetectedIssue".equals(codeString))
7503          return DETECTEDISSUE;
7504        if ("Device".equals(codeString))
7505          return DEVICE;
7506        if ("DeviceDefinition".equals(codeString))
7507          return DEVICEDEFINITION;
7508        if ("DeviceMetric".equals(codeString))
7509          return DEVICEMETRIC;
7510        if ("DeviceRequest".equals(codeString))
7511          return DEVICEREQUEST;
7512        if ("DeviceUseStatement".equals(codeString))
7513          return DEVICEUSESTATEMENT;
7514        if ("DiagnosticReport".equals(codeString))
7515          return DIAGNOSTICREPORT;
7516        if ("DocumentManifest".equals(codeString))
7517          return DOCUMENTMANIFEST;
7518        if ("DocumentReference".equals(codeString))
7519          return DOCUMENTREFERENCE;
7520        if ("DomainResource".equals(codeString))
7521          return DOMAINRESOURCE;
7522        if ("EffectEvidenceSynthesis".equals(codeString))
7523          return EFFECTEVIDENCESYNTHESIS;
7524        if ("Encounter".equals(codeString))
7525          return ENCOUNTER;
7526        if ("Endpoint".equals(codeString))
7527          return ENDPOINT;
7528        if ("EnrollmentRequest".equals(codeString))
7529          return ENROLLMENTREQUEST;
7530        if ("EnrollmentResponse".equals(codeString))
7531          return ENROLLMENTRESPONSE;
7532        if ("EpisodeOfCare".equals(codeString))
7533          return EPISODEOFCARE;
7534        if ("EventDefinition".equals(codeString))
7535          return EVENTDEFINITION;
7536        if ("Evidence".equals(codeString))
7537          return EVIDENCE;
7538        if ("EvidenceVariable".equals(codeString))
7539          return EVIDENCEVARIABLE;
7540        if ("ExampleScenario".equals(codeString))
7541          return EXAMPLESCENARIO;
7542        if ("ExplanationOfBenefit".equals(codeString))
7543          return EXPLANATIONOFBENEFIT;
7544        if ("FamilyMemberHistory".equals(codeString))
7545          return FAMILYMEMBERHISTORY;
7546        if ("Flag".equals(codeString))
7547          return FLAG;
7548        if ("Goal".equals(codeString))
7549          return GOAL;
7550        if ("GraphDefinition".equals(codeString))
7551          return GRAPHDEFINITION;
7552        if ("Group".equals(codeString))
7553          return GROUP;
7554        if ("GuidanceResponse".equals(codeString))
7555          return GUIDANCERESPONSE;
7556        if ("HealthcareService".equals(codeString))
7557          return HEALTHCARESERVICE;
7558        if ("ImagingStudy".equals(codeString))
7559          return IMAGINGSTUDY;
7560        if ("Immunization".equals(codeString))
7561          return IMMUNIZATION;
7562        if ("ImmunizationEvaluation".equals(codeString))
7563          return IMMUNIZATIONEVALUATION;
7564        if ("ImmunizationRecommendation".equals(codeString))
7565          return IMMUNIZATIONRECOMMENDATION;
7566        if ("ImplementationGuide".equals(codeString))
7567          return IMPLEMENTATIONGUIDE;
7568        if ("InsurancePlan".equals(codeString))
7569          return INSURANCEPLAN;
7570        if ("Invoice".equals(codeString))
7571          return INVOICE;
7572        if ("Library".equals(codeString))
7573          return LIBRARY;
7574        if ("Linkage".equals(codeString))
7575          return LINKAGE;
7576        if ("List".equals(codeString))
7577          return LIST;
7578        if ("Location".equals(codeString))
7579          return LOCATION;
7580        if ("Measure".equals(codeString))
7581          return MEASURE;
7582        if ("MeasureReport".equals(codeString))
7583          return MEASUREREPORT;
7584        if ("Media".equals(codeString))
7585          return MEDIA;
7586        if ("Medication".equals(codeString))
7587          return MEDICATION;
7588        if ("MedicationAdministration".equals(codeString))
7589          return MEDICATIONADMINISTRATION;
7590        if ("MedicationDispense".equals(codeString))
7591          return MEDICATIONDISPENSE;
7592        if ("MedicationKnowledge".equals(codeString))
7593          return MEDICATIONKNOWLEDGE;
7594        if ("MedicationRequest".equals(codeString))
7595          return MEDICATIONREQUEST;
7596        if ("MedicationStatement".equals(codeString))
7597          return MEDICATIONSTATEMENT;
7598        if ("MedicinalProduct".equals(codeString))
7599          return MEDICINALPRODUCT;
7600        if ("MedicinalProductAuthorization".equals(codeString))
7601          return MEDICINALPRODUCTAUTHORIZATION;
7602        if ("MedicinalProductContraindication".equals(codeString))
7603          return MEDICINALPRODUCTCONTRAINDICATION;
7604        if ("MedicinalProductIndication".equals(codeString))
7605          return MEDICINALPRODUCTINDICATION;
7606        if ("MedicinalProductIngredient".equals(codeString))
7607          return MEDICINALPRODUCTINGREDIENT;
7608        if ("MedicinalProductInteraction".equals(codeString))
7609          return MEDICINALPRODUCTINTERACTION;
7610        if ("MedicinalProductManufactured".equals(codeString))
7611          return MEDICINALPRODUCTMANUFACTURED;
7612        if ("MedicinalProductPackaged".equals(codeString))
7613          return MEDICINALPRODUCTPACKAGED;
7614        if ("MedicinalProductPharmaceutical".equals(codeString))
7615          return MEDICINALPRODUCTPHARMACEUTICAL;
7616        if ("MedicinalProductUndesirableEffect".equals(codeString))
7617          return MEDICINALPRODUCTUNDESIRABLEEFFECT;
7618        if ("MessageDefinition".equals(codeString))
7619          return MESSAGEDEFINITION;
7620        if ("MessageHeader".equals(codeString))
7621          return MESSAGEHEADER;
7622        if ("MolecularSequence".equals(codeString))
7623          return MOLECULARSEQUENCE;
7624        if ("NamingSystem".equals(codeString))
7625          return NAMINGSYSTEM;
7626        if ("NutritionOrder".equals(codeString))
7627          return NUTRITIONORDER;
7628        if ("Observation".equals(codeString))
7629          return OBSERVATION;
7630        if ("ObservationDefinition".equals(codeString))
7631          return OBSERVATIONDEFINITION;
7632        if ("OperationDefinition".equals(codeString))
7633          return OPERATIONDEFINITION;
7634        if ("OperationOutcome".equals(codeString))
7635          return OPERATIONOUTCOME;
7636        if ("Organization".equals(codeString))
7637          return ORGANIZATION;
7638        if ("OrganizationAffiliation".equals(codeString))
7639          return ORGANIZATIONAFFILIATION;
7640        if ("Parameters".equals(codeString))
7641          return PARAMETERS;
7642        if ("Patient".equals(codeString))
7643          return PATIENT;
7644        if ("PaymentNotice".equals(codeString))
7645          return PAYMENTNOTICE;
7646        if ("PaymentReconciliation".equals(codeString))
7647          return PAYMENTRECONCILIATION;
7648        if ("Person".equals(codeString))
7649          return PERSON;
7650        if ("PlanDefinition".equals(codeString))
7651          return PLANDEFINITION;
7652        if ("Practitioner".equals(codeString))
7653          return PRACTITIONER;
7654        if ("PractitionerRole".equals(codeString))
7655          return PRACTITIONERROLE;
7656        if ("Procedure".equals(codeString))
7657          return PROCEDURE;
7658        if ("Provenance".equals(codeString))
7659          return PROVENANCE;
7660        if ("Questionnaire".equals(codeString))
7661          return QUESTIONNAIRE;
7662        if ("QuestionnaireResponse".equals(codeString))
7663          return QUESTIONNAIRERESPONSE;
7664        if ("RelatedPerson".equals(codeString))
7665          return RELATEDPERSON;
7666        if ("RequestGroup".equals(codeString))
7667          return REQUESTGROUP;
7668        if ("ResearchDefinition".equals(codeString))
7669          return RESEARCHDEFINITION;
7670        if ("ResearchElementDefinition".equals(codeString))
7671          return RESEARCHELEMENTDEFINITION;
7672        if ("ResearchStudy".equals(codeString))
7673          return RESEARCHSTUDY;
7674        if ("ResearchSubject".equals(codeString))
7675          return RESEARCHSUBJECT;
7676        if ("Resource".equals(codeString))
7677          return RESOURCE;
7678        if ("RiskAssessment".equals(codeString))
7679          return RISKASSESSMENT;
7680        if ("RiskEvidenceSynthesis".equals(codeString))
7681          return RISKEVIDENCESYNTHESIS;
7682        if ("Schedule".equals(codeString))
7683          return SCHEDULE;
7684        if ("SearchParameter".equals(codeString))
7685          return SEARCHPARAMETER;
7686        if ("ServiceRequest".equals(codeString))
7687          return SERVICEREQUEST;
7688        if ("Slot".equals(codeString))
7689          return SLOT;
7690        if ("Specimen".equals(codeString))
7691          return SPECIMEN;
7692        if ("SpecimenDefinition".equals(codeString))
7693          return SPECIMENDEFINITION;
7694        if ("StructureDefinition".equals(codeString))
7695          return STRUCTUREDEFINITION;
7696        if ("StructureMap".equals(codeString))
7697          return STRUCTUREMAP;
7698        if ("Subscription".equals(codeString))
7699          return SUBSCRIPTION;
7700        if ("Substance".equals(codeString))
7701          return SUBSTANCE;
7702        if ("SubstanceNucleicAcid".equals(codeString))
7703          return SUBSTANCENUCLEICACID;
7704        if ("SubstancePolymer".equals(codeString))
7705          return SUBSTANCEPOLYMER;
7706        if ("SubstanceProtein".equals(codeString))
7707          return SUBSTANCEPROTEIN;
7708        if ("SubstanceReferenceInformation".equals(codeString))
7709          return SUBSTANCEREFERENCEINFORMATION;
7710        if ("SubstanceSourceMaterial".equals(codeString))
7711          return SUBSTANCESOURCEMATERIAL;
7712        if ("SubstanceSpecification".equals(codeString))
7713          return SUBSTANCESPECIFICATION;
7714        if ("SupplyDelivery".equals(codeString))
7715          return SUPPLYDELIVERY;
7716        if ("SupplyRequest".equals(codeString))
7717          return SUPPLYREQUEST;
7718        if ("Task".equals(codeString))
7719          return TASK;
7720        if ("TerminologyCapabilities".equals(codeString))
7721          return TERMINOLOGYCAPABILITIES;
7722        if ("TestReport".equals(codeString))
7723          return TESTREPORT;
7724        if ("TestScript".equals(codeString))
7725          return TESTSCRIPT;
7726        if ("ValueSet".equals(codeString))
7727          return VALUESET;
7728        if ("VerificationResult".equals(codeString))
7729          return VERIFICATIONRESULT;
7730        if ("VisionPrescription".equals(codeString))
7731          return VISIONPRESCRIPTION;
7732        throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'");
7733        }
7734        public String toCode() {
7735          switch (this) {
7736            case ADDRESS: return "Address";
7737            case AGE: return "Age";
7738            case ANNOTATION: return "Annotation";
7739            case ATTACHMENT: return "Attachment";
7740            case BACKBONEELEMENT: return "BackboneElement";
7741            case CODEABLECONCEPT: return "CodeableConcept";
7742            case CODING: return "Coding";
7743            case CONTACTDETAIL: return "ContactDetail";
7744            case CONTACTPOINT: return "ContactPoint";
7745            case CONTRIBUTOR: return "Contributor";
7746            case COUNT: return "Count";
7747            case DATAREQUIREMENT: return "DataRequirement";
7748            case DISTANCE: return "Distance";
7749            case DOSAGE: return "Dosage";
7750            case DURATION: return "Duration";
7751            case ELEMENT: return "Element";
7752            case ELEMENTDEFINITION: return "ElementDefinition";
7753            case EXPRESSION: return "Expression";
7754            case EXTENSION: return "Extension";
7755            case HUMANNAME: return "HumanName";
7756            case IDENTIFIER: return "Identifier";
7757            case MARKETINGSTATUS: return "MarketingStatus";
7758            case META: return "Meta";
7759            case MONEY: return "Money";
7760            case MONEYQUANTITY: return "MoneyQuantity";
7761            case NARRATIVE: return "Narrative";
7762            case PARAMETERDEFINITION: return "ParameterDefinition";
7763            case PERIOD: return "Period";
7764            case POPULATION: return "Population";
7765            case PRODCHARACTERISTIC: return "ProdCharacteristic";
7766            case PRODUCTSHELFLIFE: return "ProductShelfLife";
7767            case QUANTITY: return "Quantity";
7768            case RANGE: return "Range";
7769            case RATIO: return "Ratio";
7770            case REFERENCE: return "Reference";
7771            case RELATEDARTIFACT: return "RelatedArtifact";
7772            case SAMPLEDDATA: return "SampledData";
7773            case SIGNATURE: return "Signature";
7774            case SIMPLEQUANTITY: return "SimpleQuantity";
7775            case SUBSTANCEAMOUNT: return "SubstanceAmount";
7776            case TIMING: return "Timing";
7777            case TRIGGERDEFINITION: return "TriggerDefinition";
7778            case USAGECONTEXT: return "UsageContext";
7779            case BASE64BINARY: return "base64Binary";
7780            case BOOLEAN: return "boolean";
7781            case CANONICAL: return "canonical";
7782            case CODE: return "code";
7783            case DATE: return "date";
7784            case DATETIME: return "dateTime";
7785            case DECIMAL: return "decimal";
7786            case ID: return "id";
7787            case INSTANT: return "instant";
7788            case INTEGER: return "integer";
7789            case MARKDOWN: return "markdown";
7790            case OID: return "oid";
7791            case POSITIVEINT: return "positiveInt";
7792            case STRING: return "string";
7793            case TIME: return "time";
7794            case UNSIGNEDINT: return "unsignedInt";
7795            case URI: return "uri";
7796            case URL: return "url";
7797            case UUID: return "uuid";
7798            case XHTML: return "xhtml";
7799            case ACCOUNT: return "Account";
7800            case ACTIVITYDEFINITION: return "ActivityDefinition";
7801            case ADVERSEEVENT: return "AdverseEvent";
7802            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
7803            case APPOINTMENT: return "Appointment";
7804            case APPOINTMENTRESPONSE: return "AppointmentResponse";
7805            case AUDITEVENT: return "AuditEvent";
7806            case BASIC: return "Basic";
7807            case BINARY: return "Binary";
7808            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
7809            case BODYSTRUCTURE: return "BodyStructure";
7810            case BUNDLE: return "Bundle";
7811            case CAPABILITYSTATEMENT: return "CapabilityStatement";
7812            case CAREPLAN: return "CarePlan";
7813            case CARETEAM: return "CareTeam";
7814            case CATALOGENTRY: return "CatalogEntry";
7815            case CHARGEITEM: return "ChargeItem";
7816            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
7817            case CLAIM: return "Claim";
7818            case CLAIMRESPONSE: return "ClaimResponse";
7819            case CLINICALIMPRESSION: return "ClinicalImpression";
7820            case CODESYSTEM: return "CodeSystem";
7821            case COMMUNICATION: return "Communication";
7822            case COMMUNICATIONREQUEST: return "CommunicationRequest";
7823            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
7824            case COMPOSITION: return "Composition";
7825            case CONCEPTMAP: return "ConceptMap";
7826            case CONDITION: return "Condition";
7827            case CONSENT: return "Consent";
7828            case CONTRACT: return "Contract";
7829            case COVERAGE: return "Coverage";
7830            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
7831            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
7832            case DETECTEDISSUE: return "DetectedIssue";
7833            case DEVICE: return "Device";
7834            case DEVICEDEFINITION: return "DeviceDefinition";
7835            case DEVICEMETRIC: return "DeviceMetric";
7836            case DEVICEREQUEST: return "DeviceRequest";
7837            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
7838            case DIAGNOSTICREPORT: return "DiagnosticReport";
7839            case DOCUMENTMANIFEST: return "DocumentManifest";
7840            case DOCUMENTREFERENCE: return "DocumentReference";
7841            case DOMAINRESOURCE: return "DomainResource";
7842            case EFFECTEVIDENCESYNTHESIS: return "EffectEvidenceSynthesis";
7843            case ENCOUNTER: return "Encounter";
7844            case ENDPOINT: return "Endpoint";
7845            case ENROLLMENTREQUEST: return "EnrollmentRequest";
7846            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
7847            case EPISODEOFCARE: return "EpisodeOfCare";
7848            case EVENTDEFINITION: return "EventDefinition";
7849            case EVIDENCE: return "Evidence";
7850            case EVIDENCEVARIABLE: return "EvidenceVariable";
7851            case EXAMPLESCENARIO: return "ExampleScenario";
7852            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
7853            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
7854            case FLAG: return "Flag";
7855            case GOAL: return "Goal";
7856            case GRAPHDEFINITION: return "GraphDefinition";
7857            case GROUP: return "Group";
7858            case GUIDANCERESPONSE: return "GuidanceResponse";
7859            case HEALTHCARESERVICE: return "HealthcareService";
7860            case IMAGINGSTUDY: return "ImagingStudy";
7861            case IMMUNIZATION: return "Immunization";
7862            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
7863            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
7864            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
7865            case INSURANCEPLAN: return "InsurancePlan";
7866            case INVOICE: return "Invoice";
7867            case LIBRARY: return "Library";
7868            case LINKAGE: return "Linkage";
7869            case LIST: return "List";
7870            case LOCATION: return "Location";
7871            case MEASURE: return "Measure";
7872            case MEASUREREPORT: return "MeasureReport";
7873            case MEDIA: return "Media";
7874            case MEDICATION: return "Medication";
7875            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
7876            case MEDICATIONDISPENSE: return "MedicationDispense";
7877            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
7878            case MEDICATIONREQUEST: return "MedicationRequest";
7879            case MEDICATIONSTATEMENT: return "MedicationStatement";
7880            case MEDICINALPRODUCT: return "MedicinalProduct";
7881            case MEDICINALPRODUCTAUTHORIZATION: return "MedicinalProductAuthorization";
7882            case MEDICINALPRODUCTCONTRAINDICATION: return "MedicinalProductContraindication";
7883            case MEDICINALPRODUCTINDICATION: return "MedicinalProductIndication";
7884            case MEDICINALPRODUCTINGREDIENT: return "MedicinalProductIngredient";
7885            case MEDICINALPRODUCTINTERACTION: return "MedicinalProductInteraction";
7886            case MEDICINALPRODUCTMANUFACTURED: return "MedicinalProductManufactured";
7887            case MEDICINALPRODUCTPACKAGED: return "MedicinalProductPackaged";
7888            case MEDICINALPRODUCTPHARMACEUTICAL: return "MedicinalProductPharmaceutical";
7889            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "MedicinalProductUndesirableEffect";
7890            case MESSAGEDEFINITION: return "MessageDefinition";
7891            case MESSAGEHEADER: return "MessageHeader";
7892            case MOLECULARSEQUENCE: return "MolecularSequence";
7893            case NAMINGSYSTEM: return "NamingSystem";
7894            case NUTRITIONORDER: return "NutritionOrder";
7895            case OBSERVATION: return "Observation";
7896            case OBSERVATIONDEFINITION: return "ObservationDefinition";
7897            case OPERATIONDEFINITION: return "OperationDefinition";
7898            case OPERATIONOUTCOME: return "OperationOutcome";
7899            case ORGANIZATION: return "Organization";
7900            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
7901            case PARAMETERS: return "Parameters";
7902            case PATIENT: return "Patient";
7903            case PAYMENTNOTICE: return "PaymentNotice";
7904            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
7905            case PERSON: return "Person";
7906            case PLANDEFINITION: return "PlanDefinition";
7907            case PRACTITIONER: return "Practitioner";
7908            case PRACTITIONERROLE: return "PractitionerRole";
7909            case PROCEDURE: return "Procedure";
7910            case PROVENANCE: return "Provenance";
7911            case QUESTIONNAIRE: return "Questionnaire";
7912            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
7913            case RELATEDPERSON: return "RelatedPerson";
7914            case REQUESTGROUP: return "RequestGroup";
7915            case RESEARCHDEFINITION: return "ResearchDefinition";
7916            case RESEARCHELEMENTDEFINITION: return "ResearchElementDefinition";
7917            case RESEARCHSTUDY: return "ResearchStudy";
7918            case RESEARCHSUBJECT: return "ResearchSubject";
7919            case RESOURCE: return "Resource";
7920            case RISKASSESSMENT: return "RiskAssessment";
7921            case RISKEVIDENCESYNTHESIS: return "RiskEvidenceSynthesis";
7922            case SCHEDULE: return "Schedule";
7923            case SEARCHPARAMETER: return "SearchParameter";
7924            case SERVICEREQUEST: return "ServiceRequest";
7925            case SLOT: return "Slot";
7926            case SPECIMEN: return "Specimen";
7927            case SPECIMENDEFINITION: return "SpecimenDefinition";
7928            case STRUCTUREDEFINITION: return "StructureDefinition";
7929            case STRUCTUREMAP: return "StructureMap";
7930            case SUBSCRIPTION: return "Subscription";
7931            case SUBSTANCE: return "Substance";
7932            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
7933            case SUBSTANCEPOLYMER: return "SubstancePolymer";
7934            case SUBSTANCEPROTEIN: return "SubstanceProtein";
7935            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
7936            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
7937            case SUBSTANCESPECIFICATION: return "SubstanceSpecification";
7938            case SUPPLYDELIVERY: return "SupplyDelivery";
7939            case SUPPLYREQUEST: return "SupplyRequest";
7940            case TASK: return "Task";
7941            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
7942            case TESTREPORT: return "TestReport";
7943            case TESTSCRIPT: return "TestScript";
7944            case VALUESET: return "ValueSet";
7945            case VERIFICATIONRESULT: return "VerificationResult";
7946            case VISIONPRESCRIPTION: return "VisionPrescription";
7947            default: return "?";
7948          }
7949        }
7950        public String getSystem() {
7951          switch (this) {
7952            case ADDRESS: return "http://hl7.org/fhir/data-types";
7953            case AGE: return "http://hl7.org/fhir/data-types";
7954            case ANNOTATION: return "http://hl7.org/fhir/data-types";
7955            case ATTACHMENT: return "http://hl7.org/fhir/data-types";
7956            case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types";
7957            case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types";
7958            case CODING: return "http://hl7.org/fhir/data-types";
7959            case CONTACTDETAIL: return "http://hl7.org/fhir/data-types";
7960            case CONTACTPOINT: return "http://hl7.org/fhir/data-types";
7961            case CONTRIBUTOR: return "http://hl7.org/fhir/data-types";
7962            case COUNT: return "http://hl7.org/fhir/data-types";
7963            case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types";
7964            case DISTANCE: return "http://hl7.org/fhir/data-types";
7965            case DOSAGE: return "http://hl7.org/fhir/data-types";
7966            case DURATION: return "http://hl7.org/fhir/data-types";
7967            case ELEMENT: return "http://hl7.org/fhir/data-types";
7968            case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types";
7969            case EXPRESSION: return "http://hl7.org/fhir/data-types";
7970            case EXTENSION: return "http://hl7.org/fhir/data-types";
7971            case HUMANNAME: return "http://hl7.org/fhir/data-types";
7972            case IDENTIFIER: return "http://hl7.org/fhir/data-types";
7973            case MARKETINGSTATUS: return "http://hl7.org/fhir/data-types";
7974            case META: return "http://hl7.org/fhir/data-types";
7975            case MONEY: return "http://hl7.org/fhir/data-types";
7976            case MONEYQUANTITY: return "http://hl7.org/fhir/data-types";
7977            case NARRATIVE: return "http://hl7.org/fhir/data-types";
7978            case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types";
7979            case PERIOD: return "http://hl7.org/fhir/data-types";
7980            case POPULATION: return "http://hl7.org/fhir/data-types";
7981            case PRODCHARACTERISTIC: return "http://hl7.org/fhir/data-types";
7982            case PRODUCTSHELFLIFE: return "http://hl7.org/fhir/data-types";
7983            case QUANTITY: return "http://hl7.org/fhir/data-types";
7984            case RANGE: return "http://hl7.org/fhir/data-types";
7985            case RATIO: return "http://hl7.org/fhir/data-types";
7986            case REFERENCE: return "http://hl7.org/fhir/data-types";
7987            case RELATEDARTIFACT: return "http://hl7.org/fhir/data-types";
7988            case SAMPLEDDATA: return "http://hl7.org/fhir/data-types";
7989            case SIGNATURE: return "http://hl7.org/fhir/data-types";
7990            case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types";
7991            case SUBSTANCEAMOUNT: return "http://hl7.org/fhir/data-types";
7992            case TIMING: return "http://hl7.org/fhir/data-types";
7993            case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types";
7994            case USAGECONTEXT: return "http://hl7.org/fhir/data-types";
7995            case BASE64BINARY: return "http://hl7.org/fhir/data-types";
7996            case BOOLEAN: return "http://hl7.org/fhir/data-types";
7997            case CANONICAL: return "http://hl7.org/fhir/data-types";
7998            case CODE: return "http://hl7.org/fhir/data-types";
7999            case DATE: return "http://hl7.org/fhir/data-types";
8000            case DATETIME: return "http://hl7.org/fhir/data-types";
8001            case DECIMAL: return "http://hl7.org/fhir/data-types";
8002            case ID: return "http://hl7.org/fhir/data-types";
8003            case INSTANT: return "http://hl7.org/fhir/data-types";
8004            case INTEGER: return "http://hl7.org/fhir/data-types";
8005            case MARKDOWN: return "http://hl7.org/fhir/data-types";
8006            case OID: return "http://hl7.org/fhir/data-types";
8007            case POSITIVEINT: return "http://hl7.org/fhir/data-types";
8008            case STRING: return "http://hl7.org/fhir/data-types";
8009            case TIME: return "http://hl7.org/fhir/data-types";
8010            case UNSIGNEDINT: return "http://hl7.org/fhir/data-types";
8011            case URI: return "http://hl7.org/fhir/data-types";
8012            case URL: return "http://hl7.org/fhir/data-types";
8013            case UUID: return "http://hl7.org/fhir/data-types";
8014            case XHTML: return "http://hl7.org/fhir/data-types";
8015            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
8016            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
8017            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
8018            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
8019            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
8020            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
8021            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
8022            case BASIC: return "http://hl7.org/fhir/resource-types";
8023            case BINARY: return "http://hl7.org/fhir/resource-types";
8024            case BIOLOGICALLYDERIVEDPRODUCT: return "http://hl7.org/fhir/resource-types";
8025            case BODYSTRUCTURE: return "http://hl7.org/fhir/resource-types";
8026            case BUNDLE: return "http://hl7.org/fhir/resource-types";
8027            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
8028            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
8029            case CARETEAM: return "http://hl7.org/fhir/resource-types";
8030            case CATALOGENTRY: return "http://hl7.org/fhir/resource-types";
8031            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
8032            case CHARGEITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
8033            case CLAIM: return "http://hl7.org/fhir/resource-types";
8034            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
8035            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
8036            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
8037            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
8038            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
8039            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
8040            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
8041            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
8042            case CONDITION: return "http://hl7.org/fhir/resource-types";
8043            case CONSENT: return "http://hl7.org/fhir/resource-types";
8044            case CONTRACT: return "http://hl7.org/fhir/resource-types";
8045            case COVERAGE: return "http://hl7.org/fhir/resource-types";
8046            case COVERAGEELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
8047            case COVERAGEELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
8048            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
8049            case DEVICE: return "http://hl7.org/fhir/resource-types";
8050            case DEVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
8051            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
8052            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
8053            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types";
8054            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
8055            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
8056            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
8057            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
8058            case EFFECTEVIDENCESYNTHESIS: return "http://hl7.org/fhir/resource-types";
8059            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
8060            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
8061            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
8062            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
8063            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
8064            case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types";
8065            case EVIDENCE: return "http://hl7.org/fhir/resource-types";
8066            case EVIDENCEVARIABLE: return "http://hl7.org/fhir/resource-types";
8067            case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types";
8068            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
8069            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
8070            case FLAG: return "http://hl7.org/fhir/resource-types";
8071            case GOAL: return "http://hl7.org/fhir/resource-types";
8072            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
8073            case GROUP: return "http://hl7.org/fhir/resource-types";
8074            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
8075            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
8076            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
8077            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
8078            case IMMUNIZATIONEVALUATION: return "http://hl7.org/fhir/resource-types";
8079            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
8080            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
8081            case INSURANCEPLAN: return "http://hl7.org/fhir/resource-types";
8082            case INVOICE: return "http://hl7.org/fhir/resource-types";
8083            case LIBRARY: return "http://hl7.org/fhir/resource-types";
8084            case LINKAGE: return "http://hl7.org/fhir/resource-types";
8085            case LIST: return "http://hl7.org/fhir/resource-types";
8086            case LOCATION: return "http://hl7.org/fhir/resource-types";
8087            case MEASURE: return "http://hl7.org/fhir/resource-types";
8088            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
8089            case MEDIA: return "http://hl7.org/fhir/resource-types";
8090            case MEDICATION: return "http://hl7.org/fhir/resource-types";
8091            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
8092            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
8093            case MEDICATIONKNOWLEDGE: return "http://hl7.org/fhir/resource-types";
8094            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
8095            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types";
8096            case MEDICINALPRODUCT: return "http://hl7.org/fhir/resource-types";
8097            case MEDICINALPRODUCTAUTHORIZATION: return "http://hl7.org/fhir/resource-types";
8098            case MEDICINALPRODUCTCONTRAINDICATION: return "http://hl7.org/fhir/resource-types";
8099            case MEDICINALPRODUCTINDICATION: return "http://hl7.org/fhir/resource-types";
8100            case MEDICINALPRODUCTINGREDIENT: return "http://hl7.org/fhir/resource-types";
8101            case MEDICINALPRODUCTINTERACTION: return "http://hl7.org/fhir/resource-types";
8102            case MEDICINALPRODUCTMANUFACTURED: return "http://hl7.org/fhir/resource-types";
8103            case MEDICINALPRODUCTPACKAGED: return "http://hl7.org/fhir/resource-types";
8104            case MEDICINALPRODUCTPHARMACEUTICAL: return "http://hl7.org/fhir/resource-types";
8105            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "http://hl7.org/fhir/resource-types";
8106            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
8107            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
8108            case MOLECULARSEQUENCE: return "http://hl7.org/fhir/resource-types";
8109            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
8110            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
8111            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
8112            case OBSERVATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
8113            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
8114            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
8115            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
8116            case ORGANIZATIONAFFILIATION: return "http://hl7.org/fhir/resource-types";
8117            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
8118            case PATIENT: return "http://hl7.org/fhir/resource-types";
8119            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
8120            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
8121            case PERSON: return "http://hl7.org/fhir/resource-types";
8122            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
8123            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
8124            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
8125            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
8126            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
8127            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
8128            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
8129            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
8130            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
8131            case RESEARCHDEFINITION: return "http://hl7.org/fhir/resource-types";
8132            case RESEARCHELEMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
8133            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
8134            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
8135            case RESOURCE: return "http://hl7.org/fhir/resource-types";
8136            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
8137            case RISKEVIDENCESYNTHESIS: return "http://hl7.org/fhir/resource-types";
8138            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
8139            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
8140            case SERVICEREQUEST: return "http://hl7.org/fhir/resource-types";
8141            case SLOT: return "http://hl7.org/fhir/resource-types";
8142            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
8143            case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types";
8144            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
8145            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
8146            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
8147            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
8148            case SUBSTANCENUCLEICACID: return "http://hl7.org/fhir/resource-types";
8149            case SUBSTANCEPOLYMER: return "http://hl7.org/fhir/resource-types";
8150            case SUBSTANCEPROTEIN: return "http://hl7.org/fhir/resource-types";
8151            case SUBSTANCEREFERENCEINFORMATION: return "http://hl7.org/fhir/resource-types";
8152            case SUBSTANCESOURCEMATERIAL: return "http://hl7.org/fhir/resource-types";
8153            case SUBSTANCESPECIFICATION: return "http://hl7.org/fhir/resource-types";
8154            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
8155            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
8156            case TASK: return "http://hl7.org/fhir/resource-types";
8157            case TERMINOLOGYCAPABILITIES: return "http://hl7.org/fhir/resource-types";
8158            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
8159            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
8160            case VALUESET: return "http://hl7.org/fhir/resource-types";
8161            case VERIFICATIONRESULT: return "http://hl7.org/fhir/resource-types";
8162            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
8163            default: return "?";
8164          }
8165        }
8166        public String getDefinition() {
8167          switch (this) {
8168            case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.";
8169            case AGE: return "A duration of time during which an organism (or a process) has existed.";
8170            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
8171            case ATTACHMENT: return "For referring to data content defined in other formats.";
8172            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
8173            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
8174            case CODING: return "A reference to a code defined by a terminology system.";
8175            case CONTACTDETAIL: return "Specifies contact information for a person or organization.";
8176            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
8177            case CONTRIBUTOR: return "A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.";
8178            case COUNT: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
8179            case DATAREQUIREMENT: return "Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.";
8180            case DISTANCE: return "A length - a value with a unit that is a physical distance.";
8181            case DOSAGE: return "Indicates how the medication is/was taken or should be taken by the patient.";
8182            case DURATION: return "A length of time.";
8183            case ELEMENT: return "Base definition for all elements in a resource.";
8184            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
8185            case EXPRESSION: return "A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used.";
8186            case EXTENSION: return "Optional Extension Element - found in all resources.";
8187            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
8188            case IDENTIFIER: return "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.";
8189            case MARKETINGSTATUS: return "The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.";
8190            case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.";
8191            case MONEY: return "An amount of economic utility in some recognized currency.";
8192            case MONEYQUANTITY: return "";
8193            case NARRATIVE: return "A human-readable summary of the resource conveying the essential clinical and business information for the resource.";
8194            case PARAMETERDEFINITION: return "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.";
8195            case PERIOD: return "A time period defined by a start and end date and optionally time.";
8196            case POPULATION: return "A populatioof people with some set of grouping criteria.";
8197            case PRODCHARACTERISTIC: return "The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available.";
8198            case PRODUCTSHELFLIFE: return "The shelf-life and storage information for a medicinal product item or container can be described using this class.";
8199            case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
8200            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
8201            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
8202            case REFERENCE: return "A reference from one resource to another.";
8203            case RELATEDARTIFACT: return "Related artifacts such as additional documentation, justification, or bibliographic references.";
8204            case SAMPLEDDATA: return "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.";
8205            case SIGNATURE: return "A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities.";
8206            case SIMPLEQUANTITY: return "";
8207            case SUBSTANCEAMOUNT: return "Chemical substances are a single substance type whose primary defining element is the molecular structure. Chemical substances shall be defined on the basis of their complete covalent molecular structure; the presence of a salt (counter-ion) and/or solvates (water, alcohols) is also captured. Purity, grade, physical form or particle size are not taken into account in the definition of a chemical substance or in the assignment of a Substance ID.";
8208            case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.";
8209            case TRIGGERDEFINITION: return "A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element.";
8210            case USAGECONTEXT: return "Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).";
8211            case BASE64BINARY: return "A stream of bytes";
8212            case BOOLEAN: return "Value of \"true\" or \"false\"";
8213            case CANONICAL: return "A URI that is a reference to a canonical URL on a FHIR resource";
8214            case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents";
8215            case DATE: return "A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.";
8216            case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.";
8217            case DECIMAL: return "A rational number with implicit precision";
8218            case ID: return "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.";
8219            case INSTANT: return "An instant in time - known at least to the second";
8220            case INTEGER: return "A whole number";
8221            case MARKDOWN: return "A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine";
8222            case OID: return "An OID represented as a URI";
8223            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
8224            case STRING: return "A sequence of Unicode characters";
8225            case TIME: return "A time during the day, with no date specified";
8226            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
8227            case URI: return "String of characters used to identify a name or a resource";
8228            case URL: return "A URI that is a literal reference";
8229            case UUID: return "A UUID, represented as a URI";
8230            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
8231            case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.";
8232            case ACTIVITYDEFINITION: return "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.";
8233            case ADVERSEEVENT: return "Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.";
8234            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
8235            case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).";
8236            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
8237            case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.";
8238            case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.";
8239            case BINARY: return "A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
8240            case BIOLOGICALLYDERIVEDPRODUCT: return "A material substance originating from a biological entity intended to be transplanted or infused\ninto another (possibly the same) biological entity.";
8241            case BODYSTRUCTURE: return "Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.";
8242            case BUNDLE: return "A container for a collection of resources.";
8243            case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
8244            case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.";
8245            case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.";
8246            case CATALOGENTRY: return "Catalog entries are wrappers that contextualize items included in a catalog.";
8247            case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.";
8248            case CHARGEITEMDEFINITION: return "The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.";
8249            case CLAIM: return "A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.";
8250            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
8251            case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score.";
8252            case CODESYSTEM: return "The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.";
8253            case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.";
8254            case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.";
8255            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
8256            case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).";
8257            case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.";
8258            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
8259            case CONSENT: return "A record of a healthcare consumer’s  choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.";
8260            case CONTRACT: return "Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.";
8261            case COVERAGE: return "Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.";
8262            case COVERAGEELIGIBILITYREQUEST: return "The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.";
8263            case COVERAGEELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.";
8264            case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.";
8265            case DEVICE: return "A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.";
8266            case DEVICEDEFINITION: return "The characteristics, operational status and capabilities of a medical-related component of a medical device.";
8267            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
8268            case DEVICEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.";
8269            case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.";
8270            case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.";
8271            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
8272            case DOCUMENTREFERENCE: return "A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.";
8273            case DOMAINRESOURCE: return "A resource that includes narrative, extensions, and contained resources.";
8274            case EFFECTEVIDENCESYNTHESIS: return "The EffectEvidenceSynthesis resource describes the difference in an outcome between exposures states in a population where the effect estimate is derived from a combination of research studies.";
8275            case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.";
8276            case ENDPOINT: return "The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.";
8277            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
8278            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.";
8279            case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.";
8280            case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur.";
8281            case EVIDENCE: return "The Evidence resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.";
8282            case EVIDENCEVARIABLE: return "The EvidenceVariable resource describes a \"PICO\" element that knowledge (evidence, assertion, recommendation) is about.";
8283            case EXAMPLESCENARIO: return "Example of workflow instance.";
8284            case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.";
8285            case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient.";
8286            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
8287            case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.";
8288            case GRAPHDEFINITION: return "A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.";
8289            case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.";
8290            case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.";
8291            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
8292            case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.";
8293            case IMMUNIZATION: return "Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.";
8294            case IMMUNIZATIONEVALUATION: return "Describes a comparison of an immunization event against published recommendations to determine if the administration is \"valid\" in relation to those  recommendations.";
8295            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.";
8296            case IMPLEMENTATIONGUIDE: return "A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.";
8297            case INSURANCEPLAN: return "Details of a Health Insurance product/plan provided by an organization.";
8298            case INVOICE: return "Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.";
8299            case LIBRARY: return "The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.";
8300            case LINKAGE: return "Identifies two or more records (resource instances) that refer to the same real-world \"occurrence\".";
8301            case LIST: return "A list is a curated collection of resources.";
8302            case LOCATION: return "Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.";
8303            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
8304            case MEASUREREPORT: return "The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.";
8305            case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.";
8306            case MEDICATION: return "This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.";
8307            case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.";
8308            case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.";
8309            case MEDICATIONKNOWLEDGE: return "Information about a medication that is used to support knowledge.";
8310            case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.";
8311            case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. \n\nThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.";
8312            case MEDICINALPRODUCT: return "Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).";
8313            case MEDICINALPRODUCTAUTHORIZATION: return "The regulatory authorization of a medicinal product.";
8314            case MEDICINALPRODUCTCONTRAINDICATION: return "The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.";
8315            case MEDICINALPRODUCTINDICATION: return "Indication for the Medicinal Product.";
8316            case MEDICINALPRODUCTINGREDIENT: return "An ingredient of a manufactured item or pharmaceutical product.";
8317            case MEDICINALPRODUCTINTERACTION: return "The interactions of the medicinal product with other medicinal products, or other forms of interactions.";
8318            case MEDICINALPRODUCTMANUFACTURED: return "The manufactured item as contained in the packaged medicinal product.";
8319            case MEDICINALPRODUCTPACKAGED: return "A medicinal product in a container or package.";
8320            case MEDICINALPRODUCTPHARMACEUTICAL: return "A pharmaceutical product described in terms of its composition and dose form.";
8321            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "Describe the undesirable effects of the medicinal product.";
8322            case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.";
8323            case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.";
8324            case MOLECULARSEQUENCE: return "Raw data describing a biological sequence.";
8325            case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a \"System\" used within the Identifier and Coding data types.";
8326            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
8327            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
8328            case OBSERVATIONDEFINITION: return "Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.";
8329            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
8330            case OPERATIONOUTCOME: return "A collection of error, warning, or information messages that result from a system action.";
8331            case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.";
8332            case ORGANIZATIONAFFILIATION: return "Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.";
8333            case PARAMETERS: return "This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it.";
8334            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
8335            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
8336            case PAYMENTRECONCILIATION: return "This resource provides the details including amount of a payment and allocates the payment items being paid.";
8337            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
8338            case PLANDEFINITION: return "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.";
8339            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
8340            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
8341            case PROCEDURE: return "An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.";
8342            case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.";
8343            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.";
8344            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.";
8345            case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.";
8346            case REQUESTGROUP: return "A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\".";
8347            case RESEARCHDEFINITION: return "The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.";
8348            case RESEARCHELEMENTDEFINITION: return "The ResearchElementDefinition resource describes a \"PICO\" element that knowledge (evidence, assertion, recommendation) is about.";
8349            case RESEARCHSTUDY: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
8350            case RESEARCHSUBJECT: return "A physical entity which is the primary unit of operational and/or administrative interest in a study.";
8351            case RESOURCE: return "This is the base resource type for everything.";
8352            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
8353            case RISKEVIDENCESYNTHESIS: return "The RiskEvidenceSynthesis resource describes the likelihood of an outcome in a population plus exposure state where the risk estimate is derived from a combination of research studies.";
8354            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
8355            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
8356            case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.";
8357            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
8358            case SPECIMEN: return "A sample to be used for analysis.";
8359            case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements.";
8360            case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.";
8361            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
8362            case SUBSCRIPTION: return "The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system can take an appropriate action.";
8363            case SUBSTANCE: return "A homogeneous material with a definite composition.";
8364            case SUBSTANCENUCLEICACID: return "Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction.";
8365            case SUBSTANCEPOLYMER: return "Todo.";
8366            case SUBSTANCEPROTEIN: return "A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators.";
8367            case SUBSTANCEREFERENCEINFORMATION: return "Todo.";
8368            case SUBSTANCESOURCEMATERIAL: return "Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex.";
8369            case SUBSTANCESPECIFICATION: return "The detailed description of a substance, typically at a level beyond what is used for prescribing.";
8370            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
8371            case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting.";
8372            case TASK: return "A task to be performed.";
8373            case TERMINOLOGYCAPABILITIES: return "A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
8374            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
8375            case TESTSCRIPT: return "A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.";
8376            case VALUESET: return "A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).";
8377            case VERIFICATIONRESULT: return "Describes validation requirements, source(s), status and dates for one or more elements.";
8378            case VISIONPRESCRIPTION: return "An authorization for the provision of glasses and/or contact lenses to a patient.";
8379            default: return "?";
8380          }
8381        }
8382        public String getDisplay() {
8383          switch (this) {
8384            case ADDRESS: return "Address";
8385            case AGE: return "Age";
8386            case ANNOTATION: return "Annotation";
8387            case ATTACHMENT: return "Attachment";
8388            case BACKBONEELEMENT: return "BackboneElement";
8389            case CODEABLECONCEPT: return "CodeableConcept";
8390            case CODING: return "Coding";
8391            case CONTACTDETAIL: return "ContactDetail";
8392            case CONTACTPOINT: return "ContactPoint";
8393            case CONTRIBUTOR: return "Contributor";
8394            case COUNT: return "Count";
8395            case DATAREQUIREMENT: return "DataRequirement";
8396            case DISTANCE: return "Distance";
8397            case DOSAGE: return "Dosage";
8398            case DURATION: return "Duration";
8399            case ELEMENT: return "Element";
8400            case ELEMENTDEFINITION: return "ElementDefinition";
8401            case EXPRESSION: return "Expression";
8402            case EXTENSION: return "Extension";
8403            case HUMANNAME: return "HumanName";
8404            case IDENTIFIER: return "Identifier";
8405            case MARKETINGSTATUS: return "MarketingStatus";
8406            case META: return "Meta";
8407            case MONEY: return "Money";
8408            case MONEYQUANTITY: return "MoneyQuantity";
8409            case NARRATIVE: return "Narrative";
8410            case PARAMETERDEFINITION: return "ParameterDefinition";
8411            case PERIOD: return "Period";
8412            case POPULATION: return "Population";
8413            case PRODCHARACTERISTIC: return "ProdCharacteristic";
8414            case PRODUCTSHELFLIFE: return "ProductShelfLife";
8415            case QUANTITY: return "Quantity";
8416            case RANGE: return "Range";
8417            case RATIO: return "Ratio";
8418            case REFERENCE: return "Reference";
8419            case RELATEDARTIFACT: return "RelatedArtifact";
8420            case SAMPLEDDATA: return "SampledData";
8421            case SIGNATURE: return "Signature";
8422            case SIMPLEQUANTITY: return "SimpleQuantity";
8423            case SUBSTANCEAMOUNT: return "SubstanceAmount";
8424            case TIMING: return "Timing";
8425            case TRIGGERDEFINITION: return "TriggerDefinition";
8426            case USAGECONTEXT: return "UsageContext";
8427            case BASE64BINARY: return "base64Binary";
8428            case BOOLEAN: return "boolean";
8429            case CANONICAL: return "canonical";
8430            case CODE: return "code";
8431            case DATE: return "date";
8432            case DATETIME: return "dateTime";
8433            case DECIMAL: return "decimal";
8434            case ID: return "id";
8435            case INSTANT: return "instant";
8436            case INTEGER: return "integer";
8437            case MARKDOWN: return "markdown";
8438            case OID: return "oid";
8439            case POSITIVEINT: return "positiveInt";
8440            case STRING: return "string";
8441            case TIME: return "time";
8442            case UNSIGNEDINT: return "unsignedInt";
8443            case URI: return "uri";
8444            case URL: return "url";
8445            case UUID: return "uuid";
8446            case XHTML: return "XHTML";
8447            case ACCOUNT: return "Account";
8448            case ACTIVITYDEFINITION: return "ActivityDefinition";
8449            case ADVERSEEVENT: return "AdverseEvent";
8450            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
8451            case APPOINTMENT: return "Appointment";
8452            case APPOINTMENTRESPONSE: return "AppointmentResponse";
8453            case AUDITEVENT: return "AuditEvent";
8454            case BASIC: return "Basic";
8455            case BINARY: return "Binary";
8456            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
8457            case BODYSTRUCTURE: return "BodyStructure";
8458            case BUNDLE: return "Bundle";
8459            case CAPABILITYSTATEMENT: return "CapabilityStatement";
8460            case CAREPLAN: return "CarePlan";
8461            case CARETEAM: return "CareTeam";
8462            case CATALOGENTRY: return "CatalogEntry";
8463            case CHARGEITEM: return "ChargeItem";
8464            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
8465            case CLAIM: return "Claim";
8466            case CLAIMRESPONSE: return "ClaimResponse";
8467            case CLINICALIMPRESSION: return "ClinicalImpression";
8468            case CODESYSTEM: return "CodeSystem";
8469            case COMMUNICATION: return "Communication";
8470            case COMMUNICATIONREQUEST: return "CommunicationRequest";
8471            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
8472            case COMPOSITION: return "Composition";
8473            case CONCEPTMAP: return "ConceptMap";
8474            case CONDITION: return "Condition";
8475            case CONSENT: return "Consent";
8476            case CONTRACT: return "Contract";
8477            case COVERAGE: return "Coverage";
8478            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
8479            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
8480            case DETECTEDISSUE: return "DetectedIssue";
8481            case DEVICE: return "Device";
8482            case DEVICEDEFINITION: return "DeviceDefinition";
8483            case DEVICEMETRIC: return "DeviceMetric";
8484            case DEVICEREQUEST: return "DeviceRequest";
8485            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
8486            case DIAGNOSTICREPORT: return "DiagnosticReport";
8487            case DOCUMENTMANIFEST: return "DocumentManifest";
8488            case DOCUMENTREFERENCE: return "DocumentReference";
8489            case DOMAINRESOURCE: return "DomainResource";
8490            case EFFECTEVIDENCESYNTHESIS: return "EffectEvidenceSynthesis";
8491            case ENCOUNTER: return "Encounter";
8492            case ENDPOINT: return "Endpoint";
8493            case ENROLLMENTREQUEST: return "EnrollmentRequest";
8494            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
8495            case EPISODEOFCARE: return "EpisodeOfCare";
8496            case EVENTDEFINITION: return "EventDefinition";
8497            case EVIDENCE: return "Evidence";
8498            case EVIDENCEVARIABLE: return "EvidenceVariable";
8499            case EXAMPLESCENARIO: return "ExampleScenario";
8500            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
8501            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
8502            case FLAG: return "Flag";
8503            case GOAL: return "Goal";
8504            case GRAPHDEFINITION: return "GraphDefinition";
8505            case GROUP: return "Group";
8506            case GUIDANCERESPONSE: return "GuidanceResponse";
8507            case HEALTHCARESERVICE: return "HealthcareService";
8508            case IMAGINGSTUDY: return "ImagingStudy";
8509            case IMMUNIZATION: return "Immunization";
8510            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
8511            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
8512            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
8513            case INSURANCEPLAN: return "InsurancePlan";
8514            case INVOICE: return "Invoice";
8515            case LIBRARY: return "Library";
8516            case LINKAGE: return "Linkage";
8517            case LIST: return "List";
8518            case LOCATION: return "Location";
8519            case MEASURE: return "Measure";
8520            case MEASUREREPORT: return "MeasureReport";
8521            case MEDIA: return "Media";
8522            case MEDICATION: return "Medication";
8523            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
8524            case MEDICATIONDISPENSE: return "MedicationDispense";
8525            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
8526            case MEDICATIONREQUEST: return "MedicationRequest";
8527            case MEDICATIONSTATEMENT: return "MedicationStatement";
8528            case MEDICINALPRODUCT: return "MedicinalProduct";
8529            case MEDICINALPRODUCTAUTHORIZATION: return "MedicinalProductAuthorization";
8530            case MEDICINALPRODUCTCONTRAINDICATION: return "MedicinalProductContraindication";
8531            case MEDICINALPRODUCTINDICATION: return "MedicinalProductIndication";
8532            case MEDICINALPRODUCTINGREDIENT: return "MedicinalProductIngredient";
8533            case MEDICINALPRODUCTINTERACTION: return "MedicinalProductInteraction";
8534            case MEDICINALPRODUCTMANUFACTURED: return "MedicinalProductManufactured";
8535            case MEDICINALPRODUCTPACKAGED: return "MedicinalProductPackaged";
8536            case MEDICINALPRODUCTPHARMACEUTICAL: return "MedicinalProductPharmaceutical";
8537            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "MedicinalProductUndesirableEffect";
8538            case MESSAGEDEFINITION: return "MessageDefinition";
8539            case MESSAGEHEADER: return "MessageHeader";
8540            case MOLECULARSEQUENCE: return "MolecularSequence";
8541            case NAMINGSYSTEM: return "NamingSystem";
8542            case NUTRITIONORDER: return "NutritionOrder";
8543            case OBSERVATION: return "Observation";
8544            case OBSERVATIONDEFINITION: return "ObservationDefinition";
8545            case OPERATIONDEFINITION: return "OperationDefinition";
8546            case OPERATIONOUTCOME: return "OperationOutcome";
8547            case ORGANIZATION: return "Organization";
8548            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
8549            case PARAMETERS: return "Parameters";
8550            case PATIENT: return "Patient";
8551            case PAYMENTNOTICE: return "PaymentNotice";
8552            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
8553            case PERSON: return "Person";
8554            case PLANDEFINITION: return "PlanDefinition";
8555            case PRACTITIONER: return "Practitioner";
8556            case PRACTITIONERROLE: return "PractitionerRole";
8557            case PROCEDURE: return "Procedure";
8558            case PROVENANCE: return "Provenance";
8559            case QUESTIONNAIRE: return "Questionnaire";
8560            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
8561            case RELATEDPERSON: return "RelatedPerson";
8562            case REQUESTGROUP: return "RequestGroup";
8563            case RESEARCHDEFINITION: return "ResearchDefinition";
8564            case RESEARCHELEMENTDEFINITION: return "ResearchElementDefinition";
8565            case RESEARCHSTUDY: return "ResearchStudy";
8566            case RESEARCHSUBJECT: return "ResearchSubject";
8567            case RESOURCE: return "Resource";
8568            case RISKASSESSMENT: return "RiskAssessment";
8569            case RISKEVIDENCESYNTHESIS: return "RiskEvidenceSynthesis";
8570            case SCHEDULE: return "Schedule";
8571            case SEARCHPARAMETER: return "SearchParameter";
8572            case SERVICEREQUEST: return "ServiceRequest";
8573            case SLOT: return "Slot";
8574            case SPECIMEN: return "Specimen";
8575            case SPECIMENDEFINITION: return "SpecimenDefinition";
8576            case STRUCTUREDEFINITION: return "StructureDefinition";
8577            case STRUCTUREMAP: return "StructureMap";
8578            case SUBSCRIPTION: return "Subscription";
8579            case SUBSTANCE: return "Substance";
8580            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
8581            case SUBSTANCEPOLYMER: return "SubstancePolymer";
8582            case SUBSTANCEPROTEIN: return "SubstanceProtein";
8583            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
8584            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
8585            case SUBSTANCESPECIFICATION: return "SubstanceSpecification";
8586            case SUPPLYDELIVERY: return "SupplyDelivery";
8587            case SUPPLYREQUEST: return "SupplyRequest";
8588            case TASK: return "Task";
8589            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
8590            case TESTREPORT: return "TestReport";
8591            case TESTSCRIPT: return "TestScript";
8592            case VALUESET: return "ValueSet";
8593            case VERIFICATIONRESULT: return "VerificationResult";
8594            case VISIONPRESCRIPTION: return "VisionPrescription";
8595            default: return "?";
8596          }
8597        }
8598    }
8599
8600  public static class FHIRDefinedTypeEnumFactory implements EnumFactory<FHIRDefinedType> {
8601    public FHIRDefinedType fromCode(String codeString) throws IllegalArgumentException {
8602      if (codeString == null || "".equals(codeString))
8603            if (codeString == null || "".equals(codeString))
8604                return null;
8605        if ("Address".equals(codeString))
8606          return FHIRDefinedType.ADDRESS;
8607        if ("Age".equals(codeString))
8608          return FHIRDefinedType.AGE;
8609        if ("Annotation".equals(codeString))
8610          return FHIRDefinedType.ANNOTATION;
8611        if ("Attachment".equals(codeString))
8612          return FHIRDefinedType.ATTACHMENT;
8613        if ("BackboneElement".equals(codeString))
8614          return FHIRDefinedType.BACKBONEELEMENT;
8615        if ("CodeableConcept".equals(codeString))
8616          return FHIRDefinedType.CODEABLECONCEPT;
8617        if ("Coding".equals(codeString))
8618          return FHIRDefinedType.CODING;
8619        if ("ContactDetail".equals(codeString))
8620          return FHIRDefinedType.CONTACTDETAIL;
8621        if ("ContactPoint".equals(codeString))
8622          return FHIRDefinedType.CONTACTPOINT;
8623        if ("Contributor".equals(codeString))
8624          return FHIRDefinedType.CONTRIBUTOR;
8625        if ("Count".equals(codeString))
8626          return FHIRDefinedType.COUNT;
8627        if ("DataRequirement".equals(codeString))
8628          return FHIRDefinedType.DATAREQUIREMENT;
8629        if ("Distance".equals(codeString))
8630          return FHIRDefinedType.DISTANCE;
8631        if ("Dosage".equals(codeString))
8632          return FHIRDefinedType.DOSAGE;
8633        if ("Duration".equals(codeString))
8634          return FHIRDefinedType.DURATION;
8635        if ("Element".equals(codeString))
8636          return FHIRDefinedType.ELEMENT;
8637        if ("ElementDefinition".equals(codeString))
8638          return FHIRDefinedType.ELEMENTDEFINITION;
8639        if ("Expression".equals(codeString))
8640          return FHIRDefinedType.EXPRESSION;
8641        if ("Extension".equals(codeString))
8642          return FHIRDefinedType.EXTENSION;
8643        if ("HumanName".equals(codeString))
8644          return FHIRDefinedType.HUMANNAME;
8645        if ("Identifier".equals(codeString))
8646          return FHIRDefinedType.IDENTIFIER;
8647        if ("MarketingStatus".equals(codeString))
8648          return FHIRDefinedType.MARKETINGSTATUS;
8649        if ("Meta".equals(codeString))
8650          return FHIRDefinedType.META;
8651        if ("Money".equals(codeString))
8652          return FHIRDefinedType.MONEY;
8653        if ("MoneyQuantity".equals(codeString))
8654          return FHIRDefinedType.MONEYQUANTITY;
8655        if ("Narrative".equals(codeString))
8656          return FHIRDefinedType.NARRATIVE;
8657        if ("ParameterDefinition".equals(codeString))
8658          return FHIRDefinedType.PARAMETERDEFINITION;
8659        if ("Period".equals(codeString))
8660          return FHIRDefinedType.PERIOD;
8661        if ("Population".equals(codeString))
8662          return FHIRDefinedType.POPULATION;
8663        if ("ProdCharacteristic".equals(codeString))
8664          return FHIRDefinedType.PRODCHARACTERISTIC;
8665        if ("ProductShelfLife".equals(codeString))
8666          return FHIRDefinedType.PRODUCTSHELFLIFE;
8667        if ("Quantity".equals(codeString))
8668          return FHIRDefinedType.QUANTITY;
8669        if ("Range".equals(codeString))
8670          return FHIRDefinedType.RANGE;
8671        if ("Ratio".equals(codeString))
8672          return FHIRDefinedType.RATIO;
8673        if ("Reference".equals(codeString))
8674          return FHIRDefinedType.REFERENCE;
8675        if ("RelatedArtifact".equals(codeString))
8676          return FHIRDefinedType.RELATEDARTIFACT;
8677        if ("SampledData".equals(codeString))
8678          return FHIRDefinedType.SAMPLEDDATA;
8679        if ("Signature".equals(codeString))
8680          return FHIRDefinedType.SIGNATURE;
8681        if ("SimpleQuantity".equals(codeString))
8682          return FHIRDefinedType.SIMPLEQUANTITY;
8683        if ("SubstanceAmount".equals(codeString))
8684          return FHIRDefinedType.SUBSTANCEAMOUNT;
8685        if ("Timing".equals(codeString))
8686          return FHIRDefinedType.TIMING;
8687        if ("TriggerDefinition".equals(codeString))
8688          return FHIRDefinedType.TRIGGERDEFINITION;
8689        if ("UsageContext".equals(codeString))
8690          return FHIRDefinedType.USAGECONTEXT;
8691        if ("base64Binary".equals(codeString))
8692          return FHIRDefinedType.BASE64BINARY;
8693        if ("boolean".equals(codeString))
8694          return FHIRDefinedType.BOOLEAN;
8695        if ("canonical".equals(codeString))
8696          return FHIRDefinedType.CANONICAL;
8697        if ("code".equals(codeString))
8698          return FHIRDefinedType.CODE;
8699        if ("date".equals(codeString))
8700          return FHIRDefinedType.DATE;
8701        if ("dateTime".equals(codeString))
8702          return FHIRDefinedType.DATETIME;
8703        if ("decimal".equals(codeString))
8704          return FHIRDefinedType.DECIMAL;
8705        if ("id".equals(codeString))
8706          return FHIRDefinedType.ID;
8707        if ("instant".equals(codeString))
8708          return FHIRDefinedType.INSTANT;
8709        if ("integer".equals(codeString))
8710          return FHIRDefinedType.INTEGER;
8711        if ("markdown".equals(codeString))
8712          return FHIRDefinedType.MARKDOWN;
8713        if ("oid".equals(codeString))
8714          return FHIRDefinedType.OID;
8715        if ("positiveInt".equals(codeString))
8716          return FHIRDefinedType.POSITIVEINT;
8717        if ("string".equals(codeString))
8718          return FHIRDefinedType.STRING;
8719        if ("time".equals(codeString))
8720          return FHIRDefinedType.TIME;
8721        if ("unsignedInt".equals(codeString))
8722          return FHIRDefinedType.UNSIGNEDINT;
8723        if ("uri".equals(codeString))
8724          return FHIRDefinedType.URI;
8725        if ("url".equals(codeString))
8726          return FHIRDefinedType.URL;
8727        if ("uuid".equals(codeString))
8728          return FHIRDefinedType.UUID;
8729        if ("xhtml".equals(codeString))
8730          return FHIRDefinedType.XHTML;
8731        if ("Account".equals(codeString))
8732          return FHIRDefinedType.ACCOUNT;
8733        if ("ActivityDefinition".equals(codeString))
8734          return FHIRDefinedType.ACTIVITYDEFINITION;
8735        if ("AdverseEvent".equals(codeString))
8736          return FHIRDefinedType.ADVERSEEVENT;
8737        if ("AllergyIntolerance".equals(codeString))
8738          return FHIRDefinedType.ALLERGYINTOLERANCE;
8739        if ("Appointment".equals(codeString))
8740          return FHIRDefinedType.APPOINTMENT;
8741        if ("AppointmentResponse".equals(codeString))
8742          return FHIRDefinedType.APPOINTMENTRESPONSE;
8743        if ("AuditEvent".equals(codeString))
8744          return FHIRDefinedType.AUDITEVENT;
8745        if ("Basic".equals(codeString))
8746          return FHIRDefinedType.BASIC;
8747        if ("Binary".equals(codeString))
8748          return FHIRDefinedType.BINARY;
8749        if ("BiologicallyDerivedProduct".equals(codeString))
8750          return FHIRDefinedType.BIOLOGICALLYDERIVEDPRODUCT;
8751        if ("BodyStructure".equals(codeString))
8752          return FHIRDefinedType.BODYSTRUCTURE;
8753        if ("Bundle".equals(codeString))
8754          return FHIRDefinedType.BUNDLE;
8755        if ("CapabilityStatement".equals(codeString))
8756          return FHIRDefinedType.CAPABILITYSTATEMENT;
8757        if ("CarePlan".equals(codeString))
8758          return FHIRDefinedType.CAREPLAN;
8759        if ("CareTeam".equals(codeString))
8760          return FHIRDefinedType.CARETEAM;
8761        if ("CatalogEntry".equals(codeString))
8762          return FHIRDefinedType.CATALOGENTRY;
8763        if ("ChargeItem".equals(codeString))
8764          return FHIRDefinedType.CHARGEITEM;
8765        if ("ChargeItemDefinition".equals(codeString))
8766          return FHIRDefinedType.CHARGEITEMDEFINITION;
8767        if ("Claim".equals(codeString))
8768          return FHIRDefinedType.CLAIM;
8769        if ("ClaimResponse".equals(codeString))
8770          return FHIRDefinedType.CLAIMRESPONSE;
8771        if ("ClinicalImpression".equals(codeString))
8772          return FHIRDefinedType.CLINICALIMPRESSION;
8773        if ("CodeSystem".equals(codeString))
8774          return FHIRDefinedType.CODESYSTEM;
8775        if ("Communication".equals(codeString))
8776          return FHIRDefinedType.COMMUNICATION;
8777        if ("CommunicationRequest".equals(codeString))
8778          return FHIRDefinedType.COMMUNICATIONREQUEST;
8779        if ("CompartmentDefinition".equals(codeString))
8780          return FHIRDefinedType.COMPARTMENTDEFINITION;
8781        if ("Composition".equals(codeString))
8782          return FHIRDefinedType.COMPOSITION;
8783        if ("ConceptMap".equals(codeString))
8784          return FHIRDefinedType.CONCEPTMAP;
8785        if ("Condition".equals(codeString))
8786          return FHIRDefinedType.CONDITION;
8787        if ("Consent".equals(codeString))
8788          return FHIRDefinedType.CONSENT;
8789        if ("Contract".equals(codeString))
8790          return FHIRDefinedType.CONTRACT;
8791        if ("Coverage".equals(codeString))
8792          return FHIRDefinedType.COVERAGE;
8793        if ("CoverageEligibilityRequest".equals(codeString))
8794          return FHIRDefinedType.COVERAGEELIGIBILITYREQUEST;
8795        if ("CoverageEligibilityResponse".equals(codeString))
8796          return FHIRDefinedType.COVERAGEELIGIBILITYRESPONSE;
8797        if ("DetectedIssue".equals(codeString))
8798          return FHIRDefinedType.DETECTEDISSUE;
8799        if ("Device".equals(codeString))
8800          return FHIRDefinedType.DEVICE;
8801        if ("DeviceDefinition".equals(codeString))
8802          return FHIRDefinedType.DEVICEDEFINITION;
8803        if ("DeviceMetric".equals(codeString))
8804          return FHIRDefinedType.DEVICEMETRIC;
8805        if ("DeviceRequest".equals(codeString))
8806          return FHIRDefinedType.DEVICEREQUEST;
8807        if ("DeviceUseStatement".equals(codeString))
8808          return FHIRDefinedType.DEVICEUSESTATEMENT;
8809        if ("DiagnosticReport".equals(codeString))
8810          return FHIRDefinedType.DIAGNOSTICREPORT;
8811        if ("DocumentManifest".equals(codeString))
8812          return FHIRDefinedType.DOCUMENTMANIFEST;
8813        if ("DocumentReference".equals(codeString))
8814          return FHIRDefinedType.DOCUMENTREFERENCE;
8815        if ("DomainResource".equals(codeString))
8816          return FHIRDefinedType.DOMAINRESOURCE;
8817        if ("EffectEvidenceSynthesis".equals(codeString))
8818          return FHIRDefinedType.EFFECTEVIDENCESYNTHESIS;
8819        if ("Encounter".equals(codeString))
8820          return FHIRDefinedType.ENCOUNTER;
8821        if ("Endpoint".equals(codeString))
8822          return FHIRDefinedType.ENDPOINT;
8823        if ("EnrollmentRequest".equals(codeString))
8824          return FHIRDefinedType.ENROLLMENTREQUEST;
8825        if ("EnrollmentResponse".equals(codeString))
8826          return FHIRDefinedType.ENROLLMENTRESPONSE;
8827        if ("EpisodeOfCare".equals(codeString))
8828          return FHIRDefinedType.EPISODEOFCARE;
8829        if ("EventDefinition".equals(codeString))
8830          return FHIRDefinedType.EVENTDEFINITION;
8831        if ("Evidence".equals(codeString))
8832          return FHIRDefinedType.EVIDENCE;
8833        if ("EvidenceVariable".equals(codeString))
8834          return FHIRDefinedType.EVIDENCEVARIABLE;
8835        if ("ExampleScenario".equals(codeString))
8836          return FHIRDefinedType.EXAMPLESCENARIO;
8837        if ("ExplanationOfBenefit".equals(codeString))
8838          return FHIRDefinedType.EXPLANATIONOFBENEFIT;
8839        if ("FamilyMemberHistory".equals(codeString))
8840          return FHIRDefinedType.FAMILYMEMBERHISTORY;
8841        if ("Flag".equals(codeString))
8842          return FHIRDefinedType.FLAG;
8843        if ("Goal".equals(codeString))
8844          return FHIRDefinedType.GOAL;
8845        if ("GraphDefinition".equals(codeString))
8846          return FHIRDefinedType.GRAPHDEFINITION;
8847        if ("Group".equals(codeString))
8848          return FHIRDefinedType.GROUP;
8849        if ("GuidanceResponse".equals(codeString))
8850          return FHIRDefinedType.GUIDANCERESPONSE;
8851        if ("HealthcareService".equals(codeString))
8852          return FHIRDefinedType.HEALTHCARESERVICE;
8853        if ("ImagingStudy".equals(codeString))
8854          return FHIRDefinedType.IMAGINGSTUDY;
8855        if ("Immunization".equals(codeString))
8856          return FHIRDefinedType.IMMUNIZATION;
8857        if ("ImmunizationEvaluation".equals(codeString))
8858          return FHIRDefinedType.IMMUNIZATIONEVALUATION;
8859        if ("ImmunizationRecommendation".equals(codeString))
8860          return FHIRDefinedType.IMMUNIZATIONRECOMMENDATION;
8861        if ("ImplementationGuide".equals(codeString))
8862          return FHIRDefinedType.IMPLEMENTATIONGUIDE;
8863        if ("InsurancePlan".equals(codeString))
8864          return FHIRDefinedType.INSURANCEPLAN;
8865        if ("Invoice".equals(codeString))
8866          return FHIRDefinedType.INVOICE;
8867        if ("Library".equals(codeString))
8868          return FHIRDefinedType.LIBRARY;
8869        if ("Linkage".equals(codeString))
8870          return FHIRDefinedType.LINKAGE;
8871        if ("List".equals(codeString))
8872          return FHIRDefinedType.LIST;
8873        if ("Location".equals(codeString))
8874          return FHIRDefinedType.LOCATION;
8875        if ("Measure".equals(codeString))
8876          return FHIRDefinedType.MEASURE;
8877        if ("MeasureReport".equals(codeString))
8878          return FHIRDefinedType.MEASUREREPORT;
8879        if ("Media".equals(codeString))
8880          return FHIRDefinedType.MEDIA;
8881        if ("Medication".equals(codeString))
8882          return FHIRDefinedType.MEDICATION;
8883        if ("MedicationAdministration".equals(codeString))
8884          return FHIRDefinedType.MEDICATIONADMINISTRATION;
8885        if ("MedicationDispense".equals(codeString))
8886          return FHIRDefinedType.MEDICATIONDISPENSE;
8887        if ("MedicationKnowledge".equals(codeString))
8888          return FHIRDefinedType.MEDICATIONKNOWLEDGE;
8889        if ("MedicationRequest".equals(codeString))
8890          return FHIRDefinedType.MEDICATIONREQUEST;
8891        if ("MedicationStatement".equals(codeString))
8892          return FHIRDefinedType.MEDICATIONSTATEMENT;
8893        if ("MedicinalProduct".equals(codeString))
8894          return FHIRDefinedType.MEDICINALPRODUCT;
8895        if ("MedicinalProductAuthorization".equals(codeString))
8896          return FHIRDefinedType.MEDICINALPRODUCTAUTHORIZATION;
8897        if ("MedicinalProductContraindication".equals(codeString))
8898          return FHIRDefinedType.MEDICINALPRODUCTCONTRAINDICATION;
8899        if ("MedicinalProductIndication".equals(codeString))
8900          return FHIRDefinedType.MEDICINALPRODUCTINDICATION;
8901        if ("MedicinalProductIngredient".equals(codeString))
8902          return FHIRDefinedType.MEDICINALPRODUCTINGREDIENT;
8903        if ("MedicinalProductInteraction".equals(codeString))
8904          return FHIRDefinedType.MEDICINALPRODUCTINTERACTION;
8905        if ("MedicinalProductManufactured".equals(codeString))
8906          return FHIRDefinedType.MEDICINALPRODUCTMANUFACTURED;
8907        if ("MedicinalProductPackaged".equals(codeString))
8908          return FHIRDefinedType.MEDICINALPRODUCTPACKAGED;
8909        if ("MedicinalProductPharmaceutical".equals(codeString))
8910          return FHIRDefinedType.MEDICINALPRODUCTPHARMACEUTICAL;
8911        if ("MedicinalProductUndesirableEffect".equals(codeString))
8912          return FHIRDefinedType.MEDICINALPRODUCTUNDESIRABLEEFFECT;
8913        if ("MessageDefinition".equals(codeString))
8914          return FHIRDefinedType.MESSAGEDEFINITION;
8915        if ("MessageHeader".equals(codeString))
8916          return FHIRDefinedType.MESSAGEHEADER;
8917        if ("MolecularSequence".equals(codeString))
8918          return FHIRDefinedType.MOLECULARSEQUENCE;
8919        if ("NamingSystem".equals(codeString))
8920          return FHIRDefinedType.NAMINGSYSTEM;
8921        if ("NutritionOrder".equals(codeString))
8922          return FHIRDefinedType.NUTRITIONORDER;
8923        if ("Observation".equals(codeString))
8924          return FHIRDefinedType.OBSERVATION;
8925        if ("ObservationDefinition".equals(codeString))
8926          return FHIRDefinedType.OBSERVATIONDEFINITION;
8927        if ("OperationDefinition".equals(codeString))
8928          return FHIRDefinedType.OPERATIONDEFINITION;
8929        if ("OperationOutcome".equals(codeString))
8930          return FHIRDefinedType.OPERATIONOUTCOME;
8931        if ("Organization".equals(codeString))
8932          return FHIRDefinedType.ORGANIZATION;
8933        if ("OrganizationAffiliation".equals(codeString))
8934          return FHIRDefinedType.ORGANIZATIONAFFILIATION;
8935        if ("Parameters".equals(codeString))
8936          return FHIRDefinedType.PARAMETERS;
8937        if ("Patient".equals(codeString))
8938          return FHIRDefinedType.PATIENT;
8939        if ("PaymentNotice".equals(codeString))
8940          return FHIRDefinedType.PAYMENTNOTICE;
8941        if ("PaymentReconciliation".equals(codeString))
8942          return FHIRDefinedType.PAYMENTRECONCILIATION;
8943        if ("Person".equals(codeString))
8944          return FHIRDefinedType.PERSON;
8945        if ("PlanDefinition".equals(codeString))
8946          return FHIRDefinedType.PLANDEFINITION;
8947        if ("Practitioner".equals(codeString))
8948          return FHIRDefinedType.PRACTITIONER;
8949        if ("PractitionerRole".equals(codeString))
8950          return FHIRDefinedType.PRACTITIONERROLE;
8951        if ("Procedure".equals(codeString))
8952          return FHIRDefinedType.PROCEDURE;
8953        if ("Provenance".equals(codeString))
8954          return FHIRDefinedType.PROVENANCE;
8955        if ("Questionnaire".equals(codeString))
8956          return FHIRDefinedType.QUESTIONNAIRE;
8957        if ("QuestionnaireResponse".equals(codeString))
8958          return FHIRDefinedType.QUESTIONNAIRERESPONSE;
8959        if ("RelatedPerson".equals(codeString))
8960          return FHIRDefinedType.RELATEDPERSON;
8961        if ("RequestGroup".equals(codeString))
8962          return FHIRDefinedType.REQUESTGROUP;
8963        if ("ResearchDefinition".equals(codeString))
8964          return FHIRDefinedType.RESEARCHDEFINITION;
8965        if ("ResearchElementDefinition".equals(codeString))
8966          return FHIRDefinedType.RESEARCHELEMENTDEFINITION;
8967        if ("ResearchStudy".equals(codeString))
8968          return FHIRDefinedType.RESEARCHSTUDY;
8969        if ("ResearchSubject".equals(codeString))
8970          return FHIRDefinedType.RESEARCHSUBJECT;
8971        if ("Resource".equals(codeString))
8972          return FHIRDefinedType.RESOURCE;
8973        if ("RiskAssessment".equals(codeString))
8974          return FHIRDefinedType.RISKASSESSMENT;
8975        if ("RiskEvidenceSynthesis".equals(codeString))
8976          return FHIRDefinedType.RISKEVIDENCESYNTHESIS;
8977        if ("Schedule".equals(codeString))
8978          return FHIRDefinedType.SCHEDULE;
8979        if ("SearchParameter".equals(codeString))
8980          return FHIRDefinedType.SEARCHPARAMETER;
8981        if ("ServiceRequest".equals(codeString))
8982          return FHIRDefinedType.SERVICEREQUEST;
8983        if ("Slot".equals(codeString))
8984          return FHIRDefinedType.SLOT;
8985        if ("Specimen".equals(codeString))
8986          return FHIRDefinedType.SPECIMEN;
8987        if ("SpecimenDefinition".equals(codeString))
8988          return FHIRDefinedType.SPECIMENDEFINITION;
8989        if ("StructureDefinition".equals(codeString))
8990          return FHIRDefinedType.STRUCTUREDEFINITION;
8991        if ("StructureMap".equals(codeString))
8992          return FHIRDefinedType.STRUCTUREMAP;
8993        if ("Subscription".equals(codeString))
8994          return FHIRDefinedType.SUBSCRIPTION;
8995        if ("Substance".equals(codeString))
8996          return FHIRDefinedType.SUBSTANCE;
8997        if ("SubstanceNucleicAcid".equals(codeString))
8998          return FHIRDefinedType.SUBSTANCENUCLEICACID;
8999        if ("SubstancePolymer".equals(codeString))
9000          return FHIRDefinedType.SUBSTANCEPOLYMER;
9001        if ("SubstanceProtein".equals(codeString))
9002          return FHIRDefinedType.SUBSTANCEPROTEIN;
9003        if ("SubstanceReferenceInformation".equals(codeString))
9004          return FHIRDefinedType.SUBSTANCEREFERENCEINFORMATION;
9005        if ("SubstanceSourceMaterial".equals(codeString))
9006          return FHIRDefinedType.SUBSTANCESOURCEMATERIAL;
9007        if ("SubstanceSpecification".equals(codeString))
9008          return FHIRDefinedType.SUBSTANCESPECIFICATION;
9009        if ("SupplyDelivery".equals(codeString))
9010          return FHIRDefinedType.SUPPLYDELIVERY;
9011        if ("SupplyRequest".equals(codeString))
9012          return FHIRDefinedType.SUPPLYREQUEST;
9013        if ("Task".equals(codeString))
9014          return FHIRDefinedType.TASK;
9015        if ("TerminologyCapabilities".equals(codeString))
9016          return FHIRDefinedType.TERMINOLOGYCAPABILITIES;
9017        if ("TestReport".equals(codeString))
9018          return FHIRDefinedType.TESTREPORT;
9019        if ("TestScript".equals(codeString))
9020          return FHIRDefinedType.TESTSCRIPT;
9021        if ("ValueSet".equals(codeString))
9022          return FHIRDefinedType.VALUESET;
9023        if ("VerificationResult".equals(codeString))
9024          return FHIRDefinedType.VERIFICATIONRESULT;
9025        if ("VisionPrescription".equals(codeString))
9026          return FHIRDefinedType.VISIONPRESCRIPTION;
9027        throw new IllegalArgumentException("Unknown FHIRDefinedType code '"+codeString+"'");
9028        }
9029        public Enumeration<FHIRDefinedType> fromType(Base code) throws FHIRException {
9030          if (code == null)
9031            return null;
9032          if (code.isEmpty())
9033            return new Enumeration<FHIRDefinedType>(this);
9034          String codeString = ((PrimitiveType) code).asStringValue();
9035          if (codeString == null || "".equals(codeString))
9036            return null;
9037        if ("Address".equals(codeString))
9038          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ADDRESS);
9039        if ("Age".equals(codeString))
9040          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.AGE);
9041        if ("Annotation".equals(codeString))
9042          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ANNOTATION);
9043        if ("Attachment".equals(codeString))
9044          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ATTACHMENT);
9045        if ("BackboneElement".equals(codeString))
9046          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BACKBONEELEMENT);
9047        if ("CodeableConcept".equals(codeString))
9048          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODEABLECONCEPT);
9049        if ("Coding".equals(codeString))
9050          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODING);
9051        if ("ContactDetail".equals(codeString))
9052          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTACTDETAIL);
9053        if ("ContactPoint".equals(codeString))
9054          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTACTPOINT);
9055        if ("Contributor".equals(codeString))
9056          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTRIBUTOR);
9057        if ("Count".equals(codeString))
9058          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COUNT);
9059        if ("DataRequirement".equals(codeString))
9060          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATAREQUIREMENT);
9061        if ("Distance".equals(codeString))
9062          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DISTANCE);
9063        if ("Dosage".equals(codeString))
9064          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOSAGE);
9065        if ("Duration".equals(codeString))
9066          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DURATION);
9067        if ("Element".equals(codeString))
9068          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ELEMENT);
9069        if ("ElementDefinition".equals(codeString))
9070          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ELEMENTDEFINITION);
9071        if ("Expression".equals(codeString))
9072          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXPRESSION);
9073        if ("Extension".equals(codeString))
9074          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXTENSION);
9075        if ("HumanName".equals(codeString))
9076          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.HUMANNAME);
9077        if ("Identifier".equals(codeString))
9078          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IDENTIFIER);
9079        if ("MarketingStatus".equals(codeString))
9080          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MARKETINGSTATUS);
9081        if ("Meta".equals(codeString))
9082          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.META);
9083        if ("Money".equals(codeString))
9084          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MONEY);
9085        if ("MoneyQuantity".equals(codeString))
9086          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MONEYQUANTITY);
9087        if ("Narrative".equals(codeString))
9088          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NARRATIVE);
9089        if ("ParameterDefinition".equals(codeString))
9090          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PARAMETERDEFINITION);
9091        if ("Period".equals(codeString))
9092          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PERIOD);
9093        if ("Population".equals(codeString))
9094          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.POPULATION);
9095        if ("ProdCharacteristic".equals(codeString))
9096          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PRODCHARACTERISTIC);
9097        if ("ProductShelfLife".equals(codeString))
9098          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PRODUCTSHELFLIFE);
9099        if ("Quantity".equals(codeString))
9100          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.QUANTITY);
9101        if ("Range".equals(codeString))
9102          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RANGE);
9103        if ("Ratio".equals(codeString))
9104          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RATIO);
9105        if ("Reference".equals(codeString))
9106          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.REFERENCE);
9107        if ("RelatedArtifact".equals(codeString))
9108          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RELATEDARTIFACT);
9109        if ("SampledData".equals(codeString))
9110          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SAMPLEDDATA);
9111        if ("Signature".equals(codeString))
9112          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SIGNATURE);
9113        if ("SimpleQuantity".equals(codeString))
9114          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SIMPLEQUANTITY);
9115        if ("SubstanceAmount".equals(codeString))
9116          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCEAMOUNT);
9117        if ("Timing".equals(codeString))
9118          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TIMING);
9119        if ("TriggerDefinition".equals(codeString))
9120          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TRIGGERDEFINITION);
9121        if ("UsageContext".equals(codeString))
9122          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.USAGECONTEXT);
9123        if ("base64Binary".equals(codeString))
9124          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BASE64BINARY);
9125        if ("boolean".equals(codeString))
9126          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BOOLEAN);
9127        if ("canonical".equals(codeString))
9128          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CANONICAL);
9129        if ("code".equals(codeString))
9130          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODE);
9131        if ("date".equals(codeString))
9132          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATE);
9133        if ("dateTime".equals(codeString))
9134          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATETIME);
9135        if ("decimal".equals(codeString))
9136          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DECIMAL);
9137        if ("id".equals(codeString))
9138          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ID);
9139        if ("instant".equals(codeString))
9140          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INSTANT);
9141        if ("integer".equals(codeString))
9142          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INTEGER);
9143        if ("markdown".equals(codeString))
9144          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MARKDOWN);
9145        if ("oid".equals(codeString))
9146          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OID);
9147        if ("positiveInt".equals(codeString))
9148          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.POSITIVEINT);
9149        if ("string".equals(codeString))
9150          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.STRING);
9151        if ("time".equals(codeString))
9152          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TIME);
9153        if ("unsignedInt".equals(codeString))
9154          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.UNSIGNEDINT);
9155        if ("uri".equals(codeString))
9156          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.URI);
9157        if ("url".equals(codeString))
9158          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.URL);
9159        if ("uuid".equals(codeString))
9160          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.UUID);
9161        if ("xhtml".equals(codeString))
9162          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.XHTML);
9163        if ("Account".equals(codeString))
9164          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ACCOUNT);
9165        if ("ActivityDefinition".equals(codeString))
9166          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ACTIVITYDEFINITION);
9167        if ("AdverseEvent".equals(codeString))
9168          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ADVERSEEVENT);
9169        if ("AllergyIntolerance".equals(codeString))
9170          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ALLERGYINTOLERANCE);
9171        if ("Appointment".equals(codeString))
9172          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.APPOINTMENT);
9173        if ("AppointmentResponse".equals(codeString))
9174          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.APPOINTMENTRESPONSE);
9175        if ("AuditEvent".equals(codeString))
9176          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.AUDITEVENT);
9177        if ("Basic".equals(codeString))
9178          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BASIC);
9179        if ("Binary".equals(codeString))
9180          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BINARY);
9181        if ("BiologicallyDerivedProduct".equals(codeString))
9182          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BIOLOGICALLYDERIVEDPRODUCT);
9183        if ("BodyStructure".equals(codeString))
9184          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BODYSTRUCTURE);
9185        if ("Bundle".equals(codeString))
9186          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BUNDLE);
9187        if ("CapabilityStatement".equals(codeString))
9188          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CAPABILITYSTATEMENT);
9189        if ("CarePlan".equals(codeString))
9190          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CAREPLAN);
9191        if ("CareTeam".equals(codeString))
9192          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CARETEAM);
9193        if ("CatalogEntry".equals(codeString))
9194          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CATALOGENTRY);
9195        if ("ChargeItem".equals(codeString))
9196          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CHARGEITEM);
9197        if ("ChargeItemDefinition".equals(codeString))
9198          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CHARGEITEMDEFINITION);
9199        if ("Claim".equals(codeString))
9200          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CLAIM);
9201        if ("ClaimResponse".equals(codeString))
9202          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CLAIMRESPONSE);
9203        if ("ClinicalImpression".equals(codeString))
9204          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CLINICALIMPRESSION);
9205        if ("CodeSystem".equals(codeString))
9206          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODESYSTEM);
9207        if ("Communication".equals(codeString))
9208          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMMUNICATION);
9209        if ("CommunicationRequest".equals(codeString))
9210          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMMUNICATIONREQUEST);
9211        if ("CompartmentDefinition".equals(codeString))
9212          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMPARTMENTDEFINITION);
9213        if ("Composition".equals(codeString))
9214          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMPOSITION);
9215        if ("ConceptMap".equals(codeString))
9216          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONCEPTMAP);
9217        if ("Condition".equals(codeString))
9218          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONDITION);
9219        if ("Consent".equals(codeString))
9220          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONSENT);
9221        if ("Contract".equals(codeString))
9222          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTRACT);
9223        if ("Coverage".equals(codeString))
9224          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COVERAGE);
9225        if ("CoverageEligibilityRequest".equals(codeString))
9226          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COVERAGEELIGIBILITYREQUEST);
9227        if ("CoverageEligibilityResponse".equals(codeString))
9228          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COVERAGEELIGIBILITYRESPONSE);
9229        if ("DetectedIssue".equals(codeString))
9230          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DETECTEDISSUE);
9231        if ("Device".equals(codeString))
9232          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICE);
9233        if ("DeviceDefinition".equals(codeString))
9234          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEDEFINITION);
9235        if ("DeviceMetric".equals(codeString))
9236          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEMETRIC);
9237        if ("DeviceRequest".equals(codeString))
9238          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEREQUEST);
9239        if ("DeviceUseStatement".equals(codeString))
9240          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEUSESTATEMENT);
9241        if ("DiagnosticReport".equals(codeString))
9242          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DIAGNOSTICREPORT);
9243        if ("DocumentManifest".equals(codeString))
9244          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOCUMENTMANIFEST);
9245        if ("DocumentReference".equals(codeString))
9246          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOCUMENTREFERENCE);
9247        if ("DomainResource".equals(codeString))
9248          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOMAINRESOURCE);
9249        if ("EffectEvidenceSynthesis".equals(codeString))
9250          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EFFECTEVIDENCESYNTHESIS);
9251        if ("Encounter".equals(codeString))
9252          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENCOUNTER);
9253        if ("Endpoint".equals(codeString))
9254          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENDPOINT);
9255        if ("EnrollmentRequest".equals(codeString))
9256          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENROLLMENTREQUEST);
9257        if ("EnrollmentResponse".equals(codeString))
9258          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENROLLMENTRESPONSE);
9259        if ("EpisodeOfCare".equals(codeString))
9260          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EPISODEOFCARE);
9261        if ("EventDefinition".equals(codeString))
9262          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EVENTDEFINITION);
9263        if ("Evidence".equals(codeString))
9264          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EVIDENCE);
9265        if ("EvidenceVariable".equals(codeString))
9266          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EVIDENCEVARIABLE);
9267        if ("ExampleScenario".equals(codeString))
9268          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXAMPLESCENARIO);
9269        if ("ExplanationOfBenefit".equals(codeString))
9270          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXPLANATIONOFBENEFIT);
9271        if ("FamilyMemberHistory".equals(codeString))
9272          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.FAMILYMEMBERHISTORY);
9273        if ("Flag".equals(codeString))
9274          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.FLAG);
9275        if ("Goal".equals(codeString))
9276          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GOAL);
9277        if ("GraphDefinition".equals(codeString))
9278          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GRAPHDEFINITION);
9279        if ("Group".equals(codeString))
9280          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GROUP);
9281        if ("GuidanceResponse".equals(codeString))
9282          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GUIDANCERESPONSE);
9283        if ("HealthcareService".equals(codeString))
9284          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.HEALTHCARESERVICE);
9285        if ("ImagingStudy".equals(codeString))
9286          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMAGINGSTUDY);
9287        if ("Immunization".equals(codeString))
9288          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMMUNIZATION);
9289        if ("ImmunizationEvaluation".equals(codeString))
9290          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMMUNIZATIONEVALUATION);
9291        if ("ImmunizationRecommendation".equals(codeString))
9292          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMMUNIZATIONRECOMMENDATION);
9293        if ("ImplementationGuide".equals(codeString))
9294          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMPLEMENTATIONGUIDE);
9295        if ("InsurancePlan".equals(codeString))
9296          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INSURANCEPLAN);
9297        if ("Invoice".equals(codeString))
9298          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INVOICE);
9299        if ("Library".equals(codeString))
9300          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LIBRARY);
9301        if ("Linkage".equals(codeString))
9302          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LINKAGE);
9303        if ("List".equals(codeString))
9304          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LIST);
9305        if ("Location".equals(codeString))
9306          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LOCATION);
9307        if ("Measure".equals(codeString))
9308          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEASURE);
9309        if ("MeasureReport".equals(codeString))
9310          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEASUREREPORT);
9311        if ("Media".equals(codeString))
9312          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDIA);
9313        if ("Medication".equals(codeString))
9314          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATION);
9315        if ("MedicationAdministration".equals(codeString))
9316          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONADMINISTRATION);
9317        if ("MedicationDispense".equals(codeString))
9318          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONDISPENSE);
9319        if ("MedicationKnowledge".equals(codeString))
9320          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONKNOWLEDGE);
9321        if ("MedicationRequest".equals(codeString))
9322          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONREQUEST);
9323        if ("MedicationStatement".equals(codeString))
9324          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONSTATEMENT);
9325        if ("MedicinalProduct".equals(codeString))
9326          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICINALPRODUCT);
9327        if ("MedicinalProductAuthorization".equals(codeString))
9328          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICINALPRODUCTAUTHORIZATION);
9329        if ("MedicinalProductContraindication".equals(codeString))
9330          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICINALPRODUCTCONTRAINDICATION);
9331        if ("MedicinalProductIndication".equals(codeString))
9332          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICINALPRODUCTINDICATION);
9333        if ("MedicinalProductIngredient".equals(codeString))
9334          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICINALPRODUCTINGREDIENT);
9335        if ("MedicinalProductInteraction".equals(codeString))
9336          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICINALPRODUCTINTERACTION);
9337        if ("MedicinalProductManufactured".equals(codeString))
9338          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICINALPRODUCTMANUFACTURED);
9339        if ("MedicinalProductPackaged".equals(codeString))
9340          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICINALPRODUCTPACKAGED);
9341        if ("MedicinalProductPharmaceutical".equals(codeString))
9342          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICINALPRODUCTPHARMACEUTICAL);
9343        if ("MedicinalProductUndesirableEffect".equals(codeString))
9344          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICINALPRODUCTUNDESIRABLEEFFECT);
9345        if ("MessageDefinition".equals(codeString))
9346          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MESSAGEDEFINITION);
9347        if ("MessageHeader".equals(codeString))
9348          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MESSAGEHEADER);
9349        if ("MolecularSequence".equals(codeString))
9350          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MOLECULARSEQUENCE);
9351        if ("NamingSystem".equals(codeString))
9352          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NAMINGSYSTEM);
9353        if ("NutritionOrder".equals(codeString))
9354          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NUTRITIONORDER);
9355        if ("Observation".equals(codeString))
9356          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OBSERVATION);
9357        if ("ObservationDefinition".equals(codeString))
9358          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OBSERVATIONDEFINITION);
9359        if ("OperationDefinition".equals(codeString))
9360          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OPERATIONDEFINITION);
9361        if ("OperationOutcome".equals(codeString))
9362          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OPERATIONOUTCOME);
9363        if ("Organization".equals(codeString))
9364          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ORGANIZATION);
9365        if ("OrganizationAffiliation".equals(codeString))
9366          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ORGANIZATIONAFFILIATION);
9367        if ("Parameters".equals(codeString))
9368          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PARAMETERS);
9369        if ("Patient".equals(codeString))
9370          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PATIENT);
9371        if ("PaymentNotice".equals(codeString))
9372          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PAYMENTNOTICE);
9373        if ("PaymentReconciliation".equals(codeString))
9374          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PAYMENTRECONCILIATION);
9375        if ("Person".equals(codeString))
9376          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PERSON);
9377        if ("PlanDefinition".equals(codeString))
9378          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PLANDEFINITION);
9379        if ("Practitioner".equals(codeString))
9380          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PRACTITIONER);
9381        if ("PractitionerRole".equals(codeString))
9382          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PRACTITIONERROLE);
9383        if ("Procedure".equals(codeString))
9384          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROCEDURE);
9385        if ("Provenance".equals(codeString))
9386          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROVENANCE);
9387        if ("Questionnaire".equals(codeString))
9388          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.QUESTIONNAIRE);
9389        if ("QuestionnaireResponse".equals(codeString))
9390          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.QUESTIONNAIRERESPONSE);
9391        if ("RelatedPerson".equals(codeString))
9392          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RELATEDPERSON);
9393        if ("RequestGroup".equals(codeString))
9394          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.REQUESTGROUP);
9395        if ("ResearchDefinition".equals(codeString))
9396          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RESEARCHDEFINITION);
9397        if ("ResearchElementDefinition".equals(codeString))
9398          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RESEARCHELEMENTDEFINITION);
9399        if ("ResearchStudy".equals(codeString))
9400          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RESEARCHSTUDY);
9401        if ("ResearchSubject".equals(codeString))
9402          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RESEARCHSUBJECT);
9403        if ("Resource".equals(codeString))
9404          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RESOURCE);
9405        if ("RiskAssessment".equals(codeString))
9406          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RISKASSESSMENT);
9407        if ("RiskEvidenceSynthesis".equals(codeString))
9408          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RISKEVIDENCESYNTHESIS);
9409        if ("Schedule".equals(codeString))
9410          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SCHEDULE);
9411        if ("SearchParameter".equals(codeString))
9412          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SEARCHPARAMETER);
9413        if ("ServiceRequest".equals(codeString))
9414          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SERVICEREQUEST);
9415        if ("Slot".equals(codeString))
9416          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SLOT);
9417        if ("Specimen".equals(codeString))
9418          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SPECIMEN);
9419        if ("SpecimenDefinition".equals(codeString))
9420          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SPECIMENDEFINITION);
9421        if ("StructureDefinition".equals(codeString))
9422          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.STRUCTUREDEFINITION);
9423        if ("StructureMap".equals(codeString))
9424          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.STRUCTUREMAP);
9425        if ("Subscription".equals(codeString))
9426          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSCRIPTION);
9427        if ("Substance".equals(codeString))
9428          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCE);
9429        if ("SubstanceNucleicAcid".equals(codeString))
9430          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCENUCLEICACID);
9431        if ("SubstancePolymer".equals(codeString))
9432          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCEPOLYMER);
9433        if ("SubstanceProtein".equals(codeString))
9434          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCEPROTEIN);
9435        if ("SubstanceReferenceInformation".equals(codeString))
9436          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCEREFERENCEINFORMATION);
9437        if ("SubstanceSourceMaterial".equals(codeString))
9438          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCESOURCEMATERIAL);
9439        if ("SubstanceSpecification".equals(codeString))
9440          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCESPECIFICATION);
9441        if ("SupplyDelivery".equals(codeString))
9442          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUPPLYDELIVERY);
9443        if ("SupplyRequest".equals(codeString))
9444          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUPPLYREQUEST);
9445        if ("Task".equals(codeString))
9446          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TASK);
9447        if ("TerminologyCapabilities".equals(codeString))
9448          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TERMINOLOGYCAPABILITIES);
9449        if ("TestReport".equals(codeString))
9450          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TESTREPORT);
9451        if ("TestScript".equals(codeString))
9452          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TESTSCRIPT);
9453        if ("ValueSet".equals(codeString))
9454          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.VALUESET);
9455        if ("VerificationResult".equals(codeString))
9456          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.VERIFICATIONRESULT);
9457        if ("VisionPrescription".equals(codeString))
9458          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.VISIONPRESCRIPTION);
9459        throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'");
9460        }
9461    public String toCode(FHIRDefinedType code) {
9462      if (code == FHIRDefinedType.ADDRESS)
9463        return "Address";
9464      if (code == FHIRDefinedType.AGE)
9465        return "Age";
9466      if (code == FHIRDefinedType.ANNOTATION)
9467        return "Annotation";
9468      if (code == FHIRDefinedType.ATTACHMENT)
9469        return "Attachment";
9470      if (code == FHIRDefinedType.BACKBONEELEMENT)
9471        return "BackboneElement";
9472      if (code == FHIRDefinedType.CODEABLECONCEPT)
9473        return "CodeableConcept";
9474      if (code == FHIRDefinedType.CODING)
9475        return "Coding";
9476      if (code == FHIRDefinedType.CONTACTDETAIL)
9477        return "ContactDetail";
9478      if (code == FHIRDefinedType.CONTACTPOINT)
9479        return "ContactPoint";
9480      if (code == FHIRDefinedType.CONTRIBUTOR)
9481        return "Contributor";
9482      if (code == FHIRDefinedType.COUNT)
9483        return "Count";
9484      if (code == FHIRDefinedType.DATAREQUIREMENT)
9485        return "DataRequirement";
9486      if (code == FHIRDefinedType.DISTANCE)
9487        return "Distance";
9488      if (code == FHIRDefinedType.DOSAGE)
9489        return "Dosage";
9490      if (code == FHIRDefinedType.DURATION)
9491        return "Duration";
9492      if (code == FHIRDefinedType.ELEMENT)
9493        return "Element";
9494      if (code == FHIRDefinedType.ELEMENTDEFINITION)
9495        return "ElementDefinition";
9496      if (code == FHIRDefinedType.EXPRESSION)
9497        return "Expression";
9498      if (code == FHIRDefinedType.EXTENSION)
9499        return "Extension";
9500      if (code == FHIRDefinedType.HUMANNAME)
9501        return "HumanName";
9502      if (code == FHIRDefinedType.IDENTIFIER)
9503        return "Identifier";
9504      if (code == FHIRDefinedType.MARKETINGSTATUS)
9505        return "MarketingStatus";
9506      if (code == FHIRDefinedType.META)
9507        return "Meta";
9508      if (code == FHIRDefinedType.MONEY)
9509        return "Money";
9510      if (code == FHIRDefinedType.MONEYQUANTITY)
9511        return "MoneyQuantity";
9512      if (code == FHIRDefinedType.NARRATIVE)
9513        return "Narrative";
9514      if (code == FHIRDefinedType.PARAMETERDEFINITION)
9515        return "ParameterDefinition";
9516      if (code == FHIRDefinedType.PERIOD)
9517        return "Period";
9518      if (code == FHIRDefinedType.POPULATION)
9519        return "Population";
9520      if (code == FHIRDefinedType.PRODCHARACTERISTIC)
9521        return "ProdCharacteristic";
9522      if (code == FHIRDefinedType.PRODUCTSHELFLIFE)
9523        return "ProductShelfLife";
9524      if (code == FHIRDefinedType.QUANTITY)
9525        return "Quantity";
9526      if (code == FHIRDefinedType.RANGE)
9527        return "Range";
9528      if (code == FHIRDefinedType.RATIO)
9529        return "Ratio";
9530      if (code == FHIRDefinedType.REFERENCE)
9531        return "Reference";
9532      if (code == FHIRDefinedType.RELATEDARTIFACT)
9533        return "RelatedArtifact";
9534      if (code == FHIRDefinedType.SAMPLEDDATA)
9535        return "SampledData";
9536      if (code == FHIRDefinedType.SIGNATURE)
9537        return "Signature";
9538      if (code == FHIRDefinedType.SIMPLEQUANTITY)
9539        return "SimpleQuantity";
9540      if (code == FHIRDefinedType.SUBSTANCEAMOUNT)
9541        return "SubstanceAmount";
9542      if (code == FHIRDefinedType.TIMING)
9543        return "Timing";
9544      if (code == FHIRDefinedType.TRIGGERDEFINITION)
9545        return "TriggerDefinition";
9546      if (code == FHIRDefinedType.USAGECONTEXT)
9547        return "UsageContext";
9548      if (code == FHIRDefinedType.BASE64BINARY)
9549        return "base64Binary";
9550      if (code == FHIRDefinedType.BOOLEAN)
9551        return "boolean";
9552      if (code == FHIRDefinedType.CANONICAL)
9553        return "canonical";
9554      if (code == FHIRDefinedType.CODE)
9555        return "code";
9556      if (code == FHIRDefinedType.DATE)
9557        return "date";
9558      if (code == FHIRDefinedType.DATETIME)
9559        return "dateTime";
9560      if (code == FHIRDefinedType.DECIMAL)
9561        return "decimal";
9562      if (code == FHIRDefinedType.ID)
9563        return "id";
9564      if (code == FHIRDefinedType.INSTANT)
9565        return "instant";
9566      if (code == FHIRDefinedType.INTEGER)
9567        return "integer";
9568      if (code == FHIRDefinedType.MARKDOWN)
9569        return "markdown";
9570      if (code == FHIRDefinedType.OID)
9571        return "oid";
9572      if (code == FHIRDefinedType.POSITIVEINT)
9573        return "positiveInt";
9574      if (code == FHIRDefinedType.STRING)
9575        return "string";
9576      if (code == FHIRDefinedType.TIME)
9577        return "time";
9578      if (code == FHIRDefinedType.UNSIGNEDINT)
9579        return "unsignedInt";
9580      if (code == FHIRDefinedType.URI)
9581        return "uri";
9582      if (code == FHIRDefinedType.URL)
9583        return "url";
9584      if (code == FHIRDefinedType.UUID)
9585        return "uuid";
9586      if (code == FHIRDefinedType.XHTML)
9587        return "xhtml";
9588      if (code == FHIRDefinedType.ACCOUNT)
9589        return "Account";
9590      if (code == FHIRDefinedType.ACTIVITYDEFINITION)
9591        return "ActivityDefinition";
9592      if (code == FHIRDefinedType.ADVERSEEVENT)
9593        return "AdverseEvent";
9594      if (code == FHIRDefinedType.ALLERGYINTOLERANCE)
9595        return "AllergyIntolerance";
9596      if (code == FHIRDefinedType.APPOINTMENT)
9597        return "Appointment";
9598      if (code == FHIRDefinedType.APPOINTMENTRESPONSE)
9599        return "AppointmentResponse";
9600      if (code == FHIRDefinedType.AUDITEVENT)
9601        return "AuditEvent";
9602      if (code == FHIRDefinedType.BASIC)
9603        return "Basic";
9604      if (code == FHIRDefinedType.BINARY)
9605        return "Binary";
9606      if (code == FHIRDefinedType.BIOLOGICALLYDERIVEDPRODUCT)
9607        return "BiologicallyDerivedProduct";
9608      if (code == FHIRDefinedType.BODYSTRUCTURE)
9609        return "BodyStructure";
9610      if (code == FHIRDefinedType.BUNDLE)
9611        return "Bundle";
9612      if (code == FHIRDefinedType.CAPABILITYSTATEMENT)
9613        return "CapabilityStatement";
9614      if (code == FHIRDefinedType.CAREPLAN)
9615        return "CarePlan";
9616      if (code == FHIRDefinedType.CARETEAM)
9617        return "CareTeam";
9618      if (code == FHIRDefinedType.CATALOGENTRY)
9619        return "CatalogEntry";
9620      if (code == FHIRDefinedType.CHARGEITEM)
9621        return "ChargeItem";
9622      if (code == FHIRDefinedType.CHARGEITEMDEFINITION)
9623        return "ChargeItemDefinition";
9624      if (code == FHIRDefinedType.CLAIM)
9625        return "Claim";
9626      if (code == FHIRDefinedType.CLAIMRESPONSE)
9627        return "ClaimResponse";
9628      if (code == FHIRDefinedType.CLINICALIMPRESSION)
9629        return "ClinicalImpression";
9630      if (code == FHIRDefinedType.CODESYSTEM)
9631        return "CodeSystem";
9632      if (code == FHIRDefinedType.COMMUNICATION)
9633        return "Communication";
9634      if (code == FHIRDefinedType.COMMUNICATIONREQUEST)
9635        return "CommunicationRequest";
9636      if (code == FHIRDefinedType.COMPARTMENTDEFINITION)
9637        return "CompartmentDefinition";
9638      if (code == FHIRDefinedType.COMPOSITION)
9639        return "Composition";
9640      if (code == FHIRDefinedType.CONCEPTMAP)
9641        return "ConceptMap";
9642      if (code == FHIRDefinedType.CONDITION)
9643        return "Condition";
9644      if (code == FHIRDefinedType.CONSENT)
9645        return "Consent";
9646      if (code == FHIRDefinedType.CONTRACT)
9647        return "Contract";
9648      if (code == FHIRDefinedType.COVERAGE)
9649        return "Coverage";
9650      if (code == FHIRDefinedType.COVERAGEELIGIBILITYREQUEST)
9651        return "CoverageEligibilityRequest";
9652      if (code == FHIRDefinedType.COVERAGEELIGIBILITYRESPONSE)
9653        return "CoverageEligibilityResponse";
9654      if (code == FHIRDefinedType.DETECTEDISSUE)
9655        return "DetectedIssue";
9656      if (code == FHIRDefinedType.DEVICE)
9657        return "Device";
9658      if (code == FHIRDefinedType.DEVICEDEFINITION)
9659        return "DeviceDefinition";
9660      if (code == FHIRDefinedType.DEVICEMETRIC)
9661        return "DeviceMetric";
9662      if (code == FHIRDefinedType.DEVICEREQUEST)
9663        return "DeviceRequest";
9664      if (code == FHIRDefinedType.DEVICEUSESTATEMENT)
9665        return "DeviceUseStatement";
9666      if (code == FHIRDefinedType.DIAGNOSTICREPORT)
9667        return "DiagnosticReport";
9668      if (code == FHIRDefinedType.DOCUMENTMANIFEST)
9669        return "DocumentManifest";
9670      if (code == FHIRDefinedType.DOCUMENTREFERENCE)
9671        return "DocumentReference";
9672      if (code == FHIRDefinedType.DOMAINRESOURCE)
9673        return "DomainResource";
9674      if (code == FHIRDefinedType.EFFECTEVIDENCESYNTHESIS)
9675        return "EffectEvidenceSynthesis";
9676      if (code == FHIRDefinedType.ENCOUNTER)
9677        return "Encounter";
9678      if (code == FHIRDefinedType.ENDPOINT)
9679        return "Endpoint";
9680      if (code == FHIRDefinedType.ENROLLMENTREQUEST)
9681        return "EnrollmentRequest";
9682      if (code == FHIRDefinedType.ENROLLMENTRESPONSE)
9683        return "EnrollmentResponse";
9684      if (code == FHIRDefinedType.EPISODEOFCARE)
9685        return "EpisodeOfCare";
9686      if (code == FHIRDefinedType.EVENTDEFINITION)
9687        return "EventDefinition";
9688      if (code == FHIRDefinedType.EVIDENCE)
9689        return "Evidence";
9690      if (code == FHIRDefinedType.EVIDENCEVARIABLE)
9691        return "EvidenceVariable";
9692      if (code == FHIRDefinedType.EXAMPLESCENARIO)
9693        return "ExampleScenario";
9694      if (code == FHIRDefinedType.EXPLANATIONOFBENEFIT)
9695        return "ExplanationOfBenefit";
9696      if (code == FHIRDefinedType.FAMILYMEMBERHISTORY)
9697        return "FamilyMemberHistory";
9698      if (code == FHIRDefinedType.FLAG)
9699        return "Flag";
9700      if (code == FHIRDefinedType.GOAL)
9701        return "Goal";
9702      if (code == FHIRDefinedType.GRAPHDEFINITION)
9703        return "GraphDefinition";
9704      if (code == FHIRDefinedType.GROUP)
9705        return "Group";
9706      if (code == FHIRDefinedType.GUIDANCERESPONSE)
9707        return "GuidanceResponse";
9708      if (code == FHIRDefinedType.HEALTHCARESERVICE)
9709        return "HealthcareService";
9710      if (code == FHIRDefinedType.IMAGINGSTUDY)
9711        return "ImagingStudy";
9712      if (code == FHIRDefinedType.IMMUNIZATION)
9713        return "Immunization";
9714      if (code == FHIRDefinedType.IMMUNIZATIONEVALUATION)
9715        return "ImmunizationEvaluation";
9716      if (code == FHIRDefinedType.IMMUNIZATIONRECOMMENDATION)
9717        return "ImmunizationRecommendation";
9718      if (code == FHIRDefinedType.IMPLEMENTATIONGUIDE)
9719        return "ImplementationGuide";
9720      if (code == FHIRDefinedType.INSURANCEPLAN)
9721        return "InsurancePlan";
9722      if (code == FHIRDefinedType.INVOICE)
9723        return "Invoice";
9724      if (code == FHIRDefinedType.LIBRARY)
9725        return "Library";
9726      if (code == FHIRDefinedType.LINKAGE)
9727        return "Linkage";
9728      if (code == FHIRDefinedType.LIST)
9729        return "List";
9730      if (code == FHIRDefinedType.LOCATION)
9731        return "Location";
9732      if (code == FHIRDefinedType.MEASURE)
9733        return "Measure";
9734      if (code == FHIRDefinedType.MEASUREREPORT)
9735        return "MeasureReport";
9736      if (code == FHIRDefinedType.MEDIA)
9737        return "Media";
9738      if (code == FHIRDefinedType.MEDICATION)
9739        return "Medication";
9740      if (code == FHIRDefinedType.MEDICATIONADMINISTRATION)
9741        return "MedicationAdministration";
9742      if (code == FHIRDefinedType.MEDICATIONDISPENSE)
9743        return "MedicationDispense";
9744      if (code == FHIRDefinedType.MEDICATIONKNOWLEDGE)
9745        return "MedicationKnowledge";
9746      if (code == FHIRDefinedType.MEDICATIONREQUEST)
9747        return "MedicationRequest";
9748      if (code == FHIRDefinedType.MEDICATIONSTATEMENT)
9749        return "MedicationStatement";
9750      if (code == FHIRDefinedType.MEDICINALPRODUCT)
9751        return "MedicinalProduct";
9752      if (code == FHIRDefinedType.MEDICINALPRODUCTAUTHORIZATION)
9753        return "MedicinalProductAuthorization";
9754      if (code == FHIRDefinedType.MEDICINALPRODUCTCONTRAINDICATION)
9755        return "MedicinalProductContraindication";
9756      if (code == FHIRDefinedType.MEDICINALPRODUCTINDICATION)
9757        return "MedicinalProductIndication";
9758      if (code == FHIRDefinedType.MEDICINALPRODUCTINGREDIENT)
9759        return "MedicinalProductIngredient";
9760      if (code == FHIRDefinedType.MEDICINALPRODUCTINTERACTION)
9761        return "MedicinalProductInteraction";
9762      if (code == FHIRDefinedType.MEDICINALPRODUCTMANUFACTURED)
9763        return "MedicinalProductManufactured";
9764      if (code == FHIRDefinedType.MEDICINALPRODUCTPACKAGED)
9765        return "MedicinalProductPackaged";
9766      if (code == FHIRDefinedType.MEDICINALPRODUCTPHARMACEUTICAL)
9767        return "MedicinalProductPharmaceutical";
9768      if (code == FHIRDefinedType.MEDICINALPRODUCTUNDESIRABLEEFFECT)
9769        return "MedicinalProductUndesirableEffect";
9770      if (code == FHIRDefinedType.MESSAGEDEFINITION)
9771        return "MessageDefinition";
9772      if (code == FHIRDefinedType.MESSAGEHEADER)
9773        return "MessageHeader";
9774      if (code == FHIRDefinedType.MOLECULARSEQUENCE)
9775        return "MolecularSequence";
9776      if (code == FHIRDefinedType.NAMINGSYSTEM)
9777        return "NamingSystem";
9778      if (code == FHIRDefinedType.NUTRITIONORDER)
9779        return "NutritionOrder";
9780      if (code == FHIRDefinedType.OBSERVATION)
9781        return "Observation";
9782      if (code == FHIRDefinedType.OBSERVATIONDEFINITION)
9783        return "ObservationDefinition";
9784      if (code == FHIRDefinedType.OPERATIONDEFINITION)
9785        return "OperationDefinition";
9786      if (code == FHIRDefinedType.OPERATIONOUTCOME)
9787        return "OperationOutcome";
9788      if (code == FHIRDefinedType.ORGANIZATION)
9789        return "Organization";
9790      if (code == FHIRDefinedType.ORGANIZATIONAFFILIATION)
9791        return "OrganizationAffiliation";
9792      if (code == FHIRDefinedType.PARAMETERS)
9793        return "Parameters";
9794      if (code == FHIRDefinedType.PATIENT)
9795        return "Patient";
9796      if (code == FHIRDefinedType.PAYMENTNOTICE)
9797        return "PaymentNotice";
9798      if (code == FHIRDefinedType.PAYMENTRECONCILIATION)
9799        return "PaymentReconciliation";
9800      if (code == FHIRDefinedType.PERSON)
9801        return "Person";
9802      if (code == FHIRDefinedType.PLANDEFINITION)
9803        return "PlanDefinition";
9804      if (code == FHIRDefinedType.PRACTITIONER)
9805        return "Practitioner";
9806      if (code == FHIRDefinedType.PRACTITIONERROLE)
9807        return "PractitionerRole";
9808      if (code == FHIRDefinedType.PROCEDURE)
9809        return "Procedure";
9810      if (code == FHIRDefinedType.PROVENANCE)
9811        return "Provenance";
9812      if (code == FHIRDefinedType.QUESTIONNAIRE)
9813        return "Questionnaire";
9814      if (code == FHIRDefinedType.QUESTIONNAIRERESPONSE)
9815        return "QuestionnaireResponse";
9816      if (code == FHIRDefinedType.RELATEDPERSON)
9817        return "RelatedPerson";
9818      if (code == FHIRDefinedType.REQUESTGROUP)
9819        return "RequestGroup";
9820      if (code == FHIRDefinedType.RESEARCHDEFINITION)
9821        return "ResearchDefinition";
9822      if (code == FHIRDefinedType.RESEARCHELEMENTDEFINITION)
9823        return "ResearchElementDefinition";
9824      if (code == FHIRDefinedType.RESEARCHSTUDY)
9825        return "ResearchStudy";
9826      if (code == FHIRDefinedType.RESEARCHSUBJECT)
9827        return "ResearchSubject";
9828      if (code == FHIRDefinedType.RESOURCE)
9829        return "Resource";
9830      if (code == FHIRDefinedType.RISKASSESSMENT)
9831        return "RiskAssessment";
9832      if (code == FHIRDefinedType.RISKEVIDENCESYNTHESIS)
9833        return "RiskEvidenceSynthesis";
9834      if (code == FHIRDefinedType.SCHEDULE)
9835        return "Schedule";
9836      if (code == FHIRDefinedType.SEARCHPARAMETER)
9837        return "SearchParameter";
9838      if (code == FHIRDefinedType.SERVICEREQUEST)
9839        return "ServiceRequest";
9840      if (code == FHIRDefinedType.SLOT)
9841        return "Slot";
9842      if (code == FHIRDefinedType.SPECIMEN)
9843        return "Specimen";
9844      if (code == FHIRDefinedType.SPECIMENDEFINITION)
9845        return "SpecimenDefinition";
9846      if (code == FHIRDefinedType.STRUCTUREDEFINITION)
9847        return "StructureDefinition";
9848      if (code == FHIRDefinedType.STRUCTUREMAP)
9849        return "StructureMap";
9850      if (code == FHIRDefinedType.SUBSCRIPTION)
9851        return "Subscription";
9852      if (code == FHIRDefinedType.SUBSTANCE)
9853        return "Substance";
9854      if (code == FHIRDefinedType.SUBSTANCENUCLEICACID)
9855        return "SubstanceNucleicAcid";
9856      if (code == FHIRDefinedType.SUBSTANCEPOLYMER)
9857        return "SubstancePolymer";
9858      if (code == FHIRDefinedType.SUBSTANCEPROTEIN)
9859        return "SubstanceProtein";
9860      if (code == FHIRDefinedType.SUBSTANCEREFERENCEINFORMATION)
9861        return "SubstanceReferenceInformation";
9862      if (code == FHIRDefinedType.SUBSTANCESOURCEMATERIAL)
9863        return "SubstanceSourceMaterial";
9864      if (code == FHIRDefinedType.SUBSTANCESPECIFICATION)
9865        return "SubstanceSpecification";
9866      if (code == FHIRDefinedType.SUPPLYDELIVERY)
9867        return "SupplyDelivery";
9868      if (code == FHIRDefinedType.SUPPLYREQUEST)
9869        return "SupplyRequest";
9870      if (code == FHIRDefinedType.TASK)
9871        return "Task";
9872      if (code == FHIRDefinedType.TERMINOLOGYCAPABILITIES)
9873        return "TerminologyCapabilities";
9874      if (code == FHIRDefinedType.TESTREPORT)
9875        return "TestReport";
9876      if (code == FHIRDefinedType.TESTSCRIPT)
9877        return "TestScript";
9878      if (code == FHIRDefinedType.VALUESET)
9879        return "ValueSet";
9880      if (code == FHIRDefinedType.VERIFICATIONRESULT)
9881        return "VerificationResult";
9882      if (code == FHIRDefinedType.VISIONPRESCRIPTION)
9883        return "VisionPrescription";
9884      return "?";
9885      }
9886    public String toSystem(FHIRDefinedType code) {
9887      return code.getSystem();
9888      }
9889    }
9890
9891    public enum FHIRVersion {
9892        /**
9893         * Oldest archived version of FHIR.
9894         */
9895        _0_01, 
9896        /**
9897         * 1st Draft for Comment (Sept 2012 Ballot).
9898         */
9899        _0_05, 
9900        /**
9901         * 2nd Draft for Comment (January 2013 Ballot).
9902         */
9903        _0_06, 
9904        /**
9905         * DSTU 1 Ballot version.
9906         */
9907        _0_11, 
9908        /**
9909         * DSTU 1 Official version.
9910         */
9911        _0_0_80, 
9912        /**
9913         * DSTU 1 Official version Technical Errata #1.
9914         */
9915        _0_0_81, 
9916        /**
9917         * DSTU 1 Official version Technical Errata #2.
9918         */
9919        _0_0_82, 
9920        /**
9921         * Draft For Comment (January 2015 Ballot).
9922         */
9923        _0_4_0, 
9924        /**
9925         * DSTU 2 Ballot version (May 2015 Ballot).
9926         */
9927        _0_5_0, 
9928        /**
9929         * DSTU 2 QA Preview + CQIF Ballot (Sep 2015).
9930         */
9931        _1_0_0, 
9932        /**
9933         * DSTU 2 (Official version).
9934         */
9935        _1_0_1, 
9936        /**
9937         * DSTU 2 (Official version) with 1 technical errata.
9938         */
9939        _1_0_2, 
9940        /**
9941         * GAO Ballot + draft changes to main FHIR standard.
9942         */
9943        _1_1_0, 
9944        /**
9945         * CQF on FHIR Ballot + Connectathon 12 (Montreal).
9946         */
9947        _1_4_0, 
9948        /**
9949         * FHIR STU3 Ballot + Connectathon 13 (Baltimore).
9950         */
9951        _1_6_0, 
9952        /**
9953         * FHIR STU3 Candidate + Connectathon 14 (San Antonio).
9954         */
9955        _1_8_0, 
9956        /**
9957         * FHIR Release 3 (STU).
9958         */
9959        _3_0_0, 
9960        /**
9961         * FHIR Release 3 (STU) with 1 technical errata.
9962         */
9963        _3_0_1, 
9964        /**
9965         * R4 Ballot #1.
9966         */
9967        _3_3_0, 
9968        /**
9969         * R4 Ballot #2.
9970         */
9971        _3_5_0, 
9972        /**
9973         * FHIR Release 4 (Normative + STU).
9974         */
9975        _4_0_0, 
9976        /**
9977         * added to help the parsers
9978         */
9979        NULL;
9980        public static FHIRVersion fromCode(String codeString) throws FHIRException {
9981            if (codeString == null || "".equals(codeString))
9982                return null;
9983        if ("0.01".equals(codeString))
9984          return _0_01;
9985        if ("0.05".equals(codeString))
9986          return _0_05;
9987        if ("0.06".equals(codeString))
9988          return _0_06;
9989        if ("0.11".equals(codeString))
9990          return _0_11;
9991        if ("0.0.80".equals(codeString))
9992          return _0_0_80;
9993        if ("0.0.81".equals(codeString))
9994          return _0_0_81;
9995        if ("0.0.82".equals(codeString))
9996          return _0_0_82;
9997        if ("0.4.0".equals(codeString))
9998          return _0_4_0;
9999        if ("0.5.0".equals(codeString))
10000          return _0_5_0;
10001        if ("1.0.0".equals(codeString))
10002          return _1_0_0;
10003        if ("1.0.1".equals(codeString))
10004          return _1_0_1;
10005        if ("1.0.2".equals(codeString))
10006          return _1_0_2;
10007        if ("1.1.0".equals(codeString))
10008          return _1_1_0;
10009        if ("1.4.0".equals(codeString))
10010          return _1_4_0;
10011        if ("1.6.0".equals(codeString))
10012          return _1_6_0;
10013        if ("1.8.0".equals(codeString))
10014          return _1_8_0;
10015        if ("3.0.0".equals(codeString))
10016          return _3_0_0;
10017        if ("3.0.1".equals(codeString))
10018          return _3_0_1;
10019        if ("3.3.0".equals(codeString))
10020          return _3_3_0;
10021        if ("3.5.0".equals(codeString))
10022          return _3_5_0;
10023        if ("4.0.0".equals(codeString))
10024          return _4_0_0;
10025        throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'");
10026        }
10027        public String toCode() {
10028          switch (this) {
10029            case _0_01: return "0.01";
10030            case _0_05: return "0.05";
10031            case _0_06: return "0.06";
10032            case _0_11: return "0.11";
10033            case _0_0_80: return "0.0.80";
10034            case _0_0_81: return "0.0.81";
10035            case _0_0_82: return "0.0.82";
10036            case _0_4_0: return "0.4.0";
10037            case _0_5_0: return "0.5.0";
10038            case _1_0_0: return "1.0.0";
10039            case _1_0_1: return "1.0.1";
10040            case _1_0_2: return "1.0.2";
10041            case _1_1_0: return "1.1.0";
10042            case _1_4_0: return "1.4.0";
10043            case _1_6_0: return "1.6.0";
10044            case _1_8_0: return "1.8.0";
10045            case _3_0_0: return "3.0.0";
10046            case _3_0_1: return "3.0.1";
10047            case _3_3_0: return "3.3.0";
10048            case _3_5_0: return "3.5.0";
10049            case _4_0_0: return "4.0.0";
10050            default: return "?";
10051          }
10052        }
10053        public String getSystem() {
10054          switch (this) {
10055            case _0_01: return "http://hl7.org/fhir/FHIR-version";
10056            case _0_05: return "http://hl7.org/fhir/FHIR-version";
10057            case _0_06: return "http://hl7.org/fhir/FHIR-version";
10058            case _0_11: return "http://hl7.org/fhir/FHIR-version";
10059            case _0_0_80: return "http://hl7.org/fhir/FHIR-version";
10060            case _0_0_81: return "http://hl7.org/fhir/FHIR-version";
10061            case _0_0_82: return "http://hl7.org/fhir/FHIR-version";
10062            case _0_4_0: return "http://hl7.org/fhir/FHIR-version";
10063            case _0_5_0: return "http://hl7.org/fhir/FHIR-version";
10064            case _1_0_0: return "http://hl7.org/fhir/FHIR-version";
10065            case _1_0_1: return "http://hl7.org/fhir/FHIR-version";
10066            case _1_0_2: return "http://hl7.org/fhir/FHIR-version";
10067            case _1_1_0: return "http://hl7.org/fhir/FHIR-version";
10068            case _1_4_0: return "http://hl7.org/fhir/FHIR-version";
10069            case _1_6_0: return "http://hl7.org/fhir/FHIR-version";
10070            case _1_8_0: return "http://hl7.org/fhir/FHIR-version";
10071            case _3_0_0: return "http://hl7.org/fhir/FHIR-version";
10072            case _3_0_1: return "http://hl7.org/fhir/FHIR-version";
10073            case _3_3_0: return "http://hl7.org/fhir/FHIR-version";
10074            case _3_5_0: return "http://hl7.org/fhir/FHIR-version";
10075            case _4_0_0: return "http://hl7.org/fhir/FHIR-version";
10076            default: return "?";
10077          }
10078        }
10079        public String getDefinition() {
10080          switch (this) {
10081            case _0_01: return "Oldest archived version of FHIR.";
10082            case _0_05: return "1st Draft for Comment (Sept 2012 Ballot).";
10083            case _0_06: return "2nd Draft for Comment (January 2013 Ballot).";
10084            case _0_11: return "DSTU 1 Ballot version.";
10085            case _0_0_80: return "DSTU 1 Official version.";
10086            case _0_0_81: return "DSTU 1 Official version Technical Errata #1.";
10087            case _0_0_82: return "DSTU 1 Official version Technical Errata #2.";
10088            case _0_4_0: return "Draft For Comment (January 2015 Ballot).";
10089            case _0_5_0: return "DSTU 2 Ballot version (May 2015 Ballot).";
10090            case _1_0_0: return "DSTU 2 QA Preview + CQIF Ballot (Sep 2015).";
10091            case _1_0_1: return "DSTU 2 (Official version).";
10092            case _1_0_2: return "DSTU 2 (Official version) with 1 technical errata.";
10093            case _1_1_0: return "GAO Ballot + draft changes to main FHIR standard.";
10094            case _1_4_0: return "CQF on FHIR Ballot + Connectathon 12 (Montreal).";
10095            case _1_6_0: return "FHIR STU3 Ballot + Connectathon 13 (Baltimore).";
10096            case _1_8_0: return "FHIR STU3 Candidate + Connectathon 14 (San Antonio).";
10097            case _3_0_0: return "FHIR Release 3 (STU).";
10098            case _3_0_1: return "FHIR Release 3 (STU) with 1 technical errata.";
10099            case _3_3_0: return "R4 Ballot #1.";
10100            case _3_5_0: return "R4 Ballot #2.";
10101            case _4_0_0: return "FHIR Release 4 (Normative + STU).";
10102            default: return "?";
10103          }
10104        }
10105        public String getDisplay() {
10106          switch (this) {
10107            case _0_01: return "0.01";
10108            case _0_05: return "0.05";
10109            case _0_06: return "0.06";
10110            case _0_11: return "0.11";
10111            case _0_0_80: return "0.0.80";
10112            case _0_0_81: return "0.0.81";
10113            case _0_0_82: return "0.0.82";
10114            case _0_4_0: return "0.4.0";
10115            case _0_5_0: return "0.5.0";
10116            case _1_0_0: return "1.0.0";
10117            case _1_0_1: return "1.0.1";
10118            case _1_0_2: return "1.0.2";
10119            case _1_1_0: return "1.1.0";
10120            case _1_4_0: return "1.4.0";
10121            case _1_6_0: return "1.6.0";
10122            case _1_8_0: return "1.8.0";
10123            case _3_0_0: return "3.0.0";
10124            case _3_0_1: return "3.0.1";
10125            case _3_3_0: return "3.3.0";
10126            case _3_5_0: return "3.5.0";
10127            case _4_0_0: return "4.0.0";
10128            default: return "?";
10129          }
10130        }
10131    }
10132
10133  public static class FHIRVersionEnumFactory implements EnumFactory<FHIRVersion> {
10134    public FHIRVersion fromCode(String codeString) throws IllegalArgumentException {
10135      if (codeString == null || "".equals(codeString))
10136            if (codeString == null || "".equals(codeString))
10137                return null;
10138        if ("0.01".equals(codeString))
10139          return FHIRVersion._0_01;
10140        if ("0.05".equals(codeString))
10141          return FHIRVersion._0_05;
10142        if ("0.06".equals(codeString))
10143          return FHIRVersion._0_06;
10144        if ("0.11".equals(codeString))
10145          return FHIRVersion._0_11;
10146        if ("0.0.80".equals(codeString))
10147          return FHIRVersion._0_0_80;
10148        if ("0.0.81".equals(codeString))
10149          return FHIRVersion._0_0_81;
10150        if ("0.0.82".equals(codeString))
10151          return FHIRVersion._0_0_82;
10152        if ("0.4.0".equals(codeString))
10153          return FHIRVersion._0_4_0;
10154        if ("0.5.0".equals(codeString))
10155          return FHIRVersion._0_5_0;
10156        if ("1.0.0".equals(codeString))
10157          return FHIRVersion._1_0_0;
10158        if ("1.0.1".equals(codeString))
10159          return FHIRVersion._1_0_1;
10160        if ("1.0.2".equals(codeString))
10161          return FHIRVersion._1_0_2;
10162        if ("1.1.0".equals(codeString))
10163          return FHIRVersion._1_1_0;
10164        if ("1.4.0".equals(codeString))
10165          return FHIRVersion._1_4_0;
10166        if ("1.6.0".equals(codeString))
10167          return FHIRVersion._1_6_0;
10168        if ("1.8.0".equals(codeString))
10169          return FHIRVersion._1_8_0;
10170        if ("3.0.0".equals(codeString))
10171          return FHIRVersion._3_0_0;
10172        if ("3.0.1".equals(codeString))
10173          return FHIRVersion._3_0_1;
10174        if ("3.3.0".equals(codeString))
10175          return FHIRVersion._3_3_0;
10176        if ("3.5.0".equals(codeString))
10177          return FHIRVersion._3_5_0;
10178        if ("4.0.0".equals(codeString))
10179          return FHIRVersion._4_0_0;
10180        throw new IllegalArgumentException("Unknown FHIRVersion code '"+codeString+"'");
10181        }
10182        public Enumeration<FHIRVersion> fromType(Base code) throws FHIRException {
10183          if (code == null)
10184            return null;
10185          if (code.isEmpty())
10186            return new Enumeration<FHIRVersion>(this);
10187          String codeString = ((PrimitiveType) code).asStringValue();
10188          if (codeString == null || "".equals(codeString))
10189            return null;
10190        if ("0.01".equals(codeString))
10191          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_01);
10192        if ("0.05".equals(codeString))
10193          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_05);
10194        if ("0.06".equals(codeString))
10195          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_06);
10196        if ("0.11".equals(codeString))
10197          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_11);
10198        if ("0.0.80".equals(codeString))
10199          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_80);
10200        if ("0.0.81".equals(codeString))
10201          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_81);
10202        if ("0.0.82".equals(codeString))
10203          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_0_82);
10204        if ("0.4.0".equals(codeString))
10205          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_4_0);
10206        if ("0.5.0".equals(codeString))
10207          return new Enumeration<FHIRVersion>(this, FHIRVersion._0_5_0);
10208        if ("1.0.0".equals(codeString))
10209          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_0);
10210        if ("1.0.1".equals(codeString))
10211          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_1);
10212        if ("1.0.2".equals(codeString))
10213          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_0_2);
10214        if ("1.1.0".equals(codeString))
10215          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_1_0);
10216        if ("1.4.0".equals(codeString))
10217          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_4_0);
10218        if ("1.6.0".equals(codeString))
10219          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_6_0);
10220        if ("1.8.0".equals(codeString))
10221          return new Enumeration<FHIRVersion>(this, FHIRVersion._1_8_0);
10222        if ("3.0.0".equals(codeString))
10223          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_0);
10224        if ("3.0.1".equals(codeString))
10225          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_0_1);
10226        if ("3.3.0".equals(codeString))
10227          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_3_0);
10228        if ("3.5.0".equals(codeString))
10229          return new Enumeration<FHIRVersion>(this, FHIRVersion._3_5_0);
10230        if ("4.0.0".equals(codeString))
10231          return new Enumeration<FHIRVersion>(this, FHIRVersion._4_0_0);
10232        throw new FHIRException("Unknown FHIRVersion code '"+codeString+"'");
10233        }
10234    public String toCode(FHIRVersion code) {
10235      if (code == FHIRVersion._0_01)
10236        return "0.01";
10237      if (code == FHIRVersion._0_05)
10238        return "0.05";
10239      if (code == FHIRVersion._0_06)
10240        return "0.06";
10241      if (code == FHIRVersion._0_11)
10242        return "0.11";
10243      if (code == FHIRVersion._0_0_80)
10244        return "0.0.80";
10245      if (code == FHIRVersion._0_0_81)
10246        return "0.0.81";
10247      if (code == FHIRVersion._0_0_82)
10248        return "0.0.82";
10249      if (code == FHIRVersion._0_4_0)
10250        return "0.4.0";
10251      if (code == FHIRVersion._0_5_0)
10252        return "0.5.0";
10253      if (code == FHIRVersion._1_0_0)
10254        return "1.0.0";
10255      if (code == FHIRVersion._1_0_1)
10256        return "1.0.1";
10257      if (code == FHIRVersion._1_0_2)
10258        return "1.0.2";
10259      if (code == FHIRVersion._1_1_0)
10260        return "1.1.0";
10261      if (code == FHIRVersion._1_4_0)
10262        return "1.4.0";
10263      if (code == FHIRVersion._1_6_0)
10264        return "1.6.0";
10265      if (code == FHIRVersion._1_8_0)
10266        return "1.8.0";
10267      if (code == FHIRVersion._3_0_0)
10268        return "3.0.0";
10269      if (code == FHIRVersion._3_0_1)
10270        return "3.0.1";
10271      if (code == FHIRVersion._3_3_0)
10272        return "3.3.0";
10273      if (code == FHIRVersion._3_5_0)
10274        return "3.5.0";
10275      if (code == FHIRVersion._4_0_0)
10276        return "4.0.0";
10277      return "?";
10278      }
10279    public String toSystem(FHIRVersion code) {
10280      return code.getSystem();
10281      }
10282    }
10283
10284    public enum KnowledgeResourceType {
10285        /**
10286         * The definition of a specific activity to be taken, independent of any particular patient or context.
10287         */
10288        ACTIVITYDEFINITION, 
10289        /**
10290         * A set of codes drawn from one or more code systems.
10291         */
10292        CODESYSTEM, 
10293        /**
10294         * A map from one set of concepts to one or more other concepts.
10295         */
10296        CONCEPTMAP, 
10297        /**
10298         * Represents a library of quality improvement components.
10299         */
10300        LIBRARY, 
10301        /**
10302         * A quality measure definition.
10303         */
10304        MEASURE, 
10305        /**
10306         * The definition of a plan for a series of actions, independent of any specific patient or context.
10307         */
10308        PLANDEFINITION, 
10309        /**
10310         * Structural Definition.
10311         */
10312        STRUCTUREDEFINITION, 
10313        /**
10314         * A Map of relationships between 2 structures that can be used to transform data.
10315         */
10316        STRUCTUREMAP, 
10317        /**
10318         * A set of codes drawn from one or more code systems.
10319         */
10320        VALUESET, 
10321        /**
10322         * added to help the parsers
10323         */
10324        NULL;
10325        public static KnowledgeResourceType fromCode(String codeString) throws FHIRException {
10326            if (codeString == null || "".equals(codeString))
10327                return null;
10328        if ("ActivityDefinition".equals(codeString))
10329          return ACTIVITYDEFINITION;
10330        if ("CodeSystem".equals(codeString))
10331          return CODESYSTEM;
10332        if ("ConceptMap".equals(codeString))
10333          return CONCEPTMAP;
10334        if ("Library".equals(codeString))
10335          return LIBRARY;
10336        if ("Measure".equals(codeString))
10337          return MEASURE;
10338        if ("PlanDefinition".equals(codeString))
10339          return PLANDEFINITION;
10340        if ("StructureDefinition".equals(codeString))
10341          return STRUCTUREDEFINITION;
10342        if ("StructureMap".equals(codeString))
10343          return STRUCTUREMAP;
10344        if ("ValueSet".equals(codeString))
10345          return VALUESET;
10346        throw new FHIRException("Unknown KnowledgeResourceType code '"+codeString+"'");
10347        }
10348        public String toCode() {
10349          switch (this) {
10350            case ACTIVITYDEFINITION: return "ActivityDefinition";
10351            case CODESYSTEM: return "CodeSystem";
10352            case CONCEPTMAP: return "ConceptMap";
10353            case LIBRARY: return "Library";
10354            case MEASURE: return "Measure";
10355            case PLANDEFINITION: return "PlanDefinition";
10356            case STRUCTUREDEFINITION: return "StructureDefinition";
10357            case STRUCTUREMAP: return "StructureMap";
10358            case VALUESET: return "ValueSet";
10359            default: return "?";
10360          }
10361        }
10362        public String getSystem() {
10363          switch (this) {
10364            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/knowledge-resource-types";
10365            case CODESYSTEM: return "http://hl7.org/fhir/knowledge-resource-types";
10366            case CONCEPTMAP: return "http://hl7.org/fhir/knowledge-resource-types";
10367            case LIBRARY: return "http://hl7.org/fhir/knowledge-resource-types";
10368            case MEASURE: return "http://hl7.org/fhir/knowledge-resource-types";
10369            case PLANDEFINITION: return "http://hl7.org/fhir/knowledge-resource-types";
10370            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/knowledge-resource-types";
10371            case STRUCTUREMAP: return "http://hl7.org/fhir/knowledge-resource-types";
10372            case VALUESET: return "http://hl7.org/fhir/knowledge-resource-types";
10373            default: return "?";
10374          }
10375        }
10376        public String getDefinition() {
10377          switch (this) {
10378            case ACTIVITYDEFINITION: return "The definition of a specific activity to be taken, independent of any particular patient or context.";
10379            case CODESYSTEM: return "A set of codes drawn from one or more code systems.";
10380            case CONCEPTMAP: return "A map from one set of concepts to one or more other concepts.";
10381            case LIBRARY: return "Represents a library of quality improvement components.";
10382            case MEASURE: return "A quality measure definition.";
10383            case PLANDEFINITION: return "The definition of a plan for a series of actions, independent of any specific patient or context.";
10384            case STRUCTUREDEFINITION: return "Structural Definition.";
10385            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
10386            case VALUESET: return "A set of codes drawn from one or more code systems.";
10387            default: return "?";
10388          }
10389        }
10390        public String getDisplay() {
10391          switch (this) {
10392            case ACTIVITYDEFINITION: return "ActivityDefinition";
10393            case CODESYSTEM: return "CodeSystem";
10394            case CONCEPTMAP: return "ConceptMap";
10395            case LIBRARY: return "Library";
10396            case MEASURE: return "Measure";
10397            case PLANDEFINITION: return "PlanDefinition";
10398            case STRUCTUREDEFINITION: return "StructureDefinition";
10399            case STRUCTUREMAP: return "StructureMap";
10400            case VALUESET: return "ValueSet";
10401            default: return "?";
10402          }
10403        }
10404    }
10405
10406  public static class KnowledgeResourceTypeEnumFactory implements EnumFactory<KnowledgeResourceType> {
10407    public KnowledgeResourceType fromCode(String codeString) throws IllegalArgumentException {
10408      if (codeString == null || "".equals(codeString))
10409            if (codeString == null || "".equals(codeString))
10410                return null;
10411        if ("ActivityDefinition".equals(codeString))
10412          return KnowledgeResourceType.ACTIVITYDEFINITION;
10413        if ("CodeSystem".equals(codeString))
10414          return KnowledgeResourceType.CODESYSTEM;
10415        if ("ConceptMap".equals(codeString))
10416          return KnowledgeResourceType.CONCEPTMAP;
10417        if ("Library".equals(codeString))
10418          return KnowledgeResourceType.LIBRARY;
10419        if ("Measure".equals(codeString))
10420          return KnowledgeResourceType.MEASURE;
10421        if ("PlanDefinition".equals(codeString))
10422          return KnowledgeResourceType.PLANDEFINITION;
10423        if ("StructureDefinition".equals(codeString))
10424          return KnowledgeResourceType.STRUCTUREDEFINITION;
10425        if ("StructureMap".equals(codeString))
10426          return KnowledgeResourceType.STRUCTUREMAP;
10427        if ("ValueSet".equals(codeString))
10428          return KnowledgeResourceType.VALUESET;
10429        throw new IllegalArgumentException("Unknown KnowledgeResourceType code '"+codeString+"'");
10430        }
10431        public Enumeration<KnowledgeResourceType> fromType(Base code) throws FHIRException {
10432          if (code == null)
10433            return null;
10434          if (code.isEmpty())
10435            return new Enumeration<KnowledgeResourceType>(this);
10436          String codeString = ((PrimitiveType) code).asStringValue();
10437          if (codeString == null || "".equals(codeString))
10438            return null;
10439        if ("ActivityDefinition".equals(codeString))
10440          return new Enumeration<KnowledgeResourceType>(this, KnowledgeResourceType.ACTIVITYDEFINITION);
10441        if ("CodeSystem".equals(codeString))
10442          return new Enumeration<KnowledgeResourceType>(this, KnowledgeResourceType.CODESYSTEM);
10443        if ("ConceptMap".equals(codeString))
10444          return new Enumeration<KnowledgeResourceType>(this, KnowledgeResourceType.CONCEPTMAP);
10445        if ("Library".equals(codeString))
10446          return new Enumeration<KnowledgeResourceType>(this, KnowledgeResourceType.LIBRARY);
10447        if ("Measure".equals(codeString))
10448          return new Enumeration<KnowledgeResourceType>(this, KnowledgeResourceType.MEASURE);
10449        if ("PlanDefinition".equals(codeString))
10450          return new Enumeration<KnowledgeResourceType>(this, KnowledgeResourceType.PLANDEFINITION);
10451        if ("StructureDefinition".equals(codeString))
10452          return new Enumeration<KnowledgeResourceType>(this, KnowledgeResourceType.STRUCTUREDEFINITION);
10453        if ("StructureMap".equals(codeString))
10454          return new Enumeration<KnowledgeResourceType>(this, KnowledgeResourceType.STRUCTUREMAP);
10455        if ("ValueSet".equals(codeString))
10456          return new Enumeration<KnowledgeResourceType>(this, KnowledgeResourceType.VALUESET);
10457        throw new FHIRException("Unknown KnowledgeResourceType code '"+codeString+"'");
10458        }
10459    public String toCode(KnowledgeResourceType code) {
10460      if (code == KnowledgeResourceType.ACTIVITYDEFINITION)
10461        return "ActivityDefinition";
10462      if (code == KnowledgeResourceType.CODESYSTEM)
10463        return "CodeSystem";
10464      if (code == KnowledgeResourceType.CONCEPTMAP)
10465        return "ConceptMap";
10466      if (code == KnowledgeResourceType.LIBRARY)
10467        return "Library";
10468      if (code == KnowledgeResourceType.MEASURE)
10469        return "Measure";
10470      if (code == KnowledgeResourceType.PLANDEFINITION)
10471        return "PlanDefinition";
10472      if (code == KnowledgeResourceType.STRUCTUREDEFINITION)
10473        return "StructureDefinition";
10474      if (code == KnowledgeResourceType.STRUCTUREMAP)
10475        return "StructureMap";
10476      if (code == KnowledgeResourceType.VALUESET)
10477        return "ValueSet";
10478      return "?";
10479      }
10480    public String toSystem(KnowledgeResourceType code) {
10481      return code.getSystem();
10482      }
10483    }
10484
10485    public enum MessageEvent {
10486        /**
10487         * added to help the parsers
10488         */
10489        NULL;
10490        public static MessageEvent fromCode(String codeString) throws FHIRException {
10491            if (codeString == null || "".equals(codeString))
10492                return null;
10493        throw new FHIRException("Unknown MessageEvent code '"+codeString+"'");
10494        }
10495        public String toCode() {
10496          switch (this) {
10497            default: return "?";
10498          }
10499        }
10500        public String getSystem() {
10501          switch (this) {
10502            default: return "?";
10503          }
10504        }
10505        public String getDefinition() {
10506          switch (this) {
10507            default: return "?";
10508          }
10509        }
10510        public String getDisplay() {
10511          switch (this) {
10512            default: return "?";
10513          }
10514        }
10515    }
10516
10517  public static class MessageEventEnumFactory implements EnumFactory<MessageEvent> {
10518    public MessageEvent fromCode(String codeString) throws IllegalArgumentException {
10519      if (codeString == null || "".equals(codeString))
10520            if (codeString == null || "".equals(codeString))
10521                return null;
10522        throw new IllegalArgumentException("Unknown MessageEvent code '"+codeString+"'");
10523        }
10524        public Enumeration<MessageEvent> fromType(Base code) throws FHIRException {
10525          if (code == null)
10526            return null;
10527          if (code.isEmpty())
10528            return new Enumeration<MessageEvent>(this);
10529          String codeString = ((PrimitiveType) code).asStringValue();
10530          if (codeString == null || "".equals(codeString))
10531            return null;
10532        throw new FHIRException("Unknown MessageEvent code '"+codeString+"'");
10533        }
10534    public String toCode(MessageEvent code) {
10535      return "?";
10536      }
10537    public String toSystem(MessageEvent code) {
10538      return code.getSystem();
10539      }
10540    }
10541
10542    public enum NoteType {
10543        /**
10544         * Display the note.
10545         */
10546        DISPLAY, 
10547        /**
10548         * Print the note on the form.
10549         */
10550        PRINT, 
10551        /**
10552         * Print the note for the operator.
10553         */
10554        PRINTOPER, 
10555        /**
10556         * added to help the parsers
10557         */
10558        NULL;
10559        public static NoteType fromCode(String codeString) throws FHIRException {
10560            if (codeString == null || "".equals(codeString))
10561                return null;
10562        if ("display".equals(codeString))
10563          return DISPLAY;
10564        if ("print".equals(codeString))
10565          return PRINT;
10566        if ("printoper".equals(codeString))
10567          return PRINTOPER;
10568        throw new FHIRException("Unknown NoteType code '"+codeString+"'");
10569        }
10570        public String toCode() {
10571          switch (this) {
10572            case DISPLAY: return "display";
10573            case PRINT: return "print";
10574            case PRINTOPER: return "printoper";
10575            default: return "?";
10576          }
10577        }
10578        public String getSystem() {
10579          switch (this) {
10580            case DISPLAY: return "http://hl7.org/fhir/note-type";
10581            case PRINT: return "http://hl7.org/fhir/note-type";
10582            case PRINTOPER: return "http://hl7.org/fhir/note-type";
10583            default: return "?";
10584          }
10585        }
10586        public String getDefinition() {
10587          switch (this) {
10588            case DISPLAY: return "Display the note.";
10589            case PRINT: return "Print the note on the form.";
10590            case PRINTOPER: return "Print the note for the operator.";
10591            default: return "?";
10592          }
10593        }
10594        public String getDisplay() {
10595          switch (this) {
10596            case DISPLAY: return "Display";
10597            case PRINT: return "Print (Form)";
10598            case PRINTOPER: return "Print (Operator)";
10599            default: return "?";
10600          }
10601        }
10602    }
10603
10604  public static class NoteTypeEnumFactory implements EnumFactory<NoteType> {
10605    public NoteType fromCode(String codeString) throws IllegalArgumentException {
10606      if (codeString == null || "".equals(codeString))
10607            if (codeString == null || "".equals(codeString))
10608                return null;
10609        if ("display".equals(codeString))
10610          return NoteType.DISPLAY;
10611        if ("print".equals(codeString))
10612          return NoteType.PRINT;
10613        if ("printoper".equals(codeString))
10614          return NoteType.PRINTOPER;
10615        throw new IllegalArgumentException("Unknown NoteType code '"+codeString+"'");
10616        }
10617        public Enumeration<NoteType> fromType(Base code) throws FHIRException {
10618          if (code == null)
10619            return null;
10620          if (code.isEmpty())
10621            return new Enumeration<NoteType>(this);
10622          String codeString = ((PrimitiveType) code).asStringValue();
10623          if (codeString == null || "".equals(codeString))
10624            return null;
10625        if ("display".equals(codeString))
10626          return new Enumeration<NoteType>(this, NoteType.DISPLAY);
10627        if ("print".equals(codeString))
10628          return new Enumeration<NoteType>(this, NoteType.PRINT);
10629        if ("printoper".equals(codeString))
10630          return new Enumeration<NoteType>(this, NoteType.PRINTOPER);
10631        throw new FHIRException("Unknown NoteType code '"+codeString+"'");
10632        }
10633    public String toCode(NoteType code) {
10634      if (code == NoteType.DISPLAY)
10635        return "display";
10636      if (code == NoteType.PRINT)
10637        return "print";
10638      if (code == NoteType.PRINTOPER)
10639        return "printoper";
10640      return "?";
10641      }
10642    public String toSystem(NoteType code) {
10643      return code.getSystem();
10644      }
10645    }
10646
10647    public enum PublicationStatus {
10648        /**
10649         * This resource is still under development and is not yet considered to be ready for normal use.
10650         */
10651        DRAFT, 
10652        /**
10653         * This resource is ready for normal use.
10654         */
10655        ACTIVE, 
10656        /**
10657         * This resource has been withdrawn or superseded and should no longer be used.
10658         */
10659        RETIRED, 
10660        /**
10661         * The authoring system does not know which of the status values currently applies for this resource.  Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one.
10662         */
10663        UNKNOWN, 
10664        /**
10665         * added to help the parsers
10666         */
10667        NULL;
10668        public static PublicationStatus fromCode(String codeString) throws FHIRException {
10669            if (codeString == null || "".equals(codeString))
10670                return null;
10671        if ("draft".equals(codeString))
10672          return DRAFT;
10673        if ("active".equals(codeString))
10674          return ACTIVE;
10675        if ("retired".equals(codeString))
10676          return RETIRED;
10677        if ("unknown".equals(codeString))
10678          return UNKNOWN;
10679        throw new FHIRException("Unknown PublicationStatus code '"+codeString+"'");
10680        }
10681        public String toCode() {
10682          switch (this) {
10683            case DRAFT: return "draft";
10684            case ACTIVE: return "active";
10685            case RETIRED: return "retired";
10686            case UNKNOWN: return "unknown";
10687            default: return "?";
10688          }
10689        }
10690        public String getSystem() {
10691          switch (this) {
10692            case DRAFT: return "http://hl7.org/fhir/publication-status";
10693            case ACTIVE: return "http://hl7.org/fhir/publication-status";
10694            case RETIRED: return "http://hl7.org/fhir/publication-status";
10695            case UNKNOWN: return "http://hl7.org/fhir/publication-status";
10696            default: return "?";
10697          }
10698        }
10699        public String getDefinition() {
10700          switch (this) {
10701            case DRAFT: return "This resource is still under development and is not yet considered to be ready for normal use.";
10702            case ACTIVE: return "This resource is ready for normal use.";
10703            case RETIRED: return "This resource has been withdrawn or superseded and should no longer be used.";
10704            case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this resource.  Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one.";
10705            default: return "?";
10706          }
10707        }
10708        public String getDisplay() {
10709          switch (this) {
10710            case DRAFT: return "Draft";
10711            case ACTIVE: return "Active";
10712            case RETIRED: return "Retired";
10713            case UNKNOWN: return "Unknown";
10714            default: return "?";
10715          }
10716        }
10717    }
10718
10719  public static class PublicationStatusEnumFactory implements EnumFactory<PublicationStatus> {
10720    public PublicationStatus fromCode(String codeString) throws IllegalArgumentException {
10721      if (codeString == null || "".equals(codeString))
10722            if (codeString == null || "".equals(codeString))
10723                return null;
10724        if ("draft".equals(codeString))
10725          return PublicationStatus.DRAFT;
10726        if ("active".equals(codeString))
10727          return PublicationStatus.ACTIVE;
10728        if ("retired".equals(codeString))
10729          return PublicationStatus.RETIRED;
10730        if ("unknown".equals(codeString))
10731          return PublicationStatus.UNKNOWN;
10732        throw new IllegalArgumentException("Unknown PublicationStatus code '"+codeString+"'");
10733        }
10734        public Enumeration<PublicationStatus> fromType(Base code) throws FHIRException {
10735          if (code == null)
10736            return null;
10737          if (code.isEmpty())
10738            return new Enumeration<PublicationStatus>(this);
10739          String codeString = ((PrimitiveType) code).asStringValue();
10740          if (codeString == null || "".equals(codeString))
10741            return null;
10742        if ("draft".equals(codeString))
10743          return new Enumeration<PublicationStatus>(this, PublicationStatus.DRAFT);
10744        if ("active".equals(codeString))
10745          return new Enumeration<PublicationStatus>(this, PublicationStatus.ACTIVE);
10746        if ("retired".equals(codeString))
10747          return new Enumeration<PublicationStatus>(this, PublicationStatus.RETIRED);
10748        if ("unknown".equals(codeString))
10749          return new Enumeration<PublicationStatus>(this, PublicationStatus.UNKNOWN);
10750        throw new FHIRException("Unknown PublicationStatus code '"+codeString+"'");
10751        }
10752    public String toCode(PublicationStatus code) {
10753      if (code == PublicationStatus.DRAFT)
10754        return "draft";
10755      if (code == PublicationStatus.ACTIVE)
10756        return "active";
10757      if (code == PublicationStatus.RETIRED)
10758        return "retired";
10759      if (code == PublicationStatus.UNKNOWN)
10760        return "unknown";
10761      return "?";
10762      }
10763    public String toSystem(PublicationStatus code) {
10764      return code.getSystem();
10765      }
10766    }
10767
10768    public enum RemittanceOutcome {
10769        /**
10770         * The Claim/Pre-authorization/Pre-determination has been received but processing has not begun.
10771         */
10772        QUEUED, 
10773        /**
10774         * The processing has completed without errors
10775         */
10776        COMPLETE, 
10777        /**
10778         * One or more errors have been detected in the Claim
10779         */
10780        ERROR, 
10781        /**
10782         * No errors have been detected in the Claim and some of the adjudication has been performed.
10783         */
10784        PARTIAL, 
10785        /**
10786         * added to help the parsers
10787         */
10788        NULL;
10789        public static RemittanceOutcome fromCode(String codeString) throws FHIRException {
10790            if (codeString == null || "".equals(codeString))
10791                return null;
10792        if ("queued".equals(codeString))
10793          return QUEUED;
10794        if ("complete".equals(codeString))
10795          return COMPLETE;
10796        if ("error".equals(codeString))
10797          return ERROR;
10798        if ("partial".equals(codeString))
10799          return PARTIAL;
10800        throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'");
10801        }
10802        public String toCode() {
10803          switch (this) {
10804            case QUEUED: return "queued";
10805            case COMPLETE: return "complete";
10806            case ERROR: return "error";
10807            case PARTIAL: return "partial";
10808            default: return "?";
10809          }
10810        }
10811        public String getSystem() {
10812          switch (this) {
10813            case QUEUED: return "http://hl7.org/fhir/remittance-outcome";
10814            case COMPLETE: return "http://hl7.org/fhir/remittance-outcome";
10815            case ERROR: return "http://hl7.org/fhir/remittance-outcome";
10816            case PARTIAL: return "http://hl7.org/fhir/remittance-outcome";
10817            default: return "?";
10818          }
10819        }
10820        public String getDefinition() {
10821          switch (this) {
10822            case QUEUED: return "The Claim/Pre-authorization/Pre-determination has been received but processing has not begun.";
10823            case COMPLETE: return "The processing has completed without errors";
10824            case ERROR: return "One or more errors have been detected in the Claim";
10825            case PARTIAL: return "No errors have been detected in the Claim and some of the adjudication has been performed.";
10826            default: return "?";
10827          }
10828        }
10829        public String getDisplay() {
10830          switch (this) {
10831            case QUEUED: return "Queued";
10832            case COMPLETE: return "Processing Complete";
10833            case ERROR: return "Error";
10834            case PARTIAL: return "Partial Processing";
10835            default: return "?";
10836          }
10837        }
10838    }
10839
10840  public static class RemittanceOutcomeEnumFactory implements EnumFactory<RemittanceOutcome> {
10841    public RemittanceOutcome fromCode(String codeString) throws IllegalArgumentException {
10842      if (codeString == null || "".equals(codeString))
10843            if (codeString == null || "".equals(codeString))
10844                return null;
10845        if ("queued".equals(codeString))
10846          return RemittanceOutcome.QUEUED;
10847        if ("complete".equals(codeString))
10848          return RemittanceOutcome.COMPLETE;
10849        if ("error".equals(codeString))
10850          return RemittanceOutcome.ERROR;
10851        if ("partial".equals(codeString))
10852          return RemittanceOutcome.PARTIAL;
10853        throw new IllegalArgumentException("Unknown RemittanceOutcome code '"+codeString+"'");
10854        }
10855        public Enumeration<RemittanceOutcome> fromType(Base code) throws FHIRException {
10856          if (code == null)
10857            return null;
10858          if (code.isEmpty())
10859            return new Enumeration<RemittanceOutcome>(this);
10860          String codeString = ((PrimitiveType) code).asStringValue();
10861          if (codeString == null || "".equals(codeString))
10862            return null;
10863        if ("queued".equals(codeString))
10864          return new Enumeration<RemittanceOutcome>(this, RemittanceOutcome.QUEUED);
10865        if ("complete".equals(codeString))
10866          return new Enumeration<RemittanceOutcome>(this, RemittanceOutcome.COMPLETE);
10867        if ("error".equals(codeString))
10868          return new Enumeration<RemittanceOutcome>(this, RemittanceOutcome.ERROR);
10869        if ("partial".equals(codeString))
10870          return new Enumeration<RemittanceOutcome>(this, RemittanceOutcome.PARTIAL);
10871        throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'");
10872        }
10873    public String toCode(RemittanceOutcome code) {
10874      if (code == RemittanceOutcome.QUEUED)
10875        return "queued";
10876      if (code == RemittanceOutcome.COMPLETE)
10877        return "complete";
10878      if (code == RemittanceOutcome.ERROR)
10879        return "error";
10880      if (code == RemittanceOutcome.PARTIAL)
10881        return "partial";
10882      return "?";
10883      }
10884    public String toSystem(RemittanceOutcome code) {
10885      return code.getSystem();
10886      }
10887    }
10888
10889    public enum RequestResourceType {
10890        /**
10891         * 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).
10892         */
10893        APPOINTMENT, 
10894        /**
10895         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
10896         */
10897        APPOINTMENTRESPONSE, 
10898        /**
10899         * Healthcare plan for patient or group.
10900         */
10901        CAREPLAN, 
10902        /**
10903         * Claim, Pre-determination or Pre-authorization.
10904         */
10905        CLAIM, 
10906        /**
10907         * A request for information to be sent to a receiver.
10908         */
10909        COMMUNICATIONREQUEST, 
10910        /**
10911         * Legal Agreement.
10912         */
10913        CONTRACT, 
10914        /**
10915         * Medical device request.
10916         */
10917        DEVICEREQUEST, 
10918        /**
10919         * Enrollment request.
10920         */
10921        ENROLLMENTREQUEST, 
10922        /**
10923         * Guidance or advice relating to an immunization.
10924         */
10925        IMMUNIZATIONRECOMMENDATION, 
10926        /**
10927         * Ordering of medication for patient or group.
10928         */
10929        MEDICATIONREQUEST, 
10930        /**
10931         * Diet, formula or nutritional supplement request.
10932         */
10933        NUTRITIONORDER, 
10934        /**
10935         * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.
10936         */
10937        SERVICEREQUEST, 
10938        /**
10939         * Request for a medication, substance or device.
10940         */
10941        SUPPLYREQUEST, 
10942        /**
10943         * A task to be performed.
10944         */
10945        TASK, 
10946        /**
10947         * Prescription for vision correction products for a patient.
10948         */
10949        VISIONPRESCRIPTION, 
10950        /**
10951         * added to help the parsers
10952         */
10953        NULL;
10954        public static RequestResourceType fromCode(String codeString) throws FHIRException {
10955            if (codeString == null || "".equals(codeString))
10956                return null;
10957        if ("Appointment".equals(codeString))
10958          return APPOINTMENT;
10959        if ("AppointmentResponse".equals(codeString))
10960          return APPOINTMENTRESPONSE;
10961        if ("CarePlan".equals(codeString))
10962          return CAREPLAN;
10963        if ("Claim".equals(codeString))
10964          return CLAIM;
10965        if ("CommunicationRequest".equals(codeString))
10966          return COMMUNICATIONREQUEST;
10967        if ("Contract".equals(codeString))
10968          return CONTRACT;
10969        if ("DeviceRequest".equals(codeString))
10970          return DEVICEREQUEST;
10971        if ("EnrollmentRequest".equals(codeString))
10972          return ENROLLMENTREQUEST;
10973        if ("ImmunizationRecommendation".equals(codeString))
10974          return IMMUNIZATIONRECOMMENDATION;
10975        if ("MedicationRequest".equals(codeString))
10976          return MEDICATIONREQUEST;
10977        if ("NutritionOrder".equals(codeString))
10978          return NUTRITIONORDER;
10979        if ("ServiceRequest".equals(codeString))
10980          return SERVICEREQUEST;
10981        if ("SupplyRequest".equals(codeString))
10982          return SUPPLYREQUEST;
10983        if ("Task".equals(codeString))
10984          return TASK;
10985        if ("VisionPrescription".equals(codeString))
10986          return VISIONPRESCRIPTION;
10987        throw new FHIRException("Unknown RequestResourceType code '"+codeString+"'");
10988        }
10989        public String toCode() {
10990          switch (this) {
10991            case APPOINTMENT: return "Appointment";
10992            case APPOINTMENTRESPONSE: return "AppointmentResponse";
10993            case CAREPLAN: return "CarePlan";
10994            case CLAIM: return "Claim";
10995            case COMMUNICATIONREQUEST: return "CommunicationRequest";
10996            case CONTRACT: return "Contract";
10997            case DEVICEREQUEST: return "DeviceRequest";
10998            case ENROLLMENTREQUEST: return "EnrollmentRequest";
10999            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
11000            case MEDICATIONREQUEST: return "MedicationRequest";
11001            case NUTRITIONORDER: return "NutritionOrder";
11002            case SERVICEREQUEST: return "ServiceRequest";
11003            case SUPPLYREQUEST: return "SupplyRequest";
11004            case TASK: return "Task";
11005            case VISIONPRESCRIPTION: return "VisionPrescription";
11006            default: return "?";
11007          }
11008        }
11009        public String getSystem() {
11010          switch (this) {
11011            case APPOINTMENT: return "http://hl7.org/fhir/request-resource-types";
11012            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/request-resource-types";
11013            case CAREPLAN: return "http://hl7.org/fhir/request-resource-types";
11014            case CLAIM: return "http://hl7.org/fhir/request-resource-types";
11015            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/request-resource-types";
11016            case CONTRACT: return "http://hl7.org/fhir/request-resource-types";
11017            case DEVICEREQUEST: return "http://hl7.org/fhir/request-resource-types";
11018            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/request-resource-types";
11019            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/request-resource-types";
11020            case MEDICATIONREQUEST: return "http://hl7.org/fhir/request-resource-types";
11021            case NUTRITIONORDER: return "http://hl7.org/fhir/request-resource-types";
11022            case SERVICEREQUEST: return "http://hl7.org/fhir/request-resource-types";
11023            case SUPPLYREQUEST: return "http://hl7.org/fhir/request-resource-types";
11024            case TASK: return "http://hl7.org/fhir/request-resource-types";
11025            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/request-resource-types";
11026            default: return "?";
11027          }
11028        }
11029        public String getDefinition() {
11030          switch (this) {
11031            case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).";
11032            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
11033            case CAREPLAN: return "Healthcare plan for patient or group.";
11034            case CLAIM: return "Claim, Pre-determination or Pre-authorization.";
11035            case COMMUNICATIONREQUEST: return "A request for information to be sent to a receiver.";
11036            case CONTRACT: return "Legal Agreement.";
11037            case DEVICEREQUEST: return "Medical device request.";
11038            case ENROLLMENTREQUEST: return "Enrollment request.";
11039            case IMMUNIZATIONRECOMMENDATION: return "Guidance or advice relating to an immunization.";
11040            case MEDICATIONREQUEST: return "Ordering of medication for patient or group.";
11041            case NUTRITIONORDER: return "Diet, formula or nutritional supplement request.";
11042            case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.";
11043            case SUPPLYREQUEST: return "Request for a medication, substance or device.";
11044            case TASK: return "A task to be performed.";
11045            case VISIONPRESCRIPTION: return "Prescription for vision correction products for a patient.";
11046            default: return "?";
11047          }
11048        }
11049        public String getDisplay() {
11050          switch (this) {
11051            case APPOINTMENT: return "Appointment";
11052            case APPOINTMENTRESPONSE: return "AppointmentResponse";
11053            case CAREPLAN: return "CarePlan";
11054            case CLAIM: return "Claim";
11055            case COMMUNICATIONREQUEST: return "CommunicationRequest";
11056            case CONTRACT: return "Contract";
11057            case DEVICEREQUEST: return "DeviceRequest";
11058            case ENROLLMENTREQUEST: return "EnrollmentRequest";
11059            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
11060            case MEDICATIONREQUEST: return "MedicationRequest";
11061            case NUTRITIONORDER: return "NutritionOrder";
11062            case SERVICEREQUEST: return "ServiceRequest";
11063            case SUPPLYREQUEST: return "SupplyRequest";
11064            case TASK: return "Task";
11065            case VISIONPRESCRIPTION: return "VisionPrescription";
11066            default: return "?";
11067          }
11068        }
11069    }
11070
11071  public static class RequestResourceTypeEnumFactory implements EnumFactory<RequestResourceType> {
11072    public RequestResourceType fromCode(String codeString) throws IllegalArgumentException {
11073      if (codeString == null || "".equals(codeString))
11074            if (codeString == null || "".equals(codeString))
11075                return null;
11076        if ("Appointment".equals(codeString))
11077          return RequestResourceType.APPOINTMENT;
11078        if ("AppointmentResponse".equals(codeString))
11079          return RequestResourceType.APPOINTMENTRESPONSE;
11080        if ("CarePlan".equals(codeString))
11081          return RequestResourceType.CAREPLAN;
11082        if ("Claim".equals(codeString))
11083          return RequestResourceType.CLAIM;
11084        if ("CommunicationRequest".equals(codeString))
11085          return RequestResourceType.COMMUNICATIONREQUEST;
11086        if ("Contract".equals(codeString))
11087          return RequestResourceType.CONTRACT;
11088        if ("DeviceRequest".equals(codeString))
11089          return RequestResourceType.DEVICEREQUEST;
11090        if ("EnrollmentRequest".equals(codeString))
11091          return RequestResourceType.ENROLLMENTREQUEST;
11092        if ("ImmunizationRecommendation".equals(codeString))
11093          return RequestResourceType.IMMUNIZATIONRECOMMENDATION;
11094        if ("MedicationRequest".equals(codeString))
11095          return RequestResourceType.MEDICATIONREQUEST;
11096        if ("NutritionOrder".equals(codeString))
11097          return RequestResourceType.NUTRITIONORDER;
11098        if ("ServiceRequest".equals(codeString))
11099          return RequestResourceType.SERVICEREQUEST;
11100        if ("SupplyRequest".equals(codeString))
11101          return RequestResourceType.SUPPLYREQUEST;
11102        if ("Task".equals(codeString))
11103          return RequestResourceType.TASK;
11104        if ("VisionPrescription".equals(codeString))
11105          return RequestResourceType.VISIONPRESCRIPTION;
11106        throw new IllegalArgumentException("Unknown RequestResourceType code '"+codeString+"'");
11107        }
11108        public Enumeration<RequestResourceType> fromType(Base code) throws FHIRException {
11109          if (code == null)
11110            return null;
11111          if (code.isEmpty())
11112            return new Enumeration<RequestResourceType>(this);
11113          String codeString = ((PrimitiveType) code).asStringValue();
11114          if (codeString == null || "".equals(codeString))
11115            return null;
11116        if ("Appointment".equals(codeString))
11117          return new Enumeration<RequestResourceType>(this, RequestResourceType.APPOINTMENT);
11118        if ("AppointmentResponse".equals(codeString))
11119          return new Enumeration<RequestResourceType>(this, RequestResourceType.APPOINTMENTRESPONSE);
11120        if ("CarePlan".equals(codeString))
11121          return new Enumeration<RequestResourceType>(this, RequestResourceType.CAREPLAN);
11122        if ("Claim".equals(codeString))
11123          return new Enumeration<RequestResourceType>(this, RequestResourceType.CLAIM);
11124        if ("CommunicationRequest".equals(codeString))
11125          return new Enumeration<RequestResourceType>(this, RequestResourceType.COMMUNICATIONREQUEST);
11126        if ("Contract".equals(codeString))
11127          return new Enumeration<RequestResourceType>(this, RequestResourceType.CONTRACT);
11128        if ("DeviceRequest".equals(codeString))
11129          return new Enumeration<RequestResourceType>(this, RequestResourceType.DEVICEREQUEST);
11130        if ("EnrollmentRequest".equals(codeString))
11131          return new Enumeration<RequestResourceType>(this, RequestResourceType.ENROLLMENTREQUEST);
11132        if ("ImmunizationRecommendation".equals(codeString))
11133          return new Enumeration<RequestResourceType>(this, RequestResourceType.IMMUNIZATIONRECOMMENDATION);
11134        if ("MedicationRequest".equals(codeString))
11135          return new Enumeration<RequestResourceType>(this, RequestResourceType.MEDICATIONREQUEST);
11136        if ("NutritionOrder".equals(codeString))
11137          return new Enumeration<RequestResourceType>(this, RequestResourceType.NUTRITIONORDER);
11138        if ("ServiceRequest".equals(codeString))
11139          return new Enumeration<RequestResourceType>(this, RequestResourceType.SERVICEREQUEST);
11140        if ("SupplyRequest".equals(codeString))
11141          return new Enumeration<RequestResourceType>(this, RequestResourceType.SUPPLYREQUEST);
11142        if ("Task".equals(codeString))
11143          return new Enumeration<RequestResourceType>(this, RequestResourceType.TASK);
11144        if ("VisionPrescription".equals(codeString))
11145          return new Enumeration<RequestResourceType>(this, RequestResourceType.VISIONPRESCRIPTION);
11146        throw new FHIRException("Unknown RequestResourceType code '"+codeString+"'");
11147        }
11148    public String toCode(RequestResourceType code) {
11149      if (code == RequestResourceType.APPOINTMENT)
11150        return "Appointment";
11151      if (code == RequestResourceType.APPOINTMENTRESPONSE)
11152        return "AppointmentResponse";
11153      if (code == RequestResourceType.CAREPLAN)
11154        return "CarePlan";
11155      if (code == RequestResourceType.CLAIM)
11156        return "Claim";
11157      if (code == RequestResourceType.COMMUNICATIONREQUEST)
11158        return "CommunicationRequest";
11159      if (code == RequestResourceType.CONTRACT)
11160        return "Contract";
11161      if (code == RequestResourceType.DEVICEREQUEST)
11162        return "DeviceRequest";
11163      if (code == RequestResourceType.ENROLLMENTREQUEST)
11164        return "EnrollmentRequest";
11165      if (code == RequestResourceType.IMMUNIZATIONRECOMMENDATION)
11166        return "ImmunizationRecommendation";
11167      if (code == RequestResourceType.MEDICATIONREQUEST)
11168        return "MedicationRequest";
11169      if (code == RequestResourceType.NUTRITIONORDER)
11170        return "NutritionOrder";
11171      if (code == RequestResourceType.SERVICEREQUEST)
11172        return "ServiceRequest";
11173      if (code == RequestResourceType.SUPPLYREQUEST)
11174        return "SupplyRequest";
11175      if (code == RequestResourceType.TASK)
11176        return "Task";
11177      if (code == RequestResourceType.VISIONPRESCRIPTION)
11178        return "VisionPrescription";
11179      return "?";
11180      }
11181    public String toSystem(RequestResourceType code) {
11182      return code.getSystem();
11183      }
11184    }
11185
11186    public enum ResourceType {
11187        /**
11188         * 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.
11189         */
11190        ACCOUNT, 
11191        /**
11192         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
11193         */
11194        ACTIVITYDEFINITION, 
11195        /**
11196         * Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.
11197         */
11198        ADVERSEEVENT, 
11199        /**
11200         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
11201         */
11202        ALLERGYINTOLERANCE, 
11203        /**
11204         * 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).
11205         */
11206        APPOINTMENT, 
11207        /**
11208         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
11209         */
11210        APPOINTMENTRESPONSE, 
11211        /**
11212         * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.
11213         */
11214        AUDITEVENT, 
11215        /**
11216         * 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.
11217         */
11218        BASIC, 
11219        /**
11220         * 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.
11221         */
11222        BINARY, 
11223        /**
11224         * A material substance originating from a biological entity intended to be transplanted or infused
11225into another (possibly the same) biological entity.
11226         */
11227        BIOLOGICALLYDERIVEDPRODUCT, 
11228        /**
11229         * 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.
11230         */
11231        BODYSTRUCTURE, 
11232        /**
11233         * A container for a collection of resources.
11234         */
11235        BUNDLE, 
11236        /**
11237         * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
11238         */
11239        CAPABILITYSTATEMENT, 
11240        /**
11241         * 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.
11242         */
11243        CAREPLAN, 
11244        /**
11245         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
11246         */
11247        CARETEAM, 
11248        /**
11249         * Catalog entries are wrappers that contextualize items included in a catalog.
11250         */
11251        CATALOGENTRY, 
11252        /**
11253         * 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.
11254         */
11255        CHARGEITEM, 
11256        /**
11257         * 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.
11258         */
11259        CHARGEITEMDEFINITION, 
11260        /**
11261         * 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.
11262         */
11263        CLAIM, 
11264        /**
11265         * This resource provides the adjudication details from the processing of a Claim resource.
11266         */
11267        CLAIMRESPONSE, 
11268        /**
11269         * 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.
11270         */
11271        CLINICALIMPRESSION, 
11272        /**
11273         * 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.
11274         */
11275        CODESYSTEM, 
11276        /**
11277         * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.
11278         */
11279        COMMUNICATION, 
11280        /**
11281         * 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.
11282         */
11283        COMMUNICATIONREQUEST, 
11284        /**
11285         * A compartment definition that defines how resources are accessed on a server.
11286         */
11287        COMPARTMENTDEFINITION, 
11288        /**
11289         * 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.).
11290         */
11291        COMPOSITION, 
11292        /**
11293         * 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.
11294         */
11295        CONCEPTMAP, 
11296        /**
11297         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
11298         */
11299        CONDITION, 
11300        /**
11301         * A record of a healthcare consumer’s  choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.
11302         */
11303        CONSENT, 
11304        /**
11305         * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.
11306         */
11307        CONTRACT, 
11308        /**
11309         * Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.
11310         */
11311        COVERAGE, 
11312        /**
11313         * 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.
11314         */
11315        COVERAGEELIGIBILITYREQUEST, 
11316        /**
11317         * This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.
11318         */
11319        COVERAGEELIGIBILITYRESPONSE, 
11320        /**
11321         * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.
11322         */
11323        DETECTEDISSUE, 
11324        /**
11325         * A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.
11326         */
11327        DEVICE, 
11328        /**
11329         * The characteristics, operational status and capabilities of a medical-related component of a medical device.
11330         */
11331        DEVICEDEFINITION, 
11332        /**
11333         * Describes a measurement, calculation or setting capability of a medical device.
11334         */
11335        DEVICEMETRIC, 
11336        /**
11337         * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.
11338         */
11339        DEVICEREQUEST, 
11340        /**
11341         * A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.
11342         */
11343        DEVICEUSESTATEMENT, 
11344        /**
11345         * The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.
11346         */
11347        DIAGNOSTICREPORT, 
11348        /**
11349         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
11350         */
11351        DOCUMENTMANIFEST, 
11352        /**
11353         * A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.
11354         */
11355        DOCUMENTREFERENCE, 
11356        /**
11357         * A resource that includes narrative, extensions, and contained resources.
11358         */
11359        DOMAINRESOURCE, 
11360        /**
11361         * The EffectEvidenceSynthesis resource describes the difference in an outcome between exposures states in a population where the effect estimate is derived from a combination of research studies.
11362         */
11363        EFFECTEVIDENCESYNTHESIS, 
11364        /**
11365         * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.
11366         */
11367        ENCOUNTER, 
11368        /**
11369         * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.
11370         */
11371        ENDPOINT, 
11372        /**
11373         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
11374         */
11375        ENROLLMENTREQUEST, 
11376        /**
11377         * This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.
11378         */
11379        ENROLLMENTRESPONSE, 
11380        /**
11381         * 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.
11382         */
11383        EPISODEOFCARE, 
11384        /**
11385         * The EventDefinition resource provides a reusable description of when a particular event can occur.
11386         */
11387        EVENTDEFINITION, 
11388        /**
11389         * The Evidence resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.
11390         */
11391        EVIDENCE, 
11392        /**
11393         * The EvidenceVariable resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.
11394         */
11395        EVIDENCEVARIABLE, 
11396        /**
11397         * Example of workflow instance.
11398         */
11399        EXAMPLESCENARIO, 
11400        /**
11401         * 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.
11402         */
11403        EXPLANATIONOFBENEFIT, 
11404        /**
11405         * Significant health conditions for a person related to the patient relevant in the context of care for the patient.
11406         */
11407        FAMILYMEMBERHISTORY, 
11408        /**
11409         * Prospective warnings of potential issues when providing care to the patient.
11410         */
11411        FLAG, 
11412        /**
11413         * 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.
11414         */
11415        GOAL, 
11416        /**
11417         * 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.
11418         */
11419        GRAPHDEFINITION, 
11420        /**
11421         * 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.
11422         */
11423        GROUP, 
11424        /**
11425         * 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.
11426         */
11427        GUIDANCERESPONSE, 
11428        /**
11429         * The details of a healthcare service available at a location.
11430         */
11431        HEALTHCARESERVICE, 
11432        /**
11433         * 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.
11434         */
11435        IMAGINGSTUDY, 
11436        /**
11437         * 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.
11438         */
11439        IMMUNIZATION, 
11440        /**
11441         * Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those  recommendations.
11442         */
11443        IMMUNIZATIONEVALUATION, 
11444        /**
11445         * A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.
11446         */
11447        IMMUNIZATIONRECOMMENDATION, 
11448        /**
11449         * 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.
11450         */
11451        IMPLEMENTATIONGUIDE, 
11452        /**
11453         * Details of a Health Insurance product/plan provided by an organization.
11454         */
11455        INSURANCEPLAN, 
11456        /**
11457         * Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.
11458         */
11459        INVOICE, 
11460        /**
11461         * 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.
11462         */
11463        LIBRARY, 
11464        /**
11465         * Identifies two or more records (resource instances) that refer to the same real-world "occurrence".
11466         */
11467        LINKAGE, 
11468        /**
11469         * A list is a curated collection of resources.
11470         */
11471        LIST, 
11472        /**
11473         * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.
11474         */
11475        LOCATION, 
11476        /**
11477         * The Measure resource provides the definition of a quality measure.
11478         */
11479        MEASURE, 
11480        /**
11481         * The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.
11482         */
11483        MEASUREREPORT, 
11484        /**
11485         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
11486         */
11487        MEDIA, 
11488        /**
11489         * This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.
11490         */
11491        MEDICATION, 
11492        /**
11493         * 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.
11494         */
11495        MEDICATIONADMINISTRATION, 
11496        /**
11497         * 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.
11498         */
11499        MEDICATIONDISPENSE, 
11500        /**
11501         * Information about a medication that is used to support knowledge.
11502         */
11503        MEDICATIONKNOWLEDGE, 
11504        /**
11505         * 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.
11506         */
11507        MEDICATIONREQUEST, 
11508        /**
11509         * 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. 
11510
11511The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.
11512         */
11513        MEDICATIONSTATEMENT, 
11514        /**
11515         * Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).
11516         */
11517        MEDICINALPRODUCT, 
11518        /**
11519         * The regulatory authorization of a medicinal product.
11520         */
11521        MEDICINALPRODUCTAUTHORIZATION, 
11522        /**
11523         * The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.
11524         */
11525        MEDICINALPRODUCTCONTRAINDICATION, 
11526        /**
11527         * Indication for the Medicinal Product.
11528         */
11529        MEDICINALPRODUCTINDICATION, 
11530        /**
11531         * An ingredient of a manufactured item or pharmaceutical product.
11532         */
11533        MEDICINALPRODUCTINGREDIENT, 
11534        /**
11535         * The interactions of the medicinal product with other medicinal products, or other forms of interactions.
11536         */
11537        MEDICINALPRODUCTINTERACTION, 
11538        /**
11539         * The manufactured item as contained in the packaged medicinal product.
11540         */
11541        MEDICINALPRODUCTMANUFACTURED, 
11542        /**
11543         * A medicinal product in a container or package.
11544         */
11545        MEDICINALPRODUCTPACKAGED, 
11546        /**
11547         * A pharmaceutical product described in terms of its composition and dose form.
11548         */
11549        MEDICINALPRODUCTPHARMACEUTICAL, 
11550        /**
11551         * Describe the undesirable effects of the medicinal product.
11552         */
11553        MEDICINALPRODUCTUNDESIRABLEEFFECT, 
11554        /**
11555         * 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.
11556         */
11557        MESSAGEDEFINITION, 
11558        /**
11559         * 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.
11560         */
11561        MESSAGEHEADER, 
11562        /**
11563         * Raw data describing a biological sequence.
11564         */
11565        MOLECULARSEQUENCE, 
11566        /**
11567         * 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.
11568         */
11569        NAMINGSYSTEM, 
11570        /**
11571         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
11572         */
11573        NUTRITIONORDER, 
11574        /**
11575         * Measurements and simple assertions made about a patient, device or other subject.
11576         */
11577        OBSERVATION, 
11578        /**
11579         * Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.
11580         */
11581        OBSERVATIONDEFINITION, 
11582        /**
11583         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
11584         */
11585        OPERATIONDEFINITION, 
11586        /**
11587         * A collection of error, warning, or information messages that result from a system action.
11588         */
11589        OPERATIONOUTCOME, 
11590        /**
11591         * 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.
11592         */
11593        ORGANIZATION, 
11594        /**
11595         * Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.
11596         */
11597        ORGANIZATIONAFFILIATION, 
11598        /**
11599         * This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it.
11600         */
11601        PARAMETERS, 
11602        /**
11603         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
11604         */
11605        PATIENT, 
11606        /**
11607         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
11608         */
11609        PAYMENTNOTICE, 
11610        /**
11611         * This resource provides the details including amount of a payment and allocates the payment items being paid.
11612         */
11613        PAYMENTRECONCILIATION, 
11614        /**
11615         * Demographics and administrative information about a person independent of a specific health-related context.
11616         */
11617        PERSON, 
11618        /**
11619         * 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 artifacts such as clinical decision support rules, order sets and protocols.
11620         */
11621        PLANDEFINITION, 
11622        /**
11623         * A person who is directly or indirectly involved in the provisioning of healthcare.
11624         */
11625        PRACTITIONER, 
11626        /**
11627         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
11628         */
11629        PRACTITIONERROLE, 
11630        /**
11631         * An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.
11632         */
11633        PROCEDURE, 
11634        /**
11635         * 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.
11636         */
11637        PROVENANCE, 
11638        /**
11639         * 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.
11640         */
11641        QUESTIONNAIRE, 
11642        /**
11643         * 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.
11644         */
11645        QUESTIONNAIRERESPONSE, 
11646        /**
11647         * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.
11648         */
11649        RELATEDPERSON, 
11650        /**
11651         * A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one".
11652         */
11653        REQUESTGROUP, 
11654        /**
11655         * The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.
11656         */
11657        RESEARCHDEFINITION, 
11658        /**
11659         * The ResearchElementDefinition resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about.
11660         */
11661        RESEARCHELEMENTDEFINITION, 
11662        /**
11663         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
11664         */
11665        RESEARCHSTUDY, 
11666        /**
11667         * A physical entity which is the primary unit of operational and/or administrative interest in a study.
11668         */
11669        RESEARCHSUBJECT, 
11670        /**
11671         * This is the base resource type for everything.
11672         */
11673        RESOURCE, 
11674        /**
11675         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
11676         */
11677        RISKASSESSMENT, 
11678        /**
11679         * The RiskEvidenceSynthesis resource describes the likelihood of an outcome in a population plus exposure state where the risk estimate is derived from a combination of research studies.
11680         */
11681        RISKEVIDENCESYNTHESIS, 
11682        /**
11683         * A container for slots of time that may be available for booking appointments.
11684         */
11685        SCHEDULE, 
11686        /**
11687         * A search parameter that defines a named search item that can be used to search/filter on a resource.
11688         */
11689        SEARCHPARAMETER, 
11690        /**
11691         * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.
11692         */
11693        SERVICEREQUEST, 
11694        /**
11695         * A slot of time on a schedule that may be available for booking appointments.
11696         */
11697        SLOT, 
11698        /**
11699         * A sample to be used for analysis.
11700         */
11701        SPECIMEN, 
11702        /**
11703         * A kind of specimen with associated set of requirements.
11704         */
11705        SPECIMENDEFINITION, 
11706        /**
11707         * 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.
11708         */
11709        STRUCTUREDEFINITION, 
11710        /**
11711         * A Map of relationships between 2 structures that can be used to transform data.
11712         */
11713        STRUCTUREMAP, 
11714        /**
11715         * The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system can take an appropriate action.
11716         */
11717        SUBSCRIPTION, 
11718        /**
11719         * A homogeneous material with a definite composition.
11720         */
11721        SUBSTANCE, 
11722        /**
11723         * 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.
11724         */
11725        SUBSTANCENUCLEICACID, 
11726        /**
11727         * Todo.
11728         */
11729        SUBSTANCEPOLYMER, 
11730        /**
11731         * 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.
11732         */
11733        SUBSTANCEPROTEIN, 
11734        /**
11735         * Todo.
11736         */
11737        SUBSTANCEREFERENCEINFORMATION, 
11738        /**
11739         * 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.
11740         */
11741        SUBSTANCESOURCEMATERIAL, 
11742        /**
11743         * The detailed description of a substance, typically at a level beyond what is used for prescribing.
11744         */
11745        SUBSTANCESPECIFICATION, 
11746        /**
11747         * Record of delivery of what is supplied.
11748         */
11749        SUPPLYDELIVERY, 
11750        /**
11751         * A record of a request for a medication, substance or device used in the healthcare setting.
11752         */
11753        SUPPLYREQUEST, 
11754        /**
11755         * A task to be performed.
11756         */
11757        TASK, 
11758        /**
11759         * 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.
11760         */
11761        TERMINOLOGYCAPABILITIES, 
11762        /**
11763         * A summary of information based on the results of executing a TestScript.
11764         */
11765        TESTREPORT, 
11766        /**
11767         * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
11768         */
11769        TESTSCRIPT, 
11770        /**
11771         * 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).
11772         */
11773        VALUESET, 
11774        /**
11775         * Describes validation requirements, source(s), status and dates for one or more elements.
11776         */
11777        VERIFICATIONRESULT, 
11778        /**
11779         * An authorization for the provision of glasses and/or contact lenses to a patient.
11780         */
11781        VISIONPRESCRIPTION, 
11782        /**
11783         * added to help the parsers
11784         */
11785        NULL;
11786        public static ResourceType fromCode(String codeString) throws FHIRException {
11787            if (codeString == null || "".equals(codeString))
11788                return null;
11789        if ("Account".equals(codeString))
11790          return ACCOUNT;
11791        if ("ActivityDefinition".equals(codeString))
11792          return ACTIVITYDEFINITION;
11793        if ("AdverseEvent".equals(codeString))
11794          return ADVERSEEVENT;
11795        if ("AllergyIntolerance".equals(codeString))
11796          return ALLERGYINTOLERANCE;
11797        if ("Appointment".equals(codeString))
11798          return APPOINTMENT;
11799        if ("AppointmentResponse".equals(codeString))
11800          return APPOINTMENTRESPONSE;
11801        if ("AuditEvent".equals(codeString))
11802          return AUDITEVENT;
11803        if ("Basic".equals(codeString))
11804          return BASIC;
11805        if ("Binary".equals(codeString))
11806          return BINARY;
11807        if ("BiologicallyDerivedProduct".equals(codeString))
11808          return BIOLOGICALLYDERIVEDPRODUCT;
11809        if ("BodyStructure".equals(codeString))
11810          return BODYSTRUCTURE;
11811        if ("Bundle".equals(codeString))
11812          return BUNDLE;
11813        if ("CapabilityStatement".equals(codeString))
11814          return CAPABILITYSTATEMENT;
11815        if ("CarePlan".equals(codeString))
11816          return CAREPLAN;
11817        if ("CareTeam".equals(codeString))
11818          return CARETEAM;
11819        if ("CatalogEntry".equals(codeString))
11820          return CATALOGENTRY;
11821        if ("ChargeItem".equals(codeString))
11822          return CHARGEITEM;
11823        if ("ChargeItemDefinition".equals(codeString))
11824          return CHARGEITEMDEFINITION;
11825        if ("Claim".equals(codeString))
11826          return CLAIM;
11827        if ("ClaimResponse".equals(codeString))
11828          return CLAIMRESPONSE;
11829        if ("ClinicalImpression".equals(codeString))
11830          return CLINICALIMPRESSION;
11831        if ("CodeSystem".equals(codeString))
11832          return CODESYSTEM;
11833        if ("Communication".equals(codeString))
11834          return COMMUNICATION;
11835        if ("CommunicationRequest".equals(codeString))
11836          return COMMUNICATIONREQUEST;
11837        if ("CompartmentDefinition".equals(codeString))
11838          return COMPARTMENTDEFINITION;
11839        if ("Composition".equals(codeString))
11840          return COMPOSITION;
11841        if ("ConceptMap".equals(codeString))
11842          return CONCEPTMAP;
11843        if ("Condition".equals(codeString))
11844          return CONDITION;
11845        if ("Consent".equals(codeString))
11846          return CONSENT;
11847        if ("Contract".equals(codeString))
11848          return CONTRACT;
11849        if ("Coverage".equals(codeString))
11850          return COVERAGE;
11851        if ("CoverageEligibilityRequest".equals(codeString))
11852          return COVERAGEELIGIBILITYREQUEST;
11853        if ("CoverageEligibilityResponse".equals(codeString))
11854          return COVERAGEELIGIBILITYRESPONSE;
11855        if ("DetectedIssue".equals(codeString))
11856          return DETECTEDISSUE;
11857        if ("Device".equals(codeString))
11858          return DEVICE;
11859        if ("DeviceDefinition".equals(codeString))
11860          return DEVICEDEFINITION;
11861        if ("DeviceMetric".equals(codeString))
11862          return DEVICEMETRIC;
11863        if ("DeviceRequest".equals(codeString))
11864          return DEVICEREQUEST;
11865        if ("DeviceUseStatement".equals(codeString))
11866          return DEVICEUSESTATEMENT;
11867        if ("DiagnosticReport".equals(codeString))
11868          return DIAGNOSTICREPORT;
11869        if ("DocumentManifest".equals(codeString))
11870          return DOCUMENTMANIFEST;
11871        if ("DocumentReference".equals(codeString))
11872          return DOCUMENTREFERENCE;
11873        if ("DomainResource".equals(codeString))
11874          return DOMAINRESOURCE;
11875        if ("EffectEvidenceSynthesis".equals(codeString))
11876          return EFFECTEVIDENCESYNTHESIS;
11877        if ("Encounter".equals(codeString))
11878          return ENCOUNTER;
11879        if ("Endpoint".equals(codeString))
11880          return ENDPOINT;
11881        if ("EnrollmentRequest".equals(codeString))
11882          return ENROLLMENTREQUEST;
11883        if ("EnrollmentResponse".equals(codeString))
11884          return ENROLLMENTRESPONSE;
11885        if ("EpisodeOfCare".equals(codeString))
11886          return EPISODEOFCARE;
11887        if ("EventDefinition".equals(codeString))
11888          return EVENTDEFINITION;
11889        if ("Evidence".equals(codeString))
11890          return EVIDENCE;
11891        if ("EvidenceVariable".equals(codeString))
11892          return EVIDENCEVARIABLE;
11893        if ("ExampleScenario".equals(codeString))
11894          return EXAMPLESCENARIO;
11895        if ("ExplanationOfBenefit".equals(codeString))
11896          return EXPLANATIONOFBENEFIT;
11897        if ("FamilyMemberHistory".equals(codeString))
11898          return FAMILYMEMBERHISTORY;
11899        if ("Flag".equals(codeString))
11900          return FLAG;
11901        if ("Goal".equals(codeString))
11902          return GOAL;
11903        if ("GraphDefinition".equals(codeString))
11904          return GRAPHDEFINITION;
11905        if ("Group".equals(codeString))
11906          return GROUP;
11907        if ("GuidanceResponse".equals(codeString))
11908          return GUIDANCERESPONSE;
11909        if ("HealthcareService".equals(codeString))
11910          return HEALTHCARESERVICE;
11911        if ("ImagingStudy".equals(codeString))
11912          return IMAGINGSTUDY;
11913        if ("Immunization".equals(codeString))
11914          return IMMUNIZATION;
11915        if ("ImmunizationEvaluation".equals(codeString))
11916          return IMMUNIZATIONEVALUATION;
11917        if ("ImmunizationRecommendation".equals(codeString))
11918          return IMMUNIZATIONRECOMMENDATION;
11919        if ("ImplementationGuide".equals(codeString))
11920          return IMPLEMENTATIONGUIDE;
11921        if ("InsurancePlan".equals(codeString))
11922          return INSURANCEPLAN;
11923        if ("Invoice".equals(codeString))
11924          return INVOICE;
11925        if ("Library".equals(codeString))
11926          return LIBRARY;
11927        if ("Linkage".equals(codeString))
11928          return LINKAGE;
11929        if ("List".equals(codeString))
11930          return LIST;
11931        if ("Location".equals(codeString))
11932          return LOCATION;
11933        if ("Measure".equals(codeString))
11934          return MEASURE;
11935        if ("MeasureReport".equals(codeString))
11936          return MEASUREREPORT;
11937        if ("Media".equals(codeString))
11938          return MEDIA;
11939        if ("Medication".equals(codeString))
11940          return MEDICATION;
11941        if ("MedicationAdministration".equals(codeString))
11942          return MEDICATIONADMINISTRATION;
11943        if ("MedicationDispense".equals(codeString))
11944          return MEDICATIONDISPENSE;
11945        if ("MedicationKnowledge".equals(codeString))
11946          return MEDICATIONKNOWLEDGE;
11947        if ("MedicationRequest".equals(codeString))
11948          return MEDICATIONREQUEST;
11949        if ("MedicationStatement".equals(codeString))
11950          return MEDICATIONSTATEMENT;
11951        if ("MedicinalProduct".equals(codeString))
11952          return MEDICINALPRODUCT;
11953        if ("MedicinalProductAuthorization".equals(codeString))
11954          return MEDICINALPRODUCTAUTHORIZATION;
11955        if ("MedicinalProductContraindication".equals(codeString))
11956          return MEDICINALPRODUCTCONTRAINDICATION;
11957        if ("MedicinalProductIndication".equals(codeString))
11958          return MEDICINALPRODUCTINDICATION;
11959        if ("MedicinalProductIngredient".equals(codeString))
11960          return MEDICINALPRODUCTINGREDIENT;
11961        if ("MedicinalProductInteraction".equals(codeString))
11962          return MEDICINALPRODUCTINTERACTION;
11963        if ("MedicinalProductManufactured".equals(codeString))
11964          return MEDICINALPRODUCTMANUFACTURED;
11965        if ("MedicinalProductPackaged".equals(codeString))
11966          return MEDICINALPRODUCTPACKAGED;
11967        if ("MedicinalProductPharmaceutical".equals(codeString))
11968          return MEDICINALPRODUCTPHARMACEUTICAL;
11969        if ("MedicinalProductUndesirableEffect".equals(codeString))
11970          return MEDICINALPRODUCTUNDESIRABLEEFFECT;
11971        if ("MessageDefinition".equals(codeString))
11972          return MESSAGEDEFINITION;
11973        if ("MessageHeader".equals(codeString))
11974          return MESSAGEHEADER;
11975        if ("MolecularSequence".equals(codeString))
11976          return MOLECULARSEQUENCE;
11977        if ("NamingSystem".equals(codeString))
11978          return NAMINGSYSTEM;
11979        if ("NutritionOrder".equals(codeString))
11980          return NUTRITIONORDER;
11981        if ("Observation".equals(codeString))
11982          return OBSERVATION;
11983        if ("ObservationDefinition".equals(codeString))
11984          return OBSERVATIONDEFINITION;
11985        if ("OperationDefinition".equals(codeString))
11986          return OPERATIONDEFINITION;
11987        if ("OperationOutcome".equals(codeString))
11988          return OPERATIONOUTCOME;
11989        if ("Organization".equals(codeString))
11990          return ORGANIZATION;
11991        if ("OrganizationAffiliation".equals(codeString))
11992          return ORGANIZATIONAFFILIATION;
11993        if ("Parameters".equals(codeString))
11994          return PARAMETERS;
11995        if ("Patient".equals(codeString))
11996          return PATIENT;
11997        if ("PaymentNotice".equals(codeString))
11998          return PAYMENTNOTICE;
11999        if ("PaymentReconciliation".equals(codeString))
12000          return PAYMENTRECONCILIATION;
12001        if ("Person".equals(codeString))
12002          return PERSON;
12003        if ("PlanDefinition".equals(codeString))
12004          return PLANDEFINITION;
12005        if ("Practitioner".equals(codeString))
12006          return PRACTITIONER;
12007        if ("PractitionerRole".equals(codeString))
12008          return PRACTITIONERROLE;
12009        if ("Procedure".equals(codeString))
12010          return PROCEDURE;
12011        if ("Provenance".equals(codeString))
12012          return PROVENANCE;
12013        if ("Questionnaire".equals(codeString))
12014          return QUESTIONNAIRE;
12015        if ("QuestionnaireResponse".equals(codeString))
12016          return QUESTIONNAIRERESPONSE;
12017        if ("RelatedPerson".equals(codeString))
12018          return RELATEDPERSON;
12019        if ("RequestGroup".equals(codeString))
12020          return REQUESTGROUP;
12021        if ("ResearchDefinition".equals(codeString))
12022          return RESEARCHDEFINITION;
12023        if ("ResearchElementDefinition".equals(codeString))
12024          return RESEARCHELEMENTDEFINITION;
12025        if ("ResearchStudy".equals(codeString))
12026          return RESEARCHSTUDY;
12027        if ("ResearchSubject".equals(codeString))
12028          return RESEARCHSUBJECT;
12029        if ("Resource".equals(codeString))
12030          return RESOURCE;
12031        if ("RiskAssessment".equals(codeString))
12032          return RISKASSESSMENT;
12033        if ("RiskEvidenceSynthesis".equals(codeString))
12034          return RISKEVIDENCESYNTHESIS;
12035        if ("Schedule".equals(codeString))
12036          return SCHEDULE;
12037        if ("SearchParameter".equals(codeString))
12038          return SEARCHPARAMETER;
12039        if ("ServiceRequest".equals(codeString))
12040          return SERVICEREQUEST;
12041        if ("Slot".equals(codeString))
12042          return SLOT;
12043        if ("Specimen".equals(codeString))
12044          return SPECIMEN;
12045        if ("SpecimenDefinition".equals(codeString))
12046          return SPECIMENDEFINITION;
12047        if ("StructureDefinition".equals(codeString))
12048          return STRUCTUREDEFINITION;
12049        if ("StructureMap".equals(codeString))
12050          return STRUCTUREMAP;
12051        if ("Subscription".equals(codeString))
12052          return SUBSCRIPTION;
12053        if ("Substance".equals(codeString))
12054          return SUBSTANCE;
12055        if ("SubstanceNucleicAcid".equals(codeString))
12056          return SUBSTANCENUCLEICACID;
12057        if ("SubstancePolymer".equals(codeString))
12058          return SUBSTANCEPOLYMER;
12059        if ("SubstanceProtein".equals(codeString))
12060          return SUBSTANCEPROTEIN;
12061        if ("SubstanceReferenceInformation".equals(codeString))
12062          return SUBSTANCEREFERENCEINFORMATION;
12063        if ("SubstanceSourceMaterial".equals(codeString))
12064          return SUBSTANCESOURCEMATERIAL;
12065        if ("SubstanceSpecification".equals(codeString))
12066          return SUBSTANCESPECIFICATION;
12067        if ("SupplyDelivery".equals(codeString))
12068          return SUPPLYDELIVERY;
12069        if ("SupplyRequest".equals(codeString))
12070          return SUPPLYREQUEST;
12071        if ("Task".equals(codeString))
12072          return TASK;
12073        if ("TerminologyCapabilities".equals(codeString))
12074          return TERMINOLOGYCAPABILITIES;
12075        if ("TestReport".equals(codeString))
12076          return TESTREPORT;
12077        if ("TestScript".equals(codeString))
12078          return TESTSCRIPT;
12079        if ("ValueSet".equals(codeString))
12080          return VALUESET;
12081        if ("VerificationResult".equals(codeString))
12082          return VERIFICATIONRESULT;
12083        if ("VisionPrescription".equals(codeString))
12084          return VISIONPRESCRIPTION;
12085        throw new FHIRException("Unknown ResourceType code '"+codeString+"'");
12086        }
12087        public String toCode() {
12088          switch (this) {
12089            case ACCOUNT: return "Account";
12090            case ACTIVITYDEFINITION: return "ActivityDefinition";
12091            case ADVERSEEVENT: return "AdverseEvent";
12092            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
12093            case APPOINTMENT: return "Appointment";
12094            case APPOINTMENTRESPONSE: return "AppointmentResponse";
12095            case AUDITEVENT: return "AuditEvent";
12096            case BASIC: return "Basic";
12097            case BINARY: return "Binary";
12098            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
12099            case BODYSTRUCTURE: return "BodyStructure";
12100            case BUNDLE: return "Bundle";
12101            case CAPABILITYSTATEMENT: return "CapabilityStatement";
12102            case CAREPLAN: return "CarePlan";
12103            case CARETEAM: return "CareTeam";
12104            case CATALOGENTRY: return "CatalogEntry";
12105            case CHARGEITEM: return "ChargeItem";
12106            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
12107            case CLAIM: return "Claim";
12108            case CLAIMRESPONSE: return "ClaimResponse";
12109            case CLINICALIMPRESSION: return "ClinicalImpression";
12110            case CODESYSTEM: return "CodeSystem";
12111            case COMMUNICATION: return "Communication";
12112            case COMMUNICATIONREQUEST: return "CommunicationRequest";
12113            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
12114            case COMPOSITION: return "Composition";
12115            case CONCEPTMAP: return "ConceptMap";
12116            case CONDITION: return "Condition";
12117            case CONSENT: return "Consent";
12118            case CONTRACT: return "Contract";
12119            case COVERAGE: return "Coverage";
12120            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
12121            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
12122            case DETECTEDISSUE: return "DetectedIssue";
12123            case DEVICE: return "Device";
12124            case DEVICEDEFINITION: return "DeviceDefinition";
12125            case DEVICEMETRIC: return "DeviceMetric";
12126            case DEVICEREQUEST: return "DeviceRequest";
12127            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
12128            case DIAGNOSTICREPORT: return "DiagnosticReport";
12129            case DOCUMENTMANIFEST: return "DocumentManifest";
12130            case DOCUMENTREFERENCE: return "DocumentReference";
12131            case DOMAINRESOURCE: return "DomainResource";
12132            case EFFECTEVIDENCESYNTHESIS: return "EffectEvidenceSynthesis";
12133            case ENCOUNTER: return "Encounter";
12134            case ENDPOINT: return "Endpoint";
12135            case ENROLLMENTREQUEST: return "EnrollmentRequest";
12136            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
12137            case EPISODEOFCARE: return "EpisodeOfCare";
12138            case EVENTDEFINITION: return "EventDefinition";
12139            case EVIDENCE: return "Evidence";
12140            case EVIDENCEVARIABLE: return "EvidenceVariable";
12141            case EXAMPLESCENARIO: return "ExampleScenario";
12142            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
12143            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
12144            case FLAG: return "Flag";
12145            case GOAL: return "Goal";
12146            case GRAPHDEFINITION: return "GraphDefinition";
12147            case GROUP: return "Group";
12148            case GUIDANCERESPONSE: return "GuidanceResponse";
12149            case HEALTHCARESERVICE: return "HealthcareService";
12150            case IMAGINGSTUDY: return "ImagingStudy";
12151            case IMMUNIZATION: return "Immunization";
12152            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
12153            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
12154            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
12155            case INSURANCEPLAN: return "InsurancePlan";
12156            case INVOICE: return "Invoice";
12157            case LIBRARY: return "Library";
12158            case LINKAGE: return "Linkage";
12159            case LIST: return "List";
12160            case LOCATION: return "Location";
12161            case MEASURE: return "Measure";
12162            case MEASUREREPORT: return "MeasureReport";
12163            case MEDIA: return "Media";
12164            case MEDICATION: return "Medication";
12165            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
12166            case MEDICATIONDISPENSE: return "MedicationDispense";
12167            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
12168            case MEDICATIONREQUEST: return "MedicationRequest";
12169            case MEDICATIONSTATEMENT: return "MedicationStatement";
12170            case MEDICINALPRODUCT: return "MedicinalProduct";
12171            case MEDICINALPRODUCTAUTHORIZATION: return "MedicinalProductAuthorization";
12172            case MEDICINALPRODUCTCONTRAINDICATION: return "MedicinalProductContraindication";
12173            case MEDICINALPRODUCTINDICATION: return "MedicinalProductIndication";
12174            case MEDICINALPRODUCTINGREDIENT: return "MedicinalProductIngredient";
12175            case MEDICINALPRODUCTINTERACTION: return "MedicinalProductInteraction";
12176            case MEDICINALPRODUCTMANUFACTURED: return "MedicinalProductManufactured";
12177            case MEDICINALPRODUCTPACKAGED: return "MedicinalProductPackaged";
12178            case MEDICINALPRODUCTPHARMACEUTICAL: return "MedicinalProductPharmaceutical";
12179            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "MedicinalProductUndesirableEffect";
12180            case MESSAGEDEFINITION: return "MessageDefinition";
12181            case MESSAGEHEADER: return "MessageHeader";
12182            case MOLECULARSEQUENCE: return "MolecularSequence";
12183            case NAMINGSYSTEM: return "NamingSystem";
12184            case NUTRITIONORDER: return "NutritionOrder";
12185            case OBSERVATION: return "Observation";
12186            case OBSERVATIONDEFINITION: return "ObservationDefinition";
12187            case OPERATIONDEFINITION: return "OperationDefinition";
12188            case OPERATIONOUTCOME: return "OperationOutcome";
12189            case ORGANIZATION: return "Organization";
12190            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
12191            case PARAMETERS: return "Parameters";
12192            case PATIENT: return "Patient";
12193            case PAYMENTNOTICE: return "PaymentNotice";
12194            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
12195            case PERSON: return "Person";
12196            case PLANDEFINITION: return "PlanDefinition";
12197            case PRACTITIONER: return "Practitioner";
12198            case PRACTITIONERROLE: return "PractitionerRole";
12199            case PROCEDURE: return "Procedure";
12200            case PROVENANCE: return "Provenance";
12201            case QUESTIONNAIRE: return "Questionnaire";
12202            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
12203            case RELATEDPERSON: return "RelatedPerson";
12204            case REQUESTGROUP: return "RequestGroup";
12205            case RESEARCHDEFINITION: return "ResearchDefinition";
12206            case RESEARCHELEMENTDEFINITION: return "ResearchElementDefinition";
12207            case RESEARCHSTUDY: return "ResearchStudy";
12208            case RESEARCHSUBJECT: return "ResearchSubject";
12209            case RESOURCE: return "Resource";
12210            case RISKASSESSMENT: return "RiskAssessment";
12211            case RISKEVIDENCESYNTHESIS: return "RiskEvidenceSynthesis";
12212            case SCHEDULE: return "Schedule";
12213            case SEARCHPARAMETER: return "SearchParameter";
12214            case SERVICEREQUEST: return "ServiceRequest";
12215            case SLOT: return "Slot";
12216            case SPECIMEN: return "Specimen";
12217            case SPECIMENDEFINITION: return "SpecimenDefinition";
12218            case STRUCTUREDEFINITION: return "StructureDefinition";
12219            case STRUCTUREMAP: return "StructureMap";
12220            case SUBSCRIPTION: return "Subscription";
12221            case SUBSTANCE: return "Substance";
12222            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
12223            case SUBSTANCEPOLYMER: return "SubstancePolymer";
12224            case SUBSTANCEPROTEIN: return "SubstanceProtein";
12225            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
12226            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
12227            case SUBSTANCESPECIFICATION: return "SubstanceSpecification";
12228            case SUPPLYDELIVERY: return "SupplyDelivery";
12229            case SUPPLYREQUEST: return "SupplyRequest";
12230            case TASK: return "Task";
12231            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
12232            case TESTREPORT: return "TestReport";
12233            case TESTSCRIPT: return "TestScript";
12234            case VALUESET: return "ValueSet";
12235            case VERIFICATIONRESULT: return "VerificationResult";
12236            case VISIONPRESCRIPTION: return "VisionPrescription";
12237            default: return "?";
12238          }
12239        }
12240        public String getSystem() {
12241          switch (this) {
12242            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
12243            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
12244            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
12245            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
12246            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
12247            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
12248            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
12249            case BASIC: return "http://hl7.org/fhir/resource-types";
12250            case BINARY: return "http://hl7.org/fhir/resource-types";
12251            case BIOLOGICALLYDERIVEDPRODUCT: return "http://hl7.org/fhir/resource-types";
12252            case BODYSTRUCTURE: return "http://hl7.org/fhir/resource-types";
12253            case BUNDLE: return "http://hl7.org/fhir/resource-types";
12254            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
12255            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
12256            case CARETEAM: return "http://hl7.org/fhir/resource-types";
12257            case CATALOGENTRY: return "http://hl7.org/fhir/resource-types";
12258            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
12259            case CHARGEITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
12260            case CLAIM: return "http://hl7.org/fhir/resource-types";
12261            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
12262            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
12263            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
12264            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
12265            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
12266            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
12267            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
12268            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
12269            case CONDITION: return "http://hl7.org/fhir/resource-types";
12270            case CONSENT: return "http://hl7.org/fhir/resource-types";
12271            case CONTRACT: return "http://hl7.org/fhir/resource-types";
12272            case COVERAGE: return "http://hl7.org/fhir/resource-types";
12273            case COVERAGEELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
12274            case COVERAGEELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
12275            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
12276            case DEVICE: return "http://hl7.org/fhir/resource-types";
12277            case DEVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
12278            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
12279            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
12280            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types";
12281            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
12282            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
12283            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
12284            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
12285            case EFFECTEVIDENCESYNTHESIS: return "http://hl7.org/fhir/resource-types";
12286            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
12287            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
12288            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
12289            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
12290            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
12291            case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types";
12292            case EVIDENCE: return "http://hl7.org/fhir/resource-types";
12293            case EVIDENCEVARIABLE: return "http://hl7.org/fhir/resource-types";
12294            case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types";
12295            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
12296            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
12297            case FLAG: return "http://hl7.org/fhir/resource-types";
12298            case GOAL: return "http://hl7.org/fhir/resource-types";
12299            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
12300            case GROUP: return "http://hl7.org/fhir/resource-types";
12301            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
12302            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
12303            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
12304            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
12305            case IMMUNIZATIONEVALUATION: return "http://hl7.org/fhir/resource-types";
12306            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
12307            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
12308            case INSURANCEPLAN: return "http://hl7.org/fhir/resource-types";
12309            case INVOICE: return "http://hl7.org/fhir/resource-types";
12310            case LIBRARY: return "http://hl7.org/fhir/resource-types";
12311            case LINKAGE: return "http://hl7.org/fhir/resource-types";
12312            case LIST: return "http://hl7.org/fhir/resource-types";
12313            case LOCATION: return "http://hl7.org/fhir/resource-types";
12314            case MEASURE: return "http://hl7.org/fhir/resource-types";
12315            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
12316            case MEDIA: return "http://hl7.org/fhir/resource-types";
12317            case MEDICATION: return "http://hl7.org/fhir/resource-types";
12318            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
12319            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
12320            case MEDICATIONKNOWLEDGE: return "http://hl7.org/fhir/resource-types";
12321            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
12322            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types";
12323            case MEDICINALPRODUCT: return "http://hl7.org/fhir/resource-types";
12324            case MEDICINALPRODUCTAUTHORIZATION: return "http://hl7.org/fhir/resource-types";
12325            case MEDICINALPRODUCTCONTRAINDICATION: return "http://hl7.org/fhir/resource-types";
12326            case MEDICINALPRODUCTINDICATION: return "http://hl7.org/fhir/resource-types";
12327            case MEDICINALPRODUCTINGREDIENT: return "http://hl7.org/fhir/resource-types";
12328            case MEDICINALPRODUCTINTERACTION: return "http://hl7.org/fhir/resource-types";
12329            case MEDICINALPRODUCTMANUFACTURED: return "http://hl7.org/fhir/resource-types";
12330            case MEDICINALPRODUCTPACKAGED: return "http://hl7.org/fhir/resource-types";
12331            case MEDICINALPRODUCTPHARMACEUTICAL: return "http://hl7.org/fhir/resource-types";
12332            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "http://hl7.org/fhir/resource-types";
12333            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
12334            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
12335            case MOLECULARSEQUENCE: return "http://hl7.org/fhir/resource-types";
12336            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
12337            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
12338            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
12339            case OBSERVATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
12340            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
12341            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
12342            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
12343            case ORGANIZATIONAFFILIATION: return "http://hl7.org/fhir/resource-types";
12344            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
12345            case PATIENT: return "http://hl7.org/fhir/resource-types";
12346            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
12347            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
12348            case PERSON: return "http://hl7.org/fhir/resource-types";
12349            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
12350            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
12351            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
12352            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
12353            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
12354            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
12355            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
12356            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
12357            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
12358            case RESEARCHDEFINITION: return "http://hl7.org/fhir/resource-types";
12359            case RESEARCHELEMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
12360            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
12361            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
12362            case RESOURCE: return "http://hl7.org/fhir/resource-types";
12363            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
12364            case RISKEVIDENCESYNTHESIS: return "http://hl7.org/fhir/resource-types";
12365            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
12366            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
12367            case SERVICEREQUEST: return "http://hl7.org/fhir/resource-types";
12368            case SLOT: return "http://hl7.org/fhir/resource-types";
12369            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
12370            case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types";
12371            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
12372            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
12373            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
12374            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
12375            case SUBSTANCENUCLEICACID: return "http://hl7.org/fhir/resource-types";
12376            case SUBSTANCEPOLYMER: return "http://hl7.org/fhir/resource-types";
12377            case SUBSTANCEPROTEIN: return "http://hl7.org/fhir/resource-types";
12378            case SUBSTANCEREFERENCEINFORMATION: return "http://hl7.org/fhir/resource-types";
12379            case SUBSTANCESOURCEMATERIAL: return "http://hl7.org/fhir/resource-types";
12380            case SUBSTANCESPECIFICATION: return "http://hl7.org/fhir/resource-types";
12381            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
12382            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
12383            case TASK: return "http://hl7.org/fhir/resource-types";
12384            case TERMINOLOGYCAPABILITIES: return "http://hl7.org/fhir/resource-types";
12385            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
12386            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
12387            case VALUESET: return "http://hl7.org/fhir/resource-types";
12388            case VERIFICATIONRESULT: return "http://hl7.org/fhir/resource-types";
12389            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
12390            default: return "?";
12391          }
12392        }
12393        public String getDefinition() {
12394          switch (this) {
12395            case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.";
12396            case ACTIVITYDEFINITION: return "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.";
12397            case ADVERSEEVENT: return "Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.";
12398            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
12399            case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).";
12400            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
12401            case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.";
12402            case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.";
12403            case BINARY: return "A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
12404            case BIOLOGICALLYDERIVEDPRODUCT: return "A material substance originating from a biological entity intended to be transplanted or infused\ninto another (possibly the same) biological entity.";
12405            case BODYSTRUCTURE: return "Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.";
12406            case BUNDLE: return "A container for a collection of resources.";
12407            case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
12408            case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.";
12409            case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.";
12410            case CATALOGENTRY: return "Catalog entries are wrappers that contextualize items included in a catalog.";
12411            case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.";
12412            case CHARGEITEMDEFINITION: return "The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.";
12413            case CLAIM: return "A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement.";
12414            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
12415            case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score.";
12416            case CODESYSTEM: return "The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.";
12417            case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition.";
12418            case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.";
12419            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
12420            case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).";
12421            case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.";
12422            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
12423            case CONSENT: return "A record of a healthcare consumer’s  choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.";
12424            case CONTRACT: return "Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.";
12425            case COVERAGE: return "Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment.";
12426            case COVERAGEELIGIBILITYREQUEST: return "The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.";
12427            case COVERAGEELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.";
12428            case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.";
12429            case DEVICE: return "A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.";
12430            case DEVICEDEFINITION: return "The characteristics, operational status and capabilities of a medical-related component of a medical device.";
12431            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
12432            case DEVICEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.";
12433            case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.";
12434            case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.";
12435            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
12436            case DOCUMENTREFERENCE: return "A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.";
12437            case DOMAINRESOURCE: return "A resource that includes narrative, extensions, and contained resources.";
12438            case EFFECTEVIDENCESYNTHESIS: return "The EffectEvidenceSynthesis resource describes the difference in an outcome between exposures states in a population where the effect estimate is derived from a combination of research studies.";
12439            case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.";
12440            case ENDPOINT: return "The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.";
12441            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
12442            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource.";
12443            case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.";
12444            case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur.";
12445            case EVIDENCE: return "The Evidence resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.";
12446            case EVIDENCEVARIABLE: return "The EvidenceVariable resource describes a \"PICO\" element that knowledge (evidence, assertion, recommendation) is about.";
12447            case EXAMPLESCENARIO: return "Example of workflow instance.";
12448            case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.";
12449            case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient.";
12450            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
12451            case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.";
12452            case GRAPHDEFINITION: return "A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.";
12453            case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.";
12454            case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.";
12455            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
12456            case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.";
12457            case IMMUNIZATION: return "Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.";
12458            case IMMUNIZATIONEVALUATION: return "Describes a comparison of an immunization event against published recommendations to determine if the administration is \"valid\" in relation to those  recommendations.";
12459            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.";
12460            case IMPLEMENTATIONGUIDE: return "A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.";
12461            case INSURANCEPLAN: return "Details of a Health Insurance product/plan provided by an organization.";
12462            case INVOICE: return "Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.";
12463            case LIBRARY: return "The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.";
12464            case LINKAGE: return "Identifies two or more records (resource instances) that refer to the same real-world \"occurrence\".";
12465            case LIST: return "A list is a curated collection of resources.";
12466            case LOCATION: return "Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.";
12467            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
12468            case MEASUREREPORT: return "The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.";
12469            case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.";
12470            case MEDICATION: return "This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.";
12471            case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.";
12472            case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.";
12473            case MEDICATIONKNOWLEDGE: return "Information about a medication that is used to support knowledge.";
12474            case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.";
12475            case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. \n\nThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.";
12476            case MEDICINALPRODUCT: return "Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).";
12477            case MEDICINALPRODUCTAUTHORIZATION: return "The regulatory authorization of a medicinal product.";
12478            case MEDICINALPRODUCTCONTRAINDICATION: return "The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.";
12479            case MEDICINALPRODUCTINDICATION: return "Indication for the Medicinal Product.";
12480            case MEDICINALPRODUCTINGREDIENT: return "An ingredient of a manufactured item or pharmaceutical product.";
12481            case MEDICINALPRODUCTINTERACTION: return "The interactions of the medicinal product with other medicinal products, or other forms of interactions.";
12482            case MEDICINALPRODUCTMANUFACTURED: return "The manufactured item as contained in the packaged medicinal product.";
12483            case MEDICINALPRODUCTPACKAGED: return "A medicinal product in a container or package.";
12484            case MEDICINALPRODUCTPHARMACEUTICAL: return "A pharmaceutical product described in terms of its composition and dose form.";
12485            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "Describe the undesirable effects of the medicinal product.";
12486            case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.";
12487            case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.";
12488            case MOLECULARSEQUENCE: return "Raw data describing a biological sequence.";
12489            case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a \"System\" used within the Identifier and Coding data types.";
12490            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
12491            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
12492            case OBSERVATIONDEFINITION: return "Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.";
12493            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
12494            case OPERATIONOUTCOME: return "A collection of error, warning, or information messages that result from a system action.";
12495            case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc.";
12496            case ORGANIZATIONAFFILIATION: return "Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.";
12497            case PARAMETERS: return "This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it.";
12498            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
12499            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
12500            case PAYMENTRECONCILIATION: return "This resource provides the details including amount of a payment and allocates the payment items being paid.";
12501            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
12502            case PLANDEFINITION: return "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.";
12503            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
12504            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
12505            case PROCEDURE: return "An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.";
12506            case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.";
12507            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.";
12508            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.";
12509            case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.";
12510            case REQUESTGROUP: return "A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\".";
12511            case RESEARCHDEFINITION: return "The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about.";
12512            case RESEARCHELEMENTDEFINITION: return "The ResearchElementDefinition resource describes a \"PICO\" element that knowledge (evidence, assertion, recommendation) is about.";
12513            case RESEARCHSTUDY: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
12514            case RESEARCHSUBJECT: return "A physical entity which is the primary unit of operational and/or administrative interest in a study.";
12515            case RESOURCE: return "This is the base resource type for everything.";
12516            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
12517            case RISKEVIDENCESYNTHESIS: return "The RiskEvidenceSynthesis resource describes the likelihood of an outcome in a population plus exposure state where the risk estimate is derived from a combination of research studies.";
12518            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
12519            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
12520            case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.";
12521            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
12522            case SPECIMEN: return "A sample to be used for analysis.";
12523            case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements.";
12524            case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.";
12525            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
12526            case SUBSCRIPTION: return "The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system can take an appropriate action.";
12527            case SUBSTANCE: return "A homogeneous material with a definite composition.";
12528            case SUBSTANCENUCLEICACID: return "Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction.";
12529            case SUBSTANCEPOLYMER: return "Todo.";
12530            case SUBSTANCEPROTEIN: return "A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators.";
12531            case SUBSTANCEREFERENCEINFORMATION: return "Todo.";
12532            case SUBSTANCESOURCEMATERIAL: return "Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex.";
12533            case SUBSTANCESPECIFICATION: return "The detailed description of a substance, typically at a level beyond what is used for prescribing.";
12534            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
12535            case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting.";
12536            case TASK: return "A task to be performed.";
12537            case TERMINOLOGYCAPABILITIES: return "A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
12538            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
12539            case TESTSCRIPT: return "A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.";
12540            case VALUESET: return "A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).";
12541            case VERIFICATIONRESULT: return "Describes validation requirements, source(s), status and dates for one or more elements.";
12542            case VISIONPRESCRIPTION: return "An authorization for the provision of glasses and/or contact lenses to a patient.";
12543            default: return "?";
12544          }
12545        }
12546        public String getDisplay() {
12547          switch (this) {
12548            case ACCOUNT: return "Account";
12549            case ACTIVITYDEFINITION: return "ActivityDefinition";
12550            case ADVERSEEVENT: return "AdverseEvent";
12551            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
12552            case APPOINTMENT: return "Appointment";
12553            case APPOINTMENTRESPONSE: return "AppointmentResponse";
12554            case AUDITEVENT: return "AuditEvent";
12555            case BASIC: return "Basic";
12556            case BINARY: return "Binary";
12557            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
12558            case BODYSTRUCTURE: return "BodyStructure";
12559            case BUNDLE: return "Bundle";
12560            case CAPABILITYSTATEMENT: return "CapabilityStatement";
12561            case CAREPLAN: return "CarePlan";
12562            case CARETEAM: return "CareTeam";
12563            case CATALOGENTRY: return "CatalogEntry";
12564            case CHARGEITEM: return "ChargeItem";
12565            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
12566            case CLAIM: return "Claim";
12567            case CLAIMRESPONSE: return "ClaimResponse";
12568            case CLINICALIMPRESSION: return "ClinicalImpression";
12569            case CODESYSTEM: return "CodeSystem";
12570            case COMMUNICATION: return "Communication";
12571            case COMMUNICATIONREQUEST: return "CommunicationRequest";
12572            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
12573            case COMPOSITION: return "Composition";
12574            case CONCEPTMAP: return "ConceptMap";
12575            case CONDITION: return "Condition";
12576            case CONSENT: return "Consent";
12577            case CONTRACT: return "Contract";
12578            case COVERAGE: return "Coverage";
12579            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
12580            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
12581            case DETECTEDISSUE: return "DetectedIssue";
12582            case DEVICE: return "Device";
12583            case DEVICEDEFINITION: return "DeviceDefinition";
12584            case DEVICEMETRIC: return "DeviceMetric";
12585            case DEVICEREQUEST: return "DeviceRequest";
12586            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
12587            case DIAGNOSTICREPORT: return "DiagnosticReport";
12588            case DOCUMENTMANIFEST: return "DocumentManifest";
12589            case DOCUMENTREFERENCE: return "DocumentReference";
12590            case DOMAINRESOURCE: return "DomainResource";
12591            case EFFECTEVIDENCESYNTHESIS: return "EffectEvidenceSynthesis";
12592            case ENCOUNTER: return "Encounter";
12593            case ENDPOINT: return "Endpoint";
12594            case ENROLLMENTREQUEST: return "EnrollmentRequest";
12595            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
12596            case EPISODEOFCARE: return "EpisodeOfCare";
12597            case EVENTDEFINITION: return "EventDefinition";
12598            case EVIDENCE: return "Evidence";
12599            case EVIDENCEVARIABLE: return "EvidenceVariable";
12600            case EXAMPLESCENARIO: return "ExampleScenario";
12601            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
12602            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
12603            case FLAG: return "Flag";
12604            case GOAL: return "Goal";
12605            case GRAPHDEFINITION: return "GraphDefinition";
12606            case GROUP: return "Group";
12607            case GUIDANCERESPONSE: return "GuidanceResponse";
12608            case HEALTHCARESERVICE: return "HealthcareService";
12609            case IMAGINGSTUDY: return "ImagingStudy";
12610            case IMMUNIZATION: return "Immunization";
12611            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
12612            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
12613            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
12614            case INSURANCEPLAN: return "InsurancePlan";
12615            case INVOICE: return "Invoice";
12616            case LIBRARY: return "Library";
12617            case LINKAGE: return "Linkage";
12618            case LIST: return "List";
12619            case LOCATION: return "Location";
12620            case MEASURE: return "Measure";
12621            case MEASUREREPORT: return "MeasureReport";
12622            case MEDIA: return "Media";
12623            case MEDICATION: return "Medication";
12624            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
12625            case MEDICATIONDISPENSE: return "MedicationDispense";
12626            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
12627            case MEDICATIONREQUEST: return "MedicationRequest";
12628            case MEDICATIONSTATEMENT: return "MedicationStatement";
12629            case MEDICINALPRODUCT: return "MedicinalProduct";
12630            case MEDICINALPRODUCTAUTHORIZATION: return "MedicinalProductAuthorization";
12631            case MEDICINALPRODUCTCONTRAINDICATION: return "MedicinalProductContraindication";
12632            case MEDICINALPRODUCTINDICATION: return "MedicinalProductIndication";
12633            case MEDICINALPRODUCTINGREDIENT: return "MedicinalProductIngredient";
12634            case MEDICINALPRODUCTINTERACTION: return "MedicinalProductInteraction";
12635            case MEDICINALPRODUCTMANUFACTURED: return "MedicinalProductManufactured";
12636            case MEDICINALPRODUCTPACKAGED: return "MedicinalProductPackaged";
12637            case MEDICINALPRODUCTPHARMACEUTICAL: return "MedicinalProductPharmaceutical";
12638            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "MedicinalProductUndesirableEffect";
12639            case MESSAGEDEFINITION: return "MessageDefinition";
12640            case MESSAGEHEADER: return "MessageHeader";
12641            case MOLECULARSEQUENCE: return "MolecularSequence";
12642            case NAMINGSYSTEM: return "NamingSystem";
12643            case NUTRITIONORDER: return "NutritionOrder";
12644            case OBSERVATION: return "Observation";
12645            case OBSERVATIONDEFINITION: return "ObservationDefinition";
12646            case OPERATIONDEFINITION: return "OperationDefinition";
12647            case OPERATIONOUTCOME: return "OperationOutcome";
12648            case ORGANIZATION: return "Organization";
12649            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
12650            case PARAMETERS: return "Parameters";
12651            case PATIENT: return "Patient";
12652            case PAYMENTNOTICE: return "PaymentNotice";
12653            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
12654            case PERSON: return "Person";
12655            case PLANDEFINITION: return "PlanDefinition";
12656            case PRACTITIONER: return "Practitioner";
12657            case PRACTITIONERROLE: return "PractitionerRole";
12658            case PROCEDURE: return "Procedure";
12659            case PROVENANCE: return "Provenance";
12660            case QUESTIONNAIRE: return "Questionnaire";
12661            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
12662            case RELATEDPERSON: return "RelatedPerson";
12663            case REQUESTGROUP: return "RequestGroup";
12664            case RESEARCHDEFINITION: return "ResearchDefinition";
12665            case RESEARCHELEMENTDEFINITION: return "ResearchElementDefinition";
12666            case RESEARCHSTUDY: return "ResearchStudy";
12667            case RESEARCHSUBJECT: return "ResearchSubject";
12668            case RESOURCE: return "Resource";
12669            case RISKASSESSMENT: return "RiskAssessment";
12670            case RISKEVIDENCESYNTHESIS: return "RiskEvidenceSynthesis";
12671            case SCHEDULE: return "Schedule";
12672            case SEARCHPARAMETER: return "SearchParameter";
12673            case SERVICEREQUEST: return "ServiceRequest";
12674            case SLOT: return "Slot";
12675            case SPECIMEN: return "Specimen";
12676            case SPECIMENDEFINITION: return "SpecimenDefinition";
12677            case STRUCTUREDEFINITION: return "StructureDefinition";
12678            case STRUCTUREMAP: return "StructureMap";
12679            case SUBSCRIPTION: return "Subscription";
12680            case SUBSTANCE: return "Substance";
12681            case SUBSTANCENUCLEICACID: return "SubstanceNucleicAcid";
12682            case SUBSTANCEPOLYMER: return "SubstancePolymer";
12683            case SUBSTANCEPROTEIN: return "SubstanceProtein";
12684            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
12685            case SUBSTANCESOURCEMATERIAL: return "SubstanceSourceMaterial";
12686            case SUBSTANCESPECIFICATION: return "SubstanceSpecification";
12687            case SUPPLYDELIVERY: return "SupplyDelivery";
12688            case SUPPLYREQUEST: return "SupplyRequest";
12689            case TASK: return "Task";
12690            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
12691            case TESTREPORT: return "TestReport";
12692            case TESTSCRIPT: return "TestScript";
12693            case VALUESET: return "ValueSet";
12694            case VERIFICATIONRESULT: return "VerificationResult";
12695            case VISIONPRESCRIPTION: return "VisionPrescription";
12696            default: return "?";
12697          }
12698        }
12699    }
12700
12701  public static class ResourceTypeEnumFactory implements EnumFactory<ResourceType> {
12702    public ResourceType fromCode(String codeString) throws IllegalArgumentException {
12703      if (codeString == null || "".equals(codeString))
12704            if (codeString == null || "".equals(codeString))
12705                return null;
12706        if ("Account".equals(codeString))
12707          return ResourceType.ACCOUNT;
12708        if ("ActivityDefinition".equals(codeString))
12709          return ResourceType.ACTIVITYDEFINITION;
12710        if ("AdverseEvent".equals(codeString))
12711          return ResourceType.ADVERSEEVENT;
12712        if ("AllergyIntolerance".equals(codeString))
12713          return ResourceType.ALLERGYINTOLERANCE;
12714        if ("Appointment".equals(codeString))
12715          return ResourceType.APPOINTMENT;
12716        if ("AppointmentResponse".equals(codeString))
12717          return ResourceType.APPOINTMENTRESPONSE;
12718        if ("AuditEvent".equals(codeString))
12719          return ResourceType.AUDITEVENT;
12720        if ("Basic".equals(codeString))
12721          return ResourceType.BASIC;
12722        if ("Binary".equals(codeString))
12723          return ResourceType.BINARY;
12724        if ("BiologicallyDerivedProduct".equals(codeString))
12725          return ResourceType.BIOLOGICALLYDERIVEDPRODUCT;
12726        if ("BodyStructure".equals(codeString))
12727          return ResourceType.BODYSTRUCTURE;
12728        if ("Bundle".equals(codeString))
12729          return ResourceType.BUNDLE;
12730        if ("CapabilityStatement".equals(codeString))
12731          return ResourceType.CAPABILITYSTATEMENT;
12732        if ("CarePlan".equals(codeString))
12733          return ResourceType.CAREPLAN;
12734        if ("CareTeam".equals(codeString))
12735          return ResourceType.CARETEAM;
12736        if ("CatalogEntry".equals(codeString))
12737          return ResourceType.CATALOGENTRY;
12738        if ("ChargeItem".equals(codeString))
12739          return ResourceType.CHARGEITEM;
12740        if ("ChargeItemDefinition".equals(codeString))
12741          return ResourceType.CHARGEITEMDEFINITION;
12742        if ("Claim".equals(codeString))
12743          return ResourceType.CLAIM;
12744        if ("ClaimResponse".equals(codeString))
12745          return ResourceType.CLAIMRESPONSE;
12746        if ("ClinicalImpression".equals(codeString))
12747          return ResourceType.CLINICALIMPRESSION;
12748        if ("CodeSystem".equals(codeString))
12749          return ResourceType.CODESYSTEM;
12750        if ("Communication".equals(codeString))
12751          return ResourceType.COMMUNICATION;
12752        if ("CommunicationRequest".equals(codeString))
12753          return ResourceType.COMMUNICATIONREQUEST;
12754        if ("CompartmentDefinition".equals(codeString))
12755          return ResourceType.COMPARTMENTDEFINITION;
12756        if ("Composition".equals(codeString))
12757          return ResourceType.COMPOSITION;
12758        if ("ConceptMap".equals(codeString))
12759          return ResourceType.CONCEPTMAP;
12760        if ("Condition".equals(codeString))
12761          return ResourceType.CONDITION;
12762        if ("Consent".equals(codeString))
12763          return ResourceType.CONSENT;
12764        if ("Contract".equals(codeString))
12765          return ResourceType.CONTRACT;
12766        if ("Coverage".equals(codeString))
12767          return ResourceType.COVERAGE;
12768        if ("CoverageEligibilityRequest".equals(codeString))
12769          return ResourceType.COVERAGEELIGIBILITYREQUEST;
12770        if ("CoverageEligibilityResponse".equals(codeString))
12771          return ResourceType.COVERAGEELIGIBILITYRESPONSE;
12772        if ("DetectedIssue".equals(codeString))
12773          return ResourceType.DETECTEDISSUE;
12774        if ("Device".equals(codeString))
12775          return ResourceType.DEVICE;
12776        if ("DeviceDefinition".equals(codeString))
12777          return ResourceType.DEVICEDEFINITION;
12778        if ("DeviceMetric".equals(codeString))
12779          return ResourceType.DEVICEMETRIC;
12780        if ("DeviceRequest".equals(codeString))
12781          return ResourceType.DEVICEREQUEST;
12782        if ("DeviceUseStatement".equals(codeString))
12783          return ResourceType.DEVICEUSESTATEMENT;
12784        if ("DiagnosticReport".equals(codeString))
12785          return ResourceType.DIAGNOSTICREPORT;
12786        if ("DocumentManifest".equals(codeString))
12787          return ResourceType.DOCUMENTMANIFEST;
12788        if ("DocumentReference".equals(codeString))
12789          return ResourceType.DOCUMENTREFERENCE;
12790        if ("DomainResource".equals(codeString))
12791          return ResourceType.DOMAINRESOURCE;
12792        if ("EffectEvidenceSynthesis".equals(codeString))
12793          return ResourceType.EFFECTEVIDENCESYNTHESIS;
12794        if ("Encounter".equals(codeString))
12795          return ResourceType.ENCOUNTER;
12796        if ("Endpoint".equals(codeString))
12797          return ResourceType.ENDPOINT;
12798        if ("EnrollmentRequest".equals(codeString))
12799          return ResourceType.ENROLLMENTREQUEST;
12800        if ("EnrollmentResponse".equals(codeString))
12801          return ResourceType.ENROLLMENTRESPONSE;
12802        if ("EpisodeOfCare".equals(codeString))
12803          return ResourceType.EPISODEOFCARE;
12804        if ("EventDefinition".equals(codeString))
12805          return ResourceType.EVENTDEFINITION;
12806        if ("Evidence".equals(codeString))
12807          return ResourceType.EVIDENCE;
12808        if ("EvidenceVariable".equals(codeString))
12809          return ResourceType.EVIDENCEVARIABLE;
12810        if ("ExampleScenario".equals(codeString))
12811          return ResourceType.EXAMPLESCENARIO;
12812        if ("ExplanationOfBenefit".equals(codeString))
12813          return ResourceType.EXPLANATIONOFBENEFIT;
12814        if ("FamilyMemberHistory".equals(codeString))
12815          return ResourceType.FAMILYMEMBERHISTORY;
12816        if ("Flag".equals(codeString))
12817          return ResourceType.FLAG;
12818        if ("Goal".equals(codeString))
12819          return ResourceType.GOAL;
12820        if ("GraphDefinition".equals(codeString))
12821          return ResourceType.GRAPHDEFINITION;
12822        if ("Group".equals(codeString))
12823          return ResourceType.GROUP;
12824        if ("GuidanceResponse".equals(codeString))
12825          return ResourceType.GUIDANCERESPONSE;
12826        if ("HealthcareService".equals(codeString))
12827          return ResourceType.HEALTHCARESERVICE;
12828        if ("ImagingStudy".equals(codeString))
12829          return ResourceType.IMAGINGSTUDY;
12830        if ("Immunization".equals(codeString))
12831          return ResourceType.IMMUNIZATION;
12832        if ("ImmunizationEvaluation".equals(codeString))
12833          return ResourceType.IMMUNIZATIONEVALUATION;
12834        if ("ImmunizationRecommendation".equals(codeString))
12835          return ResourceType.IMMUNIZATIONRECOMMENDATION;
12836        if ("ImplementationGuide".equals(codeString))
12837          return ResourceType.IMPLEMENTATIONGUIDE;
12838        if ("InsurancePlan".equals(codeString))
12839          return ResourceType.INSURANCEPLAN;
12840        if ("Invoice".equals(codeString))
12841          return ResourceType.INVOICE;
12842        if ("Library".equals(codeString))
12843          return ResourceType.LIBRARY;
12844        if ("Linkage".equals(codeString))
12845          return ResourceType.LINKAGE;
12846        if ("List".equals(codeString))
12847          return ResourceType.LIST;
12848        if ("Location".equals(codeString))
12849          return ResourceType.LOCATION;
12850        if ("Measure".equals(codeString))
12851          return ResourceType.MEASURE;
12852        if ("MeasureReport".equals(codeString))
12853          return ResourceType.MEASUREREPORT;
12854        if ("Media".equals(codeString))
12855          return ResourceType.MEDIA;
12856        if ("Medication".equals(codeString))
12857          return ResourceType.MEDICATION;
12858        if ("MedicationAdministration".equals(codeString))
12859          return ResourceType.MEDICATIONADMINISTRATION;
12860        if ("MedicationDispense".equals(codeString))
12861          return ResourceType.MEDICATIONDISPENSE;
12862        if ("MedicationKnowledge".equals(codeString))
12863          return ResourceType.MEDICATIONKNOWLEDGE;
12864        if ("MedicationRequest".equals(codeString))
12865          return ResourceType.MEDICATIONREQUEST;
12866        if ("MedicationStatement".equals(codeString))
12867          return ResourceType.MEDICATIONSTATEMENT;
12868        if ("MedicinalProduct".equals(codeString))
12869          return ResourceType.MEDICINALPRODUCT;
12870        if ("MedicinalProductAuthorization".equals(codeString))
12871          return ResourceType.MEDICINALPRODUCTAUTHORIZATION;
12872        if ("MedicinalProductContraindication".equals(codeString))
12873          return ResourceType.MEDICINALPRODUCTCONTRAINDICATION;
12874        if ("MedicinalProductIndication".equals(codeString))
12875          return ResourceType.MEDICINALPRODUCTINDICATION;
12876        if ("MedicinalProductIngredient".equals(codeString))
12877          return ResourceType.MEDICINALPRODUCTINGREDIENT;
12878        if ("MedicinalProductInteraction".equals(codeString))
12879          return ResourceType.MEDICINALPRODUCTINTERACTION;
12880        if ("MedicinalProductManufactured".equals(codeString))
12881          return ResourceType.MEDICINALPRODUCTMANUFACTURED;
12882        if ("MedicinalProductPackaged".equals(codeString))
12883          return ResourceType.MEDICINALPRODUCTPACKAGED;
12884        if ("MedicinalProductPharmaceutical".equals(codeString))
12885          return ResourceType.MEDICINALPRODUCTPHARMACEUTICAL;
12886        if ("MedicinalProductUndesirableEffect".equals(codeString))
12887          return ResourceType.MEDICINALPRODUCTUNDESIRABLEEFFECT;
12888        if ("MessageDefinition".equals(codeString))
12889          return ResourceType.MESSAGEDEFINITION;
12890        if ("MessageHeader".equals(codeString))
12891          return ResourceType.MESSAGEHEADER;
12892        if ("MolecularSequence".equals(codeString))
12893          return ResourceType.MOLECULARSEQUENCE;
12894        if ("NamingSystem".equals(codeString))
12895          return ResourceType.NAMINGSYSTEM;
12896        if ("NutritionOrder".equals(codeString))
12897          return ResourceType.NUTRITIONORDER;
12898        if ("Observation".equals(codeString))
12899          return ResourceType.OBSERVATION;
12900        if ("ObservationDefinition".equals(codeString))
12901          return ResourceType.OBSERVATIONDEFINITION;
12902        if ("OperationDefinition".equals(codeString))
12903          return ResourceType.OPERATIONDEFINITION;
12904        if ("OperationOutcome".equals(codeString))
12905          return ResourceType.OPERATIONOUTCOME;
12906        if ("Organization".equals(codeString))
12907          return ResourceType.ORGANIZATION;
12908        if ("OrganizationAffiliation".equals(codeString))
12909          return ResourceType.ORGANIZATIONAFFILIATION;
12910        if ("Parameters".equals(codeString))
12911          return ResourceType.PARAMETERS;
12912        if ("Patient".equals(codeString))
12913          return ResourceType.PATIENT;
12914        if ("PaymentNotice".equals(codeString))
12915          return ResourceType.PAYMENTNOTICE;
12916        if ("PaymentReconciliation".equals(codeString))
12917          return ResourceType.PAYMENTRECONCILIATION;
12918        if ("Person".equals(codeString))
12919          return ResourceType.PERSON;
12920        if ("PlanDefinition".equals(codeString))
12921          return ResourceType.PLANDEFINITION;
12922        if ("Practitioner".equals(codeString))
12923          return ResourceType.PRACTITIONER;
12924        if ("PractitionerRole".equals(codeString))
12925          return ResourceType.PRACTITIONERROLE;
12926        if ("Procedure".equals(codeString))
12927          return ResourceType.PROCEDURE;
12928        if ("Provenance".equals(codeString))
12929          return ResourceType.PROVENANCE;
12930        if ("Questionnaire".equals(codeString))
12931          return ResourceType.QUESTIONNAIRE;
12932        if ("QuestionnaireResponse".equals(codeString))
12933          return ResourceType.QUESTIONNAIRERESPONSE;
12934        if ("RelatedPerson".equals(codeString))
12935          return ResourceType.RELATEDPERSON;
12936        if ("RequestGroup".equals(codeString))
12937          return ResourceType.REQUESTGROUP;
12938        if ("ResearchDefinition".equals(codeString))
12939          return ResourceType.RESEARCHDEFINITION;
12940        if ("ResearchElementDefinition".equals(codeString))
12941          return ResourceType.RESEARCHELEMENTDEFINITION;
12942        if ("ResearchStudy".equals(codeString))
12943          return ResourceType.RESEARCHSTUDY;
12944        if ("ResearchSubject".equals(codeString))
12945          return ResourceType.RESEARCHSUBJECT;
12946        if ("Resource".equals(codeString))
12947          return ResourceType.RESOURCE;
12948        if ("RiskAssessment".equals(codeString))
12949          return ResourceType.RISKASSESSMENT;
12950        if ("RiskEvidenceSynthesis".equals(codeString))
12951          return ResourceType.RISKEVIDENCESYNTHESIS;
12952        if ("Schedule".equals(codeString))
12953          return ResourceType.SCHEDULE;
12954        if ("SearchParameter".equals(codeString))
12955          return ResourceType.SEARCHPARAMETER;
12956        if ("ServiceRequest".equals(codeString))
12957          return ResourceType.SERVICEREQUEST;
12958        if ("Slot".equals(codeString))
12959          return ResourceType.SLOT;
12960        if ("Specimen".equals(codeString))
12961          return ResourceType.SPECIMEN;
12962        if ("SpecimenDefinition".equals(codeString))
12963          return ResourceType.SPECIMENDEFINITION;
12964        if ("StructureDefinition".equals(codeString))
12965          return ResourceType.STRUCTUREDEFINITION;
12966        if ("StructureMap".equals(codeString))
12967          return ResourceType.STRUCTUREMAP;
12968        if ("Subscription".equals(codeString))
12969          return ResourceType.SUBSCRIPTION;
12970        if ("Substance".equals(codeString))
12971          return ResourceType.SUBSTANCE;
12972        if ("SubstanceNucleicAcid".equals(codeString))
12973          return ResourceType.SUBSTANCENUCLEICACID;
12974        if ("SubstancePolymer".equals(codeString))
12975          return ResourceType.SUBSTANCEPOLYMER;
12976        if ("SubstanceProtein".equals(codeString))
12977          return ResourceType.SUBSTANCEPROTEIN;
12978        if ("SubstanceReferenceInformation".equals(codeString))
12979          return ResourceType.SUBSTANCEREFERENCEINFORMATION;
12980        if ("SubstanceSourceMaterial".equals(codeString))
12981          return ResourceType.SUBSTANCESOURCEMATERIAL;
12982        if ("SubstanceSpecification".equals(codeString))
12983          return ResourceType.SUBSTANCESPECIFICATION;
12984        if ("SupplyDelivery".equals(codeString))
12985          return ResourceType.SUPPLYDELIVERY;
12986        if ("SupplyRequest".equals(codeString))
12987          return ResourceType.SUPPLYREQUEST;
12988        if ("Task".equals(codeString))
12989          return ResourceType.TASK;
12990        if ("TerminologyCapabilities".equals(codeString))
12991          return ResourceType.TERMINOLOGYCAPABILITIES;
12992        if ("TestReport".equals(codeString))
12993          return ResourceType.TESTREPORT;
12994        if ("TestScript".equals(codeString))
12995          return ResourceType.TESTSCRIPT;
12996        if ("ValueSet".equals(codeString))
12997          return ResourceType.VALUESET;
12998        if ("VerificationResult".equals(codeString))
12999          return ResourceType.VERIFICATIONRESULT;
13000        if ("VisionPrescription".equals(codeString))
13001          return ResourceType.VISIONPRESCRIPTION;
13002        throw new IllegalArgumentException("Unknown ResourceType code '"+codeString+"'");
13003        }
13004        public Enumeration<ResourceType> fromType(Base code) throws FHIRException {
13005          if (code == null)
13006            return null;
13007          if (code.isEmpty())
13008            return new Enumeration<ResourceType>(this);
13009          String codeString = ((PrimitiveType) code).asStringValue();
13010          if (codeString == null || "".equals(codeString))
13011            return null;
13012        if ("Account".equals(codeString))
13013          return new Enumeration<ResourceType>(this, ResourceType.ACCOUNT);
13014        if ("ActivityDefinition".equals(codeString))
13015          return new Enumeration<ResourceType>(this, ResourceType.ACTIVITYDEFINITION);
13016        if ("AdverseEvent".equals(codeString))
13017          return new Enumeration<ResourceType>(this, ResourceType.ADVERSEEVENT);
13018        if ("AllergyIntolerance".equals(codeString))
13019          return new Enumeration<ResourceType>(this, ResourceType.ALLERGYINTOLERANCE);
13020        if ("Appointment".equals(codeString))
13021          return new Enumeration<ResourceType>(this, ResourceType.APPOINTMENT);
13022        if ("AppointmentResponse".equals(codeString))
13023          return new Enumeration<ResourceType>(this, ResourceType.APPOINTMENTRESPONSE);
13024        if ("AuditEvent".equals(codeString))
13025          return new Enumeration<ResourceType>(this, ResourceType.AUDITEVENT);
13026        if ("Basic".equals(codeString))
13027          return new Enumeration<ResourceType>(this, ResourceType.BASIC);
13028        if ("Binary".equals(codeString))
13029          return new Enumeration<ResourceType>(this, ResourceType.BINARY);
13030        if ("BiologicallyDerivedProduct".equals(codeString))
13031          return new Enumeration<ResourceType>(this, ResourceType.BIOLOGICALLYDERIVEDPRODUCT);
13032        if ("BodyStructure".equals(codeString))
13033          return new Enumeration<ResourceType>(this, ResourceType.BODYSTRUCTURE);
13034        if ("Bundle".equals(codeString))
13035          return new Enumeration<ResourceType>(this, ResourceType.BUNDLE);
13036        if ("CapabilityStatement".equals(codeString))
13037          return new Enumeration<ResourceType>(this, ResourceType.CAPABILITYSTATEMENT);
13038        if ("CarePlan".equals(codeString))
13039          return new Enumeration<ResourceType>(this, ResourceType.CAREPLAN);
13040        if ("CareTeam".equals(codeString))
13041          return new Enumeration<ResourceType>(this, ResourceType.CARETEAM);
13042        if ("CatalogEntry".equals(codeString))
13043          return new Enumeration<ResourceType>(this, ResourceType.CATALOGENTRY);
13044        if ("ChargeItem".equals(codeString))
13045          return new Enumeration<ResourceType>(this, ResourceType.CHARGEITEM);
13046        if ("ChargeItemDefinition".equals(codeString))
13047          return new Enumeration<ResourceType>(this, ResourceType.CHARGEITEMDEFINITION);
13048        if ("Claim".equals(codeString))
13049          return new Enumeration<ResourceType>(this, ResourceType.CLAIM);
13050        if ("ClaimResponse".equals(codeString))
13051          return new Enumeration<ResourceType>(this, ResourceType.CLAIMRESPONSE);
13052        if ("ClinicalImpression".equals(codeString))
13053          return new Enumeration<ResourceType>(this, ResourceType.CLINICALIMPRESSION);
13054        if ("CodeSystem".equals(codeString))
13055          return new Enumeration<ResourceType>(this, ResourceType.CODESYSTEM);
13056        if ("Communication".equals(codeString))
13057          return new Enumeration<ResourceType>(this, ResourceType.COMMUNICATION);
13058        if ("CommunicationRequest".equals(codeString))
13059          return new Enumeration<ResourceType>(this, ResourceType.COMMUNICATIONREQUEST);
13060        if ("CompartmentDefinition".equals(codeString))
13061          return new Enumeration<ResourceType>(this, ResourceType.COMPARTMENTDEFINITION);
13062        if ("Composition".equals(codeString))
13063          return new Enumeration<ResourceType>(this, ResourceType.COMPOSITION);
13064        if ("ConceptMap".equals(codeString))
13065          return new Enumeration<ResourceType>(this, ResourceType.CONCEPTMAP);
13066        if ("Condition".equals(codeString))
13067          return new Enumeration<ResourceType>(this, ResourceType.CONDITION);
13068        if ("Consent".equals(codeString))
13069          return new Enumeration<ResourceType>(this, ResourceType.CONSENT);
13070        if ("Contract".equals(codeString))
13071          return new Enumeration<ResourceType>(this, ResourceType.CONTRACT);
13072        if ("Coverage".equals(codeString))
13073          return new Enumeration<ResourceType>(this, ResourceType.COVERAGE);
13074        if ("CoverageEligibilityRequest".equals(codeString))
13075          return new Enumeration<ResourceType>(this, ResourceType.COVERAGEELIGIBILITYREQUEST);
13076        if ("CoverageEligibilityResponse".equals(codeString))
13077          return new Enumeration<ResourceType>(this, ResourceType.COVERAGEELIGIBILITYRESPONSE);
13078        if ("DetectedIssue".equals(codeString))
13079          return new Enumeration<ResourceType>(this, ResourceType.DETECTEDISSUE);
13080        if ("Device".equals(codeString))
13081          return new Enumeration<ResourceType>(this, ResourceType.DEVICE);
13082        if ("DeviceDefinition".equals(codeString))
13083          return new Enumeration<ResourceType>(this, ResourceType.DEVICEDEFINITION);
13084        if ("DeviceMetric".equals(codeString))
13085          return new Enumeration<ResourceType>(this, ResourceType.DEVICEMETRIC);
13086        if ("DeviceRequest".equals(codeString))
13087          return new Enumeration<ResourceType>(this, ResourceType.DEVICEREQUEST);
13088        if ("DeviceUseStatement".equals(codeString))
13089          return new Enumeration<ResourceType>(this, ResourceType.DEVICEUSESTATEMENT);
13090        if ("DiagnosticReport".equals(codeString))
13091          return new Enumeration<ResourceType>(this, ResourceType.DIAGNOSTICREPORT);
13092        if ("DocumentManifest".equals(codeString))
13093          return new Enumeration<ResourceType>(this, ResourceType.DOCUMENTMANIFEST);
13094        if ("DocumentReference".equals(codeString))
13095          return new Enumeration<ResourceType>(this, ResourceType.DOCUMENTREFERENCE);
13096        if ("DomainResource".equals(codeString))
13097          return new Enumeration<ResourceType>(this, ResourceType.DOMAINRESOURCE);
13098        if ("EffectEvidenceSynthesis".equals(codeString))
13099          return new Enumeration<ResourceType>(this, ResourceType.EFFECTEVIDENCESYNTHESIS);
13100        if ("Encounter".equals(codeString))
13101          return new Enumeration<ResourceType>(this, ResourceType.ENCOUNTER);
13102        if ("Endpoint".equals(codeString))
13103          return new Enumeration<ResourceType>(this, ResourceType.ENDPOINT);
13104        if ("EnrollmentRequest".equals(codeString))
13105          return new Enumeration<ResourceType>(this, ResourceType.ENROLLMENTREQUEST);
13106        if ("EnrollmentResponse".equals(codeString))
13107          return new Enumeration<ResourceType>(this, ResourceType.ENROLLMENTRESPONSE);
13108        if ("EpisodeOfCare".equals(codeString))
13109          return new Enumeration<ResourceType>(this, ResourceType.EPISODEOFCARE);
13110        if ("EventDefinition".equals(codeString))
13111          return new Enumeration<ResourceType>(this, ResourceType.EVENTDEFINITION);
13112        if ("Evidence".equals(codeString))
13113          return new Enumeration<ResourceType>(this, ResourceType.EVIDENCE);
13114        if ("EvidenceVariable".equals(codeString))
13115          return new Enumeration<ResourceType>(this, ResourceType.EVIDENCEVARIABLE);
13116        if ("ExampleScenario".equals(codeString))
13117          return new Enumeration<ResourceType>(this, ResourceType.EXAMPLESCENARIO);
13118        if ("ExplanationOfBenefit".equals(codeString))
13119          return new Enumeration<ResourceType>(this, ResourceType.EXPLANATIONOFBENEFIT);
13120        if ("FamilyMemberHistory".equals(codeString))
13121          return new Enumeration<ResourceType>(this, ResourceType.FAMILYMEMBERHISTORY);
13122        if ("Flag".equals(codeString))
13123          return new Enumeration<ResourceType>(this, ResourceType.FLAG);
13124        if ("Goal".equals(codeString))
13125          return new Enumeration<ResourceType>(this, ResourceType.GOAL);
13126        if ("GraphDefinition".equals(codeString))
13127          return new Enumeration<ResourceType>(this, ResourceType.GRAPHDEFINITION);
13128        if ("Group".equals(codeString))
13129          return new Enumeration<ResourceType>(this, ResourceType.GROUP);
13130        if ("GuidanceResponse".equals(codeString))
13131          return new Enumeration<ResourceType>(this, ResourceType.GUIDANCERESPONSE);
13132        if ("HealthcareService".equals(codeString))
13133          return new Enumeration<ResourceType>(this, ResourceType.HEALTHCARESERVICE);
13134        if ("ImagingStudy".equals(codeString))
13135          return new Enumeration<ResourceType>(this, ResourceType.IMAGINGSTUDY);
13136        if ("Immunization".equals(codeString))
13137          return new Enumeration<ResourceType>(this, ResourceType.IMMUNIZATION);
13138        if ("ImmunizationEvaluation".equals(codeString))
13139          return new Enumeration<ResourceType>(this, ResourceType.IMMUNIZATIONEVALUATION);
13140        if ("ImmunizationRecommendation".equals(codeString))
13141          return new Enumeration<ResourceType>(this, ResourceType.IMMUNIZATIONRECOMMENDATION);
13142        if ("ImplementationGuide".equals(codeString))
13143          return new Enumeration<ResourceType>(this, ResourceType.IMPLEMENTATIONGUIDE);
13144        if ("InsurancePlan".equals(codeString))
13145          return new Enumeration<ResourceType>(this, ResourceType.INSURANCEPLAN);
13146        if ("Invoice".equals(codeString))
13147          return new Enumeration<ResourceType>(this, ResourceType.INVOICE);
13148        if ("Library".equals(codeString))
13149          return new Enumeration<ResourceType>(this, ResourceType.LIBRARY);
13150        if ("Linkage".equals(codeString))
13151          return new Enumeration<ResourceType>(this, ResourceType.LINKAGE);
13152        if ("List".equals(codeString))
13153          return new Enumeration<ResourceType>(this, ResourceType.LIST);
13154        if ("Location".equals(codeString))
13155          return new Enumeration<ResourceType>(this, ResourceType.LOCATION);
13156        if ("Measure".equals(codeString))
13157          return new Enumeration<ResourceType>(this, ResourceType.MEASURE);
13158        if ("MeasureReport".equals(codeString))
13159          return new Enumeration<ResourceType>(this, ResourceType.MEASUREREPORT);
13160        if ("Media".equals(codeString))
13161          return new Enumeration<ResourceType>(this, ResourceType.MEDIA);
13162        if ("Medication".equals(codeString))
13163          return new Enumeration<ResourceType>(this, ResourceType.MEDICATION);
13164        if ("MedicationAdministration".equals(codeString))
13165          return new Enumeration<ResourceType>(this, ResourceType.MEDICATIONADMINISTRATION);
13166        if ("MedicationDispense".equals(codeString))
13167          return new Enumeration<ResourceType>(this, ResourceType.MEDICATIONDISPENSE);
13168        if ("MedicationKnowledge".equals(codeString))
13169          return new Enumeration<ResourceType>(this, ResourceType.MEDICATIONKNOWLEDGE);
13170        if ("MedicationRequest".equals(codeString))
13171          return new Enumeration<ResourceType>(this, ResourceType.MEDICATIONREQUEST);
13172        if ("MedicationStatement".equals(codeString))
13173          return new Enumeration<ResourceType>(this, ResourceType.MEDICATIONSTATEMENT);
13174        if ("MedicinalProduct".equals(codeString))
13175          return new Enumeration<ResourceType>(this, ResourceType.MEDICINALPRODUCT);
13176        if ("MedicinalProductAuthorization".equals(codeString))
13177          return new Enumeration<ResourceType>(this, ResourceType.MEDICINALPRODUCTAUTHORIZATION);
13178        if ("MedicinalProductContraindication".equals(codeString))
13179          return new Enumeration<ResourceType>(this, ResourceType.MEDICINALPRODUCTCONTRAINDICATION);
13180        if ("MedicinalProductIndication".equals(codeString))
13181          return new Enumeration<ResourceType>(this, ResourceType.MEDICINALPRODUCTINDICATION);
13182        if ("MedicinalProductIngredient".equals(codeString))
13183          return new Enumeration<ResourceType>(this, ResourceType.MEDICINALPRODUCTINGREDIENT);
13184        if ("MedicinalProductInteraction".equals(codeString))
13185          return new Enumeration<ResourceType>(this, ResourceType.MEDICINALPRODUCTINTERACTION);
13186        if ("MedicinalProductManufactured".equals(codeString))
13187          return new Enumeration<ResourceType>(this, ResourceType.MEDICINALPRODUCTMANUFACTURED);
13188        if ("MedicinalProductPackaged".equals(codeString))
13189          return new Enumeration<ResourceType>(this, ResourceType.MEDICINALPRODUCTPACKAGED);
13190        if ("MedicinalProductPharmaceutical".equals(codeString))
13191          return new Enumeration<ResourceType>(this, ResourceType.MEDICINALPRODUCTPHARMACEUTICAL);
13192        if ("MedicinalProductUndesirableEffect".equals(codeString))
13193          return new Enumeration<ResourceType>(this, ResourceType.MEDICINALPRODUCTUNDESIRABLEEFFECT);
13194        if ("MessageDefinition".equals(codeString))
13195          return new Enumeration<ResourceType>(this, ResourceType.MESSAGEDEFINITION);
13196        if ("MessageHeader".equals(codeString))
13197          return new Enumeration<ResourceType>(this, ResourceType.MESSAGEHEADER);
13198        if ("MolecularSequence".equals(codeString))
13199          return new Enumeration<ResourceType>(this, ResourceType.MOLECULARSEQUENCE);
13200        if ("NamingSystem".equals(codeString))
13201          return new Enumeration<ResourceType>(this, ResourceType.NAMINGSYSTEM);
13202        if ("NutritionOrder".equals(codeString))
13203          return new Enumeration<ResourceType>(this, ResourceType.NUTRITIONORDER);
13204        if ("Observation".equals(codeString))
13205          return new Enumeration<ResourceType>(this, ResourceType.OBSERVATION);
13206        if ("ObservationDefinition".equals(codeString))
13207          return new Enumeration<ResourceType>(this, ResourceType.OBSERVATIONDEFINITION);
13208        if ("OperationDefinition".equals(codeString))
13209          return new Enumeration<ResourceType>(this, ResourceType.OPERATIONDEFINITION);
13210        if ("OperationOutcome".equals(codeString))
13211          return new Enumeration<ResourceType>(this, ResourceType.OPERATIONOUTCOME);
13212        if ("Organization".equals(codeString))
13213          return new Enumeration<ResourceType>(this, ResourceType.ORGANIZATION);
13214        if ("OrganizationAffiliation".equals(codeString))
13215          return new Enumeration<ResourceType>(this, ResourceType.ORGANIZATIONAFFILIATION);
13216        if ("Parameters".equals(codeString))
13217          return new Enumeration<ResourceType>(this, ResourceType.PARAMETERS);
13218        if ("Patient".equals(codeString))
13219          return new Enumeration<ResourceType>(this, ResourceType.PATIENT);
13220        if ("PaymentNotice".equals(codeString))
13221          return new Enumeration<ResourceType>(this, ResourceType.PAYMENTNOTICE);
13222        if ("PaymentReconciliation".equals(codeString))
13223          return new Enumeration<ResourceType>(this, ResourceType.PAYMENTRECONCILIATION);
13224        if ("Person".equals(codeString))
13225          return new Enumeration<ResourceType>(this, ResourceType.PERSON);
13226        if ("PlanDefinition".equals(codeString))
13227          return new Enumeration<ResourceType>(this, ResourceType.PLANDEFINITION);
13228        if ("Practitioner".equals(codeString))
13229          return new Enumeration<ResourceType>(this, ResourceType.PRACTITIONER);
13230        if ("PractitionerRole".equals(codeString))
13231          return new Enumeration<ResourceType>(this, ResourceType.PRACTITIONERROLE);
13232        if ("Procedure".equals(codeString))
13233          return new Enumeration<ResourceType>(this, ResourceType.PROCEDURE);
13234        if ("Provenance".equals(codeString))
13235          return new Enumeration<ResourceType>(this, ResourceType.PROVENANCE);
13236        if ("Questionnaire".equals(codeString))
13237          return new Enumeration<ResourceType>(this, ResourceType.QUESTIONNAIRE);
13238        if ("QuestionnaireResponse".equals(codeString))
13239          return new Enumeration<ResourceType>(this, ResourceType.QUESTIONNAIRERESPONSE);
13240        if ("RelatedPerson".equals(codeString))
13241          return new Enumeration<ResourceType>(this, ResourceType.RELATEDPERSON);
13242        if ("RequestGroup".equals(codeString))
13243          return new Enumeration<ResourceType>(this, ResourceType.REQUESTGROUP);
13244        if ("ResearchDefinition".equals(codeString))
13245          return new Enumeration<ResourceType>(this, ResourceType.RESEARCHDEFINITION);
13246        if ("ResearchElementDefinition".equals(codeString))
13247          return new Enumeration<ResourceType>(this, ResourceType.RESEARCHELEMENTDEFINITION);
13248        if ("ResearchStudy".equals(codeString))
13249          return new Enumeration<ResourceType>(this, ResourceType.RESEARCHSTUDY);
13250        if ("ResearchSubject".equals(codeString))
13251          return new Enumeration<ResourceType>(this, ResourceType.RESEARCHSUBJECT);
13252        if ("Resource".equals(codeString))
13253          return new Enumeration<ResourceType>(this, ResourceType.RESOURCE);
13254        if ("RiskAssessment".equals(codeString))
13255          return new Enumeration<ResourceType>(this, ResourceType.RISKASSESSMENT);
13256        if ("RiskEvidenceSynthesis".equals(codeString))
13257          return new Enumeration<ResourceType>(this, ResourceType.RISKEVIDENCESYNTHESIS);
13258        if ("Schedule".equals(codeString))
13259          return new Enumeration<ResourceType>(this, ResourceType.SCHEDULE);
13260        if ("SearchParameter".equals(codeString))
13261          return new Enumeration<ResourceType>(this, ResourceType.SEARCHPARAMETER);
13262        if ("ServiceRequest".equals(codeString))
13263          return new Enumeration<ResourceType>(this, ResourceType.SERVICEREQUEST);
13264        if ("Slot".equals(codeString))
13265          return new Enumeration<ResourceType>(this, ResourceType.SLOT);
13266        if ("Specimen".equals(codeString))
13267          return new Enumeration<ResourceType>(this, ResourceType.SPECIMEN);
13268        if ("SpecimenDefinition".equals(codeString))
13269          return new Enumeration<ResourceType>(this, ResourceType.SPECIMENDEFINITION);
13270        if ("StructureDefinition".equals(codeString))
13271          return new Enumeration<ResourceType>(this, ResourceType.STRUCTUREDEFINITION);
13272        if ("StructureMap".equals(codeString))
13273          return new Enumeration<ResourceType>(this, ResourceType.STRUCTUREMAP);
13274        if ("Subscription".equals(codeString))
13275          return new Enumeration<ResourceType>(this, ResourceType.SUBSCRIPTION);
13276        if ("Substance".equals(codeString))
13277          return new Enumeration<ResourceType>(this, ResourceType.SUBSTANCE);
13278        if ("SubstanceNucleicAcid".equals(codeString))
13279          return new Enumeration<ResourceType>(this, ResourceType.SUBSTANCENUCLEICACID);
13280        if ("SubstancePolymer".equals(codeString))
13281          return new Enumeration<ResourceType>(this, ResourceType.SUBSTANCEPOLYMER);
13282        if ("SubstanceProtein".equals(codeString))
13283          return new Enumeration<ResourceType>(this, ResourceType.SUBSTANCEPROTEIN);
13284        if ("SubstanceReferenceInformation".equals(codeString))
13285          return new Enumeration<ResourceType>(this, ResourceType.SUBSTANCEREFERENCEINFORMATION);
13286        if ("SubstanceSourceMaterial".equals(codeString))
13287          return new Enumeration<ResourceType>(this, ResourceType.SUBSTANCESOURCEMATERIAL);
13288        if ("SubstanceSpecification".equals(codeString))
13289          return new Enumeration<ResourceType>(this, ResourceType.SUBSTANCESPECIFICATION);
13290        if ("SupplyDelivery".equals(codeString))
13291          return new Enumeration<ResourceType>(this, ResourceType.SUPPLYDELIVERY);
13292        if ("SupplyRequest".equals(codeString))
13293          return new Enumeration<ResourceType>(this, ResourceType.SUPPLYREQUEST);
13294        if ("Task".equals(codeString))
13295          return new Enumeration<ResourceType>(this, ResourceType.TASK);
13296        if ("TerminologyCapabilities".equals(codeString))
13297          return new Enumeration<ResourceType>(this, ResourceType.TERMINOLOGYCAPABILITIES);
13298        if ("TestReport".equals(codeString))
13299          return new Enumeration<ResourceType>(this, ResourceType.TESTREPORT);
13300        if ("TestScript".equals(codeString))
13301          return new Enumeration<ResourceType>(this, ResourceType.TESTSCRIPT);
13302        if ("ValueSet".equals(codeString))
13303          return new Enumeration<ResourceType>(this, ResourceType.VALUESET);
13304        if ("VerificationResult".equals(codeString))
13305          return new Enumeration<ResourceType>(this, ResourceType.VERIFICATIONRESULT);
13306        if ("VisionPrescription".equals(codeString))
13307          return new Enumeration<ResourceType>(this, ResourceType.VISIONPRESCRIPTION);
13308        throw new FHIRException("Unknown ResourceType code '"+codeString+"'");
13309        }
13310    public String toCode(ResourceType code) {
13311      if (code == ResourceType.ACCOUNT)
13312        return "Account";
13313      if (code == ResourceType.ACTIVITYDEFINITION)
13314        return "ActivityDefinition";
13315      if (code == ResourceType.ADVERSEEVENT)
13316        return "AdverseEvent";
13317      if (code == ResourceType.ALLERGYINTOLERANCE)
13318        return "AllergyIntolerance";
13319      if (code == ResourceType.APPOINTMENT)
13320        return "Appointment";
13321      if (code == ResourceType.APPOINTMENTRESPONSE)
13322        return "AppointmentResponse";
13323      if (code == ResourceType.AUDITEVENT)
13324        return "AuditEvent";
13325      if (code == ResourceType.BASIC)
13326        return "Basic";
13327      if (code == ResourceType.BINARY)
13328        return "Binary";
13329      if (code == ResourceType.BIOLOGICALLYDERIVEDPRODUCT)
13330        return "BiologicallyDerivedProduct";
13331      if (code == ResourceType.BODYSTRUCTURE)
13332        return "BodyStructure";
13333      if (code == ResourceType.BUNDLE)
13334        return "Bundle";
13335      if (code == ResourceType.CAPABILITYSTATEMENT)
13336        return "CapabilityStatement";
13337      if (code == ResourceType.CAREPLAN)
13338        return "CarePlan";
13339      if (code == ResourceType.CARETEAM)
13340        return "CareTeam";
13341      if (code == ResourceType.CATALOGENTRY)
13342        return "CatalogEntry";
13343      if (code == ResourceType.CHARGEITEM)
13344        return "ChargeItem";
13345      if (code == ResourceType.CHARGEITEMDEFINITION)
13346        return "ChargeItemDefinition";
13347      if (code == ResourceType.CLAIM)
13348        return "Claim";
13349      if (code == ResourceType.CLAIMRESPONSE)
13350        return "ClaimResponse";
13351      if (code == ResourceType.CLINICALIMPRESSION)
13352        return "ClinicalImpression";
13353      if (code == ResourceType.CODESYSTEM)
13354        return "CodeSystem";
13355      if (code == ResourceType.COMMUNICATION)
13356        return "Communication";
13357      if (code == ResourceType.COMMUNICATIONREQUEST)
13358        return "CommunicationRequest";
13359      if (code == ResourceType.COMPARTMENTDEFINITION)
13360        return "CompartmentDefinition";
13361      if (code == ResourceType.COMPOSITION)
13362        return "Composition";
13363      if (code == ResourceType.CONCEPTMAP)
13364        return "ConceptMap";
13365      if (code == ResourceType.CONDITION)
13366        return "Condition";
13367      if (code == ResourceType.CONSENT)
13368        return "Consent";
13369      if (code == ResourceType.CONTRACT)
13370        return "Contract";
13371      if (code == ResourceType.COVERAGE)
13372        return "Coverage";
13373      if (code == ResourceType.COVERAGEELIGIBILITYREQUEST)
13374        return "CoverageEligibilityRequest";
13375      if (code == ResourceType.COVERAGEELIGIBILITYRESPONSE)
13376        return "CoverageEligibilityResponse";
13377      if (code == ResourceType.DETECTEDISSUE)
13378        return "DetectedIssue";
13379      if (code == ResourceType.DEVICE)
13380        return "Device";
13381      if (code == ResourceType.DEVICEDEFINITION)
13382        return "DeviceDefinition";
13383      if (code == ResourceType.DEVICEMETRIC)
13384        return "DeviceMetric";
13385      if (code == ResourceType.DEVICEREQUEST)
13386        return "DeviceRequest";
13387      if (code == ResourceType.DEVICEUSESTATEMENT)
13388        return "DeviceUseStatement";
13389      if (code == ResourceType.DIAGNOSTICREPORT)
13390        return "DiagnosticReport";
13391      if (code == ResourceType.DOCUMENTMANIFEST)
13392        return "DocumentManifest";
13393      if (code == ResourceType.DOCUMENTREFERENCE)
13394        return "DocumentReference";
13395      if (code == ResourceType.DOMAINRESOURCE)
13396        return "DomainResource";
13397      if (code == ResourceType.EFFECTEVIDENCESYNTHESIS)
13398        return "EffectEvidenceSynthesis";
13399      if (code == ResourceType.ENCOUNTER)
13400        return "Encounter";
13401      if (code == ResourceType.ENDPOINT)
13402        return "Endpoint";
13403      if (code == ResourceType.ENROLLMENTREQUEST)
13404        return "EnrollmentRequest";
13405      if (code == ResourceType.ENROLLMENTRESPONSE)
13406        return "EnrollmentResponse";
13407      if (code == ResourceType.EPISODEOFCARE)
13408        return "EpisodeOfCare";
13409      if (code == ResourceType.EVENTDEFINITION)
13410        return "EventDefinition";
13411      if (code == ResourceType.EVIDENCE)
13412        return "Evidence";
13413      if (code == ResourceType.EVIDENCEVARIABLE)
13414        return "EvidenceVariable";
13415      if (code == ResourceType.EXAMPLESCENARIO)
13416        return "ExampleScenario";
13417      if (code == ResourceType.EXPLANATIONOFBENEFIT)
13418        return "ExplanationOfBenefit";
13419      if (code == ResourceType.FAMILYMEMBERHISTORY)
13420        return "FamilyMemberHistory";
13421      if (code == ResourceType.FLAG)
13422        return "Flag";
13423      if (code == ResourceType.GOAL)
13424        return "Goal";
13425      if (code == ResourceType.GRAPHDEFINITION)
13426        return "GraphDefinition";
13427      if (code == ResourceType.GROUP)
13428        return "Group";
13429      if (code == ResourceType.GUIDANCERESPONSE)
13430        return "GuidanceResponse";
13431      if (code == ResourceType.HEALTHCARESERVICE)
13432        return "HealthcareService";
13433      if (code == ResourceType.IMAGINGSTUDY)
13434        return "ImagingStudy";
13435      if (code == ResourceType.IMMUNIZATION)
13436        return "Immunization";
13437      if (code == ResourceType.IMMUNIZATIONEVALUATION)
13438        return "ImmunizationEvaluation";
13439      if (code == ResourceType.IMMUNIZATIONRECOMMENDATION)
13440        return "ImmunizationRecommendation";
13441      if (code == ResourceType.IMPLEMENTATIONGUIDE)
13442        return "ImplementationGuide";
13443      if (code == ResourceType.INSURANCEPLAN)
13444        return "InsurancePlan";
13445      if (code == ResourceType.INVOICE)
13446        return "Invoice";
13447      if (code == ResourceType.LIBRARY)
13448        return "Library";
13449      if (code == ResourceType.LINKAGE)
13450        return "Linkage";
13451      if (code == ResourceType.LIST)
13452        return "List";
13453      if (code == ResourceType.LOCATION)
13454        return "Location";
13455      if (code == ResourceType.MEASURE)
13456        return "Measure";
13457      if (code == ResourceType.MEASUREREPORT)
13458        return "MeasureReport";
13459      if (code == ResourceType.MEDIA)
13460        return "Media";
13461      if (code == ResourceType.MEDICATION)
13462        return "Medication";
13463      if (code == ResourceType.MEDICATIONADMINISTRATION)
13464        return "MedicationAdministration";
13465      if (code == ResourceType.MEDICATIONDISPENSE)
13466        return "MedicationDispense";
13467      if (code == ResourceType.MEDICATIONKNOWLEDGE)
13468        return "MedicationKnowledge";
13469      if (code == ResourceType.MEDICATIONREQUEST)
13470        return "MedicationRequest";
13471      if (code == ResourceType.MEDICATIONSTATEMENT)
13472        return "MedicationStatement";
13473      if (code == ResourceType.MEDICINALPRODUCT)
13474        return "MedicinalProduct";
13475      if (code == ResourceType.MEDICINALPRODUCTAUTHORIZATION)
13476        return "MedicinalProductAuthorization";
13477      if (code == ResourceType.MEDICINALPRODUCTCONTRAINDICATION)
13478        return "MedicinalProductContraindication";
13479      if (code == ResourceType.MEDICINALPRODUCTINDICATION)
13480        return "MedicinalProductIndication";
13481      if (code == ResourceType.MEDICINALPRODUCTINGREDIENT)
13482        return "MedicinalProductIngredient";
13483      if (code == ResourceType.MEDICINALPRODUCTINTERACTION)
13484        return "MedicinalProductInteraction";
13485      if (code == ResourceType.MEDICINALPRODUCTMANUFACTURED)
13486        return "MedicinalProductManufactured";
13487      if (code == ResourceType.MEDICINALPRODUCTPACKAGED)
13488        return "MedicinalProductPackaged";
13489      if (code == ResourceType.MEDICINALPRODUCTPHARMACEUTICAL)
13490        return "MedicinalProductPharmaceutical";
13491      if (code == ResourceType.MEDICINALPRODUCTUNDESIRABLEEFFECT)
13492        return "MedicinalProductUndesirableEffect";
13493      if (code == ResourceType.MESSAGEDEFINITION)
13494        return "MessageDefinition";
13495      if (code == ResourceType.MESSAGEHEADER)
13496        return "MessageHeader";
13497      if (code == ResourceType.MOLECULARSEQUENCE)
13498        return "MolecularSequence";
13499      if (code == ResourceType.NAMINGSYSTEM)
13500        return "NamingSystem";
13501      if (code == ResourceType.NUTRITIONORDER)
13502        return "NutritionOrder";
13503      if (code == ResourceType.OBSERVATION)
13504        return "Observation";
13505      if (code == ResourceType.OBSERVATIONDEFINITION)
13506        return "ObservationDefinition";
13507      if (code == ResourceType.OPERATIONDEFINITION)
13508        return "OperationDefinition";
13509      if (code == ResourceType.OPERATIONOUTCOME)
13510        return "OperationOutcome";
13511      if (code == ResourceType.ORGANIZATION)
13512        return "Organization";
13513      if (code == ResourceType.ORGANIZATIONAFFILIATION)
13514        return "OrganizationAffiliation";
13515      if (code == ResourceType.PARAMETERS)
13516        return "Parameters";
13517      if (code == ResourceType.PATIENT)
13518        return "Patient";
13519      if (code == ResourceType.PAYMENTNOTICE)
13520        return "PaymentNotice";
13521      if (code == ResourceType.PAYMENTRECONCILIATION)
13522        return "PaymentReconciliation";
13523      if (code == ResourceType.PERSON)
13524        return "Person";
13525      if (code == ResourceType.PLANDEFINITION)
13526        return "PlanDefinition";
13527      if (code == ResourceType.PRACTITIONER)
13528        return "Practitioner";
13529      if (code == ResourceType.PRACTITIONERROLE)
13530        return "PractitionerRole";
13531      if (code == ResourceType.PROCEDURE)
13532        return "Procedure";
13533      if (code == ResourceType.PROVENANCE)
13534        return "Provenance";
13535      if (code == ResourceType.QUESTIONNAIRE)
13536        return "Questionnaire";
13537      if (code == ResourceType.QUESTIONNAIRERESPONSE)
13538        return "QuestionnaireResponse";
13539      if (code == ResourceType.RELATEDPERSON)
13540        return "RelatedPerson";
13541      if (code == ResourceType.REQUESTGROUP)
13542        return "RequestGroup";
13543      if (code == ResourceType.RESEARCHDEFINITION)
13544        return "ResearchDefinition";
13545      if (code == ResourceType.RESEARCHELEMENTDEFINITION)
13546        return "ResearchElementDefinition";
13547      if (code == ResourceType.RESEARCHSTUDY)
13548        return "ResearchStudy";
13549      if (code == ResourceType.RESEARCHSUBJECT)
13550        return "ResearchSubject";
13551      if (code == ResourceType.RESOURCE)
13552        return "Resource";
13553      if (code == ResourceType.RISKASSESSMENT)
13554        return "RiskAssessment";
13555      if (code == ResourceType.RISKEVIDENCESYNTHESIS)
13556        return "RiskEvidenceSynthesis";
13557      if (code == ResourceType.SCHEDULE)
13558        return "Schedule";
13559      if (code == ResourceType.SEARCHPARAMETER)
13560        return "SearchParameter";
13561      if (code == ResourceType.SERVICEREQUEST)
13562        return "ServiceRequest";
13563      if (code == ResourceType.SLOT)
13564        return "Slot";
13565      if (code == ResourceType.SPECIMEN)
13566        return "Specimen";
13567      if (code == ResourceType.SPECIMENDEFINITION)
13568        return "SpecimenDefinition";
13569      if (code == ResourceType.STRUCTUREDEFINITION)
13570        return "StructureDefinition";
13571      if (code == ResourceType.STRUCTUREMAP)
13572        return "StructureMap";
13573      if (code == ResourceType.SUBSCRIPTION)
13574        return "Subscription";
13575      if (code == ResourceType.SUBSTANCE)
13576        return "Substance";
13577      if (code == ResourceType.SUBSTANCENUCLEICACID)
13578        return "SubstanceNucleicAcid";
13579      if (code == ResourceType.SUBSTANCEPOLYMER)
13580        return "SubstancePolymer";
13581      if (code == ResourceType.SUBSTANCEPROTEIN)
13582        return "SubstanceProtein";
13583      if (code == ResourceType.SUBSTANCEREFERENCEINFORMATION)
13584        return "SubstanceReferenceInformation";
13585      if (code == ResourceType.SUBSTANCESOURCEMATERIAL)
13586        return "SubstanceSourceMaterial";
13587      if (code == ResourceType.SUBSTANCESPECIFICATION)
13588        return "SubstanceSpecification";
13589      if (code == ResourceType.SUPPLYDELIVERY)
13590        return "SupplyDelivery";
13591      if (code == ResourceType.SUPPLYREQUEST)
13592        return "SupplyRequest";
13593      if (code == ResourceType.TASK)
13594        return "Task";
13595      if (code == ResourceType.TERMINOLOGYCAPABILITIES)
13596        return "TerminologyCapabilities";
13597      if (code == ResourceType.TESTREPORT)
13598        return "TestReport";
13599      if (code == ResourceType.TESTSCRIPT)
13600        return "TestScript";
13601      if (code == ResourceType.VALUESET)
13602        return "ValueSet";
13603      if (code == ResourceType.VERIFICATIONRESULT)
13604        return "VerificationResult";
13605      if (code == ResourceType.VISIONPRESCRIPTION)
13606        return "VisionPrescription";
13607      return "?";
13608      }
13609    public String toSystem(ResourceType code) {
13610      return code.getSystem();
13611      }
13612    }
13613
13614    public enum SearchParamType {
13615        /**
13616         * Search parameter SHALL be a number (a whole number, or a decimal).
13617         */
13618        NUMBER, 
13619        /**
13620         * Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported.
13621         */
13622        DATE, 
13623        /**
13624         * Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces.
13625         */
13626        STRING, 
13627        /**
13628         * Search parameter on a coded element or identifier. May be used to search through the text, display, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a "|", depending on the modifier used.
13629         */
13630        TOKEN, 
13631        /**
13632         * A reference to another resource (Reference or canonical).
13633         */
13634        REFERENCE, 
13635        /**
13636         * A composite search parameter that combines a search on two values together.
13637         */
13638        COMPOSITE, 
13639        /**
13640         * A search parameter that searches on a quantity.
13641         */
13642        QUANTITY, 
13643        /**
13644         * A search parameter that searches on a URI (RFC 3986).
13645         */
13646        URI, 
13647        /**
13648         * Special logic applies to this parameter per the description of the search parameter.
13649         */
13650        SPECIAL, 
13651        /**
13652         * added to help the parsers
13653         */
13654        NULL;
13655        public static SearchParamType fromCode(String codeString) throws FHIRException {
13656            if (codeString == null || "".equals(codeString))
13657                return null;
13658        if ("number".equals(codeString))
13659          return NUMBER;
13660        if ("date".equals(codeString))
13661          return DATE;
13662        if ("string".equals(codeString))
13663          return STRING;
13664        if ("token".equals(codeString))
13665          return TOKEN;
13666        if ("reference".equals(codeString))
13667          return REFERENCE;
13668        if ("composite".equals(codeString))
13669          return COMPOSITE;
13670        if ("quantity".equals(codeString))
13671          return QUANTITY;
13672        if ("uri".equals(codeString))
13673          return URI;
13674        if ("special".equals(codeString))
13675          return SPECIAL;
13676        throw new FHIRException("Unknown SearchParamType code '"+codeString+"'");
13677        }
13678        public String toCode() {
13679          switch (this) {
13680            case NUMBER: return "number";
13681            case DATE: return "date";
13682            case STRING: return "string";
13683            case TOKEN: return "token";
13684            case REFERENCE: return "reference";
13685            case COMPOSITE: return "composite";
13686            case QUANTITY: return "quantity";
13687            case URI: return "uri";
13688            case SPECIAL: return "special";
13689            default: return "?";
13690          }
13691        }
13692        public String getSystem() {
13693          switch (this) {
13694            case NUMBER: return "http://hl7.org/fhir/search-param-type";
13695            case DATE: return "http://hl7.org/fhir/search-param-type";
13696            case STRING: return "http://hl7.org/fhir/search-param-type";
13697            case TOKEN: return "http://hl7.org/fhir/search-param-type";
13698            case REFERENCE: return "http://hl7.org/fhir/search-param-type";
13699            case COMPOSITE: return "http://hl7.org/fhir/search-param-type";
13700            case QUANTITY: return "http://hl7.org/fhir/search-param-type";
13701            case URI: return "http://hl7.org/fhir/search-param-type";
13702            case SPECIAL: return "http://hl7.org/fhir/search-param-type";
13703            default: return "?";
13704          }
13705        }
13706        public String getDefinition() {
13707          switch (this) {
13708            case NUMBER: return "Search parameter SHALL be a number (a whole number, or a decimal).";
13709            case DATE: return "Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported.";
13710            case STRING: return "Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces.";
13711            case TOKEN: return "Search parameter on a coded element or identifier. May be used to search through the text, display, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a \"|\", depending on the modifier used.";
13712            case REFERENCE: return "A reference to another resource (Reference or canonical).";
13713            case COMPOSITE: return "A composite search parameter that combines a search on two values together.";
13714            case QUANTITY: return "A search parameter that searches on a quantity.";
13715            case URI: return "A search parameter that searches on a URI (RFC 3986).";
13716            case SPECIAL: return "Special logic applies to this parameter per the description of the search parameter.";
13717            default: return "?";
13718          }
13719        }
13720        public String getDisplay() {
13721          switch (this) {
13722            case NUMBER: return "Number";
13723            case DATE: return "Date/DateTime";
13724            case STRING: return "String";
13725            case TOKEN: return "Token";
13726            case REFERENCE: return "Reference";
13727            case COMPOSITE: return "Composite";
13728            case QUANTITY: return "Quantity";
13729            case URI: return "URI";
13730            case SPECIAL: return "Special";
13731            default: return "?";
13732          }
13733        }
13734    }
13735
13736  public static class SearchParamTypeEnumFactory implements EnumFactory<SearchParamType> {
13737    public SearchParamType fromCode(String codeString) throws IllegalArgumentException {
13738      if (codeString == null || "".equals(codeString))
13739            if (codeString == null || "".equals(codeString))
13740                return null;
13741        if ("number".equals(codeString))
13742          return SearchParamType.NUMBER;
13743        if ("date".equals(codeString))
13744          return SearchParamType.DATE;
13745        if ("string".equals(codeString))
13746          return SearchParamType.STRING;
13747        if ("token".equals(codeString))
13748          return SearchParamType.TOKEN;
13749        if ("reference".equals(codeString))
13750          return SearchParamType.REFERENCE;
13751        if ("composite".equals(codeString))
13752          return SearchParamType.COMPOSITE;
13753        if ("quantity".equals(codeString))
13754          return SearchParamType.QUANTITY;
13755        if ("uri".equals(codeString))
13756          return SearchParamType.URI;
13757        if ("special".equals(codeString))
13758          return SearchParamType.SPECIAL;
13759        throw new IllegalArgumentException("Unknown SearchParamType code '"+codeString+"'");
13760        }
13761        public Enumeration<SearchParamType> fromType(Base code) throws FHIRException {
13762          if (code == null)
13763            return null;
13764          if (code.isEmpty())
13765            return new Enumeration<SearchParamType>(this);
13766          String codeString = ((PrimitiveType) code).asStringValue();
13767          if (codeString == null || "".equals(codeString))
13768            return null;
13769        if ("number".equals(codeString))
13770          return new Enumeration<SearchParamType>(this, SearchParamType.NUMBER);
13771        if ("date".equals(codeString))
13772          return new Enumeration<SearchParamType>(this, SearchParamType.DATE);
13773        if ("string".equals(codeString))
13774          return new Enumeration<SearchParamType>(this, SearchParamType.STRING);
13775        if ("token".equals(codeString))
13776          return new Enumeration<SearchParamType>(this, SearchParamType.TOKEN);
13777        if ("reference".equals(codeString))
13778          return new Enumeration<SearchParamType>(this, SearchParamType.REFERENCE);
13779        if ("composite".equals(codeString))
13780          return new Enumeration<SearchParamType>(this, SearchParamType.COMPOSITE);
13781        if ("quantity".equals(codeString))
13782          return new Enumeration<SearchParamType>(this, SearchParamType.QUANTITY);
13783        if ("uri".equals(codeString))
13784          return new Enumeration<SearchParamType>(this, SearchParamType.URI);
13785        if ("special".equals(codeString))
13786          return new Enumeration<SearchParamType>(this, SearchParamType.SPECIAL);
13787        throw new FHIRException("Unknown SearchParamType code '"+codeString+"'");
13788        }
13789    public String toCode(SearchParamType code) {
13790      if (code == SearchParamType.NUMBER)
13791        return "number";
13792      if (code == SearchParamType.DATE)
13793        return "date";
13794      if (code == SearchParamType.STRING)
13795        return "string";
13796      if (code == SearchParamType.TOKEN)
13797        return "token";
13798      if (code == SearchParamType.REFERENCE)
13799        return "reference";
13800      if (code == SearchParamType.COMPOSITE)
13801        return "composite";
13802      if (code == SearchParamType.QUANTITY)
13803        return "quantity";
13804      if (code == SearchParamType.URI)
13805        return "uri";
13806      if (code == SearchParamType.SPECIAL)
13807        return "special";
13808      return "?";
13809      }
13810    public String toSystem(SearchParamType code) {
13811      return code.getSystem();
13812      }
13813    }
13814
13815    public enum SpecialValues {
13816        /**
13817         * Boolean true.
13818         */
13819        TRUE, 
13820        /**
13821         * Boolean false.
13822         */
13823        FALSE, 
13824        /**
13825         * The content is greater than zero, but too small to be quantified.
13826         */
13827        TRACE, 
13828        /**
13829         * The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material.
13830         */
13831        SUFFICIENT, 
13832        /**
13833         * The value is no longer available.
13834         */
13835        WITHDRAWN, 
13836        /**
13837         * The are no known applicable values in this context.
13838         */
13839        NILKNOWN, 
13840        /**
13841         * added to help the parsers
13842         */
13843        NULL;
13844        public static SpecialValues fromCode(String codeString) throws FHIRException {
13845            if (codeString == null || "".equals(codeString))
13846                return null;
13847        if ("true".equals(codeString))
13848          return TRUE;
13849        if ("false".equals(codeString))
13850          return FALSE;
13851        if ("trace".equals(codeString))
13852          return TRACE;
13853        if ("sufficient".equals(codeString))
13854          return SUFFICIENT;
13855        if ("withdrawn".equals(codeString))
13856          return WITHDRAWN;
13857        if ("nil-known".equals(codeString))
13858          return NILKNOWN;
13859        throw new FHIRException("Unknown SpecialValues code '"+codeString+"'");
13860        }
13861        public String toCode() {
13862          switch (this) {
13863            case TRUE: return "true";
13864            case FALSE: return "false";
13865            case TRACE: return "trace";
13866            case SUFFICIENT: return "sufficient";
13867            case WITHDRAWN: return "withdrawn";
13868            case NILKNOWN: return "nil-known";
13869            default: return "?";
13870          }
13871        }
13872        public String getSystem() {
13873          switch (this) {
13874            case TRUE: return "http://terminology.hl7.org/CodeSystem/special-values";
13875            case FALSE: return "http://terminology.hl7.org/CodeSystem/special-values";
13876            case TRACE: return "http://terminology.hl7.org/CodeSystem/special-values";
13877            case SUFFICIENT: return "http://terminology.hl7.org/CodeSystem/special-values";
13878            case WITHDRAWN: return "http://terminology.hl7.org/CodeSystem/special-values";
13879            case NILKNOWN: return "http://terminology.hl7.org/CodeSystem/special-values";
13880            default: return "?";
13881          }
13882        }
13883        public String getDefinition() {
13884          switch (this) {
13885            case TRUE: return "Boolean true.";
13886            case FALSE: return "Boolean false.";
13887            case TRACE: return "The content is greater than zero, but too small to be quantified.";
13888            case SUFFICIENT: return "The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material.";
13889            case WITHDRAWN: return "The value is no longer available.";
13890            case NILKNOWN: return "The are no known applicable values in this context.";
13891            default: return "?";
13892          }
13893        }
13894        public String getDisplay() {
13895          switch (this) {
13896            case TRUE: return "true";
13897            case FALSE: return "false";
13898            case TRACE: return "Trace Amount Detected";
13899            case SUFFICIENT: return "Sufficient Quantity";
13900            case WITHDRAWN: return "Value Withdrawn";
13901            case NILKNOWN: return "Nil Known";
13902            default: return "?";
13903          }
13904        }
13905    }
13906
13907  public static class SpecialValuesEnumFactory implements EnumFactory<SpecialValues> {
13908    public SpecialValues fromCode(String codeString) throws IllegalArgumentException {
13909      if (codeString == null || "".equals(codeString))
13910            if (codeString == null || "".equals(codeString))
13911                return null;
13912        if ("true".equals(codeString))
13913          return SpecialValues.TRUE;
13914        if ("false".equals(codeString))
13915          return SpecialValues.FALSE;
13916        if ("trace".equals(codeString))
13917          return SpecialValues.TRACE;
13918        if ("sufficient".equals(codeString))
13919          return SpecialValues.SUFFICIENT;
13920        if ("withdrawn".equals(codeString))
13921          return SpecialValues.WITHDRAWN;
13922        if ("nil-known".equals(codeString))
13923          return SpecialValues.NILKNOWN;
13924        throw new IllegalArgumentException("Unknown SpecialValues code '"+codeString+"'");
13925        }
13926        public Enumeration<SpecialValues> fromType(Base code) throws FHIRException {
13927          if (code == null)
13928            return null;
13929          if (code.isEmpty())
13930            return new Enumeration<SpecialValues>(this);
13931          String codeString = ((PrimitiveType) code).asStringValue();
13932          if (codeString == null || "".equals(codeString))
13933            return null;
13934        if ("true".equals(codeString))
13935          return new Enumeration<SpecialValues>(this, SpecialValues.TRUE);
13936        if ("false".equals(codeString))
13937          return new Enumeration<SpecialValues>(this, SpecialValues.FALSE);
13938        if ("trace".equals(codeString))
13939          return new Enumeration<SpecialValues>(this, SpecialValues.TRACE);
13940        if ("sufficient".equals(codeString))
13941          return new Enumeration<SpecialValues>(this, SpecialValues.SUFFICIENT);
13942        if ("withdrawn".equals(codeString))
13943          return new Enumeration<SpecialValues>(this, SpecialValues.WITHDRAWN);
13944        if ("nil-known".equals(codeString))
13945          return new Enumeration<SpecialValues>(this, SpecialValues.NILKNOWN);
13946        throw new FHIRException("Unknown SpecialValues code '"+codeString+"'");
13947        }
13948    public String toCode(SpecialValues code) {
13949      if (code == SpecialValues.TRUE)
13950        return "true";
13951      if (code == SpecialValues.FALSE)
13952        return "false";
13953      if (code == SpecialValues.TRACE)
13954        return "trace";
13955      if (code == SpecialValues.SUFFICIENT)
13956        return "sufficient";
13957      if (code == SpecialValues.WITHDRAWN)
13958        return "withdrawn";
13959      if (code == SpecialValues.NILKNOWN)
13960        return "nil-known";
13961      return "?";
13962      }
13963    public String toSystem(SpecialValues code) {
13964      return code.getSystem();
13965      }
13966    }
13967
13968
13969}
13970