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