001package org.hl7.fhir.dstu2016may.model;
002
003import org.hl7.fhir.exceptions.FHIRException;
004
005public class Enumerations {
006
007// In here: 
008//   AbstractType: A type defined by FHIR that is an abstract type
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//   ConformanceResourceStatus: The lifecycle status of a Value Set or Concept Map.
014//   DataAbsentReason: Used to specify why the normally expected content of the data element is missing.
015//   DataType: The type of an element - one of the FHIR data types.
016//   DocumentReferenceStatus: The status of the document reference.
017//   FHIRAllTypes: Either an abstract type, a resource or a data type.
018//   FHIRDefinedType: Either a resource or a data type.
019//   MessageEvent: One of the message events defined as part of FHIR.
020//   NoteType: The presentation types of notes.
021//   RemittanceOutcome: The outcome of the processing.
022//   ResourceType: One of the resource types defined as part of FHIR.
023//   SearchParamType: Data types allowed to be used for search parameters.
024//   SpecialValues: A set of generally useful codes defined so they can be included in value sets.
025
026
027    public enum AbstractType {
028        /**
029         * A place holder that means any kind of data type
030         */
031        TYPE, 
032        /**
033         * A place holder that means any kind of resource
034         */
035        ANY, 
036        /**
037         * added to help the parsers
038         */
039        NULL;
040        public static AbstractType fromCode(String codeString) throws FHIRException {
041            if (codeString == null || "".equals(codeString))
042                return null;
043        if ("Type".equals(codeString))
044          return TYPE;
045        if ("Any".equals(codeString))
046          return ANY;
047        throw new FHIRException("Unknown AbstractType code '"+codeString+"'");
048        }
049        public String toCode() {
050          switch (this) {
051            case TYPE: return "Type";
052            case ANY: return "Any";
053            default: return "?";
054          }
055        }
056        public String getSystem() {
057          switch (this) {
058            case TYPE: return "http://hl7.org/fhir/abstract-types";
059            case ANY: return "http://hl7.org/fhir/abstract-types";
060            default: return "?";
061          }
062        }
063        public String getDefinition() {
064          switch (this) {
065            case TYPE: return "A place holder that means any kind of data type";
066            case ANY: return "A place holder that means any kind of resource";
067            default: return "?";
068          }
069        }
070        public String getDisplay() {
071          switch (this) {
072            case TYPE: return "Type";
073            case ANY: return "Any";
074            default: return "?";
075          }
076        }
077    }
078
079  public static class AbstractTypeEnumFactory implements EnumFactory<AbstractType> {
080    public AbstractType fromCode(String codeString) throws IllegalArgumentException {
081      if (codeString == null || "".equals(codeString))
082            if (codeString == null || "".equals(codeString))
083                return null;
084        if ("Type".equals(codeString))
085          return AbstractType.TYPE;
086        if ("Any".equals(codeString))
087          return AbstractType.ANY;
088        throw new IllegalArgumentException("Unknown AbstractType code '"+codeString+"'");
089        }
090        public Enumeration<AbstractType> fromType(Base code) throws FHIRException {
091          if (code == null || code.isEmpty())
092            return null;
093          String codeString = ((PrimitiveType) code).asStringValue();
094          if (codeString == null || "".equals(codeString))
095            return null;
096        if ("Type".equals(codeString))
097          return new Enumeration<AbstractType>(this, AbstractType.TYPE);
098        if ("Any".equals(codeString))
099          return new Enumeration<AbstractType>(this, AbstractType.ANY);
100        throw new FHIRException("Unknown AbstractType code '"+codeString+"'");
101        }
102    public String toCode(AbstractType code) {
103      if (code == AbstractType.TYPE)
104        return "Type";
105      if (code == AbstractType.ANY)
106        return "Any";
107      return "?";
108      }
109    public String toSystem(AbstractType code) {
110      return code.getSystem();
111      }
112    }
113
114    public enum AdministrativeGender {
115        /**
116         * Male
117         */
118        MALE, 
119        /**
120         * Female
121         */
122        FEMALE, 
123        /**
124         * Other
125         */
126        OTHER, 
127        /**
128         * Unknown
129         */
130        UNKNOWN, 
131        /**
132         * added to help the parsers
133         */
134        NULL;
135        public static AdministrativeGender fromCode(String codeString) throws FHIRException {
136            if (codeString == null || "".equals(codeString))
137                return null;
138        if ("male".equals(codeString))
139          return MALE;
140        if ("female".equals(codeString))
141          return FEMALE;
142        if ("other".equals(codeString))
143          return OTHER;
144        if ("unknown".equals(codeString))
145          return UNKNOWN;
146        throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'");
147        }
148        public String toCode() {
149          switch (this) {
150            case MALE: return "male";
151            case FEMALE: return "female";
152            case OTHER: return "other";
153            case UNKNOWN: return "unknown";
154            default: return "?";
155          }
156        }
157        public String getSystem() {
158          switch (this) {
159            case MALE: return "http://hl7.org/fhir/administrative-gender";
160            case FEMALE: return "http://hl7.org/fhir/administrative-gender";
161            case OTHER: return "http://hl7.org/fhir/administrative-gender";
162            case UNKNOWN: return "http://hl7.org/fhir/administrative-gender";
163            default: return "?";
164          }
165        }
166        public String getDefinition() {
167          switch (this) {
168            case MALE: return "Male";
169            case FEMALE: return "Female";
170            case OTHER: return "Other";
171            case UNKNOWN: return "Unknown";
172            default: return "?";
173          }
174        }
175        public String getDisplay() {
176          switch (this) {
177            case MALE: return "Male";
178            case FEMALE: return "Female";
179            case OTHER: return "Other";
180            case UNKNOWN: return "Unknown";
181            default: return "?";
182          }
183        }
184    }
185
186  public static class AdministrativeGenderEnumFactory implements EnumFactory<AdministrativeGender> {
187    public AdministrativeGender fromCode(String codeString) throws IllegalArgumentException {
188      if (codeString == null || "".equals(codeString))
189            if (codeString == null || "".equals(codeString))
190                return null;
191        if ("male".equals(codeString))
192          return AdministrativeGender.MALE;
193        if ("female".equals(codeString))
194          return AdministrativeGender.FEMALE;
195        if ("other".equals(codeString))
196          return AdministrativeGender.OTHER;
197        if ("unknown".equals(codeString))
198          return AdministrativeGender.UNKNOWN;
199        throw new IllegalArgumentException("Unknown AdministrativeGender code '"+codeString+"'");
200        }
201        public Enumeration<AdministrativeGender> fromType(Base code) throws FHIRException {
202          if (code == null || code.isEmpty())
203            return null;
204          String codeString = ((PrimitiveType) code).asStringValue();
205          if (codeString == null || "".equals(codeString))
206            return null;
207        if ("male".equals(codeString))
208          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.MALE);
209        if ("female".equals(codeString))
210          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.FEMALE);
211        if ("other".equals(codeString))
212          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.OTHER);
213        if ("unknown".equals(codeString))
214          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.UNKNOWN);
215        throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'");
216        }
217    public String toCode(AdministrativeGender code) {
218      if (code == AdministrativeGender.MALE)
219        return "male";
220      if (code == AdministrativeGender.FEMALE)
221        return "female";
222      if (code == AdministrativeGender.OTHER)
223        return "other";
224      if (code == AdministrativeGender.UNKNOWN)
225        return "unknown";
226      return "?";
227      }
228    public String toSystem(AdministrativeGender code) {
229      return code.getSystem();
230      }
231    }
232
233    public enum AgeUnits {
234        /**
235         * null
236         */
237        MIN, 
238        /**
239         * null
240         */
241        H, 
242        /**
243         * null
244         */
245        D, 
246        /**
247         * null
248         */
249        WK, 
250        /**
251         * null
252         */
253        MO, 
254        /**
255         * null
256         */
257        A, 
258        /**
259         * added to help the parsers
260         */
261        NULL;
262        public static AgeUnits fromCode(String codeString) throws FHIRException {
263            if (codeString == null || "".equals(codeString))
264                return null;
265        if ("min".equals(codeString))
266          return MIN;
267        if ("h".equals(codeString))
268          return H;
269        if ("d".equals(codeString))
270          return D;
271        if ("wk".equals(codeString))
272          return WK;
273        if ("mo".equals(codeString))
274          return MO;
275        if ("a".equals(codeString))
276          return A;
277        throw new FHIRException("Unknown AgeUnits code '"+codeString+"'");
278        }
279        public String toCode() {
280          switch (this) {
281            case MIN: return "min";
282            case H: return "h";
283            case D: return "d";
284            case WK: return "wk";
285            case MO: return "mo";
286            case A: return "a";
287            default: return "?";
288          }
289        }
290        public String getSystem() {
291          switch (this) {
292            case MIN: return "http://unitsofmeasure.org";
293            case H: return "http://unitsofmeasure.org";
294            case D: return "http://unitsofmeasure.org";
295            case WK: return "http://unitsofmeasure.org";
296            case MO: return "http://unitsofmeasure.org";
297            case A: return "http://unitsofmeasure.org";
298            default: return "?";
299          }
300        }
301        public String getDefinition() {
302          switch (this) {
303            case MIN: return "";
304            case H: return "";
305            case D: return "";
306            case WK: return "";
307            case MO: return "";
308            case A: return "";
309            default: return "?";
310          }
311        }
312        public String getDisplay() {
313          switch (this) {
314            case MIN: return "Minute";
315            case H: return "Hour";
316            case D: return "Day";
317            case WK: return "Week";
318            case MO: return "Month";
319            case A: return "Year";
320            default: return "?";
321          }
322        }
323    }
324
325  public static class AgeUnitsEnumFactory implements EnumFactory<AgeUnits> {
326    public AgeUnits fromCode(String codeString) throws IllegalArgumentException {
327      if (codeString == null || "".equals(codeString))
328            if (codeString == null || "".equals(codeString))
329                return null;
330        if ("min".equals(codeString))
331          return AgeUnits.MIN;
332        if ("h".equals(codeString))
333          return AgeUnits.H;
334        if ("d".equals(codeString))
335          return AgeUnits.D;
336        if ("wk".equals(codeString))
337          return AgeUnits.WK;
338        if ("mo".equals(codeString))
339          return AgeUnits.MO;
340        if ("a".equals(codeString))
341          return AgeUnits.A;
342        throw new IllegalArgumentException("Unknown AgeUnits code '"+codeString+"'");
343        }
344        public Enumeration<AgeUnits> fromType(Base code) throws FHIRException {
345          if (code == null || code.isEmpty())
346            return null;
347          String codeString = ((PrimitiveType) code).asStringValue();
348          if (codeString == null || "".equals(codeString))
349            return null;
350        if ("min".equals(codeString))
351          return new Enumeration<AgeUnits>(this, AgeUnits.MIN);
352        if ("h".equals(codeString))
353          return new Enumeration<AgeUnits>(this, AgeUnits.H);
354        if ("d".equals(codeString))
355          return new Enumeration<AgeUnits>(this, AgeUnits.D);
356        if ("wk".equals(codeString))
357          return new Enumeration<AgeUnits>(this, AgeUnits.WK);
358        if ("mo".equals(codeString))
359          return new Enumeration<AgeUnits>(this, AgeUnits.MO);
360        if ("a".equals(codeString))
361          return new Enumeration<AgeUnits>(this, AgeUnits.A);
362        throw new FHIRException("Unknown AgeUnits code '"+codeString+"'");
363        }
364    public String toCode(AgeUnits code) {
365      if (code == AgeUnits.MIN)
366        return "min";
367      if (code == AgeUnits.H)
368        return "h";
369      if (code == AgeUnits.D)
370        return "d";
371      if (code == AgeUnits.WK)
372        return "wk";
373      if (code == AgeUnits.MO)
374        return "mo";
375      if (code == AgeUnits.A)
376        return "a";
377      return "?";
378      }
379    public String toSystem(AgeUnits code) {
380      return code.getSystem();
381      }
382    }
383
384    public enum BindingStrength {
385        /**
386         * To be conformant, instances of this element SHALL include a code from the specified value set.
387         */
388        REQUIRED, 
389        /**
390         * To be conformant, instances of this element SHALL include a code 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.
391         */
392        EXTENSIBLE, 
393        /**
394         * Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant.
395         */
396        PREFERRED, 
397        /**
398         * 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.
399         */
400        EXAMPLE, 
401        /**
402         * added to help the parsers
403         */
404        NULL;
405        public static BindingStrength fromCode(String codeString) throws FHIRException {
406            if (codeString == null || "".equals(codeString))
407                return null;
408        if ("required".equals(codeString))
409          return REQUIRED;
410        if ("extensible".equals(codeString))
411          return EXTENSIBLE;
412        if ("preferred".equals(codeString))
413          return PREFERRED;
414        if ("example".equals(codeString))
415          return EXAMPLE;
416        throw new FHIRException("Unknown BindingStrength code '"+codeString+"'");
417        }
418        public String toCode() {
419          switch (this) {
420            case REQUIRED: return "required";
421            case EXTENSIBLE: return "extensible";
422            case PREFERRED: return "preferred";
423            case EXAMPLE: return "example";
424            default: return "?";
425          }
426        }
427        public String getSystem() {
428          switch (this) {
429            case REQUIRED: return "http://hl7.org/fhir/binding-strength";
430            case EXTENSIBLE: return "http://hl7.org/fhir/binding-strength";
431            case PREFERRED: return "http://hl7.org/fhir/binding-strength";
432            case EXAMPLE: return "http://hl7.org/fhir/binding-strength";
433            default: return "?";
434          }
435        }
436        public String getDefinition() {
437          switch (this) {
438            case REQUIRED: return "To be conformant, instances of this element SHALL include a code from the specified value set.";
439            case EXTENSIBLE: return "To be conformant, instances of this element SHALL include a code 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.";
440            case PREFERRED: return "Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant.";
441            case EXAMPLE: return "Instances are not expected or even encouraged to draw from the specified value set.  The value set merely provides examples of the types of concepts intended to be included.";
442            default: return "?";
443          }
444        }
445        public String getDisplay() {
446          switch (this) {
447            case REQUIRED: return "Required";
448            case EXTENSIBLE: return "Extensible";
449            case PREFERRED: return "Preferred";
450            case EXAMPLE: return "Example";
451            default: return "?";
452          }
453        }
454    }
455
456  public static class BindingStrengthEnumFactory implements EnumFactory<BindingStrength> {
457    public BindingStrength fromCode(String codeString) throws IllegalArgumentException {
458      if (codeString == null || "".equals(codeString))
459            if (codeString == null || "".equals(codeString))
460                return null;
461        if ("required".equals(codeString))
462          return BindingStrength.REQUIRED;
463        if ("extensible".equals(codeString))
464          return BindingStrength.EXTENSIBLE;
465        if ("preferred".equals(codeString))
466          return BindingStrength.PREFERRED;
467        if ("example".equals(codeString))
468          return BindingStrength.EXAMPLE;
469        throw new IllegalArgumentException("Unknown BindingStrength code '"+codeString+"'");
470        }
471        public Enumeration<BindingStrength> fromType(Base code) throws FHIRException {
472          if (code == null || code.isEmpty())
473            return null;
474          String codeString = ((PrimitiveType) code).asStringValue();
475          if (codeString == null || "".equals(codeString))
476            return null;
477        if ("required".equals(codeString))
478          return new Enumeration<BindingStrength>(this, BindingStrength.REQUIRED);
479        if ("extensible".equals(codeString))
480          return new Enumeration<BindingStrength>(this, BindingStrength.EXTENSIBLE);
481        if ("preferred".equals(codeString))
482          return new Enumeration<BindingStrength>(this, BindingStrength.PREFERRED);
483        if ("example".equals(codeString))
484          return new Enumeration<BindingStrength>(this, BindingStrength.EXAMPLE);
485        throw new FHIRException("Unknown BindingStrength code '"+codeString+"'");
486        }
487    public String toCode(BindingStrength code) {
488      if (code == BindingStrength.REQUIRED)
489        return "required";
490      if (code == BindingStrength.EXTENSIBLE)
491        return "extensible";
492      if (code == BindingStrength.PREFERRED)
493        return "preferred";
494      if (code == BindingStrength.EXAMPLE)
495        return "example";
496      return "?";
497      }
498    public String toSystem(BindingStrength code) {
499      return code.getSystem();
500      }
501    }
502
503    public enum ConceptMapEquivalence {
504        /**
505         * The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical).
506         */
507        EQUIVALENT, 
508        /**
509         * 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).
510         */
511        EQUAL, 
512        /**
513         * The target mapping is wider in meaning than the source concept.
514         */
515        WIDER, 
516        /**
517         * The target mapping subsumes the meaning of the source concept (e.g. the source is-a target).
518         */
519        SUBSUMES, 
520        /**
521         * The target mapping is narrower in meaning that 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.
522         */
523        NARROWER, 
524        /**
525         * The target mapping specializes the meaning of the source concept (e.g. the target is-a source).
526         */
527        SPECIALIZES, 
528        /**
529         * 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 narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.
530         */
531        INEXACT, 
532        /**
533         * There is no match for this concept in the destination concept system.
534         */
535        UNMATCHED, 
536        /**
537         * This is an explicit assertion that there is no mapping between the source and target concept.
538         */
539        DISJOINT, 
540        /**
541         * added to help the parsers
542         */
543        NULL;
544        public static ConceptMapEquivalence fromCode(String codeString) throws FHIRException {
545            if (codeString == null || "".equals(codeString))
546                return null;
547        if ("equivalent".equals(codeString))
548          return EQUIVALENT;
549        if ("equal".equals(codeString))
550          return EQUAL;
551        if ("wider".equals(codeString))
552          return WIDER;
553        if ("subsumes".equals(codeString))
554          return SUBSUMES;
555        if ("narrower".equals(codeString))
556          return NARROWER;
557        if ("specializes".equals(codeString))
558          return SPECIALIZES;
559        if ("inexact".equals(codeString))
560          return INEXACT;
561        if ("unmatched".equals(codeString))
562          return UNMATCHED;
563        if ("disjoint".equals(codeString))
564          return DISJOINT;
565        throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'");
566        }
567        public String toCode() {
568          switch (this) {
569            case EQUIVALENT: return "equivalent";
570            case EQUAL: return "equal";
571            case WIDER: return "wider";
572            case SUBSUMES: return "subsumes";
573            case NARROWER: return "narrower";
574            case SPECIALIZES: return "specializes";
575            case INEXACT: return "inexact";
576            case UNMATCHED: return "unmatched";
577            case DISJOINT: return "disjoint";
578            default: return "?";
579          }
580        }
581        public String getSystem() {
582          switch (this) {
583            case EQUIVALENT: return "http://hl7.org/fhir/concept-map-equivalence";
584            case EQUAL: return "http://hl7.org/fhir/concept-map-equivalence";
585            case WIDER: return "http://hl7.org/fhir/concept-map-equivalence";
586            case SUBSUMES: return "http://hl7.org/fhir/concept-map-equivalence";
587            case NARROWER: return "http://hl7.org/fhir/concept-map-equivalence";
588            case SPECIALIZES: return "http://hl7.org/fhir/concept-map-equivalence";
589            case INEXACT: return "http://hl7.org/fhir/concept-map-equivalence";
590            case UNMATCHED: return "http://hl7.org/fhir/concept-map-equivalence";
591            case DISJOINT: return "http://hl7.org/fhir/concept-map-equivalence";
592            default: return "?";
593          }
594        }
595        public String getDefinition() {
596          switch (this) {
597            case EQUIVALENT: return "The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical).";
598            case EQUAL: return "The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identical or irrelevant (i.e. intentionally identical).";
599            case WIDER: return "The target mapping is wider in meaning than the source concept.";
600            case SUBSUMES: return "The target mapping subsumes the meaning of the source concept (e.g. the source is-a target).";
601            case NARROWER: return "The target mapping is narrower in meaning that 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.";
602            case SPECIALIZES: return "The target mapping specializes the meaning of the source concept (e.g. the target is-a source).";
603            case INEXACT: return "The target mapping overlaps with the source concept, but both source and target cover additional meaning, or the definitions are imprecise and it is uncertain whether they have the same boundaries to their meaning. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.";
604            case UNMATCHED: return "There is no match for this concept in the destination concept system.";
605            case DISJOINT: return "This is an explicit assertion that there is no mapping between the source and target concept.";
606            default: return "?";
607          }
608        }
609        public String getDisplay() {
610          switch (this) {
611            case EQUIVALENT: return "Equivalent";
612            case EQUAL: return "Equal";
613            case WIDER: return "Wider";
614            case SUBSUMES: return "Subsumes";
615            case NARROWER: return "Narrower";
616            case SPECIALIZES: return "Specializes";
617            case INEXACT: return "Inexact";
618            case UNMATCHED: return "Unmatched";
619            case DISJOINT: return "Disjoint";
620            default: return "?";
621          }
622        }
623    }
624
625  public static class ConceptMapEquivalenceEnumFactory implements EnumFactory<ConceptMapEquivalence> {
626    public ConceptMapEquivalence fromCode(String codeString) throws IllegalArgumentException {
627      if (codeString == null || "".equals(codeString))
628            if (codeString == null || "".equals(codeString))
629                return null;
630        if ("equivalent".equals(codeString))
631          return ConceptMapEquivalence.EQUIVALENT;
632        if ("equal".equals(codeString))
633          return ConceptMapEquivalence.EQUAL;
634        if ("wider".equals(codeString))
635          return ConceptMapEquivalence.WIDER;
636        if ("subsumes".equals(codeString))
637          return ConceptMapEquivalence.SUBSUMES;
638        if ("narrower".equals(codeString))
639          return ConceptMapEquivalence.NARROWER;
640        if ("specializes".equals(codeString))
641          return ConceptMapEquivalence.SPECIALIZES;
642        if ("inexact".equals(codeString))
643          return ConceptMapEquivalence.INEXACT;
644        if ("unmatched".equals(codeString))
645          return ConceptMapEquivalence.UNMATCHED;
646        if ("disjoint".equals(codeString))
647          return ConceptMapEquivalence.DISJOINT;
648        throw new IllegalArgumentException("Unknown ConceptMapEquivalence code '"+codeString+"'");
649        }
650        public Enumeration<ConceptMapEquivalence> fromType(Base code) throws FHIRException {
651          if (code == null || code.isEmpty())
652            return null;
653          String codeString = ((PrimitiveType) code).asStringValue();
654          if (codeString == null || "".equals(codeString))
655            return null;
656        if ("equivalent".equals(codeString))
657          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.EQUIVALENT);
658        if ("equal".equals(codeString))
659          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.EQUAL);
660        if ("wider".equals(codeString))
661          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.WIDER);
662        if ("subsumes".equals(codeString))
663          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.SUBSUMES);
664        if ("narrower".equals(codeString))
665          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.NARROWER);
666        if ("specializes".equals(codeString))
667          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.SPECIALIZES);
668        if ("inexact".equals(codeString))
669          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.INEXACT);
670        if ("unmatched".equals(codeString))
671          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.UNMATCHED);
672        if ("disjoint".equals(codeString))
673          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.DISJOINT);
674        throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'");
675        }
676    public String toCode(ConceptMapEquivalence code) {
677      if (code == ConceptMapEquivalence.EQUIVALENT)
678        return "equivalent";
679      if (code == ConceptMapEquivalence.EQUAL)
680        return "equal";
681      if (code == ConceptMapEquivalence.WIDER)
682        return "wider";
683      if (code == ConceptMapEquivalence.SUBSUMES)
684        return "subsumes";
685      if (code == ConceptMapEquivalence.NARROWER)
686        return "narrower";
687      if (code == ConceptMapEquivalence.SPECIALIZES)
688        return "specializes";
689      if (code == ConceptMapEquivalence.INEXACT)
690        return "inexact";
691      if (code == ConceptMapEquivalence.UNMATCHED)
692        return "unmatched";
693      if (code == ConceptMapEquivalence.DISJOINT)
694        return "disjoint";
695      return "?";
696      }
697    public String toSystem(ConceptMapEquivalence code) {
698      return code.getSystem();
699      }
700    }
701
702    public enum ConformanceResourceStatus {
703        /**
704         * This resource is still under development.
705         */
706        DRAFT, 
707        /**
708         * This resource is ready for normal use.
709         */
710        ACTIVE, 
711        /**
712         * This resource has been withdrawn or superseded and should no longer be used.
713         */
714        RETIRED, 
715        /**
716         * added to help the parsers
717         */
718        NULL;
719        public static ConformanceResourceStatus fromCode(String codeString) throws FHIRException {
720            if (codeString == null || "".equals(codeString))
721                return null;
722        if ("draft".equals(codeString))
723          return DRAFT;
724        if ("active".equals(codeString))
725          return ACTIVE;
726        if ("retired".equals(codeString))
727          return RETIRED;
728        throw new FHIRException("Unknown ConformanceResourceStatus code '"+codeString+"'");
729        }
730        public String toCode() {
731          switch (this) {
732            case DRAFT: return "draft";
733            case ACTIVE: return "active";
734            case RETIRED: return "retired";
735            default: return "?";
736          }
737        }
738        public String getSystem() {
739          switch (this) {
740            case DRAFT: return "http://hl7.org/fhir/conformance-resource-status";
741            case ACTIVE: return "http://hl7.org/fhir/conformance-resource-status";
742            case RETIRED: return "http://hl7.org/fhir/conformance-resource-status";
743            default: return "?";
744          }
745        }
746        public String getDefinition() {
747          switch (this) {
748            case DRAFT: return "This resource is still under development.";
749            case ACTIVE: return "This resource is ready for normal use.";
750            case RETIRED: return "This resource has been withdrawn or superseded and should no longer be used.";
751            default: return "?";
752          }
753        }
754        public String getDisplay() {
755          switch (this) {
756            case DRAFT: return "Draft";
757            case ACTIVE: return "Active";
758            case RETIRED: return "Retired";
759            default: return "?";
760          }
761        }
762    }
763
764  public static class ConformanceResourceStatusEnumFactory implements EnumFactory<ConformanceResourceStatus> {
765    public ConformanceResourceStatus fromCode(String codeString) throws IllegalArgumentException {
766      if (codeString == null || "".equals(codeString))
767            if (codeString == null || "".equals(codeString))
768                return null;
769        if ("draft".equals(codeString))
770          return ConformanceResourceStatus.DRAFT;
771        if ("active".equals(codeString))
772          return ConformanceResourceStatus.ACTIVE;
773        if ("retired".equals(codeString))
774          return ConformanceResourceStatus.RETIRED;
775        throw new IllegalArgumentException("Unknown ConformanceResourceStatus code '"+codeString+"'");
776        }
777        public Enumeration<ConformanceResourceStatus> fromType(Base code) throws FHIRException {
778          if (code == null || code.isEmpty())
779            return null;
780          String codeString = ((PrimitiveType) code).asStringValue();
781          if (codeString == null || "".equals(codeString))
782            return null;
783        if ("draft".equals(codeString))
784          return new Enumeration<ConformanceResourceStatus>(this, ConformanceResourceStatus.DRAFT);
785        if ("active".equals(codeString))
786          return new Enumeration<ConformanceResourceStatus>(this, ConformanceResourceStatus.ACTIVE);
787        if ("retired".equals(codeString))
788          return new Enumeration<ConformanceResourceStatus>(this, ConformanceResourceStatus.RETIRED);
789        throw new FHIRException("Unknown ConformanceResourceStatus code '"+codeString+"'");
790        }
791    public String toCode(ConformanceResourceStatus code) {
792      if (code == ConformanceResourceStatus.DRAFT)
793        return "draft";
794      if (code == ConformanceResourceStatus.ACTIVE)
795        return "active";
796      if (code == ConformanceResourceStatus.RETIRED)
797        return "retired";
798      return "?";
799      }
800    public String toSystem(ConformanceResourceStatus code) {
801      return code.getSystem();
802      }
803    }
804
805    public enum DataAbsentReason {
806        /**
807         * The value is not known.
808         */
809        UNKNOWN, 
810        /**
811         * The source human does not know the value.
812         */
813        ASKED, 
814        /**
815         * There is reason to expect (from the workflow) that the value may become known.
816         */
817        TEMP, 
818        /**
819         * The workflow didn't lead to this value being known.
820         */
821        NOTASKED, 
822        /**
823         * The information is not available due to security, privacy or related reasons.
824         */
825        MASKED, 
826        /**
827         * The source system wasn't capable of supporting this element.
828         */
829        UNSUPPORTED, 
830        /**
831         * The content of the data is represented in the resource narrative.
832         */
833        ASTEXT, 
834        /**
835         * Some system or workflow process error means that the information is not available.
836         */
837        ERROR, 
838        /**
839         * NaN, standing for not a number, is a numeric data type value representing an undefined or unrepresentable value.
840         */
841        NAN, 
842        /**
843         * added to help the parsers
844         */
845        NULL;
846        public static DataAbsentReason fromCode(String codeString) throws FHIRException {
847            if (codeString == null || "".equals(codeString))
848                return null;
849        if ("unknown".equals(codeString))
850          return UNKNOWN;
851        if ("asked".equals(codeString))
852          return ASKED;
853        if ("temp".equals(codeString))
854          return TEMP;
855        if ("not-asked".equals(codeString))
856          return NOTASKED;
857        if ("masked".equals(codeString))
858          return MASKED;
859        if ("unsupported".equals(codeString))
860          return UNSUPPORTED;
861        if ("astext".equals(codeString))
862          return ASTEXT;
863        if ("error".equals(codeString))
864          return ERROR;
865        if ("NaN".equals(codeString))
866          return NAN;
867        throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'");
868        }
869        public String toCode() {
870          switch (this) {
871            case UNKNOWN: return "unknown";
872            case ASKED: return "asked";
873            case TEMP: return "temp";
874            case NOTASKED: return "not-asked";
875            case MASKED: return "masked";
876            case UNSUPPORTED: return "unsupported";
877            case ASTEXT: return "astext";
878            case ERROR: return "error";
879            case NAN: return "NaN";
880            default: return "?";
881          }
882        }
883        public String getSystem() {
884          switch (this) {
885            case UNKNOWN: return "http://hl7.org/fhir/data-absent-reason";
886            case ASKED: return "http://hl7.org/fhir/data-absent-reason";
887            case TEMP: return "http://hl7.org/fhir/data-absent-reason";
888            case NOTASKED: return "http://hl7.org/fhir/data-absent-reason";
889            case MASKED: return "http://hl7.org/fhir/data-absent-reason";
890            case UNSUPPORTED: return "http://hl7.org/fhir/data-absent-reason";
891            case ASTEXT: return "http://hl7.org/fhir/data-absent-reason";
892            case ERROR: return "http://hl7.org/fhir/data-absent-reason";
893            case NAN: return "http://hl7.org/fhir/data-absent-reason";
894            default: return "?";
895          }
896        }
897        public String getDefinition() {
898          switch (this) {
899            case UNKNOWN: return "The value is not known.";
900            case ASKED: return "The source human does not know the value.";
901            case TEMP: return "There is reason to expect (from the workflow) that the value may become known.";
902            case NOTASKED: return "The workflow didn't lead to this value being known.";
903            case MASKED: return "The information is not available due to security, privacy or related reasons.";
904            case UNSUPPORTED: return "The source system wasn't capable of supporting this element.";
905            case ASTEXT: return "The content of the data is represented in the resource narrative.";
906            case ERROR: return "Some system or workflow process error means that the information is not available.";
907            case NAN: return "NaN, standing for not a number, is a numeric data type value representing an undefined or unrepresentable value.";
908            default: return "?";
909          }
910        }
911        public String getDisplay() {
912          switch (this) {
913            case UNKNOWN: return "Unknown";
914            case ASKED: return "Asked";
915            case TEMP: return "Temp";
916            case NOTASKED: return "Not Asked";
917            case MASKED: return "Masked";
918            case UNSUPPORTED: return "Unsupported";
919            case ASTEXT: return "As Text";
920            case ERROR: return "Error";
921            case NAN: return "Not a Number";
922            default: return "?";
923          }
924        }
925    }
926
927  public static class DataAbsentReasonEnumFactory implements EnumFactory<DataAbsentReason> {
928    public DataAbsentReason fromCode(String codeString) throws IllegalArgumentException {
929      if (codeString == null || "".equals(codeString))
930            if (codeString == null || "".equals(codeString))
931                return null;
932        if ("unknown".equals(codeString))
933          return DataAbsentReason.UNKNOWN;
934        if ("asked".equals(codeString))
935          return DataAbsentReason.ASKED;
936        if ("temp".equals(codeString))
937          return DataAbsentReason.TEMP;
938        if ("not-asked".equals(codeString))
939          return DataAbsentReason.NOTASKED;
940        if ("masked".equals(codeString))
941          return DataAbsentReason.MASKED;
942        if ("unsupported".equals(codeString))
943          return DataAbsentReason.UNSUPPORTED;
944        if ("astext".equals(codeString))
945          return DataAbsentReason.ASTEXT;
946        if ("error".equals(codeString))
947          return DataAbsentReason.ERROR;
948        if ("NaN".equals(codeString))
949          return DataAbsentReason.NAN;
950        throw new IllegalArgumentException("Unknown DataAbsentReason code '"+codeString+"'");
951        }
952        public Enumeration<DataAbsentReason> fromType(Base code) throws FHIRException {
953          if (code == null || code.isEmpty())
954            return null;
955          String codeString = ((PrimitiveType) code).asStringValue();
956          if (codeString == null || "".equals(codeString))
957            return null;
958        if ("unknown".equals(codeString))
959          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.UNKNOWN);
960        if ("asked".equals(codeString))
961          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.ASKED);
962        if ("temp".equals(codeString))
963          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.TEMP);
964        if ("not-asked".equals(codeString))
965          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.NOTASKED);
966        if ("masked".equals(codeString))
967          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.MASKED);
968        if ("unsupported".equals(codeString))
969          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.UNSUPPORTED);
970        if ("astext".equals(codeString))
971          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.ASTEXT);
972        if ("error".equals(codeString))
973          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.ERROR);
974        if ("NaN".equals(codeString))
975          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.NAN);
976        throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'");
977        }
978    public String toCode(DataAbsentReason code) {
979      if (code == DataAbsentReason.UNKNOWN)
980        return "unknown";
981      if (code == DataAbsentReason.ASKED)
982        return "asked";
983      if (code == DataAbsentReason.TEMP)
984        return "temp";
985      if (code == DataAbsentReason.NOTASKED)
986        return "not-asked";
987      if (code == DataAbsentReason.MASKED)
988        return "masked";
989      if (code == DataAbsentReason.UNSUPPORTED)
990        return "unsupported";
991      if (code == DataAbsentReason.ASTEXT)
992        return "astext";
993      if (code == DataAbsentReason.ERROR)
994        return "error";
995      if (code == DataAbsentReason.NAN)
996        return "NaN";
997      return "?";
998      }
999    public String toSystem(DataAbsentReason code) {
1000      return code.getSystem();
1001      }
1002    }
1003
1004    public enum DataType {
1005        /**
1006         * The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library.
1007         */
1008        ACTIONDEFINITION, 
1009        /**
1010         * 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 and which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.
1011         */
1012        ADDRESS, 
1013        /**
1014         * null
1015         */
1016        AGE, 
1017        /**
1018         * A  text note which also  contains information about who made the statement and when.
1019         */
1020        ANNOTATION, 
1021        /**
1022         * For referring to data content defined in other formats.
1023         */
1024        ATTACHMENT, 
1025        /**
1026         * Base definition for all elements that are defined inside a resource - but not those in a data type.
1027         */
1028        BACKBONEELEMENT, 
1029        /**
1030         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
1031         */
1032        CODEABLECONCEPT, 
1033        /**
1034         * A reference to a code defined by a terminology system.
1035         */
1036        CODING, 
1037        /**
1038         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
1039         */
1040        CONTACTPOINT, 
1041        /**
1042         * null
1043         */
1044        COUNT, 
1045        /**
1046         * Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data.
1047         */
1048        DATAREQUIREMENT, 
1049        /**
1050         * null
1051         */
1052        DISTANCE, 
1053        /**
1054         * null
1055         */
1056        DURATION, 
1057        /**
1058         * Base definition for all elements in a resource.
1059         */
1060        ELEMENT, 
1061        /**
1062         * Captures constraints on each element within the resource, profile, or extension.
1063         */
1064        ELEMENTDEFINITION, 
1065        /**
1066         * Optional Extensions Element - found in all resources.
1067         */
1068        EXTENSION, 
1069        /**
1070         * A human's name with the ability to identify parts and usage.
1071         */
1072        HUMANNAME, 
1073        /**
1074         * A technical identifier - identifies some entity uniquely and unambiguously.
1075         */
1076        IDENTIFIER, 
1077        /**
1078         * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.
1079         */
1080        META, 
1081        /**
1082         * The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information.
1083         */
1084        MODULEMETADATA, 
1085        /**
1086         * null
1087         */
1088        MONEY, 
1089        /**
1090         * A human-readable formatted text, including images.
1091         */
1092        NARRATIVE, 
1093        /**
1094         * 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.
1095         */
1096        PARAMETERDEFINITION, 
1097        /**
1098         * A time period defined by a start and end date and optionally time.
1099         */
1100        PERIOD, 
1101        /**
1102         * 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.
1103         */
1104        QUANTITY, 
1105        /**
1106         * A set of ordered Quantities defined by a low and high limit.
1107         */
1108        RANGE, 
1109        /**
1110         * A relationship of two Quantity values - expressed as a numerator and a denominator.
1111         */
1112        RATIO, 
1113        /**
1114         * A reference from one resource to another.
1115         */
1116        REFERENCE, 
1117        /**
1118         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
1119         */
1120        SAMPLEDDATA, 
1121        /**
1122         * A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities.
1123         */
1124        SIGNATURE, 
1125        /**
1126         * null
1127         */
1128        SIMPLEQUANTITY, 
1129        /**
1130         * Specifies an event that may occur multiple times. Timing schedules are used to record when things are 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.
1131         */
1132        TIMING, 
1133        /**
1134         * A description of a triggering event.
1135         */
1136        TRIGGERDEFINITION, 
1137        /**
1138         * A stream of bytes
1139         */
1140        BASE64BINARY, 
1141        /**
1142         * Value of "true" or "false"
1143         */
1144        BOOLEAN, 
1145        /**
1146         * 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
1147         */
1148        CODE, 
1149        /**
1150         * 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.
1151         */
1152        DATE, 
1153        /**
1154         * 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.
1155         */
1156        DATETIME, 
1157        /**
1158         * A rational number with implicit precision
1159         */
1160        DECIMAL, 
1161        /**
1162         * 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.
1163         */
1164        ID, 
1165        /**
1166         * An instant in time - known at least to the second
1167         */
1168        INSTANT, 
1169        /**
1170         * A whole number
1171         */
1172        INTEGER, 
1173        /**
1174         * A string that may contain markdown syntax for optional processing by a mark down presentation engine
1175         */
1176        MARKDOWN, 
1177        /**
1178         * An oid represented as a URI
1179         */
1180        OID, 
1181        /**
1182         * An integer with a value that is positive (e.g. >0)
1183         */
1184        POSITIVEINT, 
1185        /**
1186         * A sequence of Unicode characters
1187         */
1188        STRING, 
1189        /**
1190         * A time during the day, with no date specified
1191         */
1192        TIME, 
1193        /**
1194         * An integer with a value that is not negative (e.g. >= 0)
1195         */
1196        UNSIGNEDINT, 
1197        /**
1198         * String of characters used to identify a name or a resource
1199         */
1200        URI, 
1201        /**
1202         * A UUID, represented as a URI
1203         */
1204        UUID, 
1205        /**
1206         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
1207         */
1208        XHTML, 
1209        /**
1210         * added to help the parsers
1211         */
1212        NULL;
1213        public static DataType fromCode(String codeString) throws FHIRException {
1214            if (codeString == null || "".equals(codeString))
1215                return null;
1216        if ("ActionDefinition".equals(codeString))
1217          return ACTIONDEFINITION;
1218        if ("Address".equals(codeString))
1219          return ADDRESS;
1220        if ("Age".equals(codeString))
1221          return AGE;
1222        if ("Annotation".equals(codeString))
1223          return ANNOTATION;
1224        if ("Attachment".equals(codeString))
1225          return ATTACHMENT;
1226        if ("BackboneElement".equals(codeString))
1227          return BACKBONEELEMENT;
1228        if ("CodeableConcept".equals(codeString))
1229          return CODEABLECONCEPT;
1230        if ("Coding".equals(codeString))
1231          return CODING;
1232        if ("ContactPoint".equals(codeString))
1233          return CONTACTPOINT;
1234        if ("Count".equals(codeString))
1235          return COUNT;
1236        if ("DataRequirement".equals(codeString))
1237          return DATAREQUIREMENT;
1238        if ("Distance".equals(codeString))
1239          return DISTANCE;
1240        if ("Duration".equals(codeString))
1241          return DURATION;
1242        if ("Element".equals(codeString))
1243          return ELEMENT;
1244        if ("ElementDefinition".equals(codeString))
1245          return ELEMENTDEFINITION;
1246        if ("Extension".equals(codeString))
1247          return EXTENSION;
1248        if ("HumanName".equals(codeString))
1249          return HUMANNAME;
1250        if ("Identifier".equals(codeString))
1251          return IDENTIFIER;
1252        if ("Meta".equals(codeString))
1253          return META;
1254        if ("ModuleMetadata".equals(codeString))
1255          return MODULEMETADATA;
1256        if ("Money".equals(codeString))
1257          return MONEY;
1258        if ("Narrative".equals(codeString))
1259          return NARRATIVE;
1260        if ("ParameterDefinition".equals(codeString))
1261          return PARAMETERDEFINITION;
1262        if ("Period".equals(codeString))
1263          return PERIOD;
1264        if ("Quantity".equals(codeString))
1265          return QUANTITY;
1266        if ("Range".equals(codeString))
1267          return RANGE;
1268        if ("Ratio".equals(codeString))
1269          return RATIO;
1270        if ("Reference".equals(codeString))
1271          return REFERENCE;
1272        if ("SampledData".equals(codeString))
1273          return SAMPLEDDATA;
1274        if ("Signature".equals(codeString))
1275          return SIGNATURE;
1276        if ("SimpleQuantity".equals(codeString))
1277          return SIMPLEQUANTITY;
1278        if ("Timing".equals(codeString))
1279          return TIMING;
1280        if ("TriggerDefinition".equals(codeString))
1281          return TRIGGERDEFINITION;
1282        if ("base64Binary".equals(codeString))
1283          return BASE64BINARY;
1284        if ("boolean".equals(codeString))
1285          return BOOLEAN;
1286        if ("code".equals(codeString))
1287          return CODE;
1288        if ("date".equals(codeString))
1289          return DATE;
1290        if ("dateTime".equals(codeString))
1291          return DATETIME;
1292        if ("decimal".equals(codeString))
1293          return DECIMAL;
1294        if ("id".equals(codeString))
1295          return ID;
1296        if ("instant".equals(codeString))
1297          return INSTANT;
1298        if ("integer".equals(codeString))
1299          return INTEGER;
1300        if ("markdown".equals(codeString))
1301          return MARKDOWN;
1302        if ("oid".equals(codeString))
1303          return OID;
1304        if ("positiveInt".equals(codeString))
1305          return POSITIVEINT;
1306        if ("string".equals(codeString))
1307          return STRING;
1308        if ("time".equals(codeString))
1309          return TIME;
1310        if ("unsignedInt".equals(codeString))
1311          return UNSIGNEDINT;
1312        if ("uri".equals(codeString))
1313          return URI;
1314        if ("uuid".equals(codeString))
1315          return UUID;
1316        if ("xhtml".equals(codeString))
1317          return XHTML;
1318        throw new FHIRException("Unknown DataType code '"+codeString+"'");
1319        }
1320        public String toCode() {
1321          switch (this) {
1322            case ACTIONDEFINITION: return "ActionDefinition";
1323            case ADDRESS: return "Address";
1324            case AGE: return "Age";
1325            case ANNOTATION: return "Annotation";
1326            case ATTACHMENT: return "Attachment";
1327            case BACKBONEELEMENT: return "BackboneElement";
1328            case CODEABLECONCEPT: return "CodeableConcept";
1329            case CODING: return "Coding";
1330            case CONTACTPOINT: return "ContactPoint";
1331            case COUNT: return "Count";
1332            case DATAREQUIREMENT: return "DataRequirement";
1333            case DISTANCE: return "Distance";
1334            case DURATION: return "Duration";
1335            case ELEMENT: return "Element";
1336            case ELEMENTDEFINITION: return "ElementDefinition";
1337            case EXTENSION: return "Extension";
1338            case HUMANNAME: return "HumanName";
1339            case IDENTIFIER: return "Identifier";
1340            case META: return "Meta";
1341            case MODULEMETADATA: return "ModuleMetadata";
1342            case MONEY: return "Money";
1343            case NARRATIVE: return "Narrative";
1344            case PARAMETERDEFINITION: return "ParameterDefinition";
1345            case PERIOD: return "Period";
1346            case QUANTITY: return "Quantity";
1347            case RANGE: return "Range";
1348            case RATIO: return "Ratio";
1349            case REFERENCE: return "Reference";
1350            case SAMPLEDDATA: return "SampledData";
1351            case SIGNATURE: return "Signature";
1352            case SIMPLEQUANTITY: return "SimpleQuantity";
1353            case TIMING: return "Timing";
1354            case TRIGGERDEFINITION: return "TriggerDefinition";
1355            case BASE64BINARY: return "base64Binary";
1356            case BOOLEAN: return "boolean";
1357            case CODE: return "code";
1358            case DATE: return "date";
1359            case DATETIME: return "dateTime";
1360            case DECIMAL: return "decimal";
1361            case ID: return "id";
1362            case INSTANT: return "instant";
1363            case INTEGER: return "integer";
1364            case MARKDOWN: return "markdown";
1365            case OID: return "oid";
1366            case POSITIVEINT: return "positiveInt";
1367            case STRING: return "string";
1368            case TIME: return "time";
1369            case UNSIGNEDINT: return "unsignedInt";
1370            case URI: return "uri";
1371            case UUID: return "uuid";
1372            case XHTML: return "xhtml";
1373            default: return "?";
1374          }
1375        }
1376        public String getSystem() {
1377          switch (this) {
1378            case ACTIONDEFINITION: return "http://hl7.org/fhir/data-types";
1379            case ADDRESS: return "http://hl7.org/fhir/data-types";
1380            case AGE: return "http://hl7.org/fhir/data-types";
1381            case ANNOTATION: return "http://hl7.org/fhir/data-types";
1382            case ATTACHMENT: return "http://hl7.org/fhir/data-types";
1383            case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types";
1384            case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types";
1385            case CODING: return "http://hl7.org/fhir/data-types";
1386            case CONTACTPOINT: return "http://hl7.org/fhir/data-types";
1387            case COUNT: return "http://hl7.org/fhir/data-types";
1388            case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types";
1389            case DISTANCE: return "http://hl7.org/fhir/data-types";
1390            case DURATION: return "http://hl7.org/fhir/data-types";
1391            case ELEMENT: return "http://hl7.org/fhir/data-types";
1392            case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types";
1393            case EXTENSION: return "http://hl7.org/fhir/data-types";
1394            case HUMANNAME: return "http://hl7.org/fhir/data-types";
1395            case IDENTIFIER: return "http://hl7.org/fhir/data-types";
1396            case META: return "http://hl7.org/fhir/data-types";
1397            case MODULEMETADATA: return "http://hl7.org/fhir/data-types";
1398            case MONEY: return "http://hl7.org/fhir/data-types";
1399            case NARRATIVE: return "http://hl7.org/fhir/data-types";
1400            case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types";
1401            case PERIOD: return "http://hl7.org/fhir/data-types";
1402            case QUANTITY: return "http://hl7.org/fhir/data-types";
1403            case RANGE: return "http://hl7.org/fhir/data-types";
1404            case RATIO: return "http://hl7.org/fhir/data-types";
1405            case REFERENCE: return "http://hl7.org/fhir/data-types";
1406            case SAMPLEDDATA: return "http://hl7.org/fhir/data-types";
1407            case SIGNATURE: return "http://hl7.org/fhir/data-types";
1408            case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types";
1409            case TIMING: return "http://hl7.org/fhir/data-types";
1410            case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types";
1411            case BASE64BINARY: return "http://hl7.org/fhir/data-types";
1412            case BOOLEAN: return "http://hl7.org/fhir/data-types";
1413            case CODE: return "http://hl7.org/fhir/data-types";
1414            case DATE: return "http://hl7.org/fhir/data-types";
1415            case DATETIME: return "http://hl7.org/fhir/data-types";
1416            case DECIMAL: return "http://hl7.org/fhir/data-types";
1417            case ID: return "http://hl7.org/fhir/data-types";
1418            case INSTANT: return "http://hl7.org/fhir/data-types";
1419            case INTEGER: return "http://hl7.org/fhir/data-types";
1420            case MARKDOWN: return "http://hl7.org/fhir/data-types";
1421            case OID: return "http://hl7.org/fhir/data-types";
1422            case POSITIVEINT: return "http://hl7.org/fhir/data-types";
1423            case STRING: return "http://hl7.org/fhir/data-types";
1424            case TIME: return "http://hl7.org/fhir/data-types";
1425            case UNSIGNEDINT: return "http://hl7.org/fhir/data-types";
1426            case URI: return "http://hl7.org/fhir/data-types";
1427            case UUID: return "http://hl7.org/fhir/data-types";
1428            case XHTML: return "http://hl7.org/fhir/data-types";
1429            default: return "?";
1430          }
1431        }
1432        public String getDefinition() {
1433          switch (this) {
1434            case ACTIONDEFINITION: return "The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library.";
1435            case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations and which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.";
1436            case AGE: return "";
1437            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
1438            case ATTACHMENT: return "For referring to data content defined in other formats.";
1439            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
1440            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
1441            case CODING: return "A reference to a code defined by a terminology system.";
1442            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
1443            case COUNT: return "";
1444            case DATAREQUIREMENT: return "Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data.";
1445            case DISTANCE: return "";
1446            case DURATION: return "";
1447            case ELEMENT: return "Base definition for all elements in a resource.";
1448            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
1449            case EXTENSION: return "Optional Extensions Element - found in all resources.";
1450            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
1451            case IDENTIFIER: return "A technical identifier - identifies some entity uniquely and unambiguously.";
1452            case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.";
1453            case MODULEMETADATA: return "The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information.";
1454            case MONEY: return "";
1455            case NARRATIVE: return "A human-readable formatted text, including images.";
1456            case PARAMETERDEFINITION: return "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.";
1457            case PERIOD: return "A time period defined by a start and end date and optionally time.";
1458            case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
1459            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
1460            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
1461            case REFERENCE: return "A reference from one resource to another.";
1462            case SAMPLEDDATA: return "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.";
1463            case SIGNATURE: return "A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities.";
1464            case SIMPLEQUANTITY: return "";
1465            case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are 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.";
1466            case TRIGGERDEFINITION: return "A description of a triggering event.";
1467            case BASE64BINARY: return "A stream of bytes";
1468            case BOOLEAN: return "Value of \"true\" or \"false\"";
1469            case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents";
1470            case DATE: return "A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.";
1471            case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.";
1472            case DECIMAL: return "A rational number with implicit precision";
1473            case ID: return "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.";
1474            case INSTANT: return "An instant in time - known at least to the second";
1475            case INTEGER: return "A whole number";
1476            case MARKDOWN: return "A string that may contain markdown syntax for optional processing by a mark down presentation engine";
1477            case OID: return "An oid represented as a URI";
1478            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
1479            case STRING: return "A sequence of Unicode characters";
1480            case TIME: return "A time during the day, with no date specified";
1481            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
1482            case URI: return "String of characters used to identify a name or a resource";
1483            case UUID: return "A UUID, represented as a URI";
1484            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
1485            default: return "?";
1486          }
1487        }
1488        public String getDisplay() {
1489          switch (this) {
1490            case ACTIONDEFINITION: return "ActionDefinition";
1491            case ADDRESS: return "Address";
1492            case AGE: return "Age";
1493            case ANNOTATION: return "Annotation";
1494            case ATTACHMENT: return "Attachment";
1495            case BACKBONEELEMENT: return "BackboneElement";
1496            case CODEABLECONCEPT: return "CodeableConcept";
1497            case CODING: return "Coding";
1498            case CONTACTPOINT: return "ContactPoint";
1499            case COUNT: return "Count";
1500            case DATAREQUIREMENT: return "DataRequirement";
1501            case DISTANCE: return "Distance";
1502            case DURATION: return "Duration";
1503            case ELEMENT: return "Element";
1504            case ELEMENTDEFINITION: return "ElementDefinition";
1505            case EXTENSION: return "Extension";
1506            case HUMANNAME: return "HumanName";
1507            case IDENTIFIER: return "Identifier";
1508            case META: return "Meta";
1509            case MODULEMETADATA: return "ModuleMetadata";
1510            case MONEY: return "Money";
1511            case NARRATIVE: return "Narrative";
1512            case PARAMETERDEFINITION: return "ParameterDefinition";
1513            case PERIOD: return "Period";
1514            case QUANTITY: return "Quantity";
1515            case RANGE: return "Range";
1516            case RATIO: return "Ratio";
1517            case REFERENCE: return "Reference";
1518            case SAMPLEDDATA: return "SampledData";
1519            case SIGNATURE: return "Signature";
1520            case SIMPLEQUANTITY: return "SimpleQuantity";
1521            case TIMING: return "Timing";
1522            case TRIGGERDEFINITION: return "TriggerDefinition";
1523            case BASE64BINARY: return "base64Binary";
1524            case BOOLEAN: return "boolean";
1525            case CODE: return "code";
1526            case DATE: return "date";
1527            case DATETIME: return "dateTime";
1528            case DECIMAL: return "decimal";
1529            case ID: return "id";
1530            case INSTANT: return "instant";
1531            case INTEGER: return "integer";
1532            case MARKDOWN: return "markdown";
1533            case OID: return "oid";
1534            case POSITIVEINT: return "positiveInt";
1535            case STRING: return "string";
1536            case TIME: return "time";
1537            case UNSIGNEDINT: return "unsignedInt";
1538            case URI: return "uri";
1539            case UUID: return "uuid";
1540            case XHTML: return "XHTML";
1541            default: return "?";
1542          }
1543        }
1544    }
1545
1546  public static class DataTypeEnumFactory implements EnumFactory<DataType> {
1547    public DataType fromCode(String codeString) throws IllegalArgumentException {
1548      if (codeString == null || "".equals(codeString))
1549            if (codeString == null || "".equals(codeString))
1550                return null;
1551        if ("ActionDefinition".equals(codeString))
1552          return DataType.ACTIONDEFINITION;
1553        if ("Address".equals(codeString))
1554          return DataType.ADDRESS;
1555        if ("Age".equals(codeString))
1556          return DataType.AGE;
1557        if ("Annotation".equals(codeString))
1558          return DataType.ANNOTATION;
1559        if ("Attachment".equals(codeString))
1560          return DataType.ATTACHMENT;
1561        if ("BackboneElement".equals(codeString))
1562          return DataType.BACKBONEELEMENT;
1563        if ("CodeableConcept".equals(codeString))
1564          return DataType.CODEABLECONCEPT;
1565        if ("Coding".equals(codeString))
1566          return DataType.CODING;
1567        if ("ContactPoint".equals(codeString))
1568          return DataType.CONTACTPOINT;
1569        if ("Count".equals(codeString))
1570          return DataType.COUNT;
1571        if ("DataRequirement".equals(codeString))
1572          return DataType.DATAREQUIREMENT;
1573        if ("Distance".equals(codeString))
1574          return DataType.DISTANCE;
1575        if ("Duration".equals(codeString))
1576          return DataType.DURATION;
1577        if ("Element".equals(codeString))
1578          return DataType.ELEMENT;
1579        if ("ElementDefinition".equals(codeString))
1580          return DataType.ELEMENTDEFINITION;
1581        if ("Extension".equals(codeString))
1582          return DataType.EXTENSION;
1583        if ("HumanName".equals(codeString))
1584          return DataType.HUMANNAME;
1585        if ("Identifier".equals(codeString))
1586          return DataType.IDENTIFIER;
1587        if ("Meta".equals(codeString))
1588          return DataType.META;
1589        if ("ModuleMetadata".equals(codeString))
1590          return DataType.MODULEMETADATA;
1591        if ("Money".equals(codeString))
1592          return DataType.MONEY;
1593        if ("Narrative".equals(codeString))
1594          return DataType.NARRATIVE;
1595        if ("ParameterDefinition".equals(codeString))
1596          return DataType.PARAMETERDEFINITION;
1597        if ("Period".equals(codeString))
1598          return DataType.PERIOD;
1599        if ("Quantity".equals(codeString))
1600          return DataType.QUANTITY;
1601        if ("Range".equals(codeString))
1602          return DataType.RANGE;
1603        if ("Ratio".equals(codeString))
1604          return DataType.RATIO;
1605        if ("Reference".equals(codeString))
1606          return DataType.REFERENCE;
1607        if ("SampledData".equals(codeString))
1608          return DataType.SAMPLEDDATA;
1609        if ("Signature".equals(codeString))
1610          return DataType.SIGNATURE;
1611        if ("SimpleQuantity".equals(codeString))
1612          return DataType.SIMPLEQUANTITY;
1613        if ("Timing".equals(codeString))
1614          return DataType.TIMING;
1615        if ("TriggerDefinition".equals(codeString))
1616          return DataType.TRIGGERDEFINITION;
1617        if ("base64Binary".equals(codeString))
1618          return DataType.BASE64BINARY;
1619        if ("boolean".equals(codeString))
1620          return DataType.BOOLEAN;
1621        if ("code".equals(codeString))
1622          return DataType.CODE;
1623        if ("date".equals(codeString))
1624          return DataType.DATE;
1625        if ("dateTime".equals(codeString))
1626          return DataType.DATETIME;
1627        if ("decimal".equals(codeString))
1628          return DataType.DECIMAL;
1629        if ("id".equals(codeString))
1630          return DataType.ID;
1631        if ("instant".equals(codeString))
1632          return DataType.INSTANT;
1633        if ("integer".equals(codeString))
1634          return DataType.INTEGER;
1635        if ("markdown".equals(codeString))
1636          return DataType.MARKDOWN;
1637        if ("oid".equals(codeString))
1638          return DataType.OID;
1639        if ("positiveInt".equals(codeString))
1640          return DataType.POSITIVEINT;
1641        if ("string".equals(codeString))
1642          return DataType.STRING;
1643        if ("time".equals(codeString))
1644          return DataType.TIME;
1645        if ("unsignedInt".equals(codeString))
1646          return DataType.UNSIGNEDINT;
1647        if ("uri".equals(codeString))
1648          return DataType.URI;
1649        if ("uuid".equals(codeString))
1650          return DataType.UUID;
1651        if ("xhtml".equals(codeString))
1652          return DataType.XHTML;
1653        throw new IllegalArgumentException("Unknown DataType code '"+codeString+"'");
1654        }
1655        public Enumeration<DataType> fromType(Base code) throws FHIRException {
1656          if (code == null || code.isEmpty())
1657            return null;
1658          String codeString = ((PrimitiveType) code).asStringValue();
1659          if (codeString == null || "".equals(codeString))
1660            return null;
1661        if ("ActionDefinition".equals(codeString))
1662          return new Enumeration<DataType>(this, DataType.ACTIONDEFINITION);
1663        if ("Address".equals(codeString))
1664          return new Enumeration<DataType>(this, DataType.ADDRESS);
1665        if ("Age".equals(codeString))
1666          return new Enumeration<DataType>(this, DataType.AGE);
1667        if ("Annotation".equals(codeString))
1668          return new Enumeration<DataType>(this, DataType.ANNOTATION);
1669        if ("Attachment".equals(codeString))
1670          return new Enumeration<DataType>(this, DataType.ATTACHMENT);
1671        if ("BackboneElement".equals(codeString))
1672          return new Enumeration<DataType>(this, DataType.BACKBONEELEMENT);
1673        if ("CodeableConcept".equals(codeString))
1674          return new Enumeration<DataType>(this, DataType.CODEABLECONCEPT);
1675        if ("Coding".equals(codeString))
1676          return new Enumeration<DataType>(this, DataType.CODING);
1677        if ("ContactPoint".equals(codeString))
1678          return new Enumeration<DataType>(this, DataType.CONTACTPOINT);
1679        if ("Count".equals(codeString))
1680          return new Enumeration<DataType>(this, DataType.COUNT);
1681        if ("DataRequirement".equals(codeString))
1682          return new Enumeration<DataType>(this, DataType.DATAREQUIREMENT);
1683        if ("Distance".equals(codeString))
1684          return new Enumeration<DataType>(this, DataType.DISTANCE);
1685        if ("Duration".equals(codeString))
1686          return new Enumeration<DataType>(this, DataType.DURATION);
1687        if ("Element".equals(codeString))
1688          return new Enumeration<DataType>(this, DataType.ELEMENT);
1689        if ("ElementDefinition".equals(codeString))
1690          return new Enumeration<DataType>(this, DataType.ELEMENTDEFINITION);
1691        if ("Extension".equals(codeString))
1692          return new Enumeration<DataType>(this, DataType.EXTENSION);
1693        if ("HumanName".equals(codeString))
1694          return new Enumeration<DataType>(this, DataType.HUMANNAME);
1695        if ("Identifier".equals(codeString))
1696          return new Enumeration<DataType>(this, DataType.IDENTIFIER);
1697        if ("Meta".equals(codeString))
1698          return new Enumeration<DataType>(this, DataType.META);
1699        if ("ModuleMetadata".equals(codeString))
1700          return new Enumeration<DataType>(this, DataType.MODULEMETADATA);
1701        if ("Money".equals(codeString))
1702          return new Enumeration<DataType>(this, DataType.MONEY);
1703        if ("Narrative".equals(codeString))
1704          return new Enumeration<DataType>(this, DataType.NARRATIVE);
1705        if ("ParameterDefinition".equals(codeString))
1706          return new Enumeration<DataType>(this, DataType.PARAMETERDEFINITION);
1707        if ("Period".equals(codeString))
1708          return new Enumeration<DataType>(this, DataType.PERIOD);
1709        if ("Quantity".equals(codeString))
1710          return new Enumeration<DataType>(this, DataType.QUANTITY);
1711        if ("Range".equals(codeString))
1712          return new Enumeration<DataType>(this, DataType.RANGE);
1713        if ("Ratio".equals(codeString))
1714          return new Enumeration<DataType>(this, DataType.RATIO);
1715        if ("Reference".equals(codeString))
1716          return new Enumeration<DataType>(this, DataType.REFERENCE);
1717        if ("SampledData".equals(codeString))
1718          return new Enumeration<DataType>(this, DataType.SAMPLEDDATA);
1719        if ("Signature".equals(codeString))
1720          return new Enumeration<DataType>(this, DataType.SIGNATURE);
1721        if ("SimpleQuantity".equals(codeString))
1722          return new Enumeration<DataType>(this, DataType.SIMPLEQUANTITY);
1723        if ("Timing".equals(codeString))
1724          return new Enumeration<DataType>(this, DataType.TIMING);
1725        if ("TriggerDefinition".equals(codeString))
1726          return new Enumeration<DataType>(this, DataType.TRIGGERDEFINITION);
1727        if ("base64Binary".equals(codeString))
1728          return new Enumeration<DataType>(this, DataType.BASE64BINARY);
1729        if ("boolean".equals(codeString))
1730          return new Enumeration<DataType>(this, DataType.BOOLEAN);
1731        if ("code".equals(codeString))
1732          return new Enumeration<DataType>(this, DataType.CODE);
1733        if ("date".equals(codeString))
1734          return new Enumeration<DataType>(this, DataType.DATE);
1735        if ("dateTime".equals(codeString))
1736          return new Enumeration<DataType>(this, DataType.DATETIME);
1737        if ("decimal".equals(codeString))
1738          return new Enumeration<DataType>(this, DataType.DECIMAL);
1739        if ("id".equals(codeString))
1740          return new Enumeration<DataType>(this, DataType.ID);
1741        if ("instant".equals(codeString))
1742          return new Enumeration<DataType>(this, DataType.INSTANT);
1743        if ("integer".equals(codeString))
1744          return new Enumeration<DataType>(this, DataType.INTEGER);
1745        if ("markdown".equals(codeString))
1746          return new Enumeration<DataType>(this, DataType.MARKDOWN);
1747        if ("oid".equals(codeString))
1748          return new Enumeration<DataType>(this, DataType.OID);
1749        if ("positiveInt".equals(codeString))
1750          return new Enumeration<DataType>(this, DataType.POSITIVEINT);
1751        if ("string".equals(codeString))
1752          return new Enumeration<DataType>(this, DataType.STRING);
1753        if ("time".equals(codeString))
1754          return new Enumeration<DataType>(this, DataType.TIME);
1755        if ("unsignedInt".equals(codeString))
1756          return new Enumeration<DataType>(this, DataType.UNSIGNEDINT);
1757        if ("uri".equals(codeString))
1758          return new Enumeration<DataType>(this, DataType.URI);
1759        if ("uuid".equals(codeString))
1760          return new Enumeration<DataType>(this, DataType.UUID);
1761        if ("xhtml".equals(codeString))
1762          return new Enumeration<DataType>(this, DataType.XHTML);
1763        throw new FHIRException("Unknown DataType code '"+codeString+"'");
1764        }
1765    public String toCode(DataType code) {
1766      if (code == DataType.ACTIONDEFINITION)
1767        return "ActionDefinition";
1768      if (code == DataType.ADDRESS)
1769        return "Address";
1770      if (code == DataType.AGE)
1771        return "Age";
1772      if (code == DataType.ANNOTATION)
1773        return "Annotation";
1774      if (code == DataType.ATTACHMENT)
1775        return "Attachment";
1776      if (code == DataType.BACKBONEELEMENT)
1777        return "BackboneElement";
1778      if (code == DataType.CODEABLECONCEPT)
1779        return "CodeableConcept";
1780      if (code == DataType.CODING)
1781        return "Coding";
1782      if (code == DataType.CONTACTPOINT)
1783        return "ContactPoint";
1784      if (code == DataType.COUNT)
1785        return "Count";
1786      if (code == DataType.DATAREQUIREMENT)
1787        return "DataRequirement";
1788      if (code == DataType.DISTANCE)
1789        return "Distance";
1790      if (code == DataType.DURATION)
1791        return "Duration";
1792      if (code == DataType.ELEMENT)
1793        return "Element";
1794      if (code == DataType.ELEMENTDEFINITION)
1795        return "ElementDefinition";
1796      if (code == DataType.EXTENSION)
1797        return "Extension";
1798      if (code == DataType.HUMANNAME)
1799        return "HumanName";
1800      if (code == DataType.IDENTIFIER)
1801        return "Identifier";
1802      if (code == DataType.META)
1803        return "Meta";
1804      if (code == DataType.MODULEMETADATA)
1805        return "ModuleMetadata";
1806      if (code == DataType.MONEY)
1807        return "Money";
1808      if (code == DataType.NARRATIVE)
1809        return "Narrative";
1810      if (code == DataType.PARAMETERDEFINITION)
1811        return "ParameterDefinition";
1812      if (code == DataType.PERIOD)
1813        return "Period";
1814      if (code == DataType.QUANTITY)
1815        return "Quantity";
1816      if (code == DataType.RANGE)
1817        return "Range";
1818      if (code == DataType.RATIO)
1819        return "Ratio";
1820      if (code == DataType.REFERENCE)
1821        return "Reference";
1822      if (code == DataType.SAMPLEDDATA)
1823        return "SampledData";
1824      if (code == DataType.SIGNATURE)
1825        return "Signature";
1826      if (code == DataType.SIMPLEQUANTITY)
1827        return "SimpleQuantity";
1828      if (code == DataType.TIMING)
1829        return "Timing";
1830      if (code == DataType.TRIGGERDEFINITION)
1831        return "TriggerDefinition";
1832      if (code == DataType.BASE64BINARY)
1833        return "base64Binary";
1834      if (code == DataType.BOOLEAN)
1835        return "boolean";
1836      if (code == DataType.CODE)
1837        return "code";
1838      if (code == DataType.DATE)
1839        return "date";
1840      if (code == DataType.DATETIME)
1841        return "dateTime";
1842      if (code == DataType.DECIMAL)
1843        return "decimal";
1844      if (code == DataType.ID)
1845        return "id";
1846      if (code == DataType.INSTANT)
1847        return "instant";
1848      if (code == DataType.INTEGER)
1849        return "integer";
1850      if (code == DataType.MARKDOWN)
1851        return "markdown";
1852      if (code == DataType.OID)
1853        return "oid";
1854      if (code == DataType.POSITIVEINT)
1855        return "positiveInt";
1856      if (code == DataType.STRING)
1857        return "string";
1858      if (code == DataType.TIME)
1859        return "time";
1860      if (code == DataType.UNSIGNEDINT)
1861        return "unsignedInt";
1862      if (code == DataType.URI)
1863        return "uri";
1864      if (code == DataType.UUID)
1865        return "uuid";
1866      if (code == DataType.XHTML)
1867        return "xhtml";
1868      return "?";
1869      }
1870    public String toSystem(DataType code) {
1871      return code.getSystem();
1872      }
1873    }
1874
1875    public enum DocumentReferenceStatus {
1876        /**
1877         * This is the current reference for this document.
1878         */
1879        CURRENT, 
1880        /**
1881         * This reference has been superseded by another reference.
1882         */
1883        SUPERSEDED, 
1884        /**
1885         * This reference was created in error.
1886         */
1887        ENTEREDINERROR, 
1888        /**
1889         * added to help the parsers
1890         */
1891        NULL;
1892        public static DocumentReferenceStatus fromCode(String codeString) throws FHIRException {
1893            if (codeString == null || "".equals(codeString))
1894                return null;
1895        if ("current".equals(codeString))
1896          return CURRENT;
1897        if ("superseded".equals(codeString))
1898          return SUPERSEDED;
1899        if ("entered-in-error".equals(codeString))
1900          return ENTEREDINERROR;
1901        throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'");
1902        }
1903        public String toCode() {
1904          switch (this) {
1905            case CURRENT: return "current";
1906            case SUPERSEDED: return "superseded";
1907            case ENTEREDINERROR: return "entered-in-error";
1908            default: return "?";
1909          }
1910        }
1911        public String getSystem() {
1912          switch (this) {
1913            case CURRENT: return "http://hl7.org/fhir/document-reference-status";
1914            case SUPERSEDED: return "http://hl7.org/fhir/document-reference-status";
1915            case ENTEREDINERROR: return "http://hl7.org/fhir/document-reference-status";
1916            default: return "?";
1917          }
1918        }
1919        public String getDefinition() {
1920          switch (this) {
1921            case CURRENT: return "This is the current reference for this document.";
1922            case SUPERSEDED: return "This reference has been superseded by another reference.";
1923            case ENTEREDINERROR: return "This reference was created in error.";
1924            default: return "?";
1925          }
1926        }
1927        public String getDisplay() {
1928          switch (this) {
1929            case CURRENT: return "Current";
1930            case SUPERSEDED: return "Superseded";
1931            case ENTEREDINERROR: return "Entered in Error";
1932            default: return "?";
1933          }
1934        }
1935    }
1936
1937  public static class DocumentReferenceStatusEnumFactory implements EnumFactory<DocumentReferenceStatus> {
1938    public DocumentReferenceStatus fromCode(String codeString) throws IllegalArgumentException {
1939      if (codeString == null || "".equals(codeString))
1940            if (codeString == null || "".equals(codeString))
1941                return null;
1942        if ("current".equals(codeString))
1943          return DocumentReferenceStatus.CURRENT;
1944        if ("superseded".equals(codeString))
1945          return DocumentReferenceStatus.SUPERSEDED;
1946        if ("entered-in-error".equals(codeString))
1947          return DocumentReferenceStatus.ENTEREDINERROR;
1948        throw new IllegalArgumentException("Unknown DocumentReferenceStatus code '"+codeString+"'");
1949        }
1950        public Enumeration<DocumentReferenceStatus> fromType(Base code) throws FHIRException {
1951          if (code == null || code.isEmpty())
1952            return null;
1953          String codeString = ((PrimitiveType) code).asStringValue();
1954          if (codeString == null || "".equals(codeString))
1955            return null;
1956        if ("current".equals(codeString))
1957          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.CURRENT);
1958        if ("superseded".equals(codeString))
1959          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.SUPERSEDED);
1960        if ("entered-in-error".equals(codeString))
1961          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.ENTEREDINERROR);
1962        throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'");
1963        }
1964    public String toCode(DocumentReferenceStatus code) {
1965      if (code == DocumentReferenceStatus.CURRENT)
1966        return "current";
1967      if (code == DocumentReferenceStatus.SUPERSEDED)
1968        return "superseded";
1969      if (code == DocumentReferenceStatus.ENTEREDINERROR)
1970        return "entered-in-error";
1971      return "?";
1972      }
1973    public String toSystem(DocumentReferenceStatus code) {
1974      return code.getSystem();
1975      }
1976    }
1977
1978    public enum FHIRAllTypes {
1979        /**
1980         * The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library.
1981         */
1982        ACTIONDEFINITION, 
1983        /**
1984         * 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 and which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.
1985         */
1986        ADDRESS, 
1987        /**
1988         * null
1989         */
1990        AGE, 
1991        /**
1992         * A  text note which also  contains information about who made the statement and when.
1993         */
1994        ANNOTATION, 
1995        /**
1996         * For referring to data content defined in other formats.
1997         */
1998        ATTACHMENT, 
1999        /**
2000         * Base definition for all elements that are defined inside a resource - but not those in a data type.
2001         */
2002        BACKBONEELEMENT, 
2003        /**
2004         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
2005         */
2006        CODEABLECONCEPT, 
2007        /**
2008         * A reference to a code defined by a terminology system.
2009         */
2010        CODING, 
2011        /**
2012         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
2013         */
2014        CONTACTPOINT, 
2015        /**
2016         * null
2017         */
2018        COUNT, 
2019        /**
2020         * Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data.
2021         */
2022        DATAREQUIREMENT, 
2023        /**
2024         * null
2025         */
2026        DISTANCE, 
2027        /**
2028         * null
2029         */
2030        DURATION, 
2031        /**
2032         * Base definition for all elements in a resource.
2033         */
2034        ELEMENT, 
2035        /**
2036         * Captures constraints on each element within the resource, profile, or extension.
2037         */
2038        ELEMENTDEFINITION, 
2039        /**
2040         * Optional Extensions Element - found in all resources.
2041         */
2042        EXTENSION, 
2043        /**
2044         * A human's name with the ability to identify parts and usage.
2045         */
2046        HUMANNAME, 
2047        /**
2048         * A technical identifier - identifies some entity uniquely and unambiguously.
2049         */
2050        IDENTIFIER, 
2051        /**
2052         * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.
2053         */
2054        META, 
2055        /**
2056         * The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information.
2057         */
2058        MODULEMETADATA, 
2059        /**
2060         * null
2061         */
2062        MONEY, 
2063        /**
2064         * A human-readable formatted text, including images.
2065         */
2066        NARRATIVE, 
2067        /**
2068         * 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.
2069         */
2070        PARAMETERDEFINITION, 
2071        /**
2072         * A time period defined by a start and end date and optionally time.
2073         */
2074        PERIOD, 
2075        /**
2076         * 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.
2077         */
2078        QUANTITY, 
2079        /**
2080         * A set of ordered Quantities defined by a low and high limit.
2081         */
2082        RANGE, 
2083        /**
2084         * A relationship of two Quantity values - expressed as a numerator and a denominator.
2085         */
2086        RATIO, 
2087        /**
2088         * A reference from one resource to another.
2089         */
2090        REFERENCE, 
2091        /**
2092         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
2093         */
2094        SAMPLEDDATA, 
2095        /**
2096         * A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities.
2097         */
2098        SIGNATURE, 
2099        /**
2100         * null
2101         */
2102        SIMPLEQUANTITY, 
2103        /**
2104         * Specifies an event that may occur multiple times. Timing schedules are used to record when things are 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.
2105         */
2106        TIMING, 
2107        /**
2108         * A description of a triggering event.
2109         */
2110        TRIGGERDEFINITION, 
2111        /**
2112         * A stream of bytes
2113         */
2114        BASE64BINARY, 
2115        /**
2116         * Value of "true" or "false"
2117         */
2118        BOOLEAN, 
2119        /**
2120         * 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
2121         */
2122        CODE, 
2123        /**
2124         * 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.
2125         */
2126        DATE, 
2127        /**
2128         * 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.
2129         */
2130        DATETIME, 
2131        /**
2132         * A rational number with implicit precision
2133         */
2134        DECIMAL, 
2135        /**
2136         * 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.
2137         */
2138        ID, 
2139        /**
2140         * An instant in time - known at least to the second
2141         */
2142        INSTANT, 
2143        /**
2144         * A whole number
2145         */
2146        INTEGER, 
2147        /**
2148         * A string that may contain markdown syntax for optional processing by a mark down presentation engine
2149         */
2150        MARKDOWN, 
2151        /**
2152         * An oid represented as a URI
2153         */
2154        OID, 
2155        /**
2156         * An integer with a value that is positive (e.g. >0)
2157         */
2158        POSITIVEINT, 
2159        /**
2160         * A sequence of Unicode characters
2161         */
2162        STRING, 
2163        /**
2164         * A time during the day, with no date specified
2165         */
2166        TIME, 
2167        /**
2168         * An integer with a value that is not negative (e.g. >= 0)
2169         */
2170        UNSIGNEDINT, 
2171        /**
2172         * String of characters used to identify a name or a resource
2173         */
2174        URI, 
2175        /**
2176         * A UUID, represented as a URI
2177         */
2178        UUID, 
2179        /**
2180         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
2181         */
2182        XHTML, 
2183        /**
2184         * A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centres, etc.
2185         */
2186        ACCOUNT, 
2187        /**
2188         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
2189         */
2190        ALLERGYINTOLERANCE, 
2191        /**
2192         * 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).
2193         */
2194        APPOINTMENT, 
2195        /**
2196         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
2197         */
2198        APPOINTMENTRESPONSE, 
2199        /**
2200         * 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.
2201         */
2202        AUDITEVENT, 
2203        /**
2204         * 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.
2205         */
2206        BASIC, 
2207        /**
2208         * A binary resource can contain any content, whether text, image, pdf, zip archive, etc.
2209         */
2210        BINARY, 
2211        /**
2212         * Record details about the anatomical location of a specimen or body part.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.
2213         */
2214        BODYSITE, 
2215        /**
2216         * A container for a collection of resources.
2217         */
2218        BUNDLE, 
2219        /**
2220         * 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.
2221         */
2222        CAREPLAN, 
2223        /**
2224         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
2225         */
2226        CARETEAM, 
2227        /**
2228         * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.
2229         */
2230        CLAIM, 
2231        /**
2232         * This resource provides the adjudication details from the processing of a Claim resource.
2233         */
2234        CLAIMRESPONSE, 
2235        /**
2236         * 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.
2237         */
2238        CLINICALIMPRESSION, 
2239        /**
2240         * A code system resource specifies a set of codes drawn from one or more code systems.
2241         */
2242        CODESYSTEM, 
2243        /**
2244         * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition.
2245         */
2246        COMMUNICATION, 
2247        /**
2248         * 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.
2249         */
2250        COMMUNICATIONREQUEST, 
2251        /**
2252         * A compartment definition that defines how resources are accessed on a server.
2253         */
2254        COMPARTMENTDEFINITION, 
2255        /**
2256         * A set of healthcare-related information that is assembled together into a single logical document 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. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained.
2257         */
2258        COMPOSITION, 
2259        /**
2260         * A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models.
2261         */
2262        CONCEPTMAP, 
2263        /**
2264         * Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary.
2265         */
2266        CONDITION, 
2267        /**
2268         * A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
2269         */
2270        CONFORMANCE, 
2271        /**
2272         * A formal agreement between parties regarding the conduct of business, exchange of information or other matters.
2273         */
2274        CONTRACT, 
2275        /**
2276         * Financial instrument which may be used to pay for or reimburse health care products and services.
2277         */
2278        COVERAGE, 
2279        /**
2280         * The formal description of a single piece of information that can be gathered and reported.
2281         */
2282        DATAELEMENT, 
2283        /**
2284         * This resource defines a decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of a actions that should be taken whenever some condition is met in response to a particular event or events.
2285         */
2286        DECISIONSUPPORTRULE, 
2287        /**
2288         * The DecisionSupportServiceModule describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.
2289         */
2290        DECISIONSUPPORTSERVICEMODULE, 
2291        /**
2292         * 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.
2293         */
2294        DETECTEDISSUE, 
2295        /**
2296         * This resource identifies an instance or 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.  Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.  Non-medical devices may include items such as a machine, cellphone, computer, application, etc.
2297         */
2298        DEVICE, 
2299        /**
2300         * Describes the characteristics, operational status and capabilities of a medical-related component of a medical device.
2301         */
2302        DEVICECOMPONENT, 
2303        /**
2304         * Describes a measurement, calculation or setting capability of a medical device.
2305         */
2306        DEVICEMETRIC, 
2307        /**
2308         * 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.
2309         */
2310        DEVICEUSEREQUEST, 
2311        /**
2312         * 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.
2313         */
2314        DEVICEUSESTATEMENT, 
2315        /**
2316         * A record of a request for a diagnostic investigation service to be performed.
2317         */
2318        DIAGNOSTICORDER, 
2319        /**
2320         * 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.
2321         */
2322        DIAGNOSTICREPORT, 
2323        /**
2324         * A manifest that defines a set of documents.
2325         */
2326        DOCUMENTMANIFEST, 
2327        /**
2328         * A reference to a document .
2329         */
2330        DOCUMENTREFERENCE, 
2331        /**
2332         * A resource that includes narrative, extensions, and contained resources.
2333         */
2334        DOMAINRESOURCE, 
2335        /**
2336         * This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service.
2337         */
2338        ELIGIBILITYREQUEST, 
2339        /**
2340         * This resource provides eligibility and plan details from the processing of an Eligibility resource.
2341         */
2342        ELIGIBILITYRESPONSE, 
2343        /**
2344         * 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.
2345         */
2346        ENCOUNTER, 
2347        /**
2348         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
2349         */
2350        ENROLLMENTREQUEST, 
2351        /**
2352         * This resource provides enrollment and plan details from the processing of an Enrollment resource.
2353         */
2354        ENROLLMENTRESPONSE, 
2355        /**
2356         * 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.
2357         */
2358        EPISODEOFCARE, 
2359        /**
2360         * Resource to define constraints on the Expansion of a FHIR ValueSet.
2361         */
2362        EXPANSIONPROFILE, 
2363        /**
2364         * 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.
2365         */
2366        EXPLANATIONOFBENEFIT, 
2367        /**
2368         * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.
2369         */
2370        FAMILYMEMBERHISTORY, 
2371        /**
2372         * Prospective warnings of potential issues when providing care to the patient.
2373         */
2374        FLAG, 
2375        /**
2376         * 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.
2377         */
2378        GOAL, 
2379        /**
2380         * 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.
2381         */
2382        GROUP, 
2383        /**
2384         * 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.
2385         */
2386        GUIDANCERESPONSE, 
2387        /**
2388         * The details of a healthcare service available at a location.
2389         */
2390        HEALTHCARESERVICE, 
2391        /**
2392         * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances).  The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on.
2393         */
2394        IMAGINGEXCERPT, 
2395        /**
2396         * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances).  The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on.
2397         */
2398        IMAGINGOBJECTSELECTION, 
2399        /**
2400         * 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.
2401         */
2402        IMAGINGSTUDY, 
2403        /**
2404         * Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed.
2405         */
2406        IMMUNIZATION, 
2407        /**
2408         * A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification.
2409         */
2410        IMMUNIZATIONRECOMMENDATION, 
2411        /**
2412         * A set of rules or how FHIR is used to solve a particular problem. 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.
2413         */
2414        IMPLEMENTATIONGUIDE, 
2415        /**
2416         * The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library.
2417         */
2418        LIBRARY, 
2419        /**
2420         * Identifies two or more records (resource instances) that are referring to the same real-world "occurrence".
2421         */
2422        LINKAGE, 
2423        /**
2424         * A set of information summarized from a list of other resources.
2425         */
2426        LIST, 
2427        /**
2428         * Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.
2429         */
2430        LOCATION, 
2431        /**
2432         * The Measure resource provides the definition of a quality measure.
2433         */
2434        MEASURE, 
2435        /**
2436         * The MeasureReport resource contains the results of evaluating a measure.
2437         */
2438        MEASUREREPORT, 
2439        /**
2440         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
2441         */
2442        MEDIA, 
2443        /**
2444         * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.
2445         */
2446        MEDICATION, 
2447        /**
2448         * 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.
2449         */
2450        MEDICATIONADMINISTRATION, 
2451        /**
2452         * 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.
2453         */
2454        MEDICATIONDISPENSE, 
2455        /**
2456         * An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationOrder" rather than "MedicationPrescription" to generalize the use across inpatient and outpatient settings as well as for care plans, etc.
2457         */
2458        MEDICATIONORDER, 
2459        /**
2460         * 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 e.g. the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains 
2461
2462The 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.
2463         */
2464        MEDICATIONSTATEMENT, 
2465        /**
2466         * 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.
2467         */
2468        MESSAGEHEADER, 
2469        /**
2470         * The ModuleDefinition resource defines the data requirements for a quality artifact.
2471         */
2472        MODULEDEFINITION, 
2473        /**
2474         * 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.
2475         */
2476        NAMINGSYSTEM, 
2477        /**
2478         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
2479         */
2480        NUTRITIONORDER, 
2481        /**
2482         * Measurements and simple assertions made about a patient, device or other subject.
2483         */
2484        OBSERVATION, 
2485        /**
2486         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
2487         */
2488        OPERATIONDEFINITION, 
2489        /**
2490         * A collection of error, warning or information messages that result from a system action.
2491         */
2492        OPERATIONOUTCOME, 
2493        /**
2494         * A request to perform an action.
2495         */
2496        ORDER, 
2497        /**
2498         * A response to an order.
2499         */
2500        ORDERRESPONSE, 
2501        /**
2502         * This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support.
2503         */
2504        ORDERSET, 
2505        /**
2506         * 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, etc.
2507         */
2508        ORGANIZATION, 
2509        /**
2510         * This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it.
2511         */
2512        PARAMETERS, 
2513        /**
2514         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
2515         */
2516        PATIENT, 
2517        /**
2518         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
2519         */
2520        PAYMENTNOTICE, 
2521        /**
2522         * This resource provides payment details and claim references supporting a bulk payment.
2523         */
2524        PAYMENTRECONCILIATION, 
2525        /**
2526         * Demographics and administrative information about a person independent of a specific health-related context.
2527         */
2528        PERSON, 
2529        /**
2530         * A person who is directly or indirectly involved in the provisioning of healthcare.
2531         */
2532        PRACTITIONER, 
2533        /**
2534         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
2535         */
2536        PRACTITIONERROLE, 
2537        /**
2538         * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy.
2539         */
2540        PROCEDURE, 
2541        /**
2542         * A request for a procedure to be performed. May be a proposal or an order.
2543         */
2544        PROCEDUREREQUEST, 
2545        /**
2546         * This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources.
2547         */
2548        PROCESSREQUEST, 
2549        /**
2550         * This resource provides processing status, errors and notes from the processing of a resource.
2551         */
2552        PROCESSRESPONSE, 
2553        /**
2554         * A definition of behaviors to be taken in particular circumstances, often including conditions, options and other decision points.
2555         */
2556        PROTOCOL, 
2557        /**
2558         * 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.
2559         */
2560        PROVENANCE, 
2561        /**
2562         * A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.
2563         */
2564        QUESTIONNAIRE, 
2565        /**
2566         * 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 underlying questions.
2567         */
2568        QUESTIONNAIRERESPONSE, 
2569        /**
2570         * Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization.
2571         */
2572        REFERRALREQUEST, 
2573        /**
2574         * 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.
2575         */
2576        RELATEDPERSON, 
2577        /**
2578         * This is the base resource type for everything.
2579         */
2580        RESOURCE, 
2581        /**
2582         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
2583         */
2584        RISKASSESSMENT, 
2585        /**
2586         * A container for slot(s) of time that may be available for booking appointments.
2587         */
2588        SCHEDULE, 
2589        /**
2590         * A search parameter that defines a named search item that can be used to search/filter on a resource.
2591         */
2592        SEARCHPARAMETER, 
2593        /**
2594         * Variation and Sequence data.
2595         */
2596        SEQUENCE, 
2597        /**
2598         * A slot of time on a schedule that may be available for booking appointments.
2599         */
2600        SLOT, 
2601        /**
2602         * A sample to be used for analysis.
2603         */
2604        SPECIMEN, 
2605        /**
2606         * 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.
2607         */
2608        STRUCTUREDEFINITION, 
2609        /**
2610         * A Map of relationships between 2 structures that can be used to transform data.
2611         */
2612        STRUCTUREMAP, 
2613        /**
2614         * 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 is able to take an appropriate action.
2615         */
2616        SUBSCRIPTION, 
2617        /**
2618         * A homogeneous material with a definite composition.
2619         */
2620        SUBSTANCE, 
2621        /**
2622         * Record of delivery of what is supplied.
2623         */
2624        SUPPLYDELIVERY, 
2625        /**
2626         * A record of a request for a medication, substance or device used in the healthcare setting.
2627         */
2628        SUPPLYREQUEST, 
2629        /**
2630         * A task to be performed.
2631         */
2632        TASK, 
2633        /**
2634         * TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification.
2635         */
2636        TESTSCRIPT, 
2637        /**
2638         * A value set specifies a set of codes drawn from one or more code systems.
2639         */
2640        VALUESET, 
2641        /**
2642         * An authorization for the supply of glasses and/or contact lenses to a patient.
2643         */
2644        VISIONPRESCRIPTION, 
2645        /**
2646         * A place holder that means any kind of data type
2647         */
2648        TYPE, 
2649        /**
2650         * A place holder that means any kind of resource
2651         */
2652        ANY, 
2653        /**
2654         * added to help the parsers
2655         */
2656        NULL;
2657        public static FHIRAllTypes fromCode(String codeString) throws FHIRException {
2658            if (codeString == null || "".equals(codeString))
2659                return null;
2660        if ("ActionDefinition".equals(codeString))
2661          return ACTIONDEFINITION;
2662        if ("Address".equals(codeString))
2663          return ADDRESS;
2664        if ("Age".equals(codeString))
2665          return AGE;
2666        if ("Annotation".equals(codeString))
2667          return ANNOTATION;
2668        if ("Attachment".equals(codeString))
2669          return ATTACHMENT;
2670        if ("BackboneElement".equals(codeString))
2671          return BACKBONEELEMENT;
2672        if ("CodeableConcept".equals(codeString))
2673          return CODEABLECONCEPT;
2674        if ("Coding".equals(codeString))
2675          return CODING;
2676        if ("ContactPoint".equals(codeString))
2677          return CONTACTPOINT;
2678        if ("Count".equals(codeString))
2679          return COUNT;
2680        if ("DataRequirement".equals(codeString))
2681          return DATAREQUIREMENT;
2682        if ("Distance".equals(codeString))
2683          return DISTANCE;
2684        if ("Duration".equals(codeString))
2685          return DURATION;
2686        if ("Element".equals(codeString))
2687          return ELEMENT;
2688        if ("ElementDefinition".equals(codeString))
2689          return ELEMENTDEFINITION;
2690        if ("Extension".equals(codeString))
2691          return EXTENSION;
2692        if ("HumanName".equals(codeString))
2693          return HUMANNAME;
2694        if ("Identifier".equals(codeString))
2695          return IDENTIFIER;
2696        if ("Meta".equals(codeString))
2697          return META;
2698        if ("ModuleMetadata".equals(codeString))
2699          return MODULEMETADATA;
2700        if ("Money".equals(codeString))
2701          return MONEY;
2702        if ("Narrative".equals(codeString))
2703          return NARRATIVE;
2704        if ("ParameterDefinition".equals(codeString))
2705          return PARAMETERDEFINITION;
2706        if ("Period".equals(codeString))
2707          return PERIOD;
2708        if ("Quantity".equals(codeString))
2709          return QUANTITY;
2710        if ("Range".equals(codeString))
2711          return RANGE;
2712        if ("Ratio".equals(codeString))
2713          return RATIO;
2714        if ("Reference".equals(codeString))
2715          return REFERENCE;
2716        if ("SampledData".equals(codeString))
2717          return SAMPLEDDATA;
2718        if ("Signature".equals(codeString))
2719          return SIGNATURE;
2720        if ("SimpleQuantity".equals(codeString))
2721          return SIMPLEQUANTITY;
2722        if ("Timing".equals(codeString))
2723          return TIMING;
2724        if ("TriggerDefinition".equals(codeString))
2725          return TRIGGERDEFINITION;
2726        if ("base64Binary".equals(codeString))
2727          return BASE64BINARY;
2728        if ("boolean".equals(codeString))
2729          return BOOLEAN;
2730        if ("code".equals(codeString))
2731          return CODE;
2732        if ("date".equals(codeString))
2733          return DATE;
2734        if ("dateTime".equals(codeString))
2735          return DATETIME;
2736        if ("decimal".equals(codeString))
2737          return DECIMAL;
2738        if ("id".equals(codeString))
2739          return ID;
2740        if ("instant".equals(codeString))
2741          return INSTANT;
2742        if ("integer".equals(codeString))
2743          return INTEGER;
2744        if ("markdown".equals(codeString))
2745          return MARKDOWN;
2746        if ("oid".equals(codeString))
2747          return OID;
2748        if ("positiveInt".equals(codeString))
2749          return POSITIVEINT;
2750        if ("string".equals(codeString))
2751          return STRING;
2752        if ("time".equals(codeString))
2753          return TIME;
2754        if ("unsignedInt".equals(codeString))
2755          return UNSIGNEDINT;
2756        if ("uri".equals(codeString))
2757          return URI;
2758        if ("uuid".equals(codeString))
2759          return UUID;
2760        if ("xhtml".equals(codeString))
2761          return XHTML;
2762        if ("Account".equals(codeString))
2763          return ACCOUNT;
2764        if ("AllergyIntolerance".equals(codeString))
2765          return ALLERGYINTOLERANCE;
2766        if ("Appointment".equals(codeString))
2767          return APPOINTMENT;
2768        if ("AppointmentResponse".equals(codeString))
2769          return APPOINTMENTRESPONSE;
2770        if ("AuditEvent".equals(codeString))
2771          return AUDITEVENT;
2772        if ("Basic".equals(codeString))
2773          return BASIC;
2774        if ("Binary".equals(codeString))
2775          return BINARY;
2776        if ("BodySite".equals(codeString))
2777          return BODYSITE;
2778        if ("Bundle".equals(codeString))
2779          return BUNDLE;
2780        if ("CarePlan".equals(codeString))
2781          return CAREPLAN;
2782        if ("CareTeam".equals(codeString))
2783          return CARETEAM;
2784        if ("Claim".equals(codeString))
2785          return CLAIM;
2786        if ("ClaimResponse".equals(codeString))
2787          return CLAIMRESPONSE;
2788        if ("ClinicalImpression".equals(codeString))
2789          return CLINICALIMPRESSION;
2790        if ("CodeSystem".equals(codeString))
2791          return CODESYSTEM;
2792        if ("Communication".equals(codeString))
2793          return COMMUNICATION;
2794        if ("CommunicationRequest".equals(codeString))
2795          return COMMUNICATIONREQUEST;
2796        if ("CompartmentDefinition".equals(codeString))
2797          return COMPARTMENTDEFINITION;
2798        if ("Composition".equals(codeString))
2799          return COMPOSITION;
2800        if ("ConceptMap".equals(codeString))
2801          return CONCEPTMAP;
2802        if ("Condition".equals(codeString))
2803          return CONDITION;
2804        if ("Conformance".equals(codeString))
2805          return CONFORMANCE;
2806        if ("Contract".equals(codeString))
2807          return CONTRACT;
2808        if ("Coverage".equals(codeString))
2809          return COVERAGE;
2810        if ("DataElement".equals(codeString))
2811          return DATAELEMENT;
2812        if ("DecisionSupportRule".equals(codeString))
2813          return DECISIONSUPPORTRULE;
2814        if ("DecisionSupportServiceModule".equals(codeString))
2815          return DECISIONSUPPORTSERVICEMODULE;
2816        if ("DetectedIssue".equals(codeString))
2817          return DETECTEDISSUE;
2818        if ("Device".equals(codeString))
2819          return DEVICE;
2820        if ("DeviceComponent".equals(codeString))
2821          return DEVICECOMPONENT;
2822        if ("DeviceMetric".equals(codeString))
2823          return DEVICEMETRIC;
2824        if ("DeviceUseRequest".equals(codeString))
2825          return DEVICEUSEREQUEST;
2826        if ("DeviceUseStatement".equals(codeString))
2827          return DEVICEUSESTATEMENT;
2828        if ("DiagnosticOrder".equals(codeString))
2829          return DIAGNOSTICORDER;
2830        if ("DiagnosticReport".equals(codeString))
2831          return DIAGNOSTICREPORT;
2832        if ("DocumentManifest".equals(codeString))
2833          return DOCUMENTMANIFEST;
2834        if ("DocumentReference".equals(codeString))
2835          return DOCUMENTREFERENCE;
2836        if ("DomainResource".equals(codeString))
2837          return DOMAINRESOURCE;
2838        if ("EligibilityRequest".equals(codeString))
2839          return ELIGIBILITYREQUEST;
2840        if ("EligibilityResponse".equals(codeString))
2841          return ELIGIBILITYRESPONSE;
2842        if ("Encounter".equals(codeString))
2843          return ENCOUNTER;
2844        if ("EnrollmentRequest".equals(codeString))
2845          return ENROLLMENTREQUEST;
2846        if ("EnrollmentResponse".equals(codeString))
2847          return ENROLLMENTRESPONSE;
2848        if ("EpisodeOfCare".equals(codeString))
2849          return EPISODEOFCARE;
2850        if ("ExpansionProfile".equals(codeString))
2851          return EXPANSIONPROFILE;
2852        if ("ExplanationOfBenefit".equals(codeString))
2853          return EXPLANATIONOFBENEFIT;
2854        if ("FamilyMemberHistory".equals(codeString))
2855          return FAMILYMEMBERHISTORY;
2856        if ("Flag".equals(codeString))
2857          return FLAG;
2858        if ("Goal".equals(codeString))
2859          return GOAL;
2860        if ("Group".equals(codeString))
2861          return GROUP;
2862        if ("GuidanceResponse".equals(codeString))
2863          return GUIDANCERESPONSE;
2864        if ("HealthcareService".equals(codeString))
2865          return HEALTHCARESERVICE;
2866        if ("ImagingExcerpt".equals(codeString))
2867          return IMAGINGEXCERPT;
2868        if ("ImagingObjectSelection".equals(codeString))
2869          return IMAGINGOBJECTSELECTION;
2870        if ("ImagingStudy".equals(codeString))
2871          return IMAGINGSTUDY;
2872        if ("Immunization".equals(codeString))
2873          return IMMUNIZATION;
2874        if ("ImmunizationRecommendation".equals(codeString))
2875          return IMMUNIZATIONRECOMMENDATION;
2876        if ("ImplementationGuide".equals(codeString))
2877          return IMPLEMENTATIONGUIDE;
2878        if ("Library".equals(codeString))
2879          return LIBRARY;
2880        if ("Linkage".equals(codeString))
2881          return LINKAGE;
2882        if ("List".equals(codeString))
2883          return LIST;
2884        if ("Location".equals(codeString))
2885          return LOCATION;
2886        if ("Measure".equals(codeString))
2887          return MEASURE;
2888        if ("MeasureReport".equals(codeString))
2889          return MEASUREREPORT;
2890        if ("Media".equals(codeString))
2891          return MEDIA;
2892        if ("Medication".equals(codeString))
2893          return MEDICATION;
2894        if ("MedicationAdministration".equals(codeString))
2895          return MEDICATIONADMINISTRATION;
2896        if ("MedicationDispense".equals(codeString))
2897          return MEDICATIONDISPENSE;
2898        if ("MedicationOrder".equals(codeString))
2899          return MEDICATIONORDER;
2900        if ("MedicationStatement".equals(codeString))
2901          return MEDICATIONSTATEMENT;
2902        if ("MessageHeader".equals(codeString))
2903          return MESSAGEHEADER;
2904        if ("ModuleDefinition".equals(codeString))
2905          return MODULEDEFINITION;
2906        if ("NamingSystem".equals(codeString))
2907          return NAMINGSYSTEM;
2908        if ("NutritionOrder".equals(codeString))
2909          return NUTRITIONORDER;
2910        if ("Observation".equals(codeString))
2911          return OBSERVATION;
2912        if ("OperationDefinition".equals(codeString))
2913          return OPERATIONDEFINITION;
2914        if ("OperationOutcome".equals(codeString))
2915          return OPERATIONOUTCOME;
2916        if ("Order".equals(codeString))
2917          return ORDER;
2918        if ("OrderResponse".equals(codeString))
2919          return ORDERRESPONSE;
2920        if ("OrderSet".equals(codeString))
2921          return ORDERSET;
2922        if ("Organization".equals(codeString))
2923          return ORGANIZATION;
2924        if ("Parameters".equals(codeString))
2925          return PARAMETERS;
2926        if ("Patient".equals(codeString))
2927          return PATIENT;
2928        if ("PaymentNotice".equals(codeString))
2929          return PAYMENTNOTICE;
2930        if ("PaymentReconciliation".equals(codeString))
2931          return PAYMENTRECONCILIATION;
2932        if ("Person".equals(codeString))
2933          return PERSON;
2934        if ("Practitioner".equals(codeString))
2935          return PRACTITIONER;
2936        if ("PractitionerRole".equals(codeString))
2937          return PRACTITIONERROLE;
2938        if ("Procedure".equals(codeString))
2939          return PROCEDURE;
2940        if ("ProcedureRequest".equals(codeString))
2941          return PROCEDUREREQUEST;
2942        if ("ProcessRequest".equals(codeString))
2943          return PROCESSREQUEST;
2944        if ("ProcessResponse".equals(codeString))
2945          return PROCESSRESPONSE;
2946        if ("Protocol".equals(codeString))
2947          return PROTOCOL;
2948        if ("Provenance".equals(codeString))
2949          return PROVENANCE;
2950        if ("Questionnaire".equals(codeString))
2951          return QUESTIONNAIRE;
2952        if ("QuestionnaireResponse".equals(codeString))
2953          return QUESTIONNAIRERESPONSE;
2954        if ("ReferralRequest".equals(codeString))
2955          return REFERRALREQUEST;
2956        if ("RelatedPerson".equals(codeString))
2957          return RELATEDPERSON;
2958        if ("Resource".equals(codeString))
2959          return RESOURCE;
2960        if ("RiskAssessment".equals(codeString))
2961          return RISKASSESSMENT;
2962        if ("Schedule".equals(codeString))
2963          return SCHEDULE;
2964        if ("SearchParameter".equals(codeString))
2965          return SEARCHPARAMETER;
2966        if ("Sequence".equals(codeString))
2967          return SEQUENCE;
2968        if ("Slot".equals(codeString))
2969          return SLOT;
2970        if ("Specimen".equals(codeString))
2971          return SPECIMEN;
2972        if ("StructureDefinition".equals(codeString))
2973          return STRUCTUREDEFINITION;
2974        if ("StructureMap".equals(codeString))
2975          return STRUCTUREMAP;
2976        if ("Subscription".equals(codeString))
2977          return SUBSCRIPTION;
2978        if ("Substance".equals(codeString))
2979          return SUBSTANCE;
2980        if ("SupplyDelivery".equals(codeString))
2981          return SUPPLYDELIVERY;
2982        if ("SupplyRequest".equals(codeString))
2983          return SUPPLYREQUEST;
2984        if ("Task".equals(codeString))
2985          return TASK;
2986        if ("TestScript".equals(codeString))
2987          return TESTSCRIPT;
2988        if ("ValueSet".equals(codeString))
2989          return VALUESET;
2990        if ("VisionPrescription".equals(codeString))
2991          return VISIONPRESCRIPTION;
2992        if ("Type".equals(codeString))
2993          return TYPE;
2994        if ("Any".equals(codeString))
2995          return ANY;
2996        throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'");
2997        }
2998        public String toCode() {
2999          switch (this) {
3000            case ACTIONDEFINITION: return "ActionDefinition";
3001            case ADDRESS: return "Address";
3002            case AGE: return "Age";
3003            case ANNOTATION: return "Annotation";
3004            case ATTACHMENT: return "Attachment";
3005            case BACKBONEELEMENT: return "BackboneElement";
3006            case CODEABLECONCEPT: return "CodeableConcept";
3007            case CODING: return "Coding";
3008            case CONTACTPOINT: return "ContactPoint";
3009            case COUNT: return "Count";
3010            case DATAREQUIREMENT: return "DataRequirement";
3011            case DISTANCE: return "Distance";
3012            case DURATION: return "Duration";
3013            case ELEMENT: return "Element";
3014            case ELEMENTDEFINITION: return "ElementDefinition";
3015            case EXTENSION: return "Extension";
3016            case HUMANNAME: return "HumanName";
3017            case IDENTIFIER: return "Identifier";
3018            case META: return "Meta";
3019            case MODULEMETADATA: return "ModuleMetadata";
3020            case MONEY: return "Money";
3021            case NARRATIVE: return "Narrative";
3022            case PARAMETERDEFINITION: return "ParameterDefinition";
3023            case PERIOD: return "Period";
3024            case QUANTITY: return "Quantity";
3025            case RANGE: return "Range";
3026            case RATIO: return "Ratio";
3027            case REFERENCE: return "Reference";
3028            case SAMPLEDDATA: return "SampledData";
3029            case SIGNATURE: return "Signature";
3030            case SIMPLEQUANTITY: return "SimpleQuantity";
3031            case TIMING: return "Timing";
3032            case TRIGGERDEFINITION: return "TriggerDefinition";
3033            case BASE64BINARY: return "base64Binary";
3034            case BOOLEAN: return "boolean";
3035            case CODE: return "code";
3036            case DATE: return "date";
3037            case DATETIME: return "dateTime";
3038            case DECIMAL: return "decimal";
3039            case ID: return "id";
3040            case INSTANT: return "instant";
3041            case INTEGER: return "integer";
3042            case MARKDOWN: return "markdown";
3043            case OID: return "oid";
3044            case POSITIVEINT: return "positiveInt";
3045            case STRING: return "string";
3046            case TIME: return "time";
3047            case UNSIGNEDINT: return "unsignedInt";
3048            case URI: return "uri";
3049            case UUID: return "uuid";
3050            case XHTML: return "xhtml";
3051            case ACCOUNT: return "Account";
3052            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
3053            case APPOINTMENT: return "Appointment";
3054            case APPOINTMENTRESPONSE: return "AppointmentResponse";
3055            case AUDITEVENT: return "AuditEvent";
3056            case BASIC: return "Basic";
3057            case BINARY: return "Binary";
3058            case BODYSITE: return "BodySite";
3059            case BUNDLE: return "Bundle";
3060            case CAREPLAN: return "CarePlan";
3061            case CARETEAM: return "CareTeam";
3062            case CLAIM: return "Claim";
3063            case CLAIMRESPONSE: return "ClaimResponse";
3064            case CLINICALIMPRESSION: return "ClinicalImpression";
3065            case CODESYSTEM: return "CodeSystem";
3066            case COMMUNICATION: return "Communication";
3067            case COMMUNICATIONREQUEST: return "CommunicationRequest";
3068            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
3069            case COMPOSITION: return "Composition";
3070            case CONCEPTMAP: return "ConceptMap";
3071            case CONDITION: return "Condition";
3072            case CONFORMANCE: return "Conformance";
3073            case CONTRACT: return "Contract";
3074            case COVERAGE: return "Coverage";
3075            case DATAELEMENT: return "DataElement";
3076            case DECISIONSUPPORTRULE: return "DecisionSupportRule";
3077            case DECISIONSUPPORTSERVICEMODULE: return "DecisionSupportServiceModule";
3078            case DETECTEDISSUE: return "DetectedIssue";
3079            case DEVICE: return "Device";
3080            case DEVICECOMPONENT: return "DeviceComponent";
3081            case DEVICEMETRIC: return "DeviceMetric";
3082            case DEVICEUSEREQUEST: return "DeviceUseRequest";
3083            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
3084            case DIAGNOSTICORDER: return "DiagnosticOrder";
3085            case DIAGNOSTICREPORT: return "DiagnosticReport";
3086            case DOCUMENTMANIFEST: return "DocumentManifest";
3087            case DOCUMENTREFERENCE: return "DocumentReference";
3088            case DOMAINRESOURCE: return "DomainResource";
3089            case ELIGIBILITYREQUEST: return "EligibilityRequest";
3090            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
3091            case ENCOUNTER: return "Encounter";
3092            case ENROLLMENTREQUEST: return "EnrollmentRequest";
3093            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
3094            case EPISODEOFCARE: return "EpisodeOfCare";
3095            case EXPANSIONPROFILE: return "ExpansionProfile";
3096            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
3097            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
3098            case FLAG: return "Flag";
3099            case GOAL: return "Goal";
3100            case GROUP: return "Group";
3101            case GUIDANCERESPONSE: return "GuidanceResponse";
3102            case HEALTHCARESERVICE: return "HealthcareService";
3103            case IMAGINGEXCERPT: return "ImagingExcerpt";
3104            case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection";
3105            case IMAGINGSTUDY: return "ImagingStudy";
3106            case IMMUNIZATION: return "Immunization";
3107            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
3108            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
3109            case LIBRARY: return "Library";
3110            case LINKAGE: return "Linkage";
3111            case LIST: return "List";
3112            case LOCATION: return "Location";
3113            case MEASURE: return "Measure";
3114            case MEASUREREPORT: return "MeasureReport";
3115            case MEDIA: return "Media";
3116            case MEDICATION: return "Medication";
3117            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
3118            case MEDICATIONDISPENSE: return "MedicationDispense";
3119            case MEDICATIONORDER: return "MedicationOrder";
3120            case MEDICATIONSTATEMENT: return "MedicationStatement";
3121            case MESSAGEHEADER: return "MessageHeader";
3122            case MODULEDEFINITION: return "ModuleDefinition";
3123            case NAMINGSYSTEM: return "NamingSystem";
3124            case NUTRITIONORDER: return "NutritionOrder";
3125            case OBSERVATION: return "Observation";
3126            case OPERATIONDEFINITION: return "OperationDefinition";
3127            case OPERATIONOUTCOME: return "OperationOutcome";
3128            case ORDER: return "Order";
3129            case ORDERRESPONSE: return "OrderResponse";
3130            case ORDERSET: return "OrderSet";
3131            case ORGANIZATION: return "Organization";
3132            case PARAMETERS: return "Parameters";
3133            case PATIENT: return "Patient";
3134            case PAYMENTNOTICE: return "PaymentNotice";
3135            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
3136            case PERSON: return "Person";
3137            case PRACTITIONER: return "Practitioner";
3138            case PRACTITIONERROLE: return "PractitionerRole";
3139            case PROCEDURE: return "Procedure";
3140            case PROCEDUREREQUEST: return "ProcedureRequest";
3141            case PROCESSREQUEST: return "ProcessRequest";
3142            case PROCESSRESPONSE: return "ProcessResponse";
3143            case PROTOCOL: return "Protocol";
3144            case PROVENANCE: return "Provenance";
3145            case QUESTIONNAIRE: return "Questionnaire";
3146            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
3147            case REFERRALREQUEST: return "ReferralRequest";
3148            case RELATEDPERSON: return "RelatedPerson";
3149            case RESOURCE: return "Resource";
3150            case RISKASSESSMENT: return "RiskAssessment";
3151            case SCHEDULE: return "Schedule";
3152            case SEARCHPARAMETER: return "SearchParameter";
3153            case SEQUENCE: return "Sequence";
3154            case SLOT: return "Slot";
3155            case SPECIMEN: return "Specimen";
3156            case STRUCTUREDEFINITION: return "StructureDefinition";
3157            case STRUCTUREMAP: return "StructureMap";
3158            case SUBSCRIPTION: return "Subscription";
3159            case SUBSTANCE: return "Substance";
3160            case SUPPLYDELIVERY: return "SupplyDelivery";
3161            case SUPPLYREQUEST: return "SupplyRequest";
3162            case TASK: return "Task";
3163            case TESTSCRIPT: return "TestScript";
3164            case VALUESET: return "ValueSet";
3165            case VISIONPRESCRIPTION: return "VisionPrescription";
3166            case TYPE: return "Type";
3167            case ANY: return "Any";
3168            default: return "?";
3169          }
3170        }
3171        public String getSystem() {
3172          switch (this) {
3173            case ACTIONDEFINITION: return "http://hl7.org/fhir/data-types";
3174            case ADDRESS: return "http://hl7.org/fhir/data-types";
3175            case AGE: return "http://hl7.org/fhir/data-types";
3176            case ANNOTATION: return "http://hl7.org/fhir/data-types";
3177            case ATTACHMENT: return "http://hl7.org/fhir/data-types";
3178            case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types";
3179            case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types";
3180            case CODING: return "http://hl7.org/fhir/data-types";
3181            case CONTACTPOINT: return "http://hl7.org/fhir/data-types";
3182            case COUNT: return "http://hl7.org/fhir/data-types";
3183            case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types";
3184            case DISTANCE: return "http://hl7.org/fhir/data-types";
3185            case DURATION: return "http://hl7.org/fhir/data-types";
3186            case ELEMENT: return "http://hl7.org/fhir/data-types";
3187            case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types";
3188            case EXTENSION: return "http://hl7.org/fhir/data-types";
3189            case HUMANNAME: return "http://hl7.org/fhir/data-types";
3190            case IDENTIFIER: return "http://hl7.org/fhir/data-types";
3191            case META: return "http://hl7.org/fhir/data-types";
3192            case MODULEMETADATA: return "http://hl7.org/fhir/data-types";
3193            case MONEY: return "http://hl7.org/fhir/data-types";
3194            case NARRATIVE: return "http://hl7.org/fhir/data-types";
3195            case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types";
3196            case PERIOD: return "http://hl7.org/fhir/data-types";
3197            case QUANTITY: return "http://hl7.org/fhir/data-types";
3198            case RANGE: return "http://hl7.org/fhir/data-types";
3199            case RATIO: return "http://hl7.org/fhir/data-types";
3200            case REFERENCE: return "http://hl7.org/fhir/data-types";
3201            case SAMPLEDDATA: return "http://hl7.org/fhir/data-types";
3202            case SIGNATURE: return "http://hl7.org/fhir/data-types";
3203            case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types";
3204            case TIMING: return "http://hl7.org/fhir/data-types";
3205            case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types";
3206            case BASE64BINARY: return "http://hl7.org/fhir/data-types";
3207            case BOOLEAN: return "http://hl7.org/fhir/data-types";
3208            case CODE: return "http://hl7.org/fhir/data-types";
3209            case DATE: return "http://hl7.org/fhir/data-types";
3210            case DATETIME: return "http://hl7.org/fhir/data-types";
3211            case DECIMAL: return "http://hl7.org/fhir/data-types";
3212            case ID: return "http://hl7.org/fhir/data-types";
3213            case INSTANT: return "http://hl7.org/fhir/data-types";
3214            case INTEGER: return "http://hl7.org/fhir/data-types";
3215            case MARKDOWN: return "http://hl7.org/fhir/data-types";
3216            case OID: return "http://hl7.org/fhir/data-types";
3217            case POSITIVEINT: return "http://hl7.org/fhir/data-types";
3218            case STRING: return "http://hl7.org/fhir/data-types";
3219            case TIME: return "http://hl7.org/fhir/data-types";
3220            case UNSIGNEDINT: return "http://hl7.org/fhir/data-types";
3221            case URI: return "http://hl7.org/fhir/data-types";
3222            case UUID: return "http://hl7.org/fhir/data-types";
3223            case XHTML: return "http://hl7.org/fhir/data-types";
3224            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
3225            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
3226            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
3227            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
3228            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
3229            case BASIC: return "http://hl7.org/fhir/resource-types";
3230            case BINARY: return "http://hl7.org/fhir/resource-types";
3231            case BODYSITE: return "http://hl7.org/fhir/resource-types";
3232            case BUNDLE: return "http://hl7.org/fhir/resource-types";
3233            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
3234            case CARETEAM: return "http://hl7.org/fhir/resource-types";
3235            case CLAIM: return "http://hl7.org/fhir/resource-types";
3236            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
3237            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
3238            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
3239            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
3240            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
3241            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
3242            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
3243            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
3244            case CONDITION: return "http://hl7.org/fhir/resource-types";
3245            case CONFORMANCE: return "http://hl7.org/fhir/resource-types";
3246            case CONTRACT: return "http://hl7.org/fhir/resource-types";
3247            case COVERAGE: return "http://hl7.org/fhir/resource-types";
3248            case DATAELEMENT: return "http://hl7.org/fhir/resource-types";
3249            case DECISIONSUPPORTRULE: return "http://hl7.org/fhir/resource-types";
3250            case DECISIONSUPPORTSERVICEMODULE: return "http://hl7.org/fhir/resource-types";
3251            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
3252            case DEVICE: return "http://hl7.org/fhir/resource-types";
3253            case DEVICECOMPONENT: return "http://hl7.org/fhir/resource-types";
3254            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
3255            case DEVICEUSEREQUEST: return "http://hl7.org/fhir/resource-types";
3256            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types";
3257            case DIAGNOSTICORDER: return "http://hl7.org/fhir/resource-types";
3258            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
3259            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
3260            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
3261            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
3262            case ELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
3263            case ELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
3264            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
3265            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
3266            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
3267            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
3268            case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types";
3269            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
3270            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
3271            case FLAG: return "http://hl7.org/fhir/resource-types";
3272            case GOAL: return "http://hl7.org/fhir/resource-types";
3273            case GROUP: return "http://hl7.org/fhir/resource-types";
3274            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
3275            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
3276            case IMAGINGEXCERPT: return "http://hl7.org/fhir/resource-types";
3277            case IMAGINGOBJECTSELECTION: return "http://hl7.org/fhir/resource-types";
3278            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
3279            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
3280            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
3281            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
3282            case LIBRARY: return "http://hl7.org/fhir/resource-types";
3283            case LINKAGE: return "http://hl7.org/fhir/resource-types";
3284            case LIST: return "http://hl7.org/fhir/resource-types";
3285            case LOCATION: return "http://hl7.org/fhir/resource-types";
3286            case MEASURE: return "http://hl7.org/fhir/resource-types";
3287            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
3288            case MEDIA: return "http://hl7.org/fhir/resource-types";
3289            case MEDICATION: return "http://hl7.org/fhir/resource-types";
3290            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
3291            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
3292            case MEDICATIONORDER: return "http://hl7.org/fhir/resource-types";
3293            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types";
3294            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
3295            case MODULEDEFINITION: return "http://hl7.org/fhir/resource-types";
3296            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
3297            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
3298            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
3299            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
3300            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
3301            case ORDER: return "http://hl7.org/fhir/resource-types";
3302            case ORDERRESPONSE: return "http://hl7.org/fhir/resource-types";
3303            case ORDERSET: return "http://hl7.org/fhir/resource-types";
3304            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
3305            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
3306            case PATIENT: return "http://hl7.org/fhir/resource-types";
3307            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
3308            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
3309            case PERSON: return "http://hl7.org/fhir/resource-types";
3310            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
3311            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
3312            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
3313            case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types";
3314            case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types";
3315            case PROCESSRESPONSE: return "http://hl7.org/fhir/resource-types";
3316            case PROTOCOL: return "http://hl7.org/fhir/resource-types";
3317            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
3318            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
3319            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
3320            case REFERRALREQUEST: return "http://hl7.org/fhir/resource-types";
3321            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
3322            case RESOURCE: return "http://hl7.org/fhir/resource-types";
3323            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
3324            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
3325            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
3326            case SEQUENCE: return "http://hl7.org/fhir/resource-types";
3327            case SLOT: return "http://hl7.org/fhir/resource-types";
3328            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
3329            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
3330            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
3331            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
3332            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
3333            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
3334            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
3335            case TASK: return "http://hl7.org/fhir/resource-types";
3336            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
3337            case VALUESET: return "http://hl7.org/fhir/resource-types";
3338            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
3339            case TYPE: return "http://hl7.org/fhir/abstract-types";
3340            case ANY: return "http://hl7.org/fhir/abstract-types";
3341            default: return "?";
3342          }
3343        }
3344        public String getDefinition() {
3345          switch (this) {
3346            case ACTIONDEFINITION: return "The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library.";
3347            case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations and which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.";
3348            case AGE: return "";
3349            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
3350            case ATTACHMENT: return "For referring to data content defined in other formats.";
3351            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
3352            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
3353            case CODING: return "A reference to a code defined by a terminology system.";
3354            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
3355            case COUNT: return "";
3356            case DATAREQUIREMENT: return "Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data.";
3357            case DISTANCE: return "";
3358            case DURATION: return "";
3359            case ELEMENT: return "Base definition for all elements in a resource.";
3360            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
3361            case EXTENSION: return "Optional Extensions Element - found in all resources.";
3362            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
3363            case IDENTIFIER: return "A technical identifier - identifies some entity uniquely and unambiguously.";
3364            case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.";
3365            case MODULEMETADATA: return "The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information.";
3366            case MONEY: return "";
3367            case NARRATIVE: return "A human-readable formatted text, including images.";
3368            case PARAMETERDEFINITION: return "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.";
3369            case PERIOD: return "A time period defined by a start and end date and optionally time.";
3370            case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
3371            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
3372            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
3373            case REFERENCE: return "A reference from one resource to another.";
3374            case SAMPLEDDATA: return "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.";
3375            case SIGNATURE: return "A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities.";
3376            case SIMPLEQUANTITY: return "";
3377            case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are 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.";
3378            case TRIGGERDEFINITION: return "A description of a triggering event.";
3379            case BASE64BINARY: return "A stream of bytes";
3380            case BOOLEAN: return "Value of \"true\" or \"false\"";
3381            case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents";
3382            case DATE: return "A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.";
3383            case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.";
3384            case DECIMAL: return "A rational number with implicit precision";
3385            case ID: return "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.";
3386            case INSTANT: return "An instant in time - known at least to the second";
3387            case INTEGER: return "A whole number";
3388            case MARKDOWN: return "A string that may contain markdown syntax for optional processing by a mark down presentation engine";
3389            case OID: return "An oid represented as a URI";
3390            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
3391            case STRING: return "A sequence of Unicode characters";
3392            case TIME: return "A time during the day, with no date specified";
3393            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
3394            case URI: return "String of characters used to identify a name or a resource";
3395            case UUID: return "A UUID, represented as a URI";
3396            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
3397            case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centres, etc.";
3398            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
3399            case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).";
3400            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
3401            case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.";
3402            case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.";
3403            case BINARY: return "A binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
3404            case BODYSITE: return "Record details about the anatomical location of a specimen or body part.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.";
3405            case BUNDLE: return "A container for a collection of resources.";
3406            case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.";
3407            case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.";
3408            case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.";
3409            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
3410            case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score.";
3411            case CODESYSTEM: return "A code system resource specifies a set of codes drawn from one or more code systems.";
3412            case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition.";
3413            case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.";
3414            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
3415            case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical document 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. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained.";
3416            case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models.";
3417            case CONDITION: return "Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary.";
3418            case CONFORMANCE: return "A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
3419            case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters.";
3420            case COVERAGE: return "Financial instrument which may be used to pay for or reimburse health care products and services.";
3421            case DATAELEMENT: return "The formal description of a single piece of information that can be gathered and reported.";
3422            case DECISIONSUPPORTRULE: return "This resource defines a decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of a actions that should be taken whenever some condition is met in response to a particular event or events.";
3423            case DECISIONSUPPORTSERVICEMODULE: return "The DecisionSupportServiceModule describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.";
3424            case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.";
3425            case DEVICE: return "This resource identifies an instance or 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.  Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.  Non-medical devices may include items such as a machine, cellphone, computer, application, etc.";
3426            case DEVICECOMPONENT: return "Describes the characteristics, operational status and capabilities of a medical-related component of a medical device.";
3427            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
3428            case DEVICEUSEREQUEST: 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.";
3429            case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.";
3430            case DIAGNOSTICORDER: return "A record of a request for a diagnostic investigation service to be performed.";
3431            case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.";
3432            case DOCUMENTMANIFEST: return "A manifest that defines a set of documents.";
3433            case DOCUMENTREFERENCE: return "A reference to a document .";
3434            case DOMAINRESOURCE: return "A resource that includes narrative, extensions, and contained resources.";
3435            case ELIGIBILITYREQUEST: return "This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service.";
3436            case ELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an Eligibility resource.";
3437            case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.";
3438            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
3439            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource.";
3440            case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.";
3441            case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet.";
3442            case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.";
3443            case FAMILYMEMBERHISTORY: return "Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.";
3444            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
3445            case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.";
3446            case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.";
3447            case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.";
3448            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
3449            case IMAGINGEXCERPT: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances).  The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on.";
3450            case IMAGINGOBJECTSELECTION: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances).  The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on.";
3451            case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.";
3452            case IMMUNIZATION: return "Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed.";
3453            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification.";
3454            case IMPLEMENTATIONGUIDE: return "A set of rules or how FHIR is used to solve a particular problem. 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.";
3455            case LIBRARY: return "The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library.";
3456            case LINKAGE: return "Identifies two or more records (resource instances) that are referring to the same real-world \"occurrence\".";
3457            case LIST: return "A set of information summarized from a list of other resources.";
3458            case LOCATION: return "Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.";
3459            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
3460            case MEASUREREPORT: return "The MeasureReport resource contains the results of evaluating a measure.";
3461            case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.";
3462            case MEDICATION: return "This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.";
3463            case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.";
3464            case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.";
3465            case MEDICATIONORDER: return "An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationOrder\" rather than \"MedicationPrescription\" to generalize the use across inpatient and outpatient settings as well as for care plans, etc.";
3466            case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from e.g. the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains \r\rThe 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.";
3467            case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.";
3468            case MODULEDEFINITION: return "The ModuleDefinition resource defines the data requirements for a quality artifact.";
3469            case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a \"System\" used within the Identifier and Coding data types.";
3470            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
3471            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
3472            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
3473            case OPERATIONOUTCOME: return "A collection of error, warning or information messages that result from a system action.";
3474            case ORDER: return "A request to perform an action.";
3475            case ORDERRESPONSE: return "A response to an order.";
3476            case ORDERSET: return "This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support.";
3477            case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc.";
3478            case PARAMETERS: return "This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it.";
3479            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
3480            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
3481            case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment.";
3482            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
3483            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
3484            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
3485            case PROCEDURE: return "An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy.";
3486            case PROCEDUREREQUEST: return "A request for a procedure to be performed. May be a proposal or an order.";
3487            case PROCESSREQUEST: return "This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources.";
3488            case PROCESSRESPONSE: return "This resource provides processing status, errors and notes from the processing of a resource.";
3489            case PROTOCOL: return "A definition of behaviors to be taken in particular circumstances, often including conditions, options and other decision points.";
3490            case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.";
3491            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.";
3492            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.";
3493            case REFERRALREQUEST: return "Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization.";
3494            case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.";
3495            case RESOURCE: return "This is the base resource type for everything.";
3496            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
3497            case SCHEDULE: return "A container for slot(s) of time that may be available for booking appointments.";
3498            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
3499            case SEQUENCE: return "Variation and Sequence data.";
3500            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
3501            case SPECIMEN: return "A sample to be used for analysis.";
3502            case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types.";
3503            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
3504            case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action.";
3505            case SUBSTANCE: return "A homogeneous material with a definite composition.";
3506            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
3507            case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting.";
3508            case TASK: return "A task to be performed.";
3509            case TESTSCRIPT: return "TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification.";
3510            case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems.";
3511            case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient.";
3512            case TYPE: return "A place holder that means any kind of data type";
3513            case ANY: return "A place holder that means any kind of resource";
3514            default: return "?";
3515          }
3516        }
3517        public String getDisplay() {
3518          switch (this) {
3519            case ACTIONDEFINITION: return "ActionDefinition";
3520            case ADDRESS: return "Address";
3521            case AGE: return "Age";
3522            case ANNOTATION: return "Annotation";
3523            case ATTACHMENT: return "Attachment";
3524            case BACKBONEELEMENT: return "BackboneElement";
3525            case CODEABLECONCEPT: return "CodeableConcept";
3526            case CODING: return "Coding";
3527            case CONTACTPOINT: return "ContactPoint";
3528            case COUNT: return "Count";
3529            case DATAREQUIREMENT: return "DataRequirement";
3530            case DISTANCE: return "Distance";
3531            case DURATION: return "Duration";
3532            case ELEMENT: return "Element";
3533            case ELEMENTDEFINITION: return "ElementDefinition";
3534            case EXTENSION: return "Extension";
3535            case HUMANNAME: return "HumanName";
3536            case IDENTIFIER: return "Identifier";
3537            case META: return "Meta";
3538            case MODULEMETADATA: return "ModuleMetadata";
3539            case MONEY: return "Money";
3540            case NARRATIVE: return "Narrative";
3541            case PARAMETERDEFINITION: return "ParameterDefinition";
3542            case PERIOD: return "Period";
3543            case QUANTITY: return "Quantity";
3544            case RANGE: return "Range";
3545            case RATIO: return "Ratio";
3546            case REFERENCE: return "Reference";
3547            case SAMPLEDDATA: return "SampledData";
3548            case SIGNATURE: return "Signature";
3549            case SIMPLEQUANTITY: return "SimpleQuantity";
3550            case TIMING: return "Timing";
3551            case TRIGGERDEFINITION: return "TriggerDefinition";
3552            case BASE64BINARY: return "base64Binary";
3553            case BOOLEAN: return "boolean";
3554            case CODE: return "code";
3555            case DATE: return "date";
3556            case DATETIME: return "dateTime";
3557            case DECIMAL: return "decimal";
3558            case ID: return "id";
3559            case INSTANT: return "instant";
3560            case INTEGER: return "integer";
3561            case MARKDOWN: return "markdown";
3562            case OID: return "oid";
3563            case POSITIVEINT: return "positiveInt";
3564            case STRING: return "string";
3565            case TIME: return "time";
3566            case UNSIGNEDINT: return "unsignedInt";
3567            case URI: return "uri";
3568            case UUID: return "uuid";
3569            case XHTML: return "XHTML";
3570            case ACCOUNT: return "Account";
3571            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
3572            case APPOINTMENT: return "Appointment";
3573            case APPOINTMENTRESPONSE: return "AppointmentResponse";
3574            case AUDITEVENT: return "AuditEvent";
3575            case BASIC: return "Basic";
3576            case BINARY: return "Binary";
3577            case BODYSITE: return "BodySite";
3578            case BUNDLE: return "Bundle";
3579            case CAREPLAN: return "CarePlan";
3580            case CARETEAM: return "CareTeam";
3581            case CLAIM: return "Claim";
3582            case CLAIMRESPONSE: return "ClaimResponse";
3583            case CLINICALIMPRESSION: return "ClinicalImpression";
3584            case CODESYSTEM: return "CodeSystem";
3585            case COMMUNICATION: return "Communication";
3586            case COMMUNICATIONREQUEST: return "CommunicationRequest";
3587            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
3588            case COMPOSITION: return "Composition";
3589            case CONCEPTMAP: return "ConceptMap";
3590            case CONDITION: return "Condition";
3591            case CONFORMANCE: return "Conformance";
3592            case CONTRACT: return "Contract";
3593            case COVERAGE: return "Coverage";
3594            case DATAELEMENT: return "DataElement";
3595            case DECISIONSUPPORTRULE: return "DecisionSupportRule";
3596            case DECISIONSUPPORTSERVICEMODULE: return "DecisionSupportServiceModule";
3597            case DETECTEDISSUE: return "DetectedIssue";
3598            case DEVICE: return "Device";
3599            case DEVICECOMPONENT: return "DeviceComponent";
3600            case DEVICEMETRIC: return "DeviceMetric";
3601            case DEVICEUSEREQUEST: return "DeviceUseRequest";
3602            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
3603            case DIAGNOSTICORDER: return "DiagnosticOrder";
3604            case DIAGNOSTICREPORT: return "DiagnosticReport";
3605            case DOCUMENTMANIFEST: return "DocumentManifest";
3606            case DOCUMENTREFERENCE: return "DocumentReference";
3607            case DOMAINRESOURCE: return "DomainResource";
3608            case ELIGIBILITYREQUEST: return "EligibilityRequest";
3609            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
3610            case ENCOUNTER: return "Encounter";
3611            case ENROLLMENTREQUEST: return "EnrollmentRequest";
3612            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
3613            case EPISODEOFCARE: return "EpisodeOfCare";
3614            case EXPANSIONPROFILE: return "ExpansionProfile";
3615            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
3616            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
3617            case FLAG: return "Flag";
3618            case GOAL: return "Goal";
3619            case GROUP: return "Group";
3620            case GUIDANCERESPONSE: return "GuidanceResponse";
3621            case HEALTHCARESERVICE: return "HealthcareService";
3622            case IMAGINGEXCERPT: return "ImagingExcerpt";
3623            case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection";
3624            case IMAGINGSTUDY: return "ImagingStudy";
3625            case IMMUNIZATION: return "Immunization";
3626            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
3627            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
3628            case LIBRARY: return "Library";
3629            case LINKAGE: return "Linkage";
3630            case LIST: return "List";
3631            case LOCATION: return "Location";
3632            case MEASURE: return "Measure";
3633            case MEASUREREPORT: return "MeasureReport";
3634            case MEDIA: return "Media";
3635            case MEDICATION: return "Medication";
3636            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
3637            case MEDICATIONDISPENSE: return "MedicationDispense";
3638            case MEDICATIONORDER: return "MedicationOrder";
3639            case MEDICATIONSTATEMENT: return "MedicationStatement";
3640            case MESSAGEHEADER: return "MessageHeader";
3641            case MODULEDEFINITION: return "ModuleDefinition";
3642            case NAMINGSYSTEM: return "NamingSystem";
3643            case NUTRITIONORDER: return "NutritionOrder";
3644            case OBSERVATION: return "Observation";
3645            case OPERATIONDEFINITION: return "OperationDefinition";
3646            case OPERATIONOUTCOME: return "OperationOutcome";
3647            case ORDER: return "Order";
3648            case ORDERRESPONSE: return "OrderResponse";
3649            case ORDERSET: return "OrderSet";
3650            case ORGANIZATION: return "Organization";
3651            case PARAMETERS: return "Parameters";
3652            case PATIENT: return "Patient";
3653            case PAYMENTNOTICE: return "PaymentNotice";
3654            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
3655            case PERSON: return "Person";
3656            case PRACTITIONER: return "Practitioner";
3657            case PRACTITIONERROLE: return "PractitionerRole";
3658            case PROCEDURE: return "Procedure";
3659            case PROCEDUREREQUEST: return "ProcedureRequest";
3660            case PROCESSREQUEST: return "ProcessRequest";
3661            case PROCESSRESPONSE: return "ProcessResponse";
3662            case PROTOCOL: return "Protocol";
3663            case PROVENANCE: return "Provenance";
3664            case QUESTIONNAIRE: return "Questionnaire";
3665            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
3666            case REFERRALREQUEST: return "ReferralRequest";
3667            case RELATEDPERSON: return "RelatedPerson";
3668            case RESOURCE: return "Resource";
3669            case RISKASSESSMENT: return "RiskAssessment";
3670            case SCHEDULE: return "Schedule";
3671            case SEARCHPARAMETER: return "SearchParameter";
3672            case SEQUENCE: return "Sequence";
3673            case SLOT: return "Slot";
3674            case SPECIMEN: return "Specimen";
3675            case STRUCTUREDEFINITION: return "StructureDefinition";
3676            case STRUCTUREMAP: return "StructureMap";
3677            case SUBSCRIPTION: return "Subscription";
3678            case SUBSTANCE: return "Substance";
3679            case SUPPLYDELIVERY: return "SupplyDelivery";
3680            case SUPPLYREQUEST: return "SupplyRequest";
3681            case TASK: return "Task";
3682            case TESTSCRIPT: return "TestScript";
3683            case VALUESET: return "ValueSet";
3684            case VISIONPRESCRIPTION: return "VisionPrescription";
3685            case TYPE: return "Type";
3686            case ANY: return "Any";
3687            default: return "?";
3688          }
3689        }
3690    }
3691
3692  public static class FHIRAllTypesEnumFactory implements EnumFactory<FHIRAllTypes> {
3693    public FHIRAllTypes fromCode(String codeString) throws IllegalArgumentException {
3694      if (codeString == null || "".equals(codeString))
3695            if (codeString == null || "".equals(codeString))
3696                return null;
3697        if ("ActionDefinition".equals(codeString))
3698          return FHIRAllTypes.ACTIONDEFINITION;
3699        if ("Address".equals(codeString))
3700          return FHIRAllTypes.ADDRESS;
3701        if ("Age".equals(codeString))
3702          return FHIRAllTypes.AGE;
3703        if ("Annotation".equals(codeString))
3704          return FHIRAllTypes.ANNOTATION;
3705        if ("Attachment".equals(codeString))
3706          return FHIRAllTypes.ATTACHMENT;
3707        if ("BackboneElement".equals(codeString))
3708          return FHIRAllTypes.BACKBONEELEMENT;
3709        if ("CodeableConcept".equals(codeString))
3710          return FHIRAllTypes.CODEABLECONCEPT;
3711        if ("Coding".equals(codeString))
3712          return FHIRAllTypes.CODING;
3713        if ("ContactPoint".equals(codeString))
3714          return FHIRAllTypes.CONTACTPOINT;
3715        if ("Count".equals(codeString))
3716          return FHIRAllTypes.COUNT;
3717        if ("DataRequirement".equals(codeString))
3718          return FHIRAllTypes.DATAREQUIREMENT;
3719        if ("Distance".equals(codeString))
3720          return FHIRAllTypes.DISTANCE;
3721        if ("Duration".equals(codeString))
3722          return FHIRAllTypes.DURATION;
3723        if ("Element".equals(codeString))
3724          return FHIRAllTypes.ELEMENT;
3725        if ("ElementDefinition".equals(codeString))
3726          return FHIRAllTypes.ELEMENTDEFINITION;
3727        if ("Extension".equals(codeString))
3728          return FHIRAllTypes.EXTENSION;
3729        if ("HumanName".equals(codeString))
3730          return FHIRAllTypes.HUMANNAME;
3731        if ("Identifier".equals(codeString))
3732          return FHIRAllTypes.IDENTIFIER;
3733        if ("Meta".equals(codeString))
3734          return FHIRAllTypes.META;
3735        if ("ModuleMetadata".equals(codeString))
3736          return FHIRAllTypes.MODULEMETADATA;
3737        if ("Money".equals(codeString))
3738          return FHIRAllTypes.MONEY;
3739        if ("Narrative".equals(codeString))
3740          return FHIRAllTypes.NARRATIVE;
3741        if ("ParameterDefinition".equals(codeString))
3742          return FHIRAllTypes.PARAMETERDEFINITION;
3743        if ("Period".equals(codeString))
3744          return FHIRAllTypes.PERIOD;
3745        if ("Quantity".equals(codeString))
3746          return FHIRAllTypes.QUANTITY;
3747        if ("Range".equals(codeString))
3748          return FHIRAllTypes.RANGE;
3749        if ("Ratio".equals(codeString))
3750          return FHIRAllTypes.RATIO;
3751        if ("Reference".equals(codeString))
3752          return FHIRAllTypes.REFERENCE;
3753        if ("SampledData".equals(codeString))
3754          return FHIRAllTypes.SAMPLEDDATA;
3755        if ("Signature".equals(codeString))
3756          return FHIRAllTypes.SIGNATURE;
3757        if ("SimpleQuantity".equals(codeString))
3758          return FHIRAllTypes.SIMPLEQUANTITY;
3759        if ("Timing".equals(codeString))
3760          return FHIRAllTypes.TIMING;
3761        if ("TriggerDefinition".equals(codeString))
3762          return FHIRAllTypes.TRIGGERDEFINITION;
3763        if ("base64Binary".equals(codeString))
3764          return FHIRAllTypes.BASE64BINARY;
3765        if ("boolean".equals(codeString))
3766          return FHIRAllTypes.BOOLEAN;
3767        if ("code".equals(codeString))
3768          return FHIRAllTypes.CODE;
3769        if ("date".equals(codeString))
3770          return FHIRAllTypes.DATE;
3771        if ("dateTime".equals(codeString))
3772          return FHIRAllTypes.DATETIME;
3773        if ("decimal".equals(codeString))
3774          return FHIRAllTypes.DECIMAL;
3775        if ("id".equals(codeString))
3776          return FHIRAllTypes.ID;
3777        if ("instant".equals(codeString))
3778          return FHIRAllTypes.INSTANT;
3779        if ("integer".equals(codeString))
3780          return FHIRAllTypes.INTEGER;
3781        if ("markdown".equals(codeString))
3782          return FHIRAllTypes.MARKDOWN;
3783        if ("oid".equals(codeString))
3784          return FHIRAllTypes.OID;
3785        if ("positiveInt".equals(codeString))
3786          return FHIRAllTypes.POSITIVEINT;
3787        if ("string".equals(codeString))
3788          return FHIRAllTypes.STRING;
3789        if ("time".equals(codeString))
3790          return FHIRAllTypes.TIME;
3791        if ("unsignedInt".equals(codeString))
3792          return FHIRAllTypes.UNSIGNEDINT;
3793        if ("uri".equals(codeString))
3794          return FHIRAllTypes.URI;
3795        if ("uuid".equals(codeString))
3796          return FHIRAllTypes.UUID;
3797        if ("xhtml".equals(codeString))
3798          return FHIRAllTypes.XHTML;
3799        if ("Account".equals(codeString))
3800          return FHIRAllTypes.ACCOUNT;
3801        if ("AllergyIntolerance".equals(codeString))
3802          return FHIRAllTypes.ALLERGYINTOLERANCE;
3803        if ("Appointment".equals(codeString))
3804          return FHIRAllTypes.APPOINTMENT;
3805        if ("AppointmentResponse".equals(codeString))
3806          return FHIRAllTypes.APPOINTMENTRESPONSE;
3807        if ("AuditEvent".equals(codeString))
3808          return FHIRAllTypes.AUDITEVENT;
3809        if ("Basic".equals(codeString))
3810          return FHIRAllTypes.BASIC;
3811        if ("Binary".equals(codeString))
3812          return FHIRAllTypes.BINARY;
3813        if ("BodySite".equals(codeString))
3814          return FHIRAllTypes.BODYSITE;
3815        if ("Bundle".equals(codeString))
3816          return FHIRAllTypes.BUNDLE;
3817        if ("CarePlan".equals(codeString))
3818          return FHIRAllTypes.CAREPLAN;
3819        if ("CareTeam".equals(codeString))
3820          return FHIRAllTypes.CARETEAM;
3821        if ("Claim".equals(codeString))
3822          return FHIRAllTypes.CLAIM;
3823        if ("ClaimResponse".equals(codeString))
3824          return FHIRAllTypes.CLAIMRESPONSE;
3825        if ("ClinicalImpression".equals(codeString))
3826          return FHIRAllTypes.CLINICALIMPRESSION;
3827        if ("CodeSystem".equals(codeString))
3828          return FHIRAllTypes.CODESYSTEM;
3829        if ("Communication".equals(codeString))
3830          return FHIRAllTypes.COMMUNICATION;
3831        if ("CommunicationRequest".equals(codeString))
3832          return FHIRAllTypes.COMMUNICATIONREQUEST;
3833        if ("CompartmentDefinition".equals(codeString))
3834          return FHIRAllTypes.COMPARTMENTDEFINITION;
3835        if ("Composition".equals(codeString))
3836          return FHIRAllTypes.COMPOSITION;
3837        if ("ConceptMap".equals(codeString))
3838          return FHIRAllTypes.CONCEPTMAP;
3839        if ("Condition".equals(codeString))
3840          return FHIRAllTypes.CONDITION;
3841        if ("Conformance".equals(codeString))
3842          return FHIRAllTypes.CONFORMANCE;
3843        if ("Contract".equals(codeString))
3844          return FHIRAllTypes.CONTRACT;
3845        if ("Coverage".equals(codeString))
3846          return FHIRAllTypes.COVERAGE;
3847        if ("DataElement".equals(codeString))
3848          return FHIRAllTypes.DATAELEMENT;
3849        if ("DecisionSupportRule".equals(codeString))
3850          return FHIRAllTypes.DECISIONSUPPORTRULE;
3851        if ("DecisionSupportServiceModule".equals(codeString))
3852          return FHIRAllTypes.DECISIONSUPPORTSERVICEMODULE;
3853        if ("DetectedIssue".equals(codeString))
3854          return FHIRAllTypes.DETECTEDISSUE;
3855        if ("Device".equals(codeString))
3856          return FHIRAllTypes.DEVICE;
3857        if ("DeviceComponent".equals(codeString))
3858          return FHIRAllTypes.DEVICECOMPONENT;
3859        if ("DeviceMetric".equals(codeString))
3860          return FHIRAllTypes.DEVICEMETRIC;
3861        if ("DeviceUseRequest".equals(codeString))
3862          return FHIRAllTypes.DEVICEUSEREQUEST;
3863        if ("DeviceUseStatement".equals(codeString))
3864          return FHIRAllTypes.DEVICEUSESTATEMENT;
3865        if ("DiagnosticOrder".equals(codeString))
3866          return FHIRAllTypes.DIAGNOSTICORDER;
3867        if ("DiagnosticReport".equals(codeString))
3868          return FHIRAllTypes.DIAGNOSTICREPORT;
3869        if ("DocumentManifest".equals(codeString))
3870          return FHIRAllTypes.DOCUMENTMANIFEST;
3871        if ("DocumentReference".equals(codeString))
3872          return FHIRAllTypes.DOCUMENTREFERENCE;
3873        if ("DomainResource".equals(codeString))
3874          return FHIRAllTypes.DOMAINRESOURCE;
3875        if ("EligibilityRequest".equals(codeString))
3876          return FHIRAllTypes.ELIGIBILITYREQUEST;
3877        if ("EligibilityResponse".equals(codeString))
3878          return FHIRAllTypes.ELIGIBILITYRESPONSE;
3879        if ("Encounter".equals(codeString))
3880          return FHIRAllTypes.ENCOUNTER;
3881        if ("EnrollmentRequest".equals(codeString))
3882          return FHIRAllTypes.ENROLLMENTREQUEST;
3883        if ("EnrollmentResponse".equals(codeString))
3884          return FHIRAllTypes.ENROLLMENTRESPONSE;
3885        if ("EpisodeOfCare".equals(codeString))
3886          return FHIRAllTypes.EPISODEOFCARE;
3887        if ("ExpansionProfile".equals(codeString))
3888          return FHIRAllTypes.EXPANSIONPROFILE;
3889        if ("ExplanationOfBenefit".equals(codeString))
3890          return FHIRAllTypes.EXPLANATIONOFBENEFIT;
3891        if ("FamilyMemberHistory".equals(codeString))
3892          return FHIRAllTypes.FAMILYMEMBERHISTORY;
3893        if ("Flag".equals(codeString))
3894          return FHIRAllTypes.FLAG;
3895        if ("Goal".equals(codeString))
3896          return FHIRAllTypes.GOAL;
3897        if ("Group".equals(codeString))
3898          return FHIRAllTypes.GROUP;
3899        if ("GuidanceResponse".equals(codeString))
3900          return FHIRAllTypes.GUIDANCERESPONSE;
3901        if ("HealthcareService".equals(codeString))
3902          return FHIRAllTypes.HEALTHCARESERVICE;
3903        if ("ImagingExcerpt".equals(codeString))
3904          return FHIRAllTypes.IMAGINGEXCERPT;
3905        if ("ImagingObjectSelection".equals(codeString))
3906          return FHIRAllTypes.IMAGINGOBJECTSELECTION;
3907        if ("ImagingStudy".equals(codeString))
3908          return FHIRAllTypes.IMAGINGSTUDY;
3909        if ("Immunization".equals(codeString))
3910          return FHIRAllTypes.IMMUNIZATION;
3911        if ("ImmunizationRecommendation".equals(codeString))
3912          return FHIRAllTypes.IMMUNIZATIONRECOMMENDATION;
3913        if ("ImplementationGuide".equals(codeString))
3914          return FHIRAllTypes.IMPLEMENTATIONGUIDE;
3915        if ("Library".equals(codeString))
3916          return FHIRAllTypes.LIBRARY;
3917        if ("Linkage".equals(codeString))
3918          return FHIRAllTypes.LINKAGE;
3919        if ("List".equals(codeString))
3920          return FHIRAllTypes.LIST;
3921        if ("Location".equals(codeString))
3922          return FHIRAllTypes.LOCATION;
3923        if ("Measure".equals(codeString))
3924          return FHIRAllTypes.MEASURE;
3925        if ("MeasureReport".equals(codeString))
3926          return FHIRAllTypes.MEASUREREPORT;
3927        if ("Media".equals(codeString))
3928          return FHIRAllTypes.MEDIA;
3929        if ("Medication".equals(codeString))
3930          return FHIRAllTypes.MEDICATION;
3931        if ("MedicationAdministration".equals(codeString))
3932          return FHIRAllTypes.MEDICATIONADMINISTRATION;
3933        if ("MedicationDispense".equals(codeString))
3934          return FHIRAllTypes.MEDICATIONDISPENSE;
3935        if ("MedicationOrder".equals(codeString))
3936          return FHIRAllTypes.MEDICATIONORDER;
3937        if ("MedicationStatement".equals(codeString))
3938          return FHIRAllTypes.MEDICATIONSTATEMENT;
3939        if ("MessageHeader".equals(codeString))
3940          return FHIRAllTypes.MESSAGEHEADER;
3941        if ("ModuleDefinition".equals(codeString))
3942          return FHIRAllTypes.MODULEDEFINITION;
3943        if ("NamingSystem".equals(codeString))
3944          return FHIRAllTypes.NAMINGSYSTEM;
3945        if ("NutritionOrder".equals(codeString))
3946          return FHIRAllTypes.NUTRITIONORDER;
3947        if ("Observation".equals(codeString))
3948          return FHIRAllTypes.OBSERVATION;
3949        if ("OperationDefinition".equals(codeString))
3950          return FHIRAllTypes.OPERATIONDEFINITION;
3951        if ("OperationOutcome".equals(codeString))
3952          return FHIRAllTypes.OPERATIONOUTCOME;
3953        if ("Order".equals(codeString))
3954          return FHIRAllTypes.ORDER;
3955        if ("OrderResponse".equals(codeString))
3956          return FHIRAllTypes.ORDERRESPONSE;
3957        if ("OrderSet".equals(codeString))
3958          return FHIRAllTypes.ORDERSET;
3959        if ("Organization".equals(codeString))
3960          return FHIRAllTypes.ORGANIZATION;
3961        if ("Parameters".equals(codeString))
3962          return FHIRAllTypes.PARAMETERS;
3963        if ("Patient".equals(codeString))
3964          return FHIRAllTypes.PATIENT;
3965        if ("PaymentNotice".equals(codeString))
3966          return FHIRAllTypes.PAYMENTNOTICE;
3967        if ("PaymentReconciliation".equals(codeString))
3968          return FHIRAllTypes.PAYMENTRECONCILIATION;
3969        if ("Person".equals(codeString))
3970          return FHIRAllTypes.PERSON;
3971        if ("Practitioner".equals(codeString))
3972          return FHIRAllTypes.PRACTITIONER;
3973        if ("PractitionerRole".equals(codeString))
3974          return FHIRAllTypes.PRACTITIONERROLE;
3975        if ("Procedure".equals(codeString))
3976          return FHIRAllTypes.PROCEDURE;
3977        if ("ProcedureRequest".equals(codeString))
3978          return FHIRAllTypes.PROCEDUREREQUEST;
3979        if ("ProcessRequest".equals(codeString))
3980          return FHIRAllTypes.PROCESSREQUEST;
3981        if ("ProcessResponse".equals(codeString))
3982          return FHIRAllTypes.PROCESSRESPONSE;
3983        if ("Protocol".equals(codeString))
3984          return FHIRAllTypes.PROTOCOL;
3985        if ("Provenance".equals(codeString))
3986          return FHIRAllTypes.PROVENANCE;
3987        if ("Questionnaire".equals(codeString))
3988          return FHIRAllTypes.QUESTIONNAIRE;
3989        if ("QuestionnaireResponse".equals(codeString))
3990          return FHIRAllTypes.QUESTIONNAIRERESPONSE;
3991        if ("ReferralRequest".equals(codeString))
3992          return FHIRAllTypes.REFERRALREQUEST;
3993        if ("RelatedPerson".equals(codeString))
3994          return FHIRAllTypes.RELATEDPERSON;
3995        if ("Resource".equals(codeString))
3996          return FHIRAllTypes.RESOURCE;
3997        if ("RiskAssessment".equals(codeString))
3998          return FHIRAllTypes.RISKASSESSMENT;
3999        if ("Schedule".equals(codeString))
4000          return FHIRAllTypes.SCHEDULE;
4001        if ("SearchParameter".equals(codeString))
4002          return FHIRAllTypes.SEARCHPARAMETER;
4003        if ("Sequence".equals(codeString))
4004          return FHIRAllTypes.SEQUENCE;
4005        if ("Slot".equals(codeString))
4006          return FHIRAllTypes.SLOT;
4007        if ("Specimen".equals(codeString))
4008          return FHIRAllTypes.SPECIMEN;
4009        if ("StructureDefinition".equals(codeString))
4010          return FHIRAllTypes.STRUCTUREDEFINITION;
4011        if ("StructureMap".equals(codeString))
4012          return FHIRAllTypes.STRUCTUREMAP;
4013        if ("Subscription".equals(codeString))
4014          return FHIRAllTypes.SUBSCRIPTION;
4015        if ("Substance".equals(codeString))
4016          return FHIRAllTypes.SUBSTANCE;
4017        if ("SupplyDelivery".equals(codeString))
4018          return FHIRAllTypes.SUPPLYDELIVERY;
4019        if ("SupplyRequest".equals(codeString))
4020          return FHIRAllTypes.SUPPLYREQUEST;
4021        if ("Task".equals(codeString))
4022          return FHIRAllTypes.TASK;
4023        if ("TestScript".equals(codeString))
4024          return FHIRAllTypes.TESTSCRIPT;
4025        if ("ValueSet".equals(codeString))
4026          return FHIRAllTypes.VALUESET;
4027        if ("VisionPrescription".equals(codeString))
4028          return FHIRAllTypes.VISIONPRESCRIPTION;
4029        if ("Type".equals(codeString))
4030          return FHIRAllTypes.TYPE;
4031        if ("Any".equals(codeString))
4032          return FHIRAllTypes.ANY;
4033        throw new IllegalArgumentException("Unknown FHIRAllTypes code '"+codeString+"'");
4034        }
4035        public Enumeration<FHIRAllTypes> fromType(Base code) throws FHIRException {
4036          if (code == null || code.isEmpty())
4037            return null;
4038          String codeString = ((PrimitiveType) code).asStringValue();
4039          if (codeString == null || "".equals(codeString))
4040            return null;
4041        if ("ActionDefinition".equals(codeString))
4042          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ACTIONDEFINITION);
4043        if ("Address".equals(codeString))
4044          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADDRESS);
4045        if ("Age".equals(codeString))
4046          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.AGE);
4047        if ("Annotation".equals(codeString))
4048          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ANNOTATION);
4049        if ("Attachment".equals(codeString))
4050          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ATTACHMENT);
4051        if ("BackboneElement".equals(codeString))
4052          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BACKBONEELEMENT);
4053        if ("CodeableConcept".equals(codeString))
4054          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODEABLECONCEPT);
4055        if ("Coding".equals(codeString))
4056          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODING);
4057        if ("ContactPoint".equals(codeString))
4058          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTACTPOINT);
4059        if ("Count".equals(codeString))
4060          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COUNT);
4061        if ("DataRequirement".equals(codeString))
4062          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATAREQUIREMENT);
4063        if ("Distance".equals(codeString))
4064          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DISTANCE);
4065        if ("Duration".equals(codeString))
4066          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DURATION);
4067        if ("Element".equals(codeString))
4068          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELEMENT);
4069        if ("ElementDefinition".equals(codeString))
4070          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELEMENTDEFINITION);
4071        if ("Extension".equals(codeString))
4072          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXTENSION);
4073        if ("HumanName".equals(codeString))
4074          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.HUMANNAME);
4075        if ("Identifier".equals(codeString))
4076          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IDENTIFIER);
4077        if ("Meta".equals(codeString))
4078          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.META);
4079        if ("ModuleMetadata".equals(codeString))
4080          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MODULEMETADATA);
4081        if ("Money".equals(codeString))
4082          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MONEY);
4083        if ("Narrative".equals(codeString))
4084          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NARRATIVE);
4085        if ("ParameterDefinition".equals(codeString))
4086          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PARAMETERDEFINITION);
4087        if ("Period".equals(codeString))
4088          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERIOD);
4089        if ("Quantity".equals(codeString))
4090          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUANTITY);
4091        if ("Range".equals(codeString))
4092          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RANGE);
4093        if ("Ratio".equals(codeString))
4094          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RATIO);
4095        if ("Reference".equals(codeString))
4096          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REFERENCE);
4097        if ("SampledData".equals(codeString))
4098          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SAMPLEDDATA);
4099        if ("Signature".equals(codeString))
4100          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SIGNATURE);
4101        if ("SimpleQuantity".equals(codeString))
4102          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SIMPLEQUANTITY);
4103        if ("Timing".equals(codeString))
4104          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TIMING);
4105        if ("TriggerDefinition".equals(codeString))
4106          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TRIGGERDEFINITION);
4107        if ("base64Binary".equals(codeString))
4108          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASE64BINARY);
4109        if ("boolean".equals(codeString))
4110          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BOOLEAN);
4111        if ("code".equals(codeString))
4112          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODE);
4113        if ("date".equals(codeString))
4114          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATE);
4115        if ("dateTime".equals(codeString))
4116          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATETIME);
4117        if ("decimal".equals(codeString))
4118          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DECIMAL);
4119        if ("id".equals(codeString))
4120          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ID);
4121        if ("instant".equals(codeString))
4122          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INSTANT);
4123        if ("integer".equals(codeString))
4124          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INTEGER);
4125        if ("markdown".equals(codeString))
4126          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MARKDOWN);
4127        if ("oid".equals(codeString))
4128          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OID);
4129        if ("positiveInt".equals(codeString))
4130          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.POSITIVEINT);
4131        if ("string".equals(codeString))
4132          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRING);
4133        if ("time".equals(codeString))
4134          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TIME);
4135        if ("unsignedInt".equals(codeString))
4136          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.UNSIGNEDINT);
4137        if ("uri".equals(codeString))
4138          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.URI);
4139        if ("uuid".equals(codeString))
4140          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.UUID);
4141        if ("xhtml".equals(codeString))
4142          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.XHTML);
4143        if ("Account".equals(codeString))
4144          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ACCOUNT);
4145        if ("AllergyIntolerance".equals(codeString))
4146          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ALLERGYINTOLERANCE);
4147        if ("Appointment".equals(codeString))
4148          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.APPOINTMENT);
4149        if ("AppointmentResponse".equals(codeString))
4150          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.APPOINTMENTRESPONSE);
4151        if ("AuditEvent".equals(codeString))
4152          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.AUDITEVENT);
4153        if ("Basic".equals(codeString))
4154          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASIC);
4155        if ("Binary".equals(codeString))
4156          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BINARY);
4157        if ("BodySite".equals(codeString))
4158          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BODYSITE);
4159        if ("Bundle".equals(codeString))
4160          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BUNDLE);
4161        if ("CarePlan".equals(codeString))
4162          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CAREPLAN);
4163        if ("CareTeam".equals(codeString))
4164          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CARETEAM);
4165        if ("Claim".equals(codeString))
4166          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLAIM);
4167        if ("ClaimResponse".equals(codeString))
4168          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLAIMRESPONSE);
4169        if ("ClinicalImpression".equals(codeString))
4170          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLINICALIMPRESSION);
4171        if ("CodeSystem".equals(codeString))
4172          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODESYSTEM);
4173        if ("Communication".equals(codeString))
4174          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMMUNICATION);
4175        if ("CommunicationRequest".equals(codeString))
4176          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMMUNICATIONREQUEST);
4177        if ("CompartmentDefinition".equals(codeString))
4178          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMPARTMENTDEFINITION);
4179        if ("Composition".equals(codeString))
4180          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMPOSITION);
4181        if ("ConceptMap".equals(codeString))
4182          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONCEPTMAP);
4183        if ("Condition".equals(codeString))
4184          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONDITION);
4185        if ("Conformance".equals(codeString))
4186          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONFORMANCE);
4187        if ("Contract".equals(codeString))
4188          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTRACT);
4189        if ("Coverage".equals(codeString))
4190          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGE);
4191        if ("DataElement".equals(codeString))
4192          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATAELEMENT);
4193        if ("DecisionSupportRule".equals(codeString))
4194          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DECISIONSUPPORTRULE);
4195        if ("DecisionSupportServiceModule".equals(codeString))
4196          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DECISIONSUPPORTSERVICEMODULE);
4197        if ("DetectedIssue".equals(codeString))
4198          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DETECTEDISSUE);
4199        if ("Device".equals(codeString))
4200          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICE);
4201        if ("DeviceComponent".equals(codeString))
4202          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICECOMPONENT);
4203        if ("DeviceMetric".equals(codeString))
4204          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEMETRIC);
4205        if ("DeviceUseRequest".equals(codeString))
4206          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEUSEREQUEST);
4207        if ("DeviceUseStatement".equals(codeString))
4208          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEUSESTATEMENT);
4209        if ("DiagnosticOrder".equals(codeString))
4210          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DIAGNOSTICORDER);
4211        if ("DiagnosticReport".equals(codeString))
4212          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DIAGNOSTICREPORT);
4213        if ("DocumentManifest".equals(codeString))
4214          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOCUMENTMANIFEST);
4215        if ("DocumentReference".equals(codeString))
4216          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOCUMENTREFERENCE);
4217        if ("DomainResource".equals(codeString))
4218          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOMAINRESOURCE);
4219        if ("EligibilityRequest".equals(codeString))
4220          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELIGIBILITYREQUEST);
4221        if ("EligibilityResponse".equals(codeString))
4222          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELIGIBILITYRESPONSE);
4223        if ("Encounter".equals(codeString))
4224          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENCOUNTER);
4225        if ("EnrollmentRequest".equals(codeString))
4226          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENROLLMENTREQUEST);
4227        if ("EnrollmentResponse".equals(codeString))
4228          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENROLLMENTRESPONSE);
4229        if ("EpisodeOfCare".equals(codeString))
4230          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EPISODEOFCARE);
4231        if ("ExpansionProfile".equals(codeString))
4232          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXPANSIONPROFILE);
4233        if ("ExplanationOfBenefit".equals(codeString))
4234          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXPLANATIONOFBENEFIT);
4235        if ("FamilyMemberHistory".equals(codeString))
4236          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.FAMILYMEMBERHISTORY);
4237        if ("Flag".equals(codeString))
4238          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.FLAG);
4239        if ("Goal".equals(codeString))
4240          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GOAL);
4241        if ("Group".equals(codeString))
4242          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GROUP);
4243        if ("GuidanceResponse".equals(codeString))
4244          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GUIDANCERESPONSE);
4245        if ("HealthcareService".equals(codeString))
4246          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.HEALTHCARESERVICE);
4247        if ("ImagingExcerpt".equals(codeString))
4248          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMAGINGEXCERPT);
4249        if ("ImagingObjectSelection".equals(codeString))
4250          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMAGINGOBJECTSELECTION);
4251        if ("ImagingStudy".equals(codeString))
4252          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMAGINGSTUDY);
4253        if ("Immunization".equals(codeString))
4254          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATION);
4255        if ("ImmunizationRecommendation".equals(codeString))
4256          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATIONRECOMMENDATION);
4257        if ("ImplementationGuide".equals(codeString))
4258          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMPLEMENTATIONGUIDE);
4259        if ("Library".equals(codeString))
4260          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LIBRARY);
4261        if ("Linkage".equals(codeString))
4262          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LINKAGE);
4263        if ("List".equals(codeString))
4264          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LIST);
4265        if ("Location".equals(codeString))
4266          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LOCATION);
4267        if ("Measure".equals(codeString))
4268          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEASURE);
4269        if ("MeasureReport".equals(codeString))
4270          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEASUREREPORT);
4271        if ("Media".equals(codeString))
4272          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDIA);
4273        if ("Medication".equals(codeString))
4274          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATION);
4275        if ("MedicationAdministration".equals(codeString))
4276          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONADMINISTRATION);
4277        if ("MedicationDispense".equals(codeString))
4278          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONDISPENSE);
4279        if ("MedicationOrder".equals(codeString))
4280          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONORDER);
4281        if ("MedicationStatement".equals(codeString))
4282          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONSTATEMENT);
4283        if ("MessageHeader".equals(codeString))
4284          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MESSAGEHEADER);
4285        if ("ModuleDefinition".equals(codeString))
4286          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MODULEDEFINITION);
4287        if ("NamingSystem".equals(codeString))
4288          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NAMINGSYSTEM);
4289        if ("NutritionOrder".equals(codeString))
4290          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NUTRITIONORDER);
4291        if ("Observation".equals(codeString))
4292          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OBSERVATION);
4293        if ("OperationDefinition".equals(codeString))
4294          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OPERATIONDEFINITION);
4295        if ("OperationOutcome".equals(codeString))
4296          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OPERATIONOUTCOME);
4297        if ("Order".equals(codeString))
4298          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ORDER);
4299        if ("OrderResponse".equals(codeString))
4300          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ORDERRESPONSE);
4301        if ("OrderSet".equals(codeString))
4302          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ORDERSET);
4303        if ("Organization".equals(codeString))
4304          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ORGANIZATION);
4305        if ("Parameters".equals(codeString))
4306          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PARAMETERS);
4307        if ("Patient".equals(codeString))
4308          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PATIENT);
4309        if ("PaymentNotice".equals(codeString))
4310          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PAYMENTNOTICE);
4311        if ("PaymentReconciliation".equals(codeString))
4312          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PAYMENTRECONCILIATION);
4313        if ("Person".equals(codeString))
4314          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERSON);
4315        if ("Practitioner".equals(codeString))
4316          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRACTITIONER);
4317        if ("PractitionerRole".equals(codeString))
4318          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRACTITIONERROLE);
4319        if ("Procedure".equals(codeString))
4320          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROCEDURE);
4321        if ("ProcedureRequest".equals(codeString))
4322          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROCEDUREREQUEST);
4323        if ("ProcessRequest".equals(codeString))
4324          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROCESSREQUEST);
4325        if ("ProcessResponse".equals(codeString))
4326          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROCESSRESPONSE);
4327        if ("Protocol".equals(codeString))
4328          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROTOCOL);
4329        if ("Provenance".equals(codeString))
4330          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROVENANCE);
4331        if ("Questionnaire".equals(codeString))
4332          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUESTIONNAIRE);
4333        if ("QuestionnaireResponse".equals(codeString))
4334          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUESTIONNAIRERESPONSE);
4335        if ("ReferralRequest".equals(codeString))
4336          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REFERRALREQUEST);
4337        if ("RelatedPerson".equals(codeString))
4338          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RELATEDPERSON);
4339        if ("Resource".equals(codeString))
4340          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESOURCE);
4341        if ("RiskAssessment".equals(codeString))
4342          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RISKASSESSMENT);
4343        if ("Schedule".equals(codeString))
4344          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SCHEDULE);
4345        if ("SearchParameter".equals(codeString))
4346          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SEARCHPARAMETER);
4347        if ("Sequence".equals(codeString))
4348          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SEQUENCE);
4349        if ("Slot".equals(codeString))
4350          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SLOT);
4351        if ("Specimen".equals(codeString))
4352          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SPECIMEN);
4353        if ("StructureDefinition".equals(codeString))
4354          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRUCTUREDEFINITION);
4355        if ("StructureMap".equals(codeString))
4356          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRUCTUREMAP);
4357        if ("Subscription".equals(codeString))
4358          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSCRIPTION);
4359        if ("Substance".equals(codeString))
4360          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCE);
4361        if ("SupplyDelivery".equals(codeString))
4362          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUPPLYDELIVERY);
4363        if ("SupplyRequest".equals(codeString))
4364          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUPPLYREQUEST);
4365        if ("Task".equals(codeString))
4366          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TASK);
4367        if ("TestScript".equals(codeString))
4368          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TESTSCRIPT);
4369        if ("ValueSet".equals(codeString))
4370          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VALUESET);
4371        if ("VisionPrescription".equals(codeString))
4372          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VISIONPRESCRIPTION);
4373        if ("Type".equals(codeString))
4374          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TYPE);
4375        if ("Any".equals(codeString))
4376          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ANY);
4377        throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'");
4378        }
4379    public String toCode(FHIRAllTypes code) {
4380      if (code == FHIRAllTypes.ACTIONDEFINITION)
4381        return "ActionDefinition";
4382      if (code == FHIRAllTypes.ADDRESS)
4383        return "Address";
4384      if (code == FHIRAllTypes.AGE)
4385        return "Age";
4386      if (code == FHIRAllTypes.ANNOTATION)
4387        return "Annotation";
4388      if (code == FHIRAllTypes.ATTACHMENT)
4389        return "Attachment";
4390      if (code == FHIRAllTypes.BACKBONEELEMENT)
4391        return "BackboneElement";
4392      if (code == FHIRAllTypes.CODEABLECONCEPT)
4393        return "CodeableConcept";
4394      if (code == FHIRAllTypes.CODING)
4395        return "Coding";
4396      if (code == FHIRAllTypes.CONTACTPOINT)
4397        return "ContactPoint";
4398      if (code == FHIRAllTypes.COUNT)
4399        return "Count";
4400      if (code == FHIRAllTypes.DATAREQUIREMENT)
4401        return "DataRequirement";
4402      if (code == FHIRAllTypes.DISTANCE)
4403        return "Distance";
4404      if (code == FHIRAllTypes.DURATION)
4405        return "Duration";
4406      if (code == FHIRAllTypes.ELEMENT)
4407        return "Element";
4408      if (code == FHIRAllTypes.ELEMENTDEFINITION)
4409        return "ElementDefinition";
4410      if (code == FHIRAllTypes.EXTENSION)
4411        return "Extension";
4412      if (code == FHIRAllTypes.HUMANNAME)
4413        return "HumanName";
4414      if (code == FHIRAllTypes.IDENTIFIER)
4415        return "Identifier";
4416      if (code == FHIRAllTypes.META)
4417        return "Meta";
4418      if (code == FHIRAllTypes.MODULEMETADATA)
4419        return "ModuleMetadata";
4420      if (code == FHIRAllTypes.MONEY)
4421        return "Money";
4422      if (code == FHIRAllTypes.NARRATIVE)
4423        return "Narrative";
4424      if (code == FHIRAllTypes.PARAMETERDEFINITION)
4425        return "ParameterDefinition";
4426      if (code == FHIRAllTypes.PERIOD)
4427        return "Period";
4428      if (code == FHIRAllTypes.QUANTITY)
4429        return "Quantity";
4430      if (code == FHIRAllTypes.RANGE)
4431        return "Range";
4432      if (code == FHIRAllTypes.RATIO)
4433        return "Ratio";
4434      if (code == FHIRAllTypes.REFERENCE)
4435        return "Reference";
4436      if (code == FHIRAllTypes.SAMPLEDDATA)
4437        return "SampledData";
4438      if (code == FHIRAllTypes.SIGNATURE)
4439        return "Signature";
4440      if (code == FHIRAllTypes.SIMPLEQUANTITY)
4441        return "SimpleQuantity";
4442      if (code == FHIRAllTypes.TIMING)
4443        return "Timing";
4444      if (code == FHIRAllTypes.TRIGGERDEFINITION)
4445        return "TriggerDefinition";
4446      if (code == FHIRAllTypes.BASE64BINARY)
4447        return "base64Binary";
4448      if (code == FHIRAllTypes.BOOLEAN)
4449        return "boolean";
4450      if (code == FHIRAllTypes.CODE)
4451        return "code";
4452      if (code == FHIRAllTypes.DATE)
4453        return "date";
4454      if (code == FHIRAllTypes.DATETIME)
4455        return "dateTime";
4456      if (code == FHIRAllTypes.DECIMAL)
4457        return "decimal";
4458      if (code == FHIRAllTypes.ID)
4459        return "id";
4460      if (code == FHIRAllTypes.INSTANT)
4461        return "instant";
4462      if (code == FHIRAllTypes.INTEGER)
4463        return "integer";
4464      if (code == FHIRAllTypes.MARKDOWN)
4465        return "markdown";
4466      if (code == FHIRAllTypes.OID)
4467        return "oid";
4468      if (code == FHIRAllTypes.POSITIVEINT)
4469        return "positiveInt";
4470      if (code == FHIRAllTypes.STRING)
4471        return "string";
4472      if (code == FHIRAllTypes.TIME)
4473        return "time";
4474      if (code == FHIRAllTypes.UNSIGNEDINT)
4475        return "unsignedInt";
4476      if (code == FHIRAllTypes.URI)
4477        return "uri";
4478      if (code == FHIRAllTypes.UUID)
4479        return "uuid";
4480      if (code == FHIRAllTypes.XHTML)
4481        return "xhtml";
4482      if (code == FHIRAllTypes.ACCOUNT)
4483        return "Account";
4484      if (code == FHIRAllTypes.ALLERGYINTOLERANCE)
4485        return "AllergyIntolerance";
4486      if (code == FHIRAllTypes.APPOINTMENT)
4487        return "Appointment";
4488      if (code == FHIRAllTypes.APPOINTMENTRESPONSE)
4489        return "AppointmentResponse";
4490      if (code == FHIRAllTypes.AUDITEVENT)
4491        return "AuditEvent";
4492      if (code == FHIRAllTypes.BASIC)
4493        return "Basic";
4494      if (code == FHIRAllTypes.BINARY)
4495        return "Binary";
4496      if (code == FHIRAllTypes.BODYSITE)
4497        return "BodySite";
4498      if (code == FHIRAllTypes.BUNDLE)
4499        return "Bundle";
4500      if (code == FHIRAllTypes.CAREPLAN)
4501        return "CarePlan";
4502      if (code == FHIRAllTypes.CARETEAM)
4503        return "CareTeam";
4504      if (code == FHIRAllTypes.CLAIM)
4505        return "Claim";
4506      if (code == FHIRAllTypes.CLAIMRESPONSE)
4507        return "ClaimResponse";
4508      if (code == FHIRAllTypes.CLINICALIMPRESSION)
4509        return "ClinicalImpression";
4510      if (code == FHIRAllTypes.CODESYSTEM)
4511        return "CodeSystem";
4512      if (code == FHIRAllTypes.COMMUNICATION)
4513        return "Communication";
4514      if (code == FHIRAllTypes.COMMUNICATIONREQUEST)
4515        return "CommunicationRequest";
4516      if (code == FHIRAllTypes.COMPARTMENTDEFINITION)
4517        return "CompartmentDefinition";
4518      if (code == FHIRAllTypes.COMPOSITION)
4519        return "Composition";
4520      if (code == FHIRAllTypes.CONCEPTMAP)
4521        return "ConceptMap";
4522      if (code == FHIRAllTypes.CONDITION)
4523        return "Condition";
4524      if (code == FHIRAllTypes.CONFORMANCE)
4525        return "Conformance";
4526      if (code == FHIRAllTypes.CONTRACT)
4527        return "Contract";
4528      if (code == FHIRAllTypes.COVERAGE)
4529        return "Coverage";
4530      if (code == FHIRAllTypes.DATAELEMENT)
4531        return "DataElement";
4532      if (code == FHIRAllTypes.DECISIONSUPPORTRULE)
4533        return "DecisionSupportRule";
4534      if (code == FHIRAllTypes.DECISIONSUPPORTSERVICEMODULE)
4535        return "DecisionSupportServiceModule";
4536      if (code == FHIRAllTypes.DETECTEDISSUE)
4537        return "DetectedIssue";
4538      if (code == FHIRAllTypes.DEVICE)
4539        return "Device";
4540      if (code == FHIRAllTypes.DEVICECOMPONENT)
4541        return "DeviceComponent";
4542      if (code == FHIRAllTypes.DEVICEMETRIC)
4543        return "DeviceMetric";
4544      if (code == FHIRAllTypes.DEVICEUSEREQUEST)
4545        return "DeviceUseRequest";
4546      if (code == FHIRAllTypes.DEVICEUSESTATEMENT)
4547        return "DeviceUseStatement";
4548      if (code == FHIRAllTypes.DIAGNOSTICORDER)
4549        return "DiagnosticOrder";
4550      if (code == FHIRAllTypes.DIAGNOSTICREPORT)
4551        return "DiagnosticReport";
4552      if (code == FHIRAllTypes.DOCUMENTMANIFEST)
4553        return "DocumentManifest";
4554      if (code == FHIRAllTypes.DOCUMENTREFERENCE)
4555        return "DocumentReference";
4556      if (code == FHIRAllTypes.DOMAINRESOURCE)
4557        return "DomainResource";
4558      if (code == FHIRAllTypes.ELIGIBILITYREQUEST)
4559        return "EligibilityRequest";
4560      if (code == FHIRAllTypes.ELIGIBILITYRESPONSE)
4561        return "EligibilityResponse";
4562      if (code == FHIRAllTypes.ENCOUNTER)
4563        return "Encounter";
4564      if (code == FHIRAllTypes.ENROLLMENTREQUEST)
4565        return "EnrollmentRequest";
4566      if (code == FHIRAllTypes.ENROLLMENTRESPONSE)
4567        return "EnrollmentResponse";
4568      if (code == FHIRAllTypes.EPISODEOFCARE)
4569        return "EpisodeOfCare";
4570      if (code == FHIRAllTypes.EXPANSIONPROFILE)
4571        return "ExpansionProfile";
4572      if (code == FHIRAllTypes.EXPLANATIONOFBENEFIT)
4573        return "ExplanationOfBenefit";
4574      if (code == FHIRAllTypes.FAMILYMEMBERHISTORY)
4575        return "FamilyMemberHistory";
4576      if (code == FHIRAllTypes.FLAG)
4577        return "Flag";
4578      if (code == FHIRAllTypes.GOAL)
4579        return "Goal";
4580      if (code == FHIRAllTypes.GROUP)
4581        return "Group";
4582      if (code == FHIRAllTypes.GUIDANCERESPONSE)
4583        return "GuidanceResponse";
4584      if (code == FHIRAllTypes.HEALTHCARESERVICE)
4585        return "HealthcareService";
4586      if (code == FHIRAllTypes.IMAGINGEXCERPT)
4587        return "ImagingExcerpt";
4588      if (code == FHIRAllTypes.IMAGINGOBJECTSELECTION)
4589        return "ImagingObjectSelection";
4590      if (code == FHIRAllTypes.IMAGINGSTUDY)
4591        return "ImagingStudy";
4592      if (code == FHIRAllTypes.IMMUNIZATION)
4593        return "Immunization";
4594      if (code == FHIRAllTypes.IMMUNIZATIONRECOMMENDATION)
4595        return "ImmunizationRecommendation";
4596      if (code == FHIRAllTypes.IMPLEMENTATIONGUIDE)
4597        return "ImplementationGuide";
4598      if (code == FHIRAllTypes.LIBRARY)
4599        return "Library";
4600      if (code == FHIRAllTypes.LINKAGE)
4601        return "Linkage";
4602      if (code == FHIRAllTypes.LIST)
4603        return "List";
4604      if (code == FHIRAllTypes.LOCATION)
4605        return "Location";
4606      if (code == FHIRAllTypes.MEASURE)
4607        return "Measure";
4608      if (code == FHIRAllTypes.MEASUREREPORT)
4609        return "MeasureReport";
4610      if (code == FHIRAllTypes.MEDIA)
4611        return "Media";
4612      if (code == FHIRAllTypes.MEDICATION)
4613        return "Medication";
4614      if (code == FHIRAllTypes.MEDICATIONADMINISTRATION)
4615        return "MedicationAdministration";
4616      if (code == FHIRAllTypes.MEDICATIONDISPENSE)
4617        return "MedicationDispense";
4618      if (code == FHIRAllTypes.MEDICATIONORDER)
4619        return "MedicationOrder";
4620      if (code == FHIRAllTypes.MEDICATIONSTATEMENT)
4621        return "MedicationStatement";
4622      if (code == FHIRAllTypes.MESSAGEHEADER)
4623        return "MessageHeader";
4624      if (code == FHIRAllTypes.MODULEDEFINITION)
4625        return "ModuleDefinition";
4626      if (code == FHIRAllTypes.NAMINGSYSTEM)
4627        return "NamingSystem";
4628      if (code == FHIRAllTypes.NUTRITIONORDER)
4629        return "NutritionOrder";
4630      if (code == FHIRAllTypes.OBSERVATION)
4631        return "Observation";
4632      if (code == FHIRAllTypes.OPERATIONDEFINITION)
4633        return "OperationDefinition";
4634      if (code == FHIRAllTypes.OPERATIONOUTCOME)
4635        return "OperationOutcome";
4636      if (code == FHIRAllTypes.ORDER)
4637        return "Order";
4638      if (code == FHIRAllTypes.ORDERRESPONSE)
4639        return "OrderResponse";
4640      if (code == FHIRAllTypes.ORDERSET)
4641        return "OrderSet";
4642      if (code == FHIRAllTypes.ORGANIZATION)
4643        return "Organization";
4644      if (code == FHIRAllTypes.PARAMETERS)
4645        return "Parameters";
4646      if (code == FHIRAllTypes.PATIENT)
4647        return "Patient";
4648      if (code == FHIRAllTypes.PAYMENTNOTICE)
4649        return "PaymentNotice";
4650      if (code == FHIRAllTypes.PAYMENTRECONCILIATION)
4651        return "PaymentReconciliation";
4652      if (code == FHIRAllTypes.PERSON)
4653        return "Person";
4654      if (code == FHIRAllTypes.PRACTITIONER)
4655        return "Practitioner";
4656      if (code == FHIRAllTypes.PRACTITIONERROLE)
4657        return "PractitionerRole";
4658      if (code == FHIRAllTypes.PROCEDURE)
4659        return "Procedure";
4660      if (code == FHIRAllTypes.PROCEDUREREQUEST)
4661        return "ProcedureRequest";
4662      if (code == FHIRAllTypes.PROCESSREQUEST)
4663        return "ProcessRequest";
4664      if (code == FHIRAllTypes.PROCESSRESPONSE)
4665        return "ProcessResponse";
4666      if (code == FHIRAllTypes.PROTOCOL)
4667        return "Protocol";
4668      if (code == FHIRAllTypes.PROVENANCE)
4669        return "Provenance";
4670      if (code == FHIRAllTypes.QUESTIONNAIRE)
4671        return "Questionnaire";
4672      if (code == FHIRAllTypes.QUESTIONNAIRERESPONSE)
4673        return "QuestionnaireResponse";
4674      if (code == FHIRAllTypes.REFERRALREQUEST)
4675        return "ReferralRequest";
4676      if (code == FHIRAllTypes.RELATEDPERSON)
4677        return "RelatedPerson";
4678      if (code == FHIRAllTypes.RESOURCE)
4679        return "Resource";
4680      if (code == FHIRAllTypes.RISKASSESSMENT)
4681        return "RiskAssessment";
4682      if (code == FHIRAllTypes.SCHEDULE)
4683        return "Schedule";
4684      if (code == FHIRAllTypes.SEARCHPARAMETER)
4685        return "SearchParameter";
4686      if (code == FHIRAllTypes.SEQUENCE)
4687        return "Sequence";
4688      if (code == FHIRAllTypes.SLOT)
4689        return "Slot";
4690      if (code == FHIRAllTypes.SPECIMEN)
4691        return "Specimen";
4692      if (code == FHIRAllTypes.STRUCTUREDEFINITION)
4693        return "StructureDefinition";
4694      if (code == FHIRAllTypes.STRUCTUREMAP)
4695        return "StructureMap";
4696      if (code == FHIRAllTypes.SUBSCRIPTION)
4697        return "Subscription";
4698      if (code == FHIRAllTypes.SUBSTANCE)
4699        return "Substance";
4700      if (code == FHIRAllTypes.SUPPLYDELIVERY)
4701        return "SupplyDelivery";
4702      if (code == FHIRAllTypes.SUPPLYREQUEST)
4703        return "SupplyRequest";
4704      if (code == FHIRAllTypes.TASK)
4705        return "Task";
4706      if (code == FHIRAllTypes.TESTSCRIPT)
4707        return "TestScript";
4708      if (code == FHIRAllTypes.VALUESET)
4709        return "ValueSet";
4710      if (code == FHIRAllTypes.VISIONPRESCRIPTION)
4711        return "VisionPrescription";
4712      if (code == FHIRAllTypes.TYPE)
4713        return "Type";
4714      if (code == FHIRAllTypes.ANY)
4715        return "Any";
4716      return "?";
4717      }
4718    public String toSystem(FHIRAllTypes code) {
4719      return code.getSystem();
4720      }
4721    }
4722
4723    public enum FHIRDefinedType {
4724        /**
4725         * The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library.
4726         */
4727        ACTIONDEFINITION, 
4728        /**
4729         * 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 and which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.
4730         */
4731        ADDRESS, 
4732        /**
4733         * null
4734         */
4735        AGE, 
4736        /**
4737         * A  text note which also  contains information about who made the statement and when.
4738         */
4739        ANNOTATION, 
4740        /**
4741         * For referring to data content defined in other formats.
4742         */
4743        ATTACHMENT, 
4744        /**
4745         * Base definition for all elements that are defined inside a resource - but not those in a data type.
4746         */
4747        BACKBONEELEMENT, 
4748        /**
4749         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
4750         */
4751        CODEABLECONCEPT, 
4752        /**
4753         * A reference to a code defined by a terminology system.
4754         */
4755        CODING, 
4756        /**
4757         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
4758         */
4759        CONTACTPOINT, 
4760        /**
4761         * null
4762         */
4763        COUNT, 
4764        /**
4765         * Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data.
4766         */
4767        DATAREQUIREMENT, 
4768        /**
4769         * null
4770         */
4771        DISTANCE, 
4772        /**
4773         * null
4774         */
4775        DURATION, 
4776        /**
4777         * Base definition for all elements in a resource.
4778         */
4779        ELEMENT, 
4780        /**
4781         * Captures constraints on each element within the resource, profile, or extension.
4782         */
4783        ELEMENTDEFINITION, 
4784        /**
4785         * Optional Extensions Element - found in all resources.
4786         */
4787        EXTENSION, 
4788        /**
4789         * A human's name with the ability to identify parts and usage.
4790         */
4791        HUMANNAME, 
4792        /**
4793         * A technical identifier - identifies some entity uniquely and unambiguously.
4794         */
4795        IDENTIFIER, 
4796        /**
4797         * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.
4798         */
4799        META, 
4800        /**
4801         * The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information.
4802         */
4803        MODULEMETADATA, 
4804        /**
4805         * null
4806         */
4807        MONEY, 
4808        /**
4809         * A human-readable formatted text, including images.
4810         */
4811        NARRATIVE, 
4812        /**
4813         * 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.
4814         */
4815        PARAMETERDEFINITION, 
4816        /**
4817         * A time period defined by a start and end date and optionally time.
4818         */
4819        PERIOD, 
4820        /**
4821         * 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.
4822         */
4823        QUANTITY, 
4824        /**
4825         * A set of ordered Quantities defined by a low and high limit.
4826         */
4827        RANGE, 
4828        /**
4829         * A relationship of two Quantity values - expressed as a numerator and a denominator.
4830         */
4831        RATIO, 
4832        /**
4833         * A reference from one resource to another.
4834         */
4835        REFERENCE, 
4836        /**
4837         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
4838         */
4839        SAMPLEDDATA, 
4840        /**
4841         * A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities.
4842         */
4843        SIGNATURE, 
4844        /**
4845         * null
4846         */
4847        SIMPLEQUANTITY, 
4848        /**
4849         * Specifies an event that may occur multiple times. Timing schedules are used to record when things are 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.
4850         */
4851        TIMING, 
4852        /**
4853         * A description of a triggering event.
4854         */
4855        TRIGGERDEFINITION, 
4856        /**
4857         * A stream of bytes
4858         */
4859        BASE64BINARY, 
4860        /**
4861         * Value of "true" or "false"
4862         */
4863        BOOLEAN, 
4864        /**
4865         * 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
4866         */
4867        CODE, 
4868        /**
4869         * 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.
4870         */
4871        DATE, 
4872        /**
4873         * 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.
4874         */
4875        DATETIME, 
4876        /**
4877         * A rational number with implicit precision
4878         */
4879        DECIMAL, 
4880        /**
4881         * 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.
4882         */
4883        ID, 
4884        /**
4885         * An instant in time - known at least to the second
4886         */
4887        INSTANT, 
4888        /**
4889         * A whole number
4890         */
4891        INTEGER, 
4892        /**
4893         * A string that may contain markdown syntax for optional processing by a mark down presentation engine
4894         */
4895        MARKDOWN, 
4896        /**
4897         * An oid represented as a URI
4898         */
4899        OID, 
4900        /**
4901         * An integer with a value that is positive (e.g. >0)
4902         */
4903        POSITIVEINT, 
4904        /**
4905         * A sequence of Unicode characters
4906         */
4907        STRING, 
4908        /**
4909         * A time during the day, with no date specified
4910         */
4911        TIME, 
4912        /**
4913         * An integer with a value that is not negative (e.g. >= 0)
4914         */
4915        UNSIGNEDINT, 
4916        /**
4917         * String of characters used to identify a name or a resource
4918         */
4919        URI, 
4920        /**
4921         * A UUID, represented as a URI
4922         */
4923        UUID, 
4924        /**
4925         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
4926         */
4927        XHTML, 
4928        /**
4929         * A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centres, etc.
4930         */
4931        ACCOUNT, 
4932        /**
4933         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
4934         */
4935        ALLERGYINTOLERANCE, 
4936        /**
4937         * 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).
4938         */
4939        APPOINTMENT, 
4940        /**
4941         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
4942         */
4943        APPOINTMENTRESPONSE, 
4944        /**
4945         * 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.
4946         */
4947        AUDITEVENT, 
4948        /**
4949         * 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.
4950         */
4951        BASIC, 
4952        /**
4953         * A binary resource can contain any content, whether text, image, pdf, zip archive, etc.
4954         */
4955        BINARY, 
4956        /**
4957         * Record details about the anatomical location of a specimen or body part.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.
4958         */
4959        BODYSITE, 
4960        /**
4961         * A container for a collection of resources.
4962         */
4963        BUNDLE, 
4964        /**
4965         * 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.
4966         */
4967        CAREPLAN, 
4968        /**
4969         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
4970         */
4971        CARETEAM, 
4972        /**
4973         * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.
4974         */
4975        CLAIM, 
4976        /**
4977         * This resource provides the adjudication details from the processing of a Claim resource.
4978         */
4979        CLAIMRESPONSE, 
4980        /**
4981         * 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.
4982         */
4983        CLINICALIMPRESSION, 
4984        /**
4985         * A code system resource specifies a set of codes drawn from one or more code systems.
4986         */
4987        CODESYSTEM, 
4988        /**
4989         * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition.
4990         */
4991        COMMUNICATION, 
4992        /**
4993         * 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.
4994         */
4995        COMMUNICATIONREQUEST, 
4996        /**
4997         * A compartment definition that defines how resources are accessed on a server.
4998         */
4999        COMPARTMENTDEFINITION, 
5000        /**
5001         * A set of healthcare-related information that is assembled together into a single logical document 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. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained.
5002         */
5003        COMPOSITION, 
5004        /**
5005         * A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models.
5006         */
5007        CONCEPTMAP, 
5008        /**
5009         * Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary.
5010         */
5011        CONDITION, 
5012        /**
5013         * A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
5014         */
5015        CONFORMANCE, 
5016        /**
5017         * A formal agreement between parties regarding the conduct of business, exchange of information or other matters.
5018         */
5019        CONTRACT, 
5020        /**
5021         * Financial instrument which may be used to pay for or reimburse health care products and services.
5022         */
5023        COVERAGE, 
5024        /**
5025         * The formal description of a single piece of information that can be gathered and reported.
5026         */
5027        DATAELEMENT, 
5028        /**
5029         * This resource defines a decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of a actions that should be taken whenever some condition is met in response to a particular event or events.
5030         */
5031        DECISIONSUPPORTRULE, 
5032        /**
5033         * The DecisionSupportServiceModule describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.
5034         */
5035        DECISIONSUPPORTSERVICEMODULE, 
5036        /**
5037         * 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.
5038         */
5039        DETECTEDISSUE, 
5040        /**
5041         * This resource identifies an instance or 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.  Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.  Non-medical devices may include items such as a machine, cellphone, computer, application, etc.
5042         */
5043        DEVICE, 
5044        /**
5045         * Describes the characteristics, operational status and capabilities of a medical-related component of a medical device.
5046         */
5047        DEVICECOMPONENT, 
5048        /**
5049         * Describes a measurement, calculation or setting capability of a medical device.
5050         */
5051        DEVICEMETRIC, 
5052        /**
5053         * 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.
5054         */
5055        DEVICEUSEREQUEST, 
5056        /**
5057         * 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.
5058         */
5059        DEVICEUSESTATEMENT, 
5060        /**
5061         * A record of a request for a diagnostic investigation service to be performed.
5062         */
5063        DIAGNOSTICORDER, 
5064        /**
5065         * 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.
5066         */
5067        DIAGNOSTICREPORT, 
5068        /**
5069         * A manifest that defines a set of documents.
5070         */
5071        DOCUMENTMANIFEST, 
5072        /**
5073         * A reference to a document .
5074         */
5075        DOCUMENTREFERENCE, 
5076        /**
5077         * A resource that includes narrative, extensions, and contained resources.
5078         */
5079        DOMAINRESOURCE, 
5080        /**
5081         * This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service.
5082         */
5083        ELIGIBILITYREQUEST, 
5084        /**
5085         * This resource provides eligibility and plan details from the processing of an Eligibility resource.
5086         */
5087        ELIGIBILITYRESPONSE, 
5088        /**
5089         * 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.
5090         */
5091        ENCOUNTER, 
5092        /**
5093         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
5094         */
5095        ENROLLMENTREQUEST, 
5096        /**
5097         * This resource provides enrollment and plan details from the processing of an Enrollment resource.
5098         */
5099        ENROLLMENTRESPONSE, 
5100        /**
5101         * 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.
5102         */
5103        EPISODEOFCARE, 
5104        /**
5105         * Resource to define constraints on the Expansion of a FHIR ValueSet.
5106         */
5107        EXPANSIONPROFILE, 
5108        /**
5109         * 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.
5110         */
5111        EXPLANATIONOFBENEFIT, 
5112        /**
5113         * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.
5114         */
5115        FAMILYMEMBERHISTORY, 
5116        /**
5117         * Prospective warnings of potential issues when providing care to the patient.
5118         */
5119        FLAG, 
5120        /**
5121         * 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.
5122         */
5123        GOAL, 
5124        /**
5125         * 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.
5126         */
5127        GROUP, 
5128        /**
5129         * 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.
5130         */
5131        GUIDANCERESPONSE, 
5132        /**
5133         * The details of a healthcare service available at a location.
5134         */
5135        HEALTHCARESERVICE, 
5136        /**
5137         * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances).  The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on.
5138         */
5139        IMAGINGEXCERPT, 
5140        /**
5141         * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances).  The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on.
5142         */
5143        IMAGINGOBJECTSELECTION, 
5144        /**
5145         * 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.
5146         */
5147        IMAGINGSTUDY, 
5148        /**
5149         * Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed.
5150         */
5151        IMMUNIZATION, 
5152        /**
5153         * A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification.
5154         */
5155        IMMUNIZATIONRECOMMENDATION, 
5156        /**
5157         * A set of rules or how FHIR is used to solve a particular problem. 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.
5158         */
5159        IMPLEMENTATIONGUIDE, 
5160        /**
5161         * The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library.
5162         */
5163        LIBRARY, 
5164        /**
5165         * Identifies two or more records (resource instances) that are referring to the same real-world "occurrence".
5166         */
5167        LINKAGE, 
5168        /**
5169         * A set of information summarized from a list of other resources.
5170         */
5171        LIST, 
5172        /**
5173         * Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.
5174         */
5175        LOCATION, 
5176        /**
5177         * The Measure resource provides the definition of a quality measure.
5178         */
5179        MEASURE, 
5180        /**
5181         * The MeasureReport resource contains the results of evaluating a measure.
5182         */
5183        MEASUREREPORT, 
5184        /**
5185         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
5186         */
5187        MEDIA, 
5188        /**
5189         * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.
5190         */
5191        MEDICATION, 
5192        /**
5193         * 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.
5194         */
5195        MEDICATIONADMINISTRATION, 
5196        /**
5197         * 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.
5198         */
5199        MEDICATIONDISPENSE, 
5200        /**
5201         * An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationOrder" rather than "MedicationPrescription" to generalize the use across inpatient and outpatient settings as well as for care plans, etc.
5202         */
5203        MEDICATIONORDER, 
5204        /**
5205         * 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 e.g. the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains 
5206
5207The 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.
5208         */
5209        MEDICATIONSTATEMENT, 
5210        /**
5211         * 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.
5212         */
5213        MESSAGEHEADER, 
5214        /**
5215         * The ModuleDefinition resource defines the data requirements for a quality artifact.
5216         */
5217        MODULEDEFINITION, 
5218        /**
5219         * 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.
5220         */
5221        NAMINGSYSTEM, 
5222        /**
5223         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
5224         */
5225        NUTRITIONORDER, 
5226        /**
5227         * Measurements and simple assertions made about a patient, device or other subject.
5228         */
5229        OBSERVATION, 
5230        /**
5231         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
5232         */
5233        OPERATIONDEFINITION, 
5234        /**
5235         * A collection of error, warning or information messages that result from a system action.
5236         */
5237        OPERATIONOUTCOME, 
5238        /**
5239         * A request to perform an action.
5240         */
5241        ORDER, 
5242        /**
5243         * A response to an order.
5244         */
5245        ORDERRESPONSE, 
5246        /**
5247         * This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support.
5248         */
5249        ORDERSET, 
5250        /**
5251         * 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, etc.
5252         */
5253        ORGANIZATION, 
5254        /**
5255         * This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it.
5256         */
5257        PARAMETERS, 
5258        /**
5259         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
5260         */
5261        PATIENT, 
5262        /**
5263         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
5264         */
5265        PAYMENTNOTICE, 
5266        /**
5267         * This resource provides payment details and claim references supporting a bulk payment.
5268         */
5269        PAYMENTRECONCILIATION, 
5270        /**
5271         * Demographics and administrative information about a person independent of a specific health-related context.
5272         */
5273        PERSON, 
5274        /**
5275         * A person who is directly or indirectly involved in the provisioning of healthcare.
5276         */
5277        PRACTITIONER, 
5278        /**
5279         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
5280         */
5281        PRACTITIONERROLE, 
5282        /**
5283         * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy.
5284         */
5285        PROCEDURE, 
5286        /**
5287         * A request for a procedure to be performed. May be a proposal or an order.
5288         */
5289        PROCEDUREREQUEST, 
5290        /**
5291         * This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources.
5292         */
5293        PROCESSREQUEST, 
5294        /**
5295         * This resource provides processing status, errors and notes from the processing of a resource.
5296         */
5297        PROCESSRESPONSE, 
5298        /**
5299         * A definition of behaviors to be taken in particular circumstances, often including conditions, options and other decision points.
5300         */
5301        PROTOCOL, 
5302        /**
5303         * 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.
5304         */
5305        PROVENANCE, 
5306        /**
5307         * A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.
5308         */
5309        QUESTIONNAIRE, 
5310        /**
5311         * 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 underlying questions.
5312         */
5313        QUESTIONNAIRERESPONSE, 
5314        /**
5315         * Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization.
5316         */
5317        REFERRALREQUEST, 
5318        /**
5319         * 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.
5320         */
5321        RELATEDPERSON, 
5322        /**
5323         * This is the base resource type for everything.
5324         */
5325        RESOURCE, 
5326        /**
5327         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
5328         */
5329        RISKASSESSMENT, 
5330        /**
5331         * A container for slot(s) of time that may be available for booking appointments.
5332         */
5333        SCHEDULE, 
5334        /**
5335         * A search parameter that defines a named search item that can be used to search/filter on a resource.
5336         */
5337        SEARCHPARAMETER, 
5338        /**
5339         * Variation and Sequence data.
5340         */
5341        SEQUENCE, 
5342        /**
5343         * A slot of time on a schedule that may be available for booking appointments.
5344         */
5345        SLOT, 
5346        /**
5347         * A sample to be used for analysis.
5348         */
5349        SPECIMEN, 
5350        /**
5351         * 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.
5352         */
5353        STRUCTUREDEFINITION, 
5354        /**
5355         * A Map of relationships between 2 structures that can be used to transform data.
5356         */
5357        STRUCTUREMAP, 
5358        /**
5359         * 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 is able to take an appropriate action.
5360         */
5361        SUBSCRIPTION, 
5362        /**
5363         * A homogeneous material with a definite composition.
5364         */
5365        SUBSTANCE, 
5366        /**
5367         * Record of delivery of what is supplied.
5368         */
5369        SUPPLYDELIVERY, 
5370        /**
5371         * A record of a request for a medication, substance or device used in the healthcare setting.
5372         */
5373        SUPPLYREQUEST, 
5374        /**
5375         * A task to be performed.
5376         */
5377        TASK, 
5378        /**
5379         * TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification.
5380         */
5381        TESTSCRIPT, 
5382        /**
5383         * A value set specifies a set of codes drawn from one or more code systems.
5384         */
5385        VALUESET, 
5386        /**
5387         * An authorization for the supply of glasses and/or contact lenses to a patient.
5388         */
5389        VISIONPRESCRIPTION, 
5390        /**
5391         * added to help the parsers
5392         */
5393        NULL;
5394        public static FHIRDefinedType fromCode(String codeString) throws FHIRException {
5395            if (codeString == null || "".equals(codeString))
5396                return null;
5397        if ("ActionDefinition".equals(codeString))
5398          return ACTIONDEFINITION;
5399        if ("Address".equals(codeString))
5400          return ADDRESS;
5401        if ("Age".equals(codeString))
5402          return AGE;
5403        if ("Annotation".equals(codeString))
5404          return ANNOTATION;
5405        if ("Attachment".equals(codeString))
5406          return ATTACHMENT;
5407        if ("BackboneElement".equals(codeString))
5408          return BACKBONEELEMENT;
5409        if ("CodeableConcept".equals(codeString))
5410          return CODEABLECONCEPT;
5411        if ("Coding".equals(codeString))
5412          return CODING;
5413        if ("ContactPoint".equals(codeString))
5414          return CONTACTPOINT;
5415        if ("Count".equals(codeString))
5416          return COUNT;
5417        if ("DataRequirement".equals(codeString))
5418          return DATAREQUIREMENT;
5419        if ("Distance".equals(codeString))
5420          return DISTANCE;
5421        if ("Duration".equals(codeString))
5422          return DURATION;
5423        if ("Element".equals(codeString))
5424          return ELEMENT;
5425        if ("ElementDefinition".equals(codeString))
5426          return ELEMENTDEFINITION;
5427        if ("Extension".equals(codeString))
5428          return EXTENSION;
5429        if ("HumanName".equals(codeString))
5430          return HUMANNAME;
5431        if ("Identifier".equals(codeString))
5432          return IDENTIFIER;
5433        if ("Meta".equals(codeString))
5434          return META;
5435        if ("ModuleMetadata".equals(codeString))
5436          return MODULEMETADATA;
5437        if ("Money".equals(codeString))
5438          return MONEY;
5439        if ("Narrative".equals(codeString))
5440          return NARRATIVE;
5441        if ("ParameterDefinition".equals(codeString))
5442          return PARAMETERDEFINITION;
5443        if ("Period".equals(codeString))
5444          return PERIOD;
5445        if ("Quantity".equals(codeString))
5446          return QUANTITY;
5447        if ("Range".equals(codeString))
5448          return RANGE;
5449        if ("Ratio".equals(codeString))
5450          return RATIO;
5451        if ("Reference".equals(codeString))
5452          return REFERENCE;
5453        if ("SampledData".equals(codeString))
5454          return SAMPLEDDATA;
5455        if ("Signature".equals(codeString))
5456          return SIGNATURE;
5457        if ("SimpleQuantity".equals(codeString))
5458          return SIMPLEQUANTITY;
5459        if ("Timing".equals(codeString))
5460          return TIMING;
5461        if ("TriggerDefinition".equals(codeString))
5462          return TRIGGERDEFINITION;
5463        if ("base64Binary".equals(codeString))
5464          return BASE64BINARY;
5465        if ("boolean".equals(codeString))
5466          return BOOLEAN;
5467        if ("code".equals(codeString))
5468          return CODE;
5469        if ("date".equals(codeString))
5470          return DATE;
5471        if ("dateTime".equals(codeString))
5472          return DATETIME;
5473        if ("decimal".equals(codeString))
5474          return DECIMAL;
5475        if ("id".equals(codeString))
5476          return ID;
5477        if ("instant".equals(codeString))
5478          return INSTANT;
5479        if ("integer".equals(codeString))
5480          return INTEGER;
5481        if ("markdown".equals(codeString))
5482          return MARKDOWN;
5483        if ("oid".equals(codeString))
5484          return OID;
5485        if ("positiveInt".equals(codeString))
5486          return POSITIVEINT;
5487        if ("string".equals(codeString))
5488          return STRING;
5489        if ("time".equals(codeString))
5490          return TIME;
5491        if ("unsignedInt".equals(codeString))
5492          return UNSIGNEDINT;
5493        if ("uri".equals(codeString))
5494          return URI;
5495        if ("uuid".equals(codeString))
5496          return UUID;
5497        if ("xhtml".equals(codeString))
5498          return XHTML;
5499        if ("Account".equals(codeString))
5500          return ACCOUNT;
5501        if ("AllergyIntolerance".equals(codeString))
5502          return ALLERGYINTOLERANCE;
5503        if ("Appointment".equals(codeString))
5504          return APPOINTMENT;
5505        if ("AppointmentResponse".equals(codeString))
5506          return APPOINTMENTRESPONSE;
5507        if ("AuditEvent".equals(codeString))
5508          return AUDITEVENT;
5509        if ("Basic".equals(codeString))
5510          return BASIC;
5511        if ("Binary".equals(codeString))
5512          return BINARY;
5513        if ("BodySite".equals(codeString))
5514          return BODYSITE;
5515        if ("Bundle".equals(codeString))
5516          return BUNDLE;
5517        if ("CarePlan".equals(codeString))
5518          return CAREPLAN;
5519        if ("CareTeam".equals(codeString))
5520          return CARETEAM;
5521        if ("Claim".equals(codeString))
5522          return CLAIM;
5523        if ("ClaimResponse".equals(codeString))
5524          return CLAIMRESPONSE;
5525        if ("ClinicalImpression".equals(codeString))
5526          return CLINICALIMPRESSION;
5527        if ("CodeSystem".equals(codeString))
5528          return CODESYSTEM;
5529        if ("Communication".equals(codeString))
5530          return COMMUNICATION;
5531        if ("CommunicationRequest".equals(codeString))
5532          return COMMUNICATIONREQUEST;
5533        if ("CompartmentDefinition".equals(codeString))
5534          return COMPARTMENTDEFINITION;
5535        if ("Composition".equals(codeString))
5536          return COMPOSITION;
5537        if ("ConceptMap".equals(codeString))
5538          return CONCEPTMAP;
5539        if ("Condition".equals(codeString))
5540          return CONDITION;
5541        if ("Conformance".equals(codeString))
5542          return CONFORMANCE;
5543        if ("Contract".equals(codeString))
5544          return CONTRACT;
5545        if ("Coverage".equals(codeString))
5546          return COVERAGE;
5547        if ("DataElement".equals(codeString))
5548          return DATAELEMENT;
5549        if ("DecisionSupportRule".equals(codeString))
5550          return DECISIONSUPPORTRULE;
5551        if ("DecisionSupportServiceModule".equals(codeString))
5552          return DECISIONSUPPORTSERVICEMODULE;
5553        if ("DetectedIssue".equals(codeString))
5554          return DETECTEDISSUE;
5555        if ("Device".equals(codeString))
5556          return DEVICE;
5557        if ("DeviceComponent".equals(codeString))
5558          return DEVICECOMPONENT;
5559        if ("DeviceMetric".equals(codeString))
5560          return DEVICEMETRIC;
5561        if ("DeviceUseRequest".equals(codeString))
5562          return DEVICEUSEREQUEST;
5563        if ("DeviceUseStatement".equals(codeString))
5564          return DEVICEUSESTATEMENT;
5565        if ("DiagnosticOrder".equals(codeString))
5566          return DIAGNOSTICORDER;
5567        if ("DiagnosticReport".equals(codeString))
5568          return DIAGNOSTICREPORT;
5569        if ("DocumentManifest".equals(codeString))
5570          return DOCUMENTMANIFEST;
5571        if ("DocumentReference".equals(codeString))
5572          return DOCUMENTREFERENCE;
5573        if ("DomainResource".equals(codeString))
5574          return DOMAINRESOURCE;
5575        if ("EligibilityRequest".equals(codeString))
5576          return ELIGIBILITYREQUEST;
5577        if ("EligibilityResponse".equals(codeString))
5578          return ELIGIBILITYRESPONSE;
5579        if ("Encounter".equals(codeString))
5580          return ENCOUNTER;
5581        if ("EnrollmentRequest".equals(codeString))
5582          return ENROLLMENTREQUEST;
5583        if ("EnrollmentResponse".equals(codeString))
5584          return ENROLLMENTRESPONSE;
5585        if ("EpisodeOfCare".equals(codeString))
5586          return EPISODEOFCARE;
5587        if ("ExpansionProfile".equals(codeString))
5588          return EXPANSIONPROFILE;
5589        if ("ExplanationOfBenefit".equals(codeString))
5590          return EXPLANATIONOFBENEFIT;
5591        if ("FamilyMemberHistory".equals(codeString))
5592          return FAMILYMEMBERHISTORY;
5593        if ("Flag".equals(codeString))
5594          return FLAG;
5595        if ("Goal".equals(codeString))
5596          return GOAL;
5597        if ("Group".equals(codeString))
5598          return GROUP;
5599        if ("GuidanceResponse".equals(codeString))
5600          return GUIDANCERESPONSE;
5601        if ("HealthcareService".equals(codeString))
5602          return HEALTHCARESERVICE;
5603        if ("ImagingExcerpt".equals(codeString))
5604          return IMAGINGEXCERPT;
5605        if ("ImagingObjectSelection".equals(codeString))
5606          return IMAGINGOBJECTSELECTION;
5607        if ("ImagingStudy".equals(codeString))
5608          return IMAGINGSTUDY;
5609        if ("Immunization".equals(codeString))
5610          return IMMUNIZATION;
5611        if ("ImmunizationRecommendation".equals(codeString))
5612          return IMMUNIZATIONRECOMMENDATION;
5613        if ("ImplementationGuide".equals(codeString))
5614          return IMPLEMENTATIONGUIDE;
5615        if ("Library".equals(codeString))
5616          return LIBRARY;
5617        if ("Linkage".equals(codeString))
5618          return LINKAGE;
5619        if ("List".equals(codeString))
5620          return LIST;
5621        if ("Location".equals(codeString))
5622          return LOCATION;
5623        if ("Measure".equals(codeString))
5624          return MEASURE;
5625        if ("MeasureReport".equals(codeString))
5626          return MEASUREREPORT;
5627        if ("Media".equals(codeString))
5628          return MEDIA;
5629        if ("Medication".equals(codeString))
5630          return MEDICATION;
5631        if ("MedicationAdministration".equals(codeString))
5632          return MEDICATIONADMINISTRATION;
5633        if ("MedicationDispense".equals(codeString))
5634          return MEDICATIONDISPENSE;
5635        if ("MedicationOrder".equals(codeString))
5636          return MEDICATIONORDER;
5637        if ("MedicationStatement".equals(codeString))
5638          return MEDICATIONSTATEMENT;
5639        if ("MessageHeader".equals(codeString))
5640          return MESSAGEHEADER;
5641        if ("ModuleDefinition".equals(codeString))
5642          return MODULEDEFINITION;
5643        if ("NamingSystem".equals(codeString))
5644          return NAMINGSYSTEM;
5645        if ("NutritionOrder".equals(codeString))
5646          return NUTRITIONORDER;
5647        if ("Observation".equals(codeString))
5648          return OBSERVATION;
5649        if ("OperationDefinition".equals(codeString))
5650          return OPERATIONDEFINITION;
5651        if ("OperationOutcome".equals(codeString))
5652          return OPERATIONOUTCOME;
5653        if ("Order".equals(codeString))
5654          return ORDER;
5655        if ("OrderResponse".equals(codeString))
5656          return ORDERRESPONSE;
5657        if ("OrderSet".equals(codeString))
5658          return ORDERSET;
5659        if ("Organization".equals(codeString))
5660          return ORGANIZATION;
5661        if ("Parameters".equals(codeString))
5662          return PARAMETERS;
5663        if ("Patient".equals(codeString))
5664          return PATIENT;
5665        if ("PaymentNotice".equals(codeString))
5666          return PAYMENTNOTICE;
5667        if ("PaymentReconciliation".equals(codeString))
5668          return PAYMENTRECONCILIATION;
5669        if ("Person".equals(codeString))
5670          return PERSON;
5671        if ("Practitioner".equals(codeString))
5672          return PRACTITIONER;
5673        if ("PractitionerRole".equals(codeString))
5674          return PRACTITIONERROLE;
5675        if ("Procedure".equals(codeString))
5676          return PROCEDURE;
5677        if ("ProcedureRequest".equals(codeString))
5678          return PROCEDUREREQUEST;
5679        if ("ProcessRequest".equals(codeString))
5680          return PROCESSREQUEST;
5681        if ("ProcessResponse".equals(codeString))
5682          return PROCESSRESPONSE;
5683        if ("Protocol".equals(codeString))
5684          return PROTOCOL;
5685        if ("Provenance".equals(codeString))
5686          return PROVENANCE;
5687        if ("Questionnaire".equals(codeString))
5688          return QUESTIONNAIRE;
5689        if ("QuestionnaireResponse".equals(codeString))
5690          return QUESTIONNAIRERESPONSE;
5691        if ("ReferralRequest".equals(codeString))
5692          return REFERRALREQUEST;
5693        if ("RelatedPerson".equals(codeString))
5694          return RELATEDPERSON;
5695        if ("Resource".equals(codeString))
5696          return RESOURCE;
5697        if ("RiskAssessment".equals(codeString))
5698          return RISKASSESSMENT;
5699        if ("Schedule".equals(codeString))
5700          return SCHEDULE;
5701        if ("SearchParameter".equals(codeString))
5702          return SEARCHPARAMETER;
5703        if ("Sequence".equals(codeString))
5704          return SEQUENCE;
5705        if ("Slot".equals(codeString))
5706          return SLOT;
5707        if ("Specimen".equals(codeString))
5708          return SPECIMEN;
5709        if ("StructureDefinition".equals(codeString))
5710          return STRUCTUREDEFINITION;
5711        if ("StructureMap".equals(codeString))
5712          return STRUCTUREMAP;
5713        if ("Subscription".equals(codeString))
5714          return SUBSCRIPTION;
5715        if ("Substance".equals(codeString))
5716          return SUBSTANCE;
5717        if ("SupplyDelivery".equals(codeString))
5718          return SUPPLYDELIVERY;
5719        if ("SupplyRequest".equals(codeString))
5720          return SUPPLYREQUEST;
5721        if ("Task".equals(codeString))
5722          return TASK;
5723        if ("TestScript".equals(codeString))
5724          return TESTSCRIPT;
5725        if ("ValueSet".equals(codeString))
5726          return VALUESET;
5727        if ("VisionPrescription".equals(codeString))
5728          return VISIONPRESCRIPTION;
5729        throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'");
5730        }
5731        public String toCode() {
5732          switch (this) {
5733            case ACTIONDEFINITION: return "ActionDefinition";
5734            case ADDRESS: return "Address";
5735            case AGE: return "Age";
5736            case ANNOTATION: return "Annotation";
5737            case ATTACHMENT: return "Attachment";
5738            case BACKBONEELEMENT: return "BackboneElement";
5739            case CODEABLECONCEPT: return "CodeableConcept";
5740            case CODING: return "Coding";
5741            case CONTACTPOINT: return "ContactPoint";
5742            case COUNT: return "Count";
5743            case DATAREQUIREMENT: return "DataRequirement";
5744            case DISTANCE: return "Distance";
5745            case DURATION: return "Duration";
5746            case ELEMENT: return "Element";
5747            case ELEMENTDEFINITION: return "ElementDefinition";
5748            case EXTENSION: return "Extension";
5749            case HUMANNAME: return "HumanName";
5750            case IDENTIFIER: return "Identifier";
5751            case META: return "Meta";
5752            case MODULEMETADATA: return "ModuleMetadata";
5753            case MONEY: return "Money";
5754            case NARRATIVE: return "Narrative";
5755            case PARAMETERDEFINITION: return "ParameterDefinition";
5756            case PERIOD: return "Period";
5757            case QUANTITY: return "Quantity";
5758            case RANGE: return "Range";
5759            case RATIO: return "Ratio";
5760            case REFERENCE: return "Reference";
5761            case SAMPLEDDATA: return "SampledData";
5762            case SIGNATURE: return "Signature";
5763            case SIMPLEQUANTITY: return "SimpleQuantity";
5764            case TIMING: return "Timing";
5765            case TRIGGERDEFINITION: return "TriggerDefinition";
5766            case BASE64BINARY: return "base64Binary";
5767            case BOOLEAN: return "boolean";
5768            case CODE: return "code";
5769            case DATE: return "date";
5770            case DATETIME: return "dateTime";
5771            case DECIMAL: return "decimal";
5772            case ID: return "id";
5773            case INSTANT: return "instant";
5774            case INTEGER: return "integer";
5775            case MARKDOWN: return "markdown";
5776            case OID: return "oid";
5777            case POSITIVEINT: return "positiveInt";
5778            case STRING: return "string";
5779            case TIME: return "time";
5780            case UNSIGNEDINT: return "unsignedInt";
5781            case URI: return "uri";
5782            case UUID: return "uuid";
5783            case XHTML: return "xhtml";
5784            case ACCOUNT: return "Account";
5785            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
5786            case APPOINTMENT: return "Appointment";
5787            case APPOINTMENTRESPONSE: return "AppointmentResponse";
5788            case AUDITEVENT: return "AuditEvent";
5789            case BASIC: return "Basic";
5790            case BINARY: return "Binary";
5791            case BODYSITE: return "BodySite";
5792            case BUNDLE: return "Bundle";
5793            case CAREPLAN: return "CarePlan";
5794            case CARETEAM: return "CareTeam";
5795            case CLAIM: return "Claim";
5796            case CLAIMRESPONSE: return "ClaimResponse";
5797            case CLINICALIMPRESSION: return "ClinicalImpression";
5798            case CODESYSTEM: return "CodeSystem";
5799            case COMMUNICATION: return "Communication";
5800            case COMMUNICATIONREQUEST: return "CommunicationRequest";
5801            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
5802            case COMPOSITION: return "Composition";
5803            case CONCEPTMAP: return "ConceptMap";
5804            case CONDITION: return "Condition";
5805            case CONFORMANCE: return "Conformance";
5806            case CONTRACT: return "Contract";
5807            case COVERAGE: return "Coverage";
5808            case DATAELEMENT: return "DataElement";
5809            case DECISIONSUPPORTRULE: return "DecisionSupportRule";
5810            case DECISIONSUPPORTSERVICEMODULE: return "DecisionSupportServiceModule";
5811            case DETECTEDISSUE: return "DetectedIssue";
5812            case DEVICE: return "Device";
5813            case DEVICECOMPONENT: return "DeviceComponent";
5814            case DEVICEMETRIC: return "DeviceMetric";
5815            case DEVICEUSEREQUEST: return "DeviceUseRequest";
5816            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
5817            case DIAGNOSTICORDER: return "DiagnosticOrder";
5818            case DIAGNOSTICREPORT: return "DiagnosticReport";
5819            case DOCUMENTMANIFEST: return "DocumentManifest";
5820            case DOCUMENTREFERENCE: return "DocumentReference";
5821            case DOMAINRESOURCE: return "DomainResource";
5822            case ELIGIBILITYREQUEST: return "EligibilityRequest";
5823            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
5824            case ENCOUNTER: return "Encounter";
5825            case ENROLLMENTREQUEST: return "EnrollmentRequest";
5826            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
5827            case EPISODEOFCARE: return "EpisodeOfCare";
5828            case EXPANSIONPROFILE: return "ExpansionProfile";
5829            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
5830            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
5831            case FLAG: return "Flag";
5832            case GOAL: return "Goal";
5833            case GROUP: return "Group";
5834            case GUIDANCERESPONSE: return "GuidanceResponse";
5835            case HEALTHCARESERVICE: return "HealthcareService";
5836            case IMAGINGEXCERPT: return "ImagingExcerpt";
5837            case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection";
5838            case IMAGINGSTUDY: return "ImagingStudy";
5839            case IMMUNIZATION: return "Immunization";
5840            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
5841            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
5842            case LIBRARY: return "Library";
5843            case LINKAGE: return "Linkage";
5844            case LIST: return "List";
5845            case LOCATION: return "Location";
5846            case MEASURE: return "Measure";
5847            case MEASUREREPORT: return "MeasureReport";
5848            case MEDIA: return "Media";
5849            case MEDICATION: return "Medication";
5850            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
5851            case MEDICATIONDISPENSE: return "MedicationDispense";
5852            case MEDICATIONORDER: return "MedicationOrder";
5853            case MEDICATIONSTATEMENT: return "MedicationStatement";
5854            case MESSAGEHEADER: return "MessageHeader";
5855            case MODULEDEFINITION: return "ModuleDefinition";
5856            case NAMINGSYSTEM: return "NamingSystem";
5857            case NUTRITIONORDER: return "NutritionOrder";
5858            case OBSERVATION: return "Observation";
5859            case OPERATIONDEFINITION: return "OperationDefinition";
5860            case OPERATIONOUTCOME: return "OperationOutcome";
5861            case ORDER: return "Order";
5862            case ORDERRESPONSE: return "OrderResponse";
5863            case ORDERSET: return "OrderSet";
5864            case ORGANIZATION: return "Organization";
5865            case PARAMETERS: return "Parameters";
5866            case PATIENT: return "Patient";
5867            case PAYMENTNOTICE: return "PaymentNotice";
5868            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
5869            case PERSON: return "Person";
5870            case PRACTITIONER: return "Practitioner";
5871            case PRACTITIONERROLE: return "PractitionerRole";
5872            case PROCEDURE: return "Procedure";
5873            case PROCEDUREREQUEST: return "ProcedureRequest";
5874            case PROCESSREQUEST: return "ProcessRequest";
5875            case PROCESSRESPONSE: return "ProcessResponse";
5876            case PROTOCOL: return "Protocol";
5877            case PROVENANCE: return "Provenance";
5878            case QUESTIONNAIRE: return "Questionnaire";
5879            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
5880            case REFERRALREQUEST: return "ReferralRequest";
5881            case RELATEDPERSON: return "RelatedPerson";
5882            case RESOURCE: return "Resource";
5883            case RISKASSESSMENT: return "RiskAssessment";
5884            case SCHEDULE: return "Schedule";
5885            case SEARCHPARAMETER: return "SearchParameter";
5886            case SEQUENCE: return "Sequence";
5887            case SLOT: return "Slot";
5888            case SPECIMEN: return "Specimen";
5889            case STRUCTUREDEFINITION: return "StructureDefinition";
5890            case STRUCTUREMAP: return "StructureMap";
5891            case SUBSCRIPTION: return "Subscription";
5892            case SUBSTANCE: return "Substance";
5893            case SUPPLYDELIVERY: return "SupplyDelivery";
5894            case SUPPLYREQUEST: return "SupplyRequest";
5895            case TASK: return "Task";
5896            case TESTSCRIPT: return "TestScript";
5897            case VALUESET: return "ValueSet";
5898            case VISIONPRESCRIPTION: return "VisionPrescription";
5899            default: return "?";
5900          }
5901        }
5902        public String getSystem() {
5903          switch (this) {
5904            case ACTIONDEFINITION: return "http://hl7.org/fhir/data-types";
5905            case ADDRESS: return "http://hl7.org/fhir/data-types";
5906            case AGE: return "http://hl7.org/fhir/data-types";
5907            case ANNOTATION: return "http://hl7.org/fhir/data-types";
5908            case ATTACHMENT: return "http://hl7.org/fhir/data-types";
5909            case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types";
5910            case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types";
5911            case CODING: return "http://hl7.org/fhir/data-types";
5912            case CONTACTPOINT: return "http://hl7.org/fhir/data-types";
5913            case COUNT: return "http://hl7.org/fhir/data-types";
5914            case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types";
5915            case DISTANCE: return "http://hl7.org/fhir/data-types";
5916            case DURATION: return "http://hl7.org/fhir/data-types";
5917            case ELEMENT: return "http://hl7.org/fhir/data-types";
5918            case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types";
5919            case EXTENSION: return "http://hl7.org/fhir/data-types";
5920            case HUMANNAME: return "http://hl7.org/fhir/data-types";
5921            case IDENTIFIER: return "http://hl7.org/fhir/data-types";
5922            case META: return "http://hl7.org/fhir/data-types";
5923            case MODULEMETADATA: return "http://hl7.org/fhir/data-types";
5924            case MONEY: return "http://hl7.org/fhir/data-types";
5925            case NARRATIVE: return "http://hl7.org/fhir/data-types";
5926            case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types";
5927            case PERIOD: return "http://hl7.org/fhir/data-types";
5928            case QUANTITY: return "http://hl7.org/fhir/data-types";
5929            case RANGE: return "http://hl7.org/fhir/data-types";
5930            case RATIO: return "http://hl7.org/fhir/data-types";
5931            case REFERENCE: return "http://hl7.org/fhir/data-types";
5932            case SAMPLEDDATA: return "http://hl7.org/fhir/data-types";
5933            case SIGNATURE: return "http://hl7.org/fhir/data-types";
5934            case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types";
5935            case TIMING: return "http://hl7.org/fhir/data-types";
5936            case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types";
5937            case BASE64BINARY: return "http://hl7.org/fhir/data-types";
5938            case BOOLEAN: return "http://hl7.org/fhir/data-types";
5939            case CODE: return "http://hl7.org/fhir/data-types";
5940            case DATE: return "http://hl7.org/fhir/data-types";
5941            case DATETIME: return "http://hl7.org/fhir/data-types";
5942            case DECIMAL: return "http://hl7.org/fhir/data-types";
5943            case ID: return "http://hl7.org/fhir/data-types";
5944            case INSTANT: return "http://hl7.org/fhir/data-types";
5945            case INTEGER: return "http://hl7.org/fhir/data-types";
5946            case MARKDOWN: return "http://hl7.org/fhir/data-types";
5947            case OID: return "http://hl7.org/fhir/data-types";
5948            case POSITIVEINT: return "http://hl7.org/fhir/data-types";
5949            case STRING: return "http://hl7.org/fhir/data-types";
5950            case TIME: return "http://hl7.org/fhir/data-types";
5951            case UNSIGNEDINT: return "http://hl7.org/fhir/data-types";
5952            case URI: return "http://hl7.org/fhir/data-types";
5953            case UUID: return "http://hl7.org/fhir/data-types";
5954            case XHTML: return "http://hl7.org/fhir/data-types";
5955            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
5956            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
5957            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
5958            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
5959            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
5960            case BASIC: return "http://hl7.org/fhir/resource-types";
5961            case BINARY: return "http://hl7.org/fhir/resource-types";
5962            case BODYSITE: return "http://hl7.org/fhir/resource-types";
5963            case BUNDLE: return "http://hl7.org/fhir/resource-types";
5964            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
5965            case CARETEAM: return "http://hl7.org/fhir/resource-types";
5966            case CLAIM: return "http://hl7.org/fhir/resource-types";
5967            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
5968            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
5969            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
5970            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
5971            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
5972            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
5973            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
5974            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
5975            case CONDITION: return "http://hl7.org/fhir/resource-types";
5976            case CONFORMANCE: return "http://hl7.org/fhir/resource-types";
5977            case CONTRACT: return "http://hl7.org/fhir/resource-types";
5978            case COVERAGE: return "http://hl7.org/fhir/resource-types";
5979            case DATAELEMENT: return "http://hl7.org/fhir/resource-types";
5980            case DECISIONSUPPORTRULE: return "http://hl7.org/fhir/resource-types";
5981            case DECISIONSUPPORTSERVICEMODULE: return "http://hl7.org/fhir/resource-types";
5982            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
5983            case DEVICE: return "http://hl7.org/fhir/resource-types";
5984            case DEVICECOMPONENT: return "http://hl7.org/fhir/resource-types";
5985            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
5986            case DEVICEUSEREQUEST: return "http://hl7.org/fhir/resource-types";
5987            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types";
5988            case DIAGNOSTICORDER: return "http://hl7.org/fhir/resource-types";
5989            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
5990            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
5991            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
5992            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
5993            case ELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
5994            case ELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
5995            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
5996            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
5997            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
5998            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
5999            case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types";
6000            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
6001            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
6002            case FLAG: return "http://hl7.org/fhir/resource-types";
6003            case GOAL: return "http://hl7.org/fhir/resource-types";
6004            case GROUP: return "http://hl7.org/fhir/resource-types";
6005            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
6006            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
6007            case IMAGINGEXCERPT: return "http://hl7.org/fhir/resource-types";
6008            case IMAGINGOBJECTSELECTION: return "http://hl7.org/fhir/resource-types";
6009            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
6010            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
6011            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
6012            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
6013            case LIBRARY: return "http://hl7.org/fhir/resource-types";
6014            case LINKAGE: return "http://hl7.org/fhir/resource-types";
6015            case LIST: return "http://hl7.org/fhir/resource-types";
6016            case LOCATION: return "http://hl7.org/fhir/resource-types";
6017            case MEASURE: return "http://hl7.org/fhir/resource-types";
6018            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
6019            case MEDIA: return "http://hl7.org/fhir/resource-types";
6020            case MEDICATION: return "http://hl7.org/fhir/resource-types";
6021            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
6022            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
6023            case MEDICATIONORDER: return "http://hl7.org/fhir/resource-types";
6024            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types";
6025            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
6026            case MODULEDEFINITION: return "http://hl7.org/fhir/resource-types";
6027            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
6028            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
6029            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
6030            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
6031            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
6032            case ORDER: return "http://hl7.org/fhir/resource-types";
6033            case ORDERRESPONSE: return "http://hl7.org/fhir/resource-types";
6034            case ORDERSET: return "http://hl7.org/fhir/resource-types";
6035            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
6036            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
6037            case PATIENT: return "http://hl7.org/fhir/resource-types";
6038            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
6039            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
6040            case PERSON: return "http://hl7.org/fhir/resource-types";
6041            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
6042            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
6043            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
6044            case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types";
6045            case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types";
6046            case PROCESSRESPONSE: return "http://hl7.org/fhir/resource-types";
6047            case PROTOCOL: return "http://hl7.org/fhir/resource-types";
6048            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
6049            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
6050            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
6051            case REFERRALREQUEST: return "http://hl7.org/fhir/resource-types";
6052            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
6053            case RESOURCE: return "http://hl7.org/fhir/resource-types";
6054            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
6055            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
6056            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
6057            case SEQUENCE: return "http://hl7.org/fhir/resource-types";
6058            case SLOT: return "http://hl7.org/fhir/resource-types";
6059            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
6060            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
6061            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
6062            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
6063            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
6064            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
6065            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
6066            case TASK: return "http://hl7.org/fhir/resource-types";
6067            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
6068            case VALUESET: return "http://hl7.org/fhir/resource-types";
6069            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
6070            default: return "?";
6071          }
6072        }
6073        public String getDefinition() {
6074          switch (this) {
6075            case ACTIONDEFINITION: return "The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library.";
6076            case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations and which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.";
6077            case AGE: return "";
6078            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
6079            case ATTACHMENT: return "For referring to data content defined in other formats.";
6080            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
6081            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
6082            case CODING: return "A reference to a code defined by a terminology system.";
6083            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
6084            case COUNT: return "";
6085            case DATAREQUIREMENT: return "Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data.";
6086            case DISTANCE: return "";
6087            case DURATION: return "";
6088            case ELEMENT: return "Base definition for all elements in a resource.";
6089            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
6090            case EXTENSION: return "Optional Extensions Element - found in all resources.";
6091            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
6092            case IDENTIFIER: return "A technical identifier - identifies some entity uniquely and unambiguously.";
6093            case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.";
6094            case MODULEMETADATA: return "The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information.";
6095            case MONEY: return "";
6096            case NARRATIVE: return "A human-readable formatted text, including images.";
6097            case PARAMETERDEFINITION: return "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.";
6098            case PERIOD: return "A time period defined by a start and end date and optionally time.";
6099            case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
6100            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
6101            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
6102            case REFERENCE: return "A reference from one resource to another.";
6103            case SAMPLEDDATA: return "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.";
6104            case SIGNATURE: return "A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities.";
6105            case SIMPLEQUANTITY: return "";
6106            case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are 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.";
6107            case TRIGGERDEFINITION: return "A description of a triggering event.";
6108            case BASE64BINARY: return "A stream of bytes";
6109            case BOOLEAN: return "Value of \"true\" or \"false\"";
6110            case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents";
6111            case DATE: return "A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.";
6112            case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.";
6113            case DECIMAL: return "A rational number with implicit precision";
6114            case ID: return "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.";
6115            case INSTANT: return "An instant in time - known at least to the second";
6116            case INTEGER: return "A whole number";
6117            case MARKDOWN: return "A string that may contain markdown syntax for optional processing by a mark down presentation engine";
6118            case OID: return "An oid represented as a URI";
6119            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
6120            case STRING: return "A sequence of Unicode characters";
6121            case TIME: return "A time during the day, with no date specified";
6122            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
6123            case URI: return "String of characters used to identify a name or a resource";
6124            case UUID: return "A UUID, represented as a URI";
6125            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
6126            case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centres, etc.";
6127            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
6128            case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).";
6129            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
6130            case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.";
6131            case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.";
6132            case BINARY: return "A binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
6133            case BODYSITE: return "Record details about the anatomical location of a specimen or body part.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.";
6134            case BUNDLE: return "A container for a collection of resources.";
6135            case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.";
6136            case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.";
6137            case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.";
6138            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
6139            case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score.";
6140            case CODESYSTEM: return "A code system resource specifies a set of codes drawn from one or more code systems.";
6141            case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition.";
6142            case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.";
6143            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
6144            case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical document 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. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained.";
6145            case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models.";
6146            case CONDITION: return "Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary.";
6147            case CONFORMANCE: return "A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
6148            case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters.";
6149            case COVERAGE: return "Financial instrument which may be used to pay for or reimburse health care products and services.";
6150            case DATAELEMENT: return "The formal description of a single piece of information that can be gathered and reported.";
6151            case DECISIONSUPPORTRULE: return "This resource defines a decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of a actions that should be taken whenever some condition is met in response to a particular event or events.";
6152            case DECISIONSUPPORTSERVICEMODULE: return "The DecisionSupportServiceModule describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.";
6153            case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.";
6154            case DEVICE: return "This resource identifies an instance or 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.  Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.  Non-medical devices may include items such as a machine, cellphone, computer, application, etc.";
6155            case DEVICECOMPONENT: return "Describes the characteristics, operational status and capabilities of a medical-related component of a medical device.";
6156            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
6157            case DEVICEUSEREQUEST: 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.";
6158            case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.";
6159            case DIAGNOSTICORDER: return "A record of a request for a diagnostic investigation service to be performed.";
6160            case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.";
6161            case DOCUMENTMANIFEST: return "A manifest that defines a set of documents.";
6162            case DOCUMENTREFERENCE: return "A reference to a document .";
6163            case DOMAINRESOURCE: return "A resource that includes narrative, extensions, and contained resources.";
6164            case ELIGIBILITYREQUEST: return "This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service.";
6165            case ELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an Eligibility resource.";
6166            case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.";
6167            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
6168            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource.";
6169            case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.";
6170            case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet.";
6171            case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.";
6172            case FAMILYMEMBERHISTORY: return "Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.";
6173            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
6174            case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.";
6175            case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.";
6176            case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.";
6177            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
6178            case IMAGINGEXCERPT: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances).  The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on.";
6179            case IMAGINGOBJECTSELECTION: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances).  The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on.";
6180            case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.";
6181            case IMMUNIZATION: return "Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed.";
6182            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification.";
6183            case IMPLEMENTATIONGUIDE: return "A set of rules or how FHIR is used to solve a particular problem. 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.";
6184            case LIBRARY: return "The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library.";
6185            case LINKAGE: return "Identifies two or more records (resource instances) that are referring to the same real-world \"occurrence\".";
6186            case LIST: return "A set of information summarized from a list of other resources.";
6187            case LOCATION: return "Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.";
6188            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
6189            case MEASUREREPORT: return "The MeasureReport resource contains the results of evaluating a measure.";
6190            case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.";
6191            case MEDICATION: return "This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.";
6192            case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.";
6193            case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.";
6194            case MEDICATIONORDER: return "An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationOrder\" rather than \"MedicationPrescription\" to generalize the use across inpatient and outpatient settings as well as for care plans, etc.";
6195            case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from e.g. the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains \r\rThe 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.";
6196            case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.";
6197            case MODULEDEFINITION: return "The ModuleDefinition resource defines the data requirements for a quality artifact.";
6198            case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a \"System\" used within the Identifier and Coding data types.";
6199            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
6200            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
6201            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
6202            case OPERATIONOUTCOME: return "A collection of error, warning or information messages that result from a system action.";
6203            case ORDER: return "A request to perform an action.";
6204            case ORDERRESPONSE: return "A response to an order.";
6205            case ORDERSET: return "This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support.";
6206            case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc.";
6207            case PARAMETERS: return "This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it.";
6208            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
6209            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
6210            case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment.";
6211            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
6212            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
6213            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
6214            case PROCEDURE: return "An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy.";
6215            case PROCEDUREREQUEST: return "A request for a procedure to be performed. May be a proposal or an order.";
6216            case PROCESSREQUEST: return "This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources.";
6217            case PROCESSRESPONSE: return "This resource provides processing status, errors and notes from the processing of a resource.";
6218            case PROTOCOL: return "A definition of behaviors to be taken in particular circumstances, often including conditions, options and other decision points.";
6219            case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.";
6220            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.";
6221            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.";
6222            case REFERRALREQUEST: return "Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization.";
6223            case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.";
6224            case RESOURCE: return "This is the base resource type for everything.";
6225            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
6226            case SCHEDULE: return "A container for slot(s) of time that may be available for booking appointments.";
6227            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
6228            case SEQUENCE: return "Variation and Sequence data.";
6229            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
6230            case SPECIMEN: return "A sample to be used for analysis.";
6231            case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types.";
6232            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
6233            case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action.";
6234            case SUBSTANCE: return "A homogeneous material with a definite composition.";
6235            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
6236            case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting.";
6237            case TASK: return "A task to be performed.";
6238            case TESTSCRIPT: return "TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification.";
6239            case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems.";
6240            case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient.";
6241            default: return "?";
6242          }
6243        }
6244        public String getDisplay() {
6245          switch (this) {
6246            case ACTIONDEFINITION: return "ActionDefinition";
6247            case ADDRESS: return "Address";
6248            case AGE: return "Age";
6249            case ANNOTATION: return "Annotation";
6250            case ATTACHMENT: return "Attachment";
6251            case BACKBONEELEMENT: return "BackboneElement";
6252            case CODEABLECONCEPT: return "CodeableConcept";
6253            case CODING: return "Coding";
6254            case CONTACTPOINT: return "ContactPoint";
6255            case COUNT: return "Count";
6256            case DATAREQUIREMENT: return "DataRequirement";
6257            case DISTANCE: return "Distance";
6258            case DURATION: return "Duration";
6259            case ELEMENT: return "Element";
6260            case ELEMENTDEFINITION: return "ElementDefinition";
6261            case EXTENSION: return "Extension";
6262            case HUMANNAME: return "HumanName";
6263            case IDENTIFIER: return "Identifier";
6264            case META: return "Meta";
6265            case MODULEMETADATA: return "ModuleMetadata";
6266            case MONEY: return "Money";
6267            case NARRATIVE: return "Narrative";
6268            case PARAMETERDEFINITION: return "ParameterDefinition";
6269            case PERIOD: return "Period";
6270            case QUANTITY: return "Quantity";
6271            case RANGE: return "Range";
6272            case RATIO: return "Ratio";
6273            case REFERENCE: return "Reference";
6274            case SAMPLEDDATA: return "SampledData";
6275            case SIGNATURE: return "Signature";
6276            case SIMPLEQUANTITY: return "SimpleQuantity";
6277            case TIMING: return "Timing";
6278            case TRIGGERDEFINITION: return "TriggerDefinition";
6279            case BASE64BINARY: return "base64Binary";
6280            case BOOLEAN: return "boolean";
6281            case CODE: return "code";
6282            case DATE: return "date";
6283            case DATETIME: return "dateTime";
6284            case DECIMAL: return "decimal";
6285            case ID: return "id";
6286            case INSTANT: return "instant";
6287            case INTEGER: return "integer";
6288            case MARKDOWN: return "markdown";
6289            case OID: return "oid";
6290            case POSITIVEINT: return "positiveInt";
6291            case STRING: return "string";
6292            case TIME: return "time";
6293            case UNSIGNEDINT: return "unsignedInt";
6294            case URI: return "uri";
6295            case UUID: return "uuid";
6296            case XHTML: return "XHTML";
6297            case ACCOUNT: return "Account";
6298            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
6299            case APPOINTMENT: return "Appointment";
6300            case APPOINTMENTRESPONSE: return "AppointmentResponse";
6301            case AUDITEVENT: return "AuditEvent";
6302            case BASIC: return "Basic";
6303            case BINARY: return "Binary";
6304            case BODYSITE: return "BodySite";
6305            case BUNDLE: return "Bundle";
6306            case CAREPLAN: return "CarePlan";
6307            case CARETEAM: return "CareTeam";
6308            case CLAIM: return "Claim";
6309            case CLAIMRESPONSE: return "ClaimResponse";
6310            case CLINICALIMPRESSION: return "ClinicalImpression";
6311            case CODESYSTEM: return "CodeSystem";
6312            case COMMUNICATION: return "Communication";
6313            case COMMUNICATIONREQUEST: return "CommunicationRequest";
6314            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
6315            case COMPOSITION: return "Composition";
6316            case CONCEPTMAP: return "ConceptMap";
6317            case CONDITION: return "Condition";
6318            case CONFORMANCE: return "Conformance";
6319            case CONTRACT: return "Contract";
6320            case COVERAGE: return "Coverage";
6321            case DATAELEMENT: return "DataElement";
6322            case DECISIONSUPPORTRULE: return "DecisionSupportRule";
6323            case DECISIONSUPPORTSERVICEMODULE: return "DecisionSupportServiceModule";
6324            case DETECTEDISSUE: return "DetectedIssue";
6325            case DEVICE: return "Device";
6326            case DEVICECOMPONENT: return "DeviceComponent";
6327            case DEVICEMETRIC: return "DeviceMetric";
6328            case DEVICEUSEREQUEST: return "DeviceUseRequest";
6329            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
6330            case DIAGNOSTICORDER: return "DiagnosticOrder";
6331            case DIAGNOSTICREPORT: return "DiagnosticReport";
6332            case DOCUMENTMANIFEST: return "DocumentManifest";
6333            case DOCUMENTREFERENCE: return "DocumentReference";
6334            case DOMAINRESOURCE: return "DomainResource";
6335            case ELIGIBILITYREQUEST: return "EligibilityRequest";
6336            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
6337            case ENCOUNTER: return "Encounter";
6338            case ENROLLMENTREQUEST: return "EnrollmentRequest";
6339            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
6340            case EPISODEOFCARE: return "EpisodeOfCare";
6341            case EXPANSIONPROFILE: return "ExpansionProfile";
6342            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
6343            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
6344            case FLAG: return "Flag";
6345            case GOAL: return "Goal";
6346            case GROUP: return "Group";
6347            case GUIDANCERESPONSE: return "GuidanceResponse";
6348            case HEALTHCARESERVICE: return "HealthcareService";
6349            case IMAGINGEXCERPT: return "ImagingExcerpt";
6350            case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection";
6351            case IMAGINGSTUDY: return "ImagingStudy";
6352            case IMMUNIZATION: return "Immunization";
6353            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
6354            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
6355            case LIBRARY: return "Library";
6356            case LINKAGE: return "Linkage";
6357            case LIST: return "List";
6358            case LOCATION: return "Location";
6359            case MEASURE: return "Measure";
6360            case MEASUREREPORT: return "MeasureReport";
6361            case MEDIA: return "Media";
6362            case MEDICATION: return "Medication";
6363            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
6364            case MEDICATIONDISPENSE: return "MedicationDispense";
6365            case MEDICATIONORDER: return "MedicationOrder";
6366            case MEDICATIONSTATEMENT: return "MedicationStatement";
6367            case MESSAGEHEADER: return "MessageHeader";
6368            case MODULEDEFINITION: return "ModuleDefinition";
6369            case NAMINGSYSTEM: return "NamingSystem";
6370            case NUTRITIONORDER: return "NutritionOrder";
6371            case OBSERVATION: return "Observation";
6372            case OPERATIONDEFINITION: return "OperationDefinition";
6373            case OPERATIONOUTCOME: return "OperationOutcome";
6374            case ORDER: return "Order";
6375            case ORDERRESPONSE: return "OrderResponse";
6376            case ORDERSET: return "OrderSet";
6377            case ORGANIZATION: return "Organization";
6378            case PARAMETERS: return "Parameters";
6379            case PATIENT: return "Patient";
6380            case PAYMENTNOTICE: return "PaymentNotice";
6381            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
6382            case PERSON: return "Person";
6383            case PRACTITIONER: return "Practitioner";
6384            case PRACTITIONERROLE: return "PractitionerRole";
6385            case PROCEDURE: return "Procedure";
6386            case PROCEDUREREQUEST: return "ProcedureRequest";
6387            case PROCESSREQUEST: return "ProcessRequest";
6388            case PROCESSRESPONSE: return "ProcessResponse";
6389            case PROTOCOL: return "Protocol";
6390            case PROVENANCE: return "Provenance";
6391            case QUESTIONNAIRE: return "Questionnaire";
6392            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
6393            case REFERRALREQUEST: return "ReferralRequest";
6394            case RELATEDPERSON: return "RelatedPerson";
6395            case RESOURCE: return "Resource";
6396            case RISKASSESSMENT: return "RiskAssessment";
6397            case SCHEDULE: return "Schedule";
6398            case SEARCHPARAMETER: return "SearchParameter";
6399            case SEQUENCE: return "Sequence";
6400            case SLOT: return "Slot";
6401            case SPECIMEN: return "Specimen";
6402            case STRUCTUREDEFINITION: return "StructureDefinition";
6403            case STRUCTUREMAP: return "StructureMap";
6404            case SUBSCRIPTION: return "Subscription";
6405            case SUBSTANCE: return "Substance";
6406            case SUPPLYDELIVERY: return "SupplyDelivery";
6407            case SUPPLYREQUEST: return "SupplyRequest";
6408            case TASK: return "Task";
6409            case TESTSCRIPT: return "TestScript";
6410            case VALUESET: return "ValueSet";
6411            case VISIONPRESCRIPTION: return "VisionPrescription";
6412            default: return "?";
6413          }
6414        }
6415    }
6416
6417  public static class FHIRDefinedTypeEnumFactory implements EnumFactory<FHIRDefinedType> {
6418    public FHIRDefinedType fromCode(String codeString) throws IllegalArgumentException {
6419      if (codeString == null || "".equals(codeString))
6420            if (codeString == null || "".equals(codeString))
6421                return null;
6422        if ("ActionDefinition".equals(codeString))
6423          return FHIRDefinedType.ACTIONDEFINITION;
6424        if ("Address".equals(codeString))
6425          return FHIRDefinedType.ADDRESS;
6426        if ("Age".equals(codeString))
6427          return FHIRDefinedType.AGE;
6428        if ("Annotation".equals(codeString))
6429          return FHIRDefinedType.ANNOTATION;
6430        if ("Attachment".equals(codeString))
6431          return FHIRDefinedType.ATTACHMENT;
6432        if ("BackboneElement".equals(codeString))
6433          return FHIRDefinedType.BACKBONEELEMENT;
6434        if ("CodeableConcept".equals(codeString))
6435          return FHIRDefinedType.CODEABLECONCEPT;
6436        if ("Coding".equals(codeString))
6437          return FHIRDefinedType.CODING;
6438        if ("ContactPoint".equals(codeString))
6439          return FHIRDefinedType.CONTACTPOINT;
6440        if ("Count".equals(codeString))
6441          return FHIRDefinedType.COUNT;
6442        if ("DataRequirement".equals(codeString))
6443          return FHIRDefinedType.DATAREQUIREMENT;
6444        if ("Distance".equals(codeString))
6445          return FHIRDefinedType.DISTANCE;
6446        if ("Duration".equals(codeString))
6447          return FHIRDefinedType.DURATION;
6448        if ("Element".equals(codeString))
6449          return FHIRDefinedType.ELEMENT;
6450        if ("ElementDefinition".equals(codeString))
6451          return FHIRDefinedType.ELEMENTDEFINITION;
6452        if ("Extension".equals(codeString))
6453          return FHIRDefinedType.EXTENSION;
6454        if ("HumanName".equals(codeString))
6455          return FHIRDefinedType.HUMANNAME;
6456        if ("Identifier".equals(codeString))
6457          return FHIRDefinedType.IDENTIFIER;
6458        if ("Meta".equals(codeString))
6459          return FHIRDefinedType.META;
6460        if ("ModuleMetadata".equals(codeString))
6461          return FHIRDefinedType.MODULEMETADATA;
6462        if ("Money".equals(codeString))
6463          return FHIRDefinedType.MONEY;
6464        if ("Narrative".equals(codeString))
6465          return FHIRDefinedType.NARRATIVE;
6466        if ("ParameterDefinition".equals(codeString))
6467          return FHIRDefinedType.PARAMETERDEFINITION;
6468        if ("Period".equals(codeString))
6469          return FHIRDefinedType.PERIOD;
6470        if ("Quantity".equals(codeString))
6471          return FHIRDefinedType.QUANTITY;
6472        if ("Range".equals(codeString))
6473          return FHIRDefinedType.RANGE;
6474        if ("Ratio".equals(codeString))
6475          return FHIRDefinedType.RATIO;
6476        if ("Reference".equals(codeString))
6477          return FHIRDefinedType.REFERENCE;
6478        if ("SampledData".equals(codeString))
6479          return FHIRDefinedType.SAMPLEDDATA;
6480        if ("Signature".equals(codeString))
6481          return FHIRDefinedType.SIGNATURE;
6482        if ("SimpleQuantity".equals(codeString))
6483          return FHIRDefinedType.SIMPLEQUANTITY;
6484        if ("Timing".equals(codeString))
6485          return FHIRDefinedType.TIMING;
6486        if ("TriggerDefinition".equals(codeString))
6487          return FHIRDefinedType.TRIGGERDEFINITION;
6488        if ("base64Binary".equals(codeString))
6489          return FHIRDefinedType.BASE64BINARY;
6490        if ("boolean".equals(codeString))
6491          return FHIRDefinedType.BOOLEAN;
6492        if ("code".equals(codeString))
6493          return FHIRDefinedType.CODE;
6494        if ("date".equals(codeString))
6495          return FHIRDefinedType.DATE;
6496        if ("dateTime".equals(codeString))
6497          return FHIRDefinedType.DATETIME;
6498        if ("decimal".equals(codeString))
6499          return FHIRDefinedType.DECIMAL;
6500        if ("id".equals(codeString))
6501          return FHIRDefinedType.ID;
6502        if ("instant".equals(codeString))
6503          return FHIRDefinedType.INSTANT;
6504        if ("integer".equals(codeString))
6505          return FHIRDefinedType.INTEGER;
6506        if ("markdown".equals(codeString))
6507          return FHIRDefinedType.MARKDOWN;
6508        if ("oid".equals(codeString))
6509          return FHIRDefinedType.OID;
6510        if ("positiveInt".equals(codeString))
6511          return FHIRDefinedType.POSITIVEINT;
6512        if ("string".equals(codeString))
6513          return FHIRDefinedType.STRING;
6514        if ("time".equals(codeString))
6515          return FHIRDefinedType.TIME;
6516        if ("unsignedInt".equals(codeString))
6517          return FHIRDefinedType.UNSIGNEDINT;
6518        if ("uri".equals(codeString))
6519          return FHIRDefinedType.URI;
6520        if ("uuid".equals(codeString))
6521          return FHIRDefinedType.UUID;
6522        if ("xhtml".equals(codeString))
6523          return FHIRDefinedType.XHTML;
6524        if ("Account".equals(codeString))
6525          return FHIRDefinedType.ACCOUNT;
6526        if ("AllergyIntolerance".equals(codeString))
6527          return FHIRDefinedType.ALLERGYINTOLERANCE;
6528        if ("Appointment".equals(codeString))
6529          return FHIRDefinedType.APPOINTMENT;
6530        if ("AppointmentResponse".equals(codeString))
6531          return FHIRDefinedType.APPOINTMENTRESPONSE;
6532        if ("AuditEvent".equals(codeString))
6533          return FHIRDefinedType.AUDITEVENT;
6534        if ("Basic".equals(codeString))
6535          return FHIRDefinedType.BASIC;
6536        if ("Binary".equals(codeString))
6537          return FHIRDefinedType.BINARY;
6538        if ("BodySite".equals(codeString))
6539          return FHIRDefinedType.BODYSITE;
6540        if ("Bundle".equals(codeString))
6541          return FHIRDefinedType.BUNDLE;
6542        if ("CarePlan".equals(codeString))
6543          return FHIRDefinedType.CAREPLAN;
6544        if ("CareTeam".equals(codeString))
6545          return FHIRDefinedType.CARETEAM;
6546        if ("Claim".equals(codeString))
6547          return FHIRDefinedType.CLAIM;
6548        if ("ClaimResponse".equals(codeString))
6549          return FHIRDefinedType.CLAIMRESPONSE;
6550        if ("ClinicalImpression".equals(codeString))
6551          return FHIRDefinedType.CLINICALIMPRESSION;
6552        if ("CodeSystem".equals(codeString))
6553          return FHIRDefinedType.CODESYSTEM;
6554        if ("Communication".equals(codeString))
6555          return FHIRDefinedType.COMMUNICATION;
6556        if ("CommunicationRequest".equals(codeString))
6557          return FHIRDefinedType.COMMUNICATIONREQUEST;
6558        if ("CompartmentDefinition".equals(codeString))
6559          return FHIRDefinedType.COMPARTMENTDEFINITION;
6560        if ("Composition".equals(codeString))
6561          return FHIRDefinedType.COMPOSITION;
6562        if ("ConceptMap".equals(codeString))
6563          return FHIRDefinedType.CONCEPTMAP;
6564        if ("Condition".equals(codeString))
6565          return FHIRDefinedType.CONDITION;
6566        if ("Conformance".equals(codeString))
6567          return FHIRDefinedType.CONFORMANCE;
6568        if ("Contract".equals(codeString))
6569          return FHIRDefinedType.CONTRACT;
6570        if ("Coverage".equals(codeString))
6571          return FHIRDefinedType.COVERAGE;
6572        if ("DataElement".equals(codeString))
6573          return FHIRDefinedType.DATAELEMENT;
6574        if ("DecisionSupportRule".equals(codeString))
6575          return FHIRDefinedType.DECISIONSUPPORTRULE;
6576        if ("DecisionSupportServiceModule".equals(codeString))
6577          return FHIRDefinedType.DECISIONSUPPORTSERVICEMODULE;
6578        if ("DetectedIssue".equals(codeString))
6579          return FHIRDefinedType.DETECTEDISSUE;
6580        if ("Device".equals(codeString))
6581          return FHIRDefinedType.DEVICE;
6582        if ("DeviceComponent".equals(codeString))
6583          return FHIRDefinedType.DEVICECOMPONENT;
6584        if ("DeviceMetric".equals(codeString))
6585          return FHIRDefinedType.DEVICEMETRIC;
6586        if ("DeviceUseRequest".equals(codeString))
6587          return FHIRDefinedType.DEVICEUSEREQUEST;
6588        if ("DeviceUseStatement".equals(codeString))
6589          return FHIRDefinedType.DEVICEUSESTATEMENT;
6590        if ("DiagnosticOrder".equals(codeString))
6591          return FHIRDefinedType.DIAGNOSTICORDER;
6592        if ("DiagnosticReport".equals(codeString))
6593          return FHIRDefinedType.DIAGNOSTICREPORT;
6594        if ("DocumentManifest".equals(codeString))
6595          return FHIRDefinedType.DOCUMENTMANIFEST;
6596        if ("DocumentReference".equals(codeString))
6597          return FHIRDefinedType.DOCUMENTREFERENCE;
6598        if ("DomainResource".equals(codeString))
6599          return FHIRDefinedType.DOMAINRESOURCE;
6600        if ("EligibilityRequest".equals(codeString))
6601          return FHIRDefinedType.ELIGIBILITYREQUEST;
6602        if ("EligibilityResponse".equals(codeString))
6603          return FHIRDefinedType.ELIGIBILITYRESPONSE;
6604        if ("Encounter".equals(codeString))
6605          return FHIRDefinedType.ENCOUNTER;
6606        if ("EnrollmentRequest".equals(codeString))
6607          return FHIRDefinedType.ENROLLMENTREQUEST;
6608        if ("EnrollmentResponse".equals(codeString))
6609          return FHIRDefinedType.ENROLLMENTRESPONSE;
6610        if ("EpisodeOfCare".equals(codeString))
6611          return FHIRDefinedType.EPISODEOFCARE;
6612        if ("ExpansionProfile".equals(codeString))
6613          return FHIRDefinedType.EXPANSIONPROFILE;
6614        if ("ExplanationOfBenefit".equals(codeString))
6615          return FHIRDefinedType.EXPLANATIONOFBENEFIT;
6616        if ("FamilyMemberHistory".equals(codeString))
6617          return FHIRDefinedType.FAMILYMEMBERHISTORY;
6618        if ("Flag".equals(codeString))
6619          return FHIRDefinedType.FLAG;
6620        if ("Goal".equals(codeString))
6621          return FHIRDefinedType.GOAL;
6622        if ("Group".equals(codeString))
6623          return FHIRDefinedType.GROUP;
6624        if ("GuidanceResponse".equals(codeString))
6625          return FHIRDefinedType.GUIDANCERESPONSE;
6626        if ("HealthcareService".equals(codeString))
6627          return FHIRDefinedType.HEALTHCARESERVICE;
6628        if ("ImagingExcerpt".equals(codeString))
6629          return FHIRDefinedType.IMAGINGEXCERPT;
6630        if ("ImagingObjectSelection".equals(codeString))
6631          return FHIRDefinedType.IMAGINGOBJECTSELECTION;
6632        if ("ImagingStudy".equals(codeString))
6633          return FHIRDefinedType.IMAGINGSTUDY;
6634        if ("Immunization".equals(codeString))
6635          return FHIRDefinedType.IMMUNIZATION;
6636        if ("ImmunizationRecommendation".equals(codeString))
6637          return FHIRDefinedType.IMMUNIZATIONRECOMMENDATION;
6638        if ("ImplementationGuide".equals(codeString))
6639          return FHIRDefinedType.IMPLEMENTATIONGUIDE;
6640        if ("Library".equals(codeString))
6641          return FHIRDefinedType.LIBRARY;
6642        if ("Linkage".equals(codeString))
6643          return FHIRDefinedType.LINKAGE;
6644        if ("List".equals(codeString))
6645          return FHIRDefinedType.LIST;
6646        if ("Location".equals(codeString))
6647          return FHIRDefinedType.LOCATION;
6648        if ("Measure".equals(codeString))
6649          return FHIRDefinedType.MEASURE;
6650        if ("MeasureReport".equals(codeString))
6651          return FHIRDefinedType.MEASUREREPORT;
6652        if ("Media".equals(codeString))
6653          return FHIRDefinedType.MEDIA;
6654        if ("Medication".equals(codeString))
6655          return FHIRDefinedType.MEDICATION;
6656        if ("MedicationAdministration".equals(codeString))
6657          return FHIRDefinedType.MEDICATIONADMINISTRATION;
6658        if ("MedicationDispense".equals(codeString))
6659          return FHIRDefinedType.MEDICATIONDISPENSE;
6660        if ("MedicationOrder".equals(codeString))
6661          return FHIRDefinedType.MEDICATIONORDER;
6662        if ("MedicationStatement".equals(codeString))
6663          return FHIRDefinedType.MEDICATIONSTATEMENT;
6664        if ("MessageHeader".equals(codeString))
6665          return FHIRDefinedType.MESSAGEHEADER;
6666        if ("ModuleDefinition".equals(codeString))
6667          return FHIRDefinedType.MODULEDEFINITION;
6668        if ("NamingSystem".equals(codeString))
6669          return FHIRDefinedType.NAMINGSYSTEM;
6670        if ("NutritionOrder".equals(codeString))
6671          return FHIRDefinedType.NUTRITIONORDER;
6672        if ("Observation".equals(codeString))
6673          return FHIRDefinedType.OBSERVATION;
6674        if ("OperationDefinition".equals(codeString))
6675          return FHIRDefinedType.OPERATIONDEFINITION;
6676        if ("OperationOutcome".equals(codeString))
6677          return FHIRDefinedType.OPERATIONOUTCOME;
6678        if ("Order".equals(codeString))
6679          return FHIRDefinedType.ORDER;
6680        if ("OrderResponse".equals(codeString))
6681          return FHIRDefinedType.ORDERRESPONSE;
6682        if ("OrderSet".equals(codeString))
6683          return FHIRDefinedType.ORDERSET;
6684        if ("Organization".equals(codeString))
6685          return FHIRDefinedType.ORGANIZATION;
6686        if ("Parameters".equals(codeString))
6687          return FHIRDefinedType.PARAMETERS;
6688        if ("Patient".equals(codeString))
6689          return FHIRDefinedType.PATIENT;
6690        if ("PaymentNotice".equals(codeString))
6691          return FHIRDefinedType.PAYMENTNOTICE;
6692        if ("PaymentReconciliation".equals(codeString))
6693          return FHIRDefinedType.PAYMENTRECONCILIATION;
6694        if ("Person".equals(codeString))
6695          return FHIRDefinedType.PERSON;
6696        if ("Practitioner".equals(codeString))
6697          return FHIRDefinedType.PRACTITIONER;
6698        if ("PractitionerRole".equals(codeString))
6699          return FHIRDefinedType.PRACTITIONERROLE;
6700        if ("Procedure".equals(codeString))
6701          return FHIRDefinedType.PROCEDURE;
6702        if ("ProcedureRequest".equals(codeString))
6703          return FHIRDefinedType.PROCEDUREREQUEST;
6704        if ("ProcessRequest".equals(codeString))
6705          return FHIRDefinedType.PROCESSREQUEST;
6706        if ("ProcessResponse".equals(codeString))
6707          return FHIRDefinedType.PROCESSRESPONSE;
6708        if ("Protocol".equals(codeString))
6709          return FHIRDefinedType.PROTOCOL;
6710        if ("Provenance".equals(codeString))
6711          return FHIRDefinedType.PROVENANCE;
6712        if ("Questionnaire".equals(codeString))
6713          return FHIRDefinedType.QUESTIONNAIRE;
6714        if ("QuestionnaireResponse".equals(codeString))
6715          return FHIRDefinedType.QUESTIONNAIRERESPONSE;
6716        if ("ReferralRequest".equals(codeString))
6717          return FHIRDefinedType.REFERRALREQUEST;
6718        if ("RelatedPerson".equals(codeString))
6719          return FHIRDefinedType.RELATEDPERSON;
6720        if ("Resource".equals(codeString))
6721          return FHIRDefinedType.RESOURCE;
6722        if ("RiskAssessment".equals(codeString))
6723          return FHIRDefinedType.RISKASSESSMENT;
6724        if ("Schedule".equals(codeString))
6725          return FHIRDefinedType.SCHEDULE;
6726        if ("SearchParameter".equals(codeString))
6727          return FHIRDefinedType.SEARCHPARAMETER;
6728        if ("Sequence".equals(codeString))
6729          return FHIRDefinedType.SEQUENCE;
6730        if ("Slot".equals(codeString))
6731          return FHIRDefinedType.SLOT;
6732        if ("Specimen".equals(codeString))
6733          return FHIRDefinedType.SPECIMEN;
6734        if ("StructureDefinition".equals(codeString))
6735          return FHIRDefinedType.STRUCTUREDEFINITION;
6736        if ("StructureMap".equals(codeString))
6737          return FHIRDefinedType.STRUCTUREMAP;
6738        if ("Subscription".equals(codeString))
6739          return FHIRDefinedType.SUBSCRIPTION;
6740        if ("Substance".equals(codeString))
6741          return FHIRDefinedType.SUBSTANCE;
6742        if ("SupplyDelivery".equals(codeString))
6743          return FHIRDefinedType.SUPPLYDELIVERY;
6744        if ("SupplyRequest".equals(codeString))
6745          return FHIRDefinedType.SUPPLYREQUEST;
6746        if ("Task".equals(codeString))
6747          return FHIRDefinedType.TASK;
6748        if ("TestScript".equals(codeString))
6749          return FHIRDefinedType.TESTSCRIPT;
6750        if ("ValueSet".equals(codeString))
6751          return FHIRDefinedType.VALUESET;
6752        if ("VisionPrescription".equals(codeString))
6753          return FHIRDefinedType.VISIONPRESCRIPTION;
6754        throw new IllegalArgumentException("Unknown FHIRDefinedType code '"+codeString+"'");
6755        }
6756        public Enumeration<FHIRDefinedType> fromType(Base code) throws FHIRException {
6757          if (code == null || code.isEmpty())
6758            return null;
6759          String codeString = ((PrimitiveType) code).asStringValue();
6760          if (codeString == null || "".equals(codeString))
6761            return null;
6762        if ("ActionDefinition".equals(codeString))
6763          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ACTIONDEFINITION);
6764        if ("Address".equals(codeString))
6765          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ADDRESS);
6766        if ("Age".equals(codeString))
6767          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.AGE);
6768        if ("Annotation".equals(codeString))
6769          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ANNOTATION);
6770        if ("Attachment".equals(codeString))
6771          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ATTACHMENT);
6772        if ("BackboneElement".equals(codeString))
6773          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BACKBONEELEMENT);
6774        if ("CodeableConcept".equals(codeString))
6775          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODEABLECONCEPT);
6776        if ("Coding".equals(codeString))
6777          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODING);
6778        if ("ContactPoint".equals(codeString))
6779          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTACTPOINT);
6780        if ("Count".equals(codeString))
6781          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COUNT);
6782        if ("DataRequirement".equals(codeString))
6783          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATAREQUIREMENT);
6784        if ("Distance".equals(codeString))
6785          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DISTANCE);
6786        if ("Duration".equals(codeString))
6787          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DURATION);
6788        if ("Element".equals(codeString))
6789          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ELEMENT);
6790        if ("ElementDefinition".equals(codeString))
6791          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ELEMENTDEFINITION);
6792        if ("Extension".equals(codeString))
6793          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXTENSION);
6794        if ("HumanName".equals(codeString))
6795          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.HUMANNAME);
6796        if ("Identifier".equals(codeString))
6797          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IDENTIFIER);
6798        if ("Meta".equals(codeString))
6799          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.META);
6800        if ("ModuleMetadata".equals(codeString))
6801          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MODULEMETADATA);
6802        if ("Money".equals(codeString))
6803          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MONEY);
6804        if ("Narrative".equals(codeString))
6805          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NARRATIVE);
6806        if ("ParameterDefinition".equals(codeString))
6807          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PARAMETERDEFINITION);
6808        if ("Period".equals(codeString))
6809          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PERIOD);
6810        if ("Quantity".equals(codeString))
6811          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.QUANTITY);
6812        if ("Range".equals(codeString))
6813          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RANGE);
6814        if ("Ratio".equals(codeString))
6815          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RATIO);
6816        if ("Reference".equals(codeString))
6817          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.REFERENCE);
6818        if ("SampledData".equals(codeString))
6819          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SAMPLEDDATA);
6820        if ("Signature".equals(codeString))
6821          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SIGNATURE);
6822        if ("SimpleQuantity".equals(codeString))
6823          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SIMPLEQUANTITY);
6824        if ("Timing".equals(codeString))
6825          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TIMING);
6826        if ("TriggerDefinition".equals(codeString))
6827          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TRIGGERDEFINITION);
6828        if ("base64Binary".equals(codeString))
6829          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BASE64BINARY);
6830        if ("boolean".equals(codeString))
6831          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BOOLEAN);
6832        if ("code".equals(codeString))
6833          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODE);
6834        if ("date".equals(codeString))
6835          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATE);
6836        if ("dateTime".equals(codeString))
6837          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATETIME);
6838        if ("decimal".equals(codeString))
6839          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DECIMAL);
6840        if ("id".equals(codeString))
6841          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ID);
6842        if ("instant".equals(codeString))
6843          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INSTANT);
6844        if ("integer".equals(codeString))
6845          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INTEGER);
6846        if ("markdown".equals(codeString))
6847          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MARKDOWN);
6848        if ("oid".equals(codeString))
6849          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OID);
6850        if ("positiveInt".equals(codeString))
6851          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.POSITIVEINT);
6852        if ("string".equals(codeString))
6853          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.STRING);
6854        if ("time".equals(codeString))
6855          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TIME);
6856        if ("unsignedInt".equals(codeString))
6857          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.UNSIGNEDINT);
6858        if ("uri".equals(codeString))
6859          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.URI);
6860        if ("uuid".equals(codeString))
6861          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.UUID);
6862        if ("xhtml".equals(codeString))
6863          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.XHTML);
6864        if ("Account".equals(codeString))
6865          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ACCOUNT);
6866        if ("AllergyIntolerance".equals(codeString))
6867          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ALLERGYINTOLERANCE);
6868        if ("Appointment".equals(codeString))
6869          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.APPOINTMENT);
6870        if ("AppointmentResponse".equals(codeString))
6871          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.APPOINTMENTRESPONSE);
6872        if ("AuditEvent".equals(codeString))
6873          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.AUDITEVENT);
6874        if ("Basic".equals(codeString))
6875          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BASIC);
6876        if ("Binary".equals(codeString))
6877          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BINARY);
6878        if ("BodySite".equals(codeString))
6879          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BODYSITE);
6880        if ("Bundle".equals(codeString))
6881          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BUNDLE);
6882        if ("CarePlan".equals(codeString))
6883          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CAREPLAN);
6884        if ("CareTeam".equals(codeString))
6885          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CARETEAM);
6886        if ("Claim".equals(codeString))
6887          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CLAIM);
6888        if ("ClaimResponse".equals(codeString))
6889          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CLAIMRESPONSE);
6890        if ("ClinicalImpression".equals(codeString))
6891          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CLINICALIMPRESSION);
6892        if ("CodeSystem".equals(codeString))
6893          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODESYSTEM);
6894        if ("Communication".equals(codeString))
6895          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMMUNICATION);
6896        if ("CommunicationRequest".equals(codeString))
6897          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMMUNICATIONREQUEST);
6898        if ("CompartmentDefinition".equals(codeString))
6899          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMPARTMENTDEFINITION);
6900        if ("Composition".equals(codeString))
6901          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMPOSITION);
6902        if ("ConceptMap".equals(codeString))
6903          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONCEPTMAP);
6904        if ("Condition".equals(codeString))
6905          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONDITION);
6906        if ("Conformance".equals(codeString))
6907          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONFORMANCE);
6908        if ("Contract".equals(codeString))
6909          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTRACT);
6910        if ("Coverage".equals(codeString))
6911          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COVERAGE);
6912        if ("DataElement".equals(codeString))
6913          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATAELEMENT);
6914        if ("DecisionSupportRule".equals(codeString))
6915          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DECISIONSUPPORTRULE);
6916        if ("DecisionSupportServiceModule".equals(codeString))
6917          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DECISIONSUPPORTSERVICEMODULE);
6918        if ("DetectedIssue".equals(codeString))
6919          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DETECTEDISSUE);
6920        if ("Device".equals(codeString))
6921          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICE);
6922        if ("DeviceComponent".equals(codeString))
6923          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICECOMPONENT);
6924        if ("DeviceMetric".equals(codeString))
6925          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEMETRIC);
6926        if ("DeviceUseRequest".equals(codeString))
6927          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEUSEREQUEST);
6928        if ("DeviceUseStatement".equals(codeString))
6929          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEUSESTATEMENT);
6930        if ("DiagnosticOrder".equals(codeString))
6931          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DIAGNOSTICORDER);
6932        if ("DiagnosticReport".equals(codeString))
6933          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DIAGNOSTICREPORT);
6934        if ("DocumentManifest".equals(codeString))
6935          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOCUMENTMANIFEST);
6936        if ("DocumentReference".equals(codeString))
6937          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOCUMENTREFERENCE);
6938        if ("DomainResource".equals(codeString))
6939          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOMAINRESOURCE);
6940        if ("EligibilityRequest".equals(codeString))
6941          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ELIGIBILITYREQUEST);
6942        if ("EligibilityResponse".equals(codeString))
6943          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ELIGIBILITYRESPONSE);
6944        if ("Encounter".equals(codeString))
6945          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENCOUNTER);
6946        if ("EnrollmentRequest".equals(codeString))
6947          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENROLLMENTREQUEST);
6948        if ("EnrollmentResponse".equals(codeString))
6949          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENROLLMENTRESPONSE);
6950        if ("EpisodeOfCare".equals(codeString))
6951          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EPISODEOFCARE);
6952        if ("ExpansionProfile".equals(codeString))
6953          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXPANSIONPROFILE);
6954        if ("ExplanationOfBenefit".equals(codeString))
6955          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXPLANATIONOFBENEFIT);
6956        if ("FamilyMemberHistory".equals(codeString))
6957          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.FAMILYMEMBERHISTORY);
6958        if ("Flag".equals(codeString))
6959          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.FLAG);
6960        if ("Goal".equals(codeString))
6961          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GOAL);
6962        if ("Group".equals(codeString))
6963          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GROUP);
6964        if ("GuidanceResponse".equals(codeString))
6965          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GUIDANCERESPONSE);
6966        if ("HealthcareService".equals(codeString))
6967          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.HEALTHCARESERVICE);
6968        if ("ImagingExcerpt".equals(codeString))
6969          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMAGINGEXCERPT);
6970        if ("ImagingObjectSelection".equals(codeString))
6971          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMAGINGOBJECTSELECTION);
6972        if ("ImagingStudy".equals(codeString))
6973          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMAGINGSTUDY);
6974        if ("Immunization".equals(codeString))
6975          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMMUNIZATION);
6976        if ("ImmunizationRecommendation".equals(codeString))
6977          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMMUNIZATIONRECOMMENDATION);
6978        if ("ImplementationGuide".equals(codeString))
6979          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMPLEMENTATIONGUIDE);
6980        if ("Library".equals(codeString))
6981          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LIBRARY);
6982        if ("Linkage".equals(codeString))
6983          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LINKAGE);
6984        if ("List".equals(codeString))
6985          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LIST);
6986        if ("Location".equals(codeString))
6987          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LOCATION);
6988        if ("Measure".equals(codeString))
6989          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEASURE);
6990        if ("MeasureReport".equals(codeString))
6991          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEASUREREPORT);
6992        if ("Media".equals(codeString))
6993          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDIA);
6994        if ("Medication".equals(codeString))
6995          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATION);
6996        if ("MedicationAdministration".equals(codeString))
6997          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONADMINISTRATION);
6998        if ("MedicationDispense".equals(codeString))
6999          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONDISPENSE);
7000        if ("MedicationOrder".equals(codeString))
7001          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONORDER);
7002        if ("MedicationStatement".equals(codeString))
7003          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONSTATEMENT);
7004        if ("MessageHeader".equals(codeString))
7005          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MESSAGEHEADER);
7006        if ("ModuleDefinition".equals(codeString))
7007          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MODULEDEFINITION);
7008        if ("NamingSystem".equals(codeString))
7009          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NAMINGSYSTEM);
7010        if ("NutritionOrder".equals(codeString))
7011          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NUTRITIONORDER);
7012        if ("Observation".equals(codeString))
7013          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OBSERVATION);
7014        if ("OperationDefinition".equals(codeString))
7015          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OPERATIONDEFINITION);
7016        if ("OperationOutcome".equals(codeString))
7017          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OPERATIONOUTCOME);
7018        if ("Order".equals(codeString))
7019          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ORDER);
7020        if ("OrderResponse".equals(codeString))
7021          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ORDERRESPONSE);
7022        if ("OrderSet".equals(codeString))
7023          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ORDERSET);
7024        if ("Organization".equals(codeString))
7025          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ORGANIZATION);
7026        if ("Parameters".equals(codeString))
7027          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PARAMETERS);
7028        if ("Patient".equals(codeString))
7029          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PATIENT);
7030        if ("PaymentNotice".equals(codeString))
7031          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PAYMENTNOTICE);
7032        if ("PaymentReconciliation".equals(codeString))
7033          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PAYMENTRECONCILIATION);
7034        if ("Person".equals(codeString))
7035          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PERSON);
7036        if ("Practitioner".equals(codeString))
7037          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PRACTITIONER);
7038        if ("PractitionerRole".equals(codeString))
7039          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PRACTITIONERROLE);
7040        if ("Procedure".equals(codeString))
7041          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROCEDURE);
7042        if ("ProcedureRequest".equals(codeString))
7043          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROCEDUREREQUEST);
7044        if ("ProcessRequest".equals(codeString))
7045          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROCESSREQUEST);
7046        if ("ProcessResponse".equals(codeString))
7047          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROCESSRESPONSE);
7048        if ("Protocol".equals(codeString))
7049          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROTOCOL);
7050        if ("Provenance".equals(codeString))
7051          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROVENANCE);
7052        if ("Questionnaire".equals(codeString))
7053          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.QUESTIONNAIRE);
7054        if ("QuestionnaireResponse".equals(codeString))
7055          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.QUESTIONNAIRERESPONSE);
7056        if ("ReferralRequest".equals(codeString))
7057          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.REFERRALREQUEST);
7058        if ("RelatedPerson".equals(codeString))
7059          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RELATEDPERSON);
7060        if ("Resource".equals(codeString))
7061          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RESOURCE);
7062        if ("RiskAssessment".equals(codeString))
7063          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RISKASSESSMENT);
7064        if ("Schedule".equals(codeString))
7065          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SCHEDULE);
7066        if ("SearchParameter".equals(codeString))
7067          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SEARCHPARAMETER);
7068        if ("Sequence".equals(codeString))
7069          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SEQUENCE);
7070        if ("Slot".equals(codeString))
7071          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SLOT);
7072        if ("Specimen".equals(codeString))
7073          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SPECIMEN);
7074        if ("StructureDefinition".equals(codeString))
7075          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.STRUCTUREDEFINITION);
7076        if ("StructureMap".equals(codeString))
7077          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.STRUCTUREMAP);
7078        if ("Subscription".equals(codeString))
7079          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSCRIPTION);
7080        if ("Substance".equals(codeString))
7081          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCE);
7082        if ("SupplyDelivery".equals(codeString))
7083          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUPPLYDELIVERY);
7084        if ("SupplyRequest".equals(codeString))
7085          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUPPLYREQUEST);
7086        if ("Task".equals(codeString))
7087          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TASK);
7088        if ("TestScript".equals(codeString))
7089          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TESTSCRIPT);
7090        if ("ValueSet".equals(codeString))
7091          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.VALUESET);
7092        if ("VisionPrescription".equals(codeString))
7093          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.VISIONPRESCRIPTION);
7094        throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'");
7095        }
7096    public String toCode(FHIRDefinedType code) {
7097      if (code == FHIRDefinedType.ACTIONDEFINITION)
7098        return "ActionDefinition";
7099      if (code == FHIRDefinedType.ADDRESS)
7100        return "Address";
7101      if (code == FHIRDefinedType.AGE)
7102        return "Age";
7103      if (code == FHIRDefinedType.ANNOTATION)
7104        return "Annotation";
7105      if (code == FHIRDefinedType.ATTACHMENT)
7106        return "Attachment";
7107      if (code == FHIRDefinedType.BACKBONEELEMENT)
7108        return "BackboneElement";
7109      if (code == FHIRDefinedType.CODEABLECONCEPT)
7110        return "CodeableConcept";
7111      if (code == FHIRDefinedType.CODING)
7112        return "Coding";
7113      if (code == FHIRDefinedType.CONTACTPOINT)
7114        return "ContactPoint";
7115      if (code == FHIRDefinedType.COUNT)
7116        return "Count";
7117      if (code == FHIRDefinedType.DATAREQUIREMENT)
7118        return "DataRequirement";
7119      if (code == FHIRDefinedType.DISTANCE)
7120        return "Distance";
7121      if (code == FHIRDefinedType.DURATION)
7122        return "Duration";
7123      if (code == FHIRDefinedType.ELEMENT)
7124        return "Element";
7125      if (code == FHIRDefinedType.ELEMENTDEFINITION)
7126        return "ElementDefinition";
7127      if (code == FHIRDefinedType.EXTENSION)
7128        return "Extension";
7129      if (code == FHIRDefinedType.HUMANNAME)
7130        return "HumanName";
7131      if (code == FHIRDefinedType.IDENTIFIER)
7132        return "Identifier";
7133      if (code == FHIRDefinedType.META)
7134        return "Meta";
7135      if (code == FHIRDefinedType.MODULEMETADATA)
7136        return "ModuleMetadata";
7137      if (code == FHIRDefinedType.MONEY)
7138        return "Money";
7139      if (code == FHIRDefinedType.NARRATIVE)
7140        return "Narrative";
7141      if (code == FHIRDefinedType.PARAMETERDEFINITION)
7142        return "ParameterDefinition";
7143      if (code == FHIRDefinedType.PERIOD)
7144        return "Period";
7145      if (code == FHIRDefinedType.QUANTITY)
7146        return "Quantity";
7147      if (code == FHIRDefinedType.RANGE)
7148        return "Range";
7149      if (code == FHIRDefinedType.RATIO)
7150        return "Ratio";
7151      if (code == FHIRDefinedType.REFERENCE)
7152        return "Reference";
7153      if (code == FHIRDefinedType.SAMPLEDDATA)
7154        return "SampledData";
7155      if (code == FHIRDefinedType.SIGNATURE)
7156        return "Signature";
7157      if (code == FHIRDefinedType.SIMPLEQUANTITY)
7158        return "SimpleQuantity";
7159      if (code == FHIRDefinedType.TIMING)
7160        return "Timing";
7161      if (code == FHIRDefinedType.TRIGGERDEFINITION)
7162        return "TriggerDefinition";
7163      if (code == FHIRDefinedType.BASE64BINARY)
7164        return "base64Binary";
7165      if (code == FHIRDefinedType.BOOLEAN)
7166        return "boolean";
7167      if (code == FHIRDefinedType.CODE)
7168        return "code";
7169      if (code == FHIRDefinedType.DATE)
7170        return "date";
7171      if (code == FHIRDefinedType.DATETIME)
7172        return "dateTime";
7173      if (code == FHIRDefinedType.DECIMAL)
7174        return "decimal";
7175      if (code == FHIRDefinedType.ID)
7176        return "id";
7177      if (code == FHIRDefinedType.INSTANT)
7178        return "instant";
7179      if (code == FHIRDefinedType.INTEGER)
7180        return "integer";
7181      if (code == FHIRDefinedType.MARKDOWN)
7182        return "markdown";
7183      if (code == FHIRDefinedType.OID)
7184        return "oid";
7185      if (code == FHIRDefinedType.POSITIVEINT)
7186        return "positiveInt";
7187      if (code == FHIRDefinedType.STRING)
7188        return "string";
7189      if (code == FHIRDefinedType.TIME)
7190        return "time";
7191      if (code == FHIRDefinedType.UNSIGNEDINT)
7192        return "unsignedInt";
7193      if (code == FHIRDefinedType.URI)
7194        return "uri";
7195      if (code == FHIRDefinedType.UUID)
7196        return "uuid";
7197      if (code == FHIRDefinedType.XHTML)
7198        return "xhtml";
7199      if (code == FHIRDefinedType.ACCOUNT)
7200        return "Account";
7201      if (code == FHIRDefinedType.ALLERGYINTOLERANCE)
7202        return "AllergyIntolerance";
7203      if (code == FHIRDefinedType.APPOINTMENT)
7204        return "Appointment";
7205      if (code == FHIRDefinedType.APPOINTMENTRESPONSE)
7206        return "AppointmentResponse";
7207      if (code == FHIRDefinedType.AUDITEVENT)
7208        return "AuditEvent";
7209      if (code == FHIRDefinedType.BASIC)
7210        return "Basic";
7211      if (code == FHIRDefinedType.BINARY)
7212        return "Binary";
7213      if (code == FHIRDefinedType.BODYSITE)
7214        return "BodySite";
7215      if (code == FHIRDefinedType.BUNDLE)
7216        return "Bundle";
7217      if (code == FHIRDefinedType.CAREPLAN)
7218        return "CarePlan";
7219      if (code == FHIRDefinedType.CARETEAM)
7220        return "CareTeam";
7221      if (code == FHIRDefinedType.CLAIM)
7222        return "Claim";
7223      if (code == FHIRDefinedType.CLAIMRESPONSE)
7224        return "ClaimResponse";
7225      if (code == FHIRDefinedType.CLINICALIMPRESSION)
7226        return "ClinicalImpression";
7227      if (code == FHIRDefinedType.CODESYSTEM)
7228        return "CodeSystem";
7229      if (code == FHIRDefinedType.COMMUNICATION)
7230        return "Communication";
7231      if (code == FHIRDefinedType.COMMUNICATIONREQUEST)
7232        return "CommunicationRequest";
7233      if (code == FHIRDefinedType.COMPARTMENTDEFINITION)
7234        return "CompartmentDefinition";
7235      if (code == FHIRDefinedType.COMPOSITION)
7236        return "Composition";
7237      if (code == FHIRDefinedType.CONCEPTMAP)
7238        return "ConceptMap";
7239      if (code == FHIRDefinedType.CONDITION)
7240        return "Condition";
7241      if (code == FHIRDefinedType.CONFORMANCE)
7242        return "Conformance";
7243      if (code == FHIRDefinedType.CONTRACT)
7244        return "Contract";
7245      if (code == FHIRDefinedType.COVERAGE)
7246        return "Coverage";
7247      if (code == FHIRDefinedType.DATAELEMENT)
7248        return "DataElement";
7249      if (code == FHIRDefinedType.DECISIONSUPPORTRULE)
7250        return "DecisionSupportRule";
7251      if (code == FHIRDefinedType.DECISIONSUPPORTSERVICEMODULE)
7252        return "DecisionSupportServiceModule";
7253      if (code == FHIRDefinedType.DETECTEDISSUE)
7254        return "DetectedIssue";
7255      if (code == FHIRDefinedType.DEVICE)
7256        return "Device";
7257      if (code == FHIRDefinedType.DEVICECOMPONENT)
7258        return "DeviceComponent";
7259      if (code == FHIRDefinedType.DEVICEMETRIC)
7260        return "DeviceMetric";
7261      if (code == FHIRDefinedType.DEVICEUSEREQUEST)
7262        return "DeviceUseRequest";
7263      if (code == FHIRDefinedType.DEVICEUSESTATEMENT)
7264        return "DeviceUseStatement";
7265      if (code == FHIRDefinedType.DIAGNOSTICORDER)
7266        return "DiagnosticOrder";
7267      if (code == FHIRDefinedType.DIAGNOSTICREPORT)
7268        return "DiagnosticReport";
7269      if (code == FHIRDefinedType.DOCUMENTMANIFEST)
7270        return "DocumentManifest";
7271      if (code == FHIRDefinedType.DOCUMENTREFERENCE)
7272        return "DocumentReference";
7273      if (code == FHIRDefinedType.DOMAINRESOURCE)
7274        return "DomainResource";
7275      if (code == FHIRDefinedType.ELIGIBILITYREQUEST)
7276        return "EligibilityRequest";
7277      if (code == FHIRDefinedType.ELIGIBILITYRESPONSE)
7278        return "EligibilityResponse";
7279      if (code == FHIRDefinedType.ENCOUNTER)
7280        return "Encounter";
7281      if (code == FHIRDefinedType.ENROLLMENTREQUEST)
7282        return "EnrollmentRequest";
7283      if (code == FHIRDefinedType.ENROLLMENTRESPONSE)
7284        return "EnrollmentResponse";
7285      if (code == FHIRDefinedType.EPISODEOFCARE)
7286        return "EpisodeOfCare";
7287      if (code == FHIRDefinedType.EXPANSIONPROFILE)
7288        return "ExpansionProfile";
7289      if (code == FHIRDefinedType.EXPLANATIONOFBENEFIT)
7290        return "ExplanationOfBenefit";
7291      if (code == FHIRDefinedType.FAMILYMEMBERHISTORY)
7292        return "FamilyMemberHistory";
7293      if (code == FHIRDefinedType.FLAG)
7294        return "Flag";
7295      if (code == FHIRDefinedType.GOAL)
7296        return "Goal";
7297      if (code == FHIRDefinedType.GROUP)
7298        return "Group";
7299      if (code == FHIRDefinedType.GUIDANCERESPONSE)
7300        return "GuidanceResponse";
7301      if (code == FHIRDefinedType.HEALTHCARESERVICE)
7302        return "HealthcareService";
7303      if (code == FHIRDefinedType.IMAGINGEXCERPT)
7304        return "ImagingExcerpt";
7305      if (code == FHIRDefinedType.IMAGINGOBJECTSELECTION)
7306        return "ImagingObjectSelection";
7307      if (code == FHIRDefinedType.IMAGINGSTUDY)
7308        return "ImagingStudy";
7309      if (code == FHIRDefinedType.IMMUNIZATION)
7310        return "Immunization";
7311      if (code == FHIRDefinedType.IMMUNIZATIONRECOMMENDATION)
7312        return "ImmunizationRecommendation";
7313      if (code == FHIRDefinedType.IMPLEMENTATIONGUIDE)
7314        return "ImplementationGuide";
7315      if (code == FHIRDefinedType.LIBRARY)
7316        return "Library";
7317      if (code == FHIRDefinedType.LINKAGE)
7318        return "Linkage";
7319      if (code == FHIRDefinedType.LIST)
7320        return "List";
7321      if (code == FHIRDefinedType.LOCATION)
7322        return "Location";
7323      if (code == FHIRDefinedType.MEASURE)
7324        return "Measure";
7325      if (code == FHIRDefinedType.MEASUREREPORT)
7326        return "MeasureReport";
7327      if (code == FHIRDefinedType.MEDIA)
7328        return "Media";
7329      if (code == FHIRDefinedType.MEDICATION)
7330        return "Medication";
7331      if (code == FHIRDefinedType.MEDICATIONADMINISTRATION)
7332        return "MedicationAdministration";
7333      if (code == FHIRDefinedType.MEDICATIONDISPENSE)
7334        return "MedicationDispense";
7335      if (code == FHIRDefinedType.MEDICATIONORDER)
7336        return "MedicationOrder";
7337      if (code == FHIRDefinedType.MEDICATIONSTATEMENT)
7338        return "MedicationStatement";
7339      if (code == FHIRDefinedType.MESSAGEHEADER)
7340        return "MessageHeader";
7341      if (code == FHIRDefinedType.MODULEDEFINITION)
7342        return "ModuleDefinition";
7343      if (code == FHIRDefinedType.NAMINGSYSTEM)
7344        return "NamingSystem";
7345      if (code == FHIRDefinedType.NUTRITIONORDER)
7346        return "NutritionOrder";
7347      if (code == FHIRDefinedType.OBSERVATION)
7348        return "Observation";
7349      if (code == FHIRDefinedType.OPERATIONDEFINITION)
7350        return "OperationDefinition";
7351      if (code == FHIRDefinedType.OPERATIONOUTCOME)
7352        return "OperationOutcome";
7353      if (code == FHIRDefinedType.ORDER)
7354        return "Order";
7355      if (code == FHIRDefinedType.ORDERRESPONSE)
7356        return "OrderResponse";
7357      if (code == FHIRDefinedType.ORDERSET)
7358        return "OrderSet";
7359      if (code == FHIRDefinedType.ORGANIZATION)
7360        return "Organization";
7361      if (code == FHIRDefinedType.PARAMETERS)
7362        return "Parameters";
7363      if (code == FHIRDefinedType.PATIENT)
7364        return "Patient";
7365      if (code == FHIRDefinedType.PAYMENTNOTICE)
7366        return "PaymentNotice";
7367      if (code == FHIRDefinedType.PAYMENTRECONCILIATION)
7368        return "PaymentReconciliation";
7369      if (code == FHIRDefinedType.PERSON)
7370        return "Person";
7371      if (code == FHIRDefinedType.PRACTITIONER)
7372        return "Practitioner";
7373      if (code == FHIRDefinedType.PRACTITIONERROLE)
7374        return "PractitionerRole";
7375      if (code == FHIRDefinedType.PROCEDURE)
7376        return "Procedure";
7377      if (code == FHIRDefinedType.PROCEDUREREQUEST)
7378        return "ProcedureRequest";
7379      if (code == FHIRDefinedType.PROCESSREQUEST)
7380        return "ProcessRequest";
7381      if (code == FHIRDefinedType.PROCESSRESPONSE)
7382        return "ProcessResponse";
7383      if (code == FHIRDefinedType.PROTOCOL)
7384        return "Protocol";
7385      if (code == FHIRDefinedType.PROVENANCE)
7386        return "Provenance";
7387      if (code == FHIRDefinedType.QUESTIONNAIRE)
7388        return "Questionnaire";
7389      if (code == FHIRDefinedType.QUESTIONNAIRERESPONSE)
7390        return "QuestionnaireResponse";
7391      if (code == FHIRDefinedType.REFERRALREQUEST)
7392        return "ReferralRequest";
7393      if (code == FHIRDefinedType.RELATEDPERSON)
7394        return "RelatedPerson";
7395      if (code == FHIRDefinedType.RESOURCE)
7396        return "Resource";
7397      if (code == FHIRDefinedType.RISKASSESSMENT)
7398        return "RiskAssessment";
7399      if (code == FHIRDefinedType.SCHEDULE)
7400        return "Schedule";
7401      if (code == FHIRDefinedType.SEARCHPARAMETER)
7402        return "SearchParameter";
7403      if (code == FHIRDefinedType.SEQUENCE)
7404        return "Sequence";
7405      if (code == FHIRDefinedType.SLOT)
7406        return "Slot";
7407      if (code == FHIRDefinedType.SPECIMEN)
7408        return "Specimen";
7409      if (code == FHIRDefinedType.STRUCTUREDEFINITION)
7410        return "StructureDefinition";
7411      if (code == FHIRDefinedType.STRUCTUREMAP)
7412        return "StructureMap";
7413      if (code == FHIRDefinedType.SUBSCRIPTION)
7414        return "Subscription";
7415      if (code == FHIRDefinedType.SUBSTANCE)
7416        return "Substance";
7417      if (code == FHIRDefinedType.SUPPLYDELIVERY)
7418        return "SupplyDelivery";
7419      if (code == FHIRDefinedType.SUPPLYREQUEST)
7420        return "SupplyRequest";
7421      if (code == FHIRDefinedType.TASK)
7422        return "Task";
7423      if (code == FHIRDefinedType.TESTSCRIPT)
7424        return "TestScript";
7425      if (code == FHIRDefinedType.VALUESET)
7426        return "ValueSet";
7427      if (code == FHIRDefinedType.VISIONPRESCRIPTION)
7428        return "VisionPrescription";
7429      return "?";
7430      }
7431    public String toSystem(FHIRDefinedType code) {
7432      return code.getSystem();
7433      }
7434    }
7435
7436    public enum MessageEvent {
7437        /**
7438         * The definition of a code system is used to create a simple collection of codes suitable for use for data entry or validation. An expanded code system will be returned, or an error message.
7439         */
7440        CODESYSTEMEXPAND, 
7441        /**
7442         * Change the status of a Medication Administration to show that it is complete.
7443         */
7444        MEDICATIONADMINISTRATIONCOMPLETE, 
7445        /**
7446         * Someone wishes to record that the record of administration of a medication is in error and should be ignored.
7447         */
7448        MEDICATIONADMINISTRATIONNULLIFICATION, 
7449        /**
7450         * Indicates that a medication has been recorded against the patient's record.
7451         */
7452        MEDICATIONADMINISTRATIONRECORDING, 
7453        /**
7454         * Update a Medication Administration record.
7455         */
7456        MEDICATIONADMINISTRATIONUPDATE, 
7457        /**
7458         * Notification of a change to an administrative resource (either create or update). Note that there is no delete, though some administrative resources have status or period elements for this use.
7459         */
7460        ADMINNOTIFY, 
7461        /**
7462         * Provide a diagnostic report, or update a previously provided diagnostic report.
7463         */
7464        DIAGNOSTICREPORTPROVIDE, 
7465        /**
7466         * Provide a simple observation or update a previously provided simple observation.
7467         */
7468        OBSERVATIONPROVIDE, 
7469        /**
7470         * Notification that two patient records actually identify the same patient.
7471         */
7472        PATIENTLINK, 
7473        /**
7474         * Notification that previous advice that two patient records concern the same patient is now considered incorrect.
7475         */
7476        PATIENTUNLINK, 
7477        /**
7478         * The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. An expanded value set will be returned, or an error message.
7479         */
7480        VALUESETEXPAND, 
7481        /**
7482         * added to help the parsers
7483         */
7484        NULL;
7485        public static MessageEvent fromCode(String codeString) throws FHIRException {
7486            if (codeString == null || "".equals(codeString))
7487                return null;
7488        if ("CodeSystem-expand".equals(codeString))
7489          return CODESYSTEMEXPAND;
7490        if ("MedicationAdministration-Complete".equals(codeString))
7491          return MEDICATIONADMINISTRATIONCOMPLETE;
7492        if ("MedicationAdministration-Nullification".equals(codeString))
7493          return MEDICATIONADMINISTRATIONNULLIFICATION;
7494        if ("MedicationAdministration-Recording".equals(codeString))
7495          return MEDICATIONADMINISTRATIONRECORDING;
7496        if ("MedicationAdministration-Update".equals(codeString))
7497          return MEDICATIONADMINISTRATIONUPDATE;
7498        if ("admin-notify".equals(codeString))
7499          return ADMINNOTIFY;
7500        if ("diagnosticreport-provide".equals(codeString))
7501          return DIAGNOSTICREPORTPROVIDE;
7502        if ("observation-provide".equals(codeString))
7503          return OBSERVATIONPROVIDE;
7504        if ("patient-link".equals(codeString))
7505          return PATIENTLINK;
7506        if ("patient-unlink".equals(codeString))
7507          return PATIENTUNLINK;
7508        if ("valueset-expand".equals(codeString))
7509          return VALUESETEXPAND;
7510        throw new FHIRException("Unknown MessageEvent code '"+codeString+"'");
7511        }
7512        public String toCode() {
7513          switch (this) {
7514            case CODESYSTEMEXPAND: return "CodeSystem-expand";
7515            case MEDICATIONADMINISTRATIONCOMPLETE: return "MedicationAdministration-Complete";
7516            case MEDICATIONADMINISTRATIONNULLIFICATION: return "MedicationAdministration-Nullification";
7517            case MEDICATIONADMINISTRATIONRECORDING: return "MedicationAdministration-Recording";
7518            case MEDICATIONADMINISTRATIONUPDATE: return "MedicationAdministration-Update";
7519            case ADMINNOTIFY: return "admin-notify";
7520            case DIAGNOSTICREPORTPROVIDE: return "diagnosticreport-provide";
7521            case OBSERVATIONPROVIDE: return "observation-provide";
7522            case PATIENTLINK: return "patient-link";
7523            case PATIENTUNLINK: return "patient-unlink";
7524            case VALUESETEXPAND: return "valueset-expand";
7525            default: return "?";
7526          }
7527        }
7528        public String getSystem() {
7529          switch (this) {
7530            case CODESYSTEMEXPAND: return "http://hl7.org/fhir/message-events";
7531            case MEDICATIONADMINISTRATIONCOMPLETE: return "http://hl7.org/fhir/message-events";
7532            case MEDICATIONADMINISTRATIONNULLIFICATION: return "http://hl7.org/fhir/message-events";
7533            case MEDICATIONADMINISTRATIONRECORDING: return "http://hl7.org/fhir/message-events";
7534            case MEDICATIONADMINISTRATIONUPDATE: return "http://hl7.org/fhir/message-events";
7535            case ADMINNOTIFY: return "http://hl7.org/fhir/message-events";
7536            case DIAGNOSTICREPORTPROVIDE: return "http://hl7.org/fhir/message-events";
7537            case OBSERVATIONPROVIDE: return "http://hl7.org/fhir/message-events";
7538            case PATIENTLINK: return "http://hl7.org/fhir/message-events";
7539            case PATIENTUNLINK: return "http://hl7.org/fhir/message-events";
7540            case VALUESETEXPAND: return "http://hl7.org/fhir/message-events";
7541            default: return "?";
7542          }
7543        }
7544        public String getDefinition() {
7545          switch (this) {
7546            case CODESYSTEMEXPAND: return "The definition of a code system is used to create a simple collection of codes suitable for use for data entry or validation. An expanded code system will be returned, or an error message.";
7547            case MEDICATIONADMINISTRATIONCOMPLETE: return "Change the status of a Medication Administration to show that it is complete.";
7548            case MEDICATIONADMINISTRATIONNULLIFICATION: return "Someone wishes to record that the record of administration of a medication is in error and should be ignored.";
7549            case MEDICATIONADMINISTRATIONRECORDING: return "Indicates that a medication has been recorded against the patient's record.";
7550            case MEDICATIONADMINISTRATIONUPDATE: return "Update a Medication Administration record.";
7551            case ADMINNOTIFY: return "Notification of a change to an administrative resource (either create or update). Note that there is no delete, though some administrative resources have status or period elements for this use.";
7552            case DIAGNOSTICREPORTPROVIDE: return "Provide a diagnostic report, or update a previously provided diagnostic report.";
7553            case OBSERVATIONPROVIDE: return "Provide a simple observation or update a previously provided simple observation.";
7554            case PATIENTLINK: return "Notification that two patient records actually identify the same patient.";
7555            case PATIENTUNLINK: return "Notification that previous advice that two patient records concern the same patient is now considered incorrect.";
7556            case VALUESETEXPAND: return "The definition of a value set is used to create a simple collection of codes suitable for use for data entry or validation. An expanded value set will be returned, or an error message.";
7557            default: return "?";
7558          }
7559        }
7560        public String getDisplay() {
7561          switch (this) {
7562            case CODESYSTEMEXPAND: return "CodeSystem-expand";
7563            case MEDICATIONADMINISTRATIONCOMPLETE: return "MedicationAdministration-Complete";
7564            case MEDICATIONADMINISTRATIONNULLIFICATION: return "MedicationAdministration-Nullification";
7565            case MEDICATIONADMINISTRATIONRECORDING: return "MedicationAdministration-Recording";
7566            case MEDICATIONADMINISTRATIONUPDATE: return "MedicationAdministration-Update";
7567            case ADMINNOTIFY: return "admin-notify";
7568            case DIAGNOSTICREPORTPROVIDE: return "diagnosticreport-provide";
7569            case OBSERVATIONPROVIDE: return "observation-provide";
7570            case PATIENTLINK: return "patient-link";
7571            case PATIENTUNLINK: return "patient-unlink";
7572            case VALUESETEXPAND: return "valueset-expand";
7573            default: return "?";
7574          }
7575        }
7576    }
7577
7578  public static class MessageEventEnumFactory implements EnumFactory<MessageEvent> {
7579    public MessageEvent fromCode(String codeString) throws IllegalArgumentException {
7580      if (codeString == null || "".equals(codeString))
7581            if (codeString == null || "".equals(codeString))
7582                return null;
7583        if ("CodeSystem-expand".equals(codeString))
7584          return MessageEvent.CODESYSTEMEXPAND;
7585        if ("MedicationAdministration-Complete".equals(codeString))
7586          return MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE;
7587        if ("MedicationAdministration-Nullification".equals(codeString))
7588          return MessageEvent.MEDICATIONADMINISTRATIONNULLIFICATION;
7589        if ("MedicationAdministration-Recording".equals(codeString))
7590          return MessageEvent.MEDICATIONADMINISTRATIONRECORDING;
7591        if ("MedicationAdministration-Update".equals(codeString))
7592          return MessageEvent.MEDICATIONADMINISTRATIONUPDATE;
7593        if ("admin-notify".equals(codeString))
7594          return MessageEvent.ADMINNOTIFY;
7595        if ("diagnosticreport-provide".equals(codeString))
7596          return MessageEvent.DIAGNOSTICREPORTPROVIDE;
7597        if ("observation-provide".equals(codeString))
7598          return MessageEvent.OBSERVATIONPROVIDE;
7599        if ("patient-link".equals(codeString))
7600          return MessageEvent.PATIENTLINK;
7601        if ("patient-unlink".equals(codeString))
7602          return MessageEvent.PATIENTUNLINK;
7603        if ("valueset-expand".equals(codeString))
7604          return MessageEvent.VALUESETEXPAND;
7605        throw new IllegalArgumentException("Unknown MessageEvent code '"+codeString+"'");
7606        }
7607        public Enumeration<MessageEvent> fromType(Base code) throws FHIRException {
7608          if (code == null || code.isEmpty())
7609            return null;
7610          String codeString = ((PrimitiveType) code).asStringValue();
7611          if (codeString == null || "".equals(codeString))
7612            return null;
7613        if ("CodeSystem-expand".equals(codeString))
7614          return new Enumeration<MessageEvent>(this, MessageEvent.CODESYSTEMEXPAND);
7615        if ("MedicationAdministration-Complete".equals(codeString))
7616          return new Enumeration<MessageEvent>(this, MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE);
7617        if ("MedicationAdministration-Nullification".equals(codeString))
7618          return new Enumeration<MessageEvent>(this, MessageEvent.MEDICATIONADMINISTRATIONNULLIFICATION);
7619        if ("MedicationAdministration-Recording".equals(codeString))
7620          return new Enumeration<MessageEvent>(this, MessageEvent.MEDICATIONADMINISTRATIONRECORDING);
7621        if ("MedicationAdministration-Update".equals(codeString))
7622          return new Enumeration<MessageEvent>(this, MessageEvent.MEDICATIONADMINISTRATIONUPDATE);
7623        if ("admin-notify".equals(codeString))
7624          return new Enumeration<MessageEvent>(this, MessageEvent.ADMINNOTIFY);
7625        if ("diagnosticreport-provide".equals(codeString))
7626          return new Enumeration<MessageEvent>(this, MessageEvent.DIAGNOSTICREPORTPROVIDE);
7627        if ("observation-provide".equals(codeString))
7628          return new Enumeration<MessageEvent>(this, MessageEvent.OBSERVATIONPROVIDE);
7629        if ("patient-link".equals(codeString))
7630          return new Enumeration<MessageEvent>(this, MessageEvent.PATIENTLINK);
7631        if ("patient-unlink".equals(codeString))
7632          return new Enumeration<MessageEvent>(this, MessageEvent.PATIENTUNLINK);
7633        if ("valueset-expand".equals(codeString))
7634          return new Enumeration<MessageEvent>(this, MessageEvent.VALUESETEXPAND);
7635        throw new FHIRException("Unknown MessageEvent code '"+codeString+"'");
7636        }
7637    public String toCode(MessageEvent code) {
7638      if (code == MessageEvent.CODESYSTEMEXPAND)
7639        return "CodeSystem-expand";
7640      if (code == MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE)
7641        return "MedicationAdministration-Complete";
7642      if (code == MessageEvent.MEDICATIONADMINISTRATIONNULLIFICATION)
7643        return "MedicationAdministration-Nullification";
7644      if (code == MessageEvent.MEDICATIONADMINISTRATIONRECORDING)
7645        return "MedicationAdministration-Recording";
7646      if (code == MessageEvent.MEDICATIONADMINISTRATIONUPDATE)
7647        return "MedicationAdministration-Update";
7648      if (code == MessageEvent.ADMINNOTIFY)
7649        return "admin-notify";
7650      if (code == MessageEvent.DIAGNOSTICREPORTPROVIDE)
7651        return "diagnosticreport-provide";
7652      if (code == MessageEvent.OBSERVATIONPROVIDE)
7653        return "observation-provide";
7654      if (code == MessageEvent.PATIENTLINK)
7655        return "patient-link";
7656      if (code == MessageEvent.PATIENTUNLINK)
7657        return "patient-unlink";
7658      if (code == MessageEvent.VALUESETEXPAND)
7659        return "valueset-expand";
7660      return "?";
7661      }
7662    public String toSystem(MessageEvent code) {
7663      return code.getSystem();
7664      }
7665    }
7666
7667    public enum NoteType {
7668        /**
7669         * Display the note.
7670         */
7671        DISPLAY, 
7672        /**
7673         * Print the note on the form.
7674         */
7675        PRINT, 
7676        /**
7677         * Print the note for the operator.
7678         */
7679        PRINTOPER, 
7680        /**
7681         * added to help the parsers
7682         */
7683        NULL;
7684        public static NoteType fromCode(String codeString) throws FHIRException {
7685            if (codeString == null || "".equals(codeString))
7686                return null;
7687        if ("display".equals(codeString))
7688          return DISPLAY;
7689        if ("print".equals(codeString))
7690          return PRINT;
7691        if ("printoper".equals(codeString))
7692          return PRINTOPER;
7693        throw new FHIRException("Unknown NoteType code '"+codeString+"'");
7694        }
7695        public String toCode() {
7696          switch (this) {
7697            case DISPLAY: return "display";
7698            case PRINT: return "print";
7699            case PRINTOPER: return "printoper";
7700            default: return "?";
7701          }
7702        }
7703        public String getSystem() {
7704          switch (this) {
7705            case DISPLAY: return "http://hl7.org/fhir/note-type";
7706            case PRINT: return "http://hl7.org/fhir/note-type";
7707            case PRINTOPER: return "http://hl7.org/fhir/note-type";
7708            default: return "?";
7709          }
7710        }
7711        public String getDefinition() {
7712          switch (this) {
7713            case DISPLAY: return "Display the note.";
7714            case PRINT: return "Print the note on the form.";
7715            case PRINTOPER: return "Print the note for the operator.";
7716            default: return "?";
7717          }
7718        }
7719        public String getDisplay() {
7720          switch (this) {
7721            case DISPLAY: return "Display";
7722            case PRINT: return "Print (Form)";
7723            case PRINTOPER: return "Print (Operator)";
7724            default: return "?";
7725          }
7726        }
7727    }
7728
7729  public static class NoteTypeEnumFactory implements EnumFactory<NoteType> {
7730    public NoteType fromCode(String codeString) throws IllegalArgumentException {
7731      if (codeString == null || "".equals(codeString))
7732            if (codeString == null || "".equals(codeString))
7733                return null;
7734        if ("display".equals(codeString))
7735          return NoteType.DISPLAY;
7736        if ("print".equals(codeString))
7737          return NoteType.PRINT;
7738        if ("printoper".equals(codeString))
7739          return NoteType.PRINTOPER;
7740        throw new IllegalArgumentException("Unknown NoteType code '"+codeString+"'");
7741        }
7742        public Enumeration<NoteType> fromType(Base code) throws FHIRException {
7743          if (code == null || code.isEmpty())
7744            return null;
7745          String codeString = ((PrimitiveType) code).asStringValue();
7746          if (codeString == null || "".equals(codeString))
7747            return null;
7748        if ("display".equals(codeString))
7749          return new Enumeration<NoteType>(this, NoteType.DISPLAY);
7750        if ("print".equals(codeString))
7751          return new Enumeration<NoteType>(this, NoteType.PRINT);
7752        if ("printoper".equals(codeString))
7753          return new Enumeration<NoteType>(this, NoteType.PRINTOPER);
7754        throw new FHIRException("Unknown NoteType code '"+codeString+"'");
7755        }
7756    public String toCode(NoteType code) {
7757      if (code == NoteType.DISPLAY)
7758        return "display";
7759      if (code == NoteType.PRINT)
7760        return "print";
7761      if (code == NoteType.PRINTOPER)
7762        return "printoper";
7763      return "?";
7764      }
7765    public String toSystem(NoteType code) {
7766      return code.getSystem();
7767      }
7768    }
7769
7770    public enum RemittanceOutcome {
7771        /**
7772         * The processing completed without errors.
7773         */
7774        COMPLETE, 
7775        /**
7776         * The processing identified errors.
7777         */
7778        ERROR, 
7779        /**
7780         * added to help the parsers
7781         */
7782        NULL;
7783        public static RemittanceOutcome fromCode(String codeString) throws FHIRException {
7784            if (codeString == null || "".equals(codeString))
7785                return null;
7786        if ("complete".equals(codeString))
7787          return COMPLETE;
7788        if ("error".equals(codeString))
7789          return ERROR;
7790        throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'");
7791        }
7792        public String toCode() {
7793          switch (this) {
7794            case COMPLETE: return "complete";
7795            case ERROR: return "error";
7796            default: return "?";
7797          }
7798        }
7799        public String getSystem() {
7800          switch (this) {
7801            case COMPLETE: return "http://hl7.org/fhir/remittance-outcome";
7802            case ERROR: return "http://hl7.org/fhir/remittance-outcome";
7803            default: return "?";
7804          }
7805        }
7806        public String getDefinition() {
7807          switch (this) {
7808            case COMPLETE: return "The processing completed without errors.";
7809            case ERROR: return "The processing identified errors.";
7810            default: return "?";
7811          }
7812        }
7813        public String getDisplay() {
7814          switch (this) {
7815            case COMPLETE: return "Complete";
7816            case ERROR: return "Error";
7817            default: return "?";
7818          }
7819        }
7820    }
7821
7822  public static class RemittanceOutcomeEnumFactory implements EnumFactory<RemittanceOutcome> {
7823    public RemittanceOutcome fromCode(String codeString) throws IllegalArgumentException {
7824      if (codeString == null || "".equals(codeString))
7825            if (codeString == null || "".equals(codeString))
7826                return null;
7827        if ("complete".equals(codeString))
7828          return RemittanceOutcome.COMPLETE;
7829        if ("error".equals(codeString))
7830          return RemittanceOutcome.ERROR;
7831        throw new IllegalArgumentException("Unknown RemittanceOutcome code '"+codeString+"'");
7832        }
7833        public Enumeration<RemittanceOutcome> fromType(Base code) throws FHIRException {
7834          if (code == null || code.isEmpty())
7835            return null;
7836          String codeString = ((PrimitiveType) code).asStringValue();
7837          if (codeString == null || "".equals(codeString))
7838            return null;
7839        if ("complete".equals(codeString))
7840          return new Enumeration<RemittanceOutcome>(this, RemittanceOutcome.COMPLETE);
7841        if ("error".equals(codeString))
7842          return new Enumeration<RemittanceOutcome>(this, RemittanceOutcome.ERROR);
7843        throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'");
7844        }
7845    public String toCode(RemittanceOutcome code) {
7846      if (code == RemittanceOutcome.COMPLETE)
7847        return "complete";
7848      if (code == RemittanceOutcome.ERROR)
7849        return "error";
7850      return "?";
7851      }
7852    public String toSystem(RemittanceOutcome code) {
7853      return code.getSystem();
7854      }
7855    }
7856
7857    public enum ResourceType {
7858        /**
7859         * A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centres, etc.
7860         */
7861        ACCOUNT, 
7862        /**
7863         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
7864         */
7865        ALLERGYINTOLERANCE, 
7866        /**
7867         * 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).
7868         */
7869        APPOINTMENT, 
7870        /**
7871         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
7872         */
7873        APPOINTMENTRESPONSE, 
7874        /**
7875         * 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.
7876         */
7877        AUDITEVENT, 
7878        /**
7879         * 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.
7880         */
7881        BASIC, 
7882        /**
7883         * A binary resource can contain any content, whether text, image, pdf, zip archive, etc.
7884         */
7885        BINARY, 
7886        /**
7887         * Record details about the anatomical location of a specimen or body part.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.
7888         */
7889        BODYSITE, 
7890        /**
7891         * A container for a collection of resources.
7892         */
7893        BUNDLE, 
7894        /**
7895         * 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.
7896         */
7897        CAREPLAN, 
7898        /**
7899         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
7900         */
7901        CARETEAM, 
7902        /**
7903         * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.
7904         */
7905        CLAIM, 
7906        /**
7907         * This resource provides the adjudication details from the processing of a Claim resource.
7908         */
7909        CLAIMRESPONSE, 
7910        /**
7911         * 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.
7912         */
7913        CLINICALIMPRESSION, 
7914        /**
7915         * A code system resource specifies a set of codes drawn from one or more code systems.
7916         */
7917        CODESYSTEM, 
7918        /**
7919         * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition.
7920         */
7921        COMMUNICATION, 
7922        /**
7923         * 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.
7924         */
7925        COMMUNICATIONREQUEST, 
7926        /**
7927         * A compartment definition that defines how resources are accessed on a server.
7928         */
7929        COMPARTMENTDEFINITION, 
7930        /**
7931         * A set of healthcare-related information that is assembled together into a single logical document 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. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained.
7932         */
7933        COMPOSITION, 
7934        /**
7935         * A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models.
7936         */
7937        CONCEPTMAP, 
7938        /**
7939         * Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary.
7940         */
7941        CONDITION, 
7942        /**
7943         * A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
7944         */
7945        CONFORMANCE, 
7946        /**
7947         * A formal agreement between parties regarding the conduct of business, exchange of information or other matters.
7948         */
7949        CONTRACT, 
7950        /**
7951         * Financial instrument which may be used to pay for or reimburse health care products and services.
7952         */
7953        COVERAGE, 
7954        /**
7955         * The formal description of a single piece of information that can be gathered and reported.
7956         */
7957        DATAELEMENT, 
7958        /**
7959         * This resource defines a decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of a actions that should be taken whenever some condition is met in response to a particular event or events.
7960         */
7961        DECISIONSUPPORTRULE, 
7962        /**
7963         * The DecisionSupportServiceModule describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.
7964         */
7965        DECISIONSUPPORTSERVICEMODULE, 
7966        /**
7967         * 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.
7968         */
7969        DETECTEDISSUE, 
7970        /**
7971         * This resource identifies an instance or 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.  Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.  Non-medical devices may include items such as a machine, cellphone, computer, application, etc.
7972         */
7973        DEVICE, 
7974        /**
7975         * Describes the characteristics, operational status and capabilities of a medical-related component of a medical device.
7976         */
7977        DEVICECOMPONENT, 
7978        /**
7979         * Describes a measurement, calculation or setting capability of a medical device.
7980         */
7981        DEVICEMETRIC, 
7982        /**
7983         * 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.
7984         */
7985        DEVICEUSEREQUEST, 
7986        /**
7987         * 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.
7988         */
7989        DEVICEUSESTATEMENT, 
7990        /**
7991         * A record of a request for a diagnostic investigation service to be performed.
7992         */
7993        DIAGNOSTICORDER, 
7994        /**
7995         * 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.
7996         */
7997        DIAGNOSTICREPORT, 
7998        /**
7999         * A manifest that defines a set of documents.
8000         */
8001        DOCUMENTMANIFEST, 
8002        /**
8003         * A reference to a document .
8004         */
8005        DOCUMENTREFERENCE, 
8006        /**
8007         * A resource that includes narrative, extensions, and contained resources.
8008         */
8009        DOMAINRESOURCE, 
8010        /**
8011         * This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service.
8012         */
8013        ELIGIBILITYREQUEST, 
8014        /**
8015         * This resource provides eligibility and plan details from the processing of an Eligibility resource.
8016         */
8017        ELIGIBILITYRESPONSE, 
8018        /**
8019         * 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.
8020         */
8021        ENCOUNTER, 
8022        /**
8023         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
8024         */
8025        ENROLLMENTREQUEST, 
8026        /**
8027         * This resource provides enrollment and plan details from the processing of an Enrollment resource.
8028         */
8029        ENROLLMENTRESPONSE, 
8030        /**
8031         * 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.
8032         */
8033        EPISODEOFCARE, 
8034        /**
8035         * Resource to define constraints on the Expansion of a FHIR ValueSet.
8036         */
8037        EXPANSIONPROFILE, 
8038        /**
8039         * 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.
8040         */
8041        EXPLANATIONOFBENEFIT, 
8042        /**
8043         * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.
8044         */
8045        FAMILYMEMBERHISTORY, 
8046        /**
8047         * Prospective warnings of potential issues when providing care to the patient.
8048         */
8049        FLAG, 
8050        /**
8051         * 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.
8052         */
8053        GOAL, 
8054        /**
8055         * 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.
8056         */
8057        GROUP, 
8058        /**
8059         * 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.
8060         */
8061        GUIDANCERESPONSE, 
8062        /**
8063         * The details of a healthcare service available at a location.
8064         */
8065        HEALTHCARESERVICE, 
8066        /**
8067         * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances).  The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on.
8068         */
8069        IMAGINGEXCERPT, 
8070        /**
8071         * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances).  The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on.
8072         */
8073        IMAGINGOBJECTSELECTION, 
8074        /**
8075         * 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.
8076         */
8077        IMAGINGSTUDY, 
8078        /**
8079         * Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed.
8080         */
8081        IMMUNIZATION, 
8082        /**
8083         * A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification.
8084         */
8085        IMMUNIZATIONRECOMMENDATION, 
8086        /**
8087         * A set of rules or how FHIR is used to solve a particular problem. 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.
8088         */
8089        IMPLEMENTATIONGUIDE, 
8090        /**
8091         * The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library.
8092         */
8093        LIBRARY, 
8094        /**
8095         * Identifies two or more records (resource instances) that are referring to the same real-world "occurrence".
8096         */
8097        LINKAGE, 
8098        /**
8099         * A set of information summarized from a list of other resources.
8100         */
8101        LIST, 
8102        /**
8103         * Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.
8104         */
8105        LOCATION, 
8106        /**
8107         * The Measure resource provides the definition of a quality measure.
8108         */
8109        MEASURE, 
8110        /**
8111         * The MeasureReport resource contains the results of evaluating a measure.
8112         */
8113        MEASUREREPORT, 
8114        /**
8115         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
8116         */
8117        MEDIA, 
8118        /**
8119         * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.
8120         */
8121        MEDICATION, 
8122        /**
8123         * 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.
8124         */
8125        MEDICATIONADMINISTRATION, 
8126        /**
8127         * 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.
8128         */
8129        MEDICATIONDISPENSE, 
8130        /**
8131         * An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationOrder" rather than "MedicationPrescription" to generalize the use across inpatient and outpatient settings as well as for care plans, etc.
8132         */
8133        MEDICATIONORDER, 
8134        /**
8135         * 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 e.g. the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains 
8136
8137The 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.
8138         */
8139        MEDICATIONSTATEMENT, 
8140        /**
8141         * 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.
8142         */
8143        MESSAGEHEADER, 
8144        /**
8145         * The ModuleDefinition resource defines the data requirements for a quality artifact.
8146         */
8147        MODULEDEFINITION, 
8148        /**
8149         * 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.
8150         */
8151        NAMINGSYSTEM, 
8152        /**
8153         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
8154         */
8155        NUTRITIONORDER, 
8156        /**
8157         * Measurements and simple assertions made about a patient, device or other subject.
8158         */
8159        OBSERVATION, 
8160        /**
8161         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
8162         */
8163        OPERATIONDEFINITION, 
8164        /**
8165         * A collection of error, warning or information messages that result from a system action.
8166         */
8167        OPERATIONOUTCOME, 
8168        /**
8169         * A request to perform an action.
8170         */
8171        ORDER, 
8172        /**
8173         * A response to an order.
8174         */
8175        ORDERRESPONSE, 
8176        /**
8177         * This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support.
8178         */
8179        ORDERSET, 
8180        /**
8181         * 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, etc.
8182         */
8183        ORGANIZATION, 
8184        /**
8185         * This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it.
8186         */
8187        PARAMETERS, 
8188        /**
8189         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
8190         */
8191        PATIENT, 
8192        /**
8193         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
8194         */
8195        PAYMENTNOTICE, 
8196        /**
8197         * This resource provides payment details and claim references supporting a bulk payment.
8198         */
8199        PAYMENTRECONCILIATION, 
8200        /**
8201         * Demographics and administrative information about a person independent of a specific health-related context.
8202         */
8203        PERSON, 
8204        /**
8205         * A person who is directly or indirectly involved in the provisioning of healthcare.
8206         */
8207        PRACTITIONER, 
8208        /**
8209         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
8210         */
8211        PRACTITIONERROLE, 
8212        /**
8213         * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy.
8214         */
8215        PROCEDURE, 
8216        /**
8217         * A request for a procedure to be performed. May be a proposal or an order.
8218         */
8219        PROCEDUREREQUEST, 
8220        /**
8221         * This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources.
8222         */
8223        PROCESSREQUEST, 
8224        /**
8225         * This resource provides processing status, errors and notes from the processing of a resource.
8226         */
8227        PROCESSRESPONSE, 
8228        /**
8229         * A definition of behaviors to be taken in particular circumstances, often including conditions, options and other decision points.
8230         */
8231        PROTOCOL, 
8232        /**
8233         * 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.
8234         */
8235        PROVENANCE, 
8236        /**
8237         * A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.
8238         */
8239        QUESTIONNAIRE, 
8240        /**
8241         * 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 underlying questions.
8242         */
8243        QUESTIONNAIRERESPONSE, 
8244        /**
8245         * Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization.
8246         */
8247        REFERRALREQUEST, 
8248        /**
8249         * 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.
8250         */
8251        RELATEDPERSON, 
8252        /**
8253         * This is the base resource type for everything.
8254         */
8255        RESOURCE, 
8256        /**
8257         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
8258         */
8259        RISKASSESSMENT, 
8260        /**
8261         * A container for slot(s) of time that may be available for booking appointments.
8262         */
8263        SCHEDULE, 
8264        /**
8265         * A search parameter that defines a named search item that can be used to search/filter on a resource.
8266         */
8267        SEARCHPARAMETER, 
8268        /**
8269         * Variation and Sequence data.
8270         */
8271        SEQUENCE, 
8272        /**
8273         * A slot of time on a schedule that may be available for booking appointments.
8274         */
8275        SLOT, 
8276        /**
8277         * A sample to be used for analysis.
8278         */
8279        SPECIMEN, 
8280        /**
8281         * 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.
8282         */
8283        STRUCTUREDEFINITION, 
8284        /**
8285         * A Map of relationships between 2 structures that can be used to transform data.
8286         */
8287        STRUCTUREMAP, 
8288        /**
8289         * 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 is able to take an appropriate action.
8290         */
8291        SUBSCRIPTION, 
8292        /**
8293         * A homogeneous material with a definite composition.
8294         */
8295        SUBSTANCE, 
8296        /**
8297         * Record of delivery of what is supplied.
8298         */
8299        SUPPLYDELIVERY, 
8300        /**
8301         * A record of a request for a medication, substance or device used in the healthcare setting.
8302         */
8303        SUPPLYREQUEST, 
8304        /**
8305         * A task to be performed.
8306         */
8307        TASK, 
8308        /**
8309         * TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification.
8310         */
8311        TESTSCRIPT, 
8312        /**
8313         * A value set specifies a set of codes drawn from one or more code systems.
8314         */
8315        VALUESET, 
8316        /**
8317         * An authorization for the supply of glasses and/or contact lenses to a patient.
8318         */
8319        VISIONPRESCRIPTION, 
8320        /**
8321         * added to help the parsers
8322         */
8323        NULL;
8324        public static ResourceType fromCode(String codeString) throws FHIRException {
8325            if (codeString == null || "".equals(codeString))
8326                return null;
8327        if ("Account".equals(codeString))
8328          return ACCOUNT;
8329        if ("AllergyIntolerance".equals(codeString))
8330          return ALLERGYINTOLERANCE;
8331        if ("Appointment".equals(codeString))
8332          return APPOINTMENT;
8333        if ("AppointmentResponse".equals(codeString))
8334          return APPOINTMENTRESPONSE;
8335        if ("AuditEvent".equals(codeString))
8336          return AUDITEVENT;
8337        if ("Basic".equals(codeString))
8338          return BASIC;
8339        if ("Binary".equals(codeString))
8340          return BINARY;
8341        if ("BodySite".equals(codeString))
8342          return BODYSITE;
8343        if ("Bundle".equals(codeString))
8344          return BUNDLE;
8345        if ("CarePlan".equals(codeString))
8346          return CAREPLAN;
8347        if ("CareTeam".equals(codeString))
8348          return CARETEAM;
8349        if ("Claim".equals(codeString))
8350          return CLAIM;
8351        if ("ClaimResponse".equals(codeString))
8352          return CLAIMRESPONSE;
8353        if ("ClinicalImpression".equals(codeString))
8354          return CLINICALIMPRESSION;
8355        if ("CodeSystem".equals(codeString))
8356          return CODESYSTEM;
8357        if ("Communication".equals(codeString))
8358          return COMMUNICATION;
8359        if ("CommunicationRequest".equals(codeString))
8360          return COMMUNICATIONREQUEST;
8361        if ("CompartmentDefinition".equals(codeString))
8362          return COMPARTMENTDEFINITION;
8363        if ("Composition".equals(codeString))
8364          return COMPOSITION;
8365        if ("ConceptMap".equals(codeString))
8366          return CONCEPTMAP;
8367        if ("Condition".equals(codeString))
8368          return CONDITION;
8369        if ("Conformance".equals(codeString))
8370          return CONFORMANCE;
8371        if ("Contract".equals(codeString))
8372          return CONTRACT;
8373        if ("Coverage".equals(codeString))
8374          return COVERAGE;
8375        if ("DataElement".equals(codeString))
8376          return DATAELEMENT;
8377        if ("DecisionSupportRule".equals(codeString))
8378          return DECISIONSUPPORTRULE;
8379        if ("DecisionSupportServiceModule".equals(codeString))
8380          return DECISIONSUPPORTSERVICEMODULE;
8381        if ("DetectedIssue".equals(codeString))
8382          return DETECTEDISSUE;
8383        if ("Device".equals(codeString))
8384          return DEVICE;
8385        if ("DeviceComponent".equals(codeString))
8386          return DEVICECOMPONENT;
8387        if ("DeviceMetric".equals(codeString))
8388          return DEVICEMETRIC;
8389        if ("DeviceUseRequest".equals(codeString))
8390          return DEVICEUSEREQUEST;
8391        if ("DeviceUseStatement".equals(codeString))
8392          return DEVICEUSESTATEMENT;
8393        if ("DiagnosticOrder".equals(codeString))
8394          return DIAGNOSTICORDER;
8395        if ("DiagnosticReport".equals(codeString))
8396          return DIAGNOSTICREPORT;
8397        if ("DocumentManifest".equals(codeString))
8398          return DOCUMENTMANIFEST;
8399        if ("DocumentReference".equals(codeString))
8400          return DOCUMENTREFERENCE;
8401        if ("DomainResource".equals(codeString))
8402          return DOMAINRESOURCE;
8403        if ("EligibilityRequest".equals(codeString))
8404          return ELIGIBILITYREQUEST;
8405        if ("EligibilityResponse".equals(codeString))
8406          return ELIGIBILITYRESPONSE;
8407        if ("Encounter".equals(codeString))
8408          return ENCOUNTER;
8409        if ("EnrollmentRequest".equals(codeString))
8410          return ENROLLMENTREQUEST;
8411        if ("EnrollmentResponse".equals(codeString))
8412          return ENROLLMENTRESPONSE;
8413        if ("EpisodeOfCare".equals(codeString))
8414          return EPISODEOFCARE;
8415        if ("ExpansionProfile".equals(codeString))
8416          return EXPANSIONPROFILE;
8417        if ("ExplanationOfBenefit".equals(codeString))
8418          return EXPLANATIONOFBENEFIT;
8419        if ("FamilyMemberHistory".equals(codeString))
8420          return FAMILYMEMBERHISTORY;
8421        if ("Flag".equals(codeString))
8422          return FLAG;
8423        if ("Goal".equals(codeString))
8424          return GOAL;
8425        if ("Group".equals(codeString))
8426          return GROUP;
8427        if ("GuidanceResponse".equals(codeString))
8428          return GUIDANCERESPONSE;
8429        if ("HealthcareService".equals(codeString))
8430          return HEALTHCARESERVICE;
8431        if ("ImagingExcerpt".equals(codeString))
8432          return IMAGINGEXCERPT;
8433        if ("ImagingObjectSelection".equals(codeString))
8434          return IMAGINGOBJECTSELECTION;
8435        if ("ImagingStudy".equals(codeString))
8436          return IMAGINGSTUDY;
8437        if ("Immunization".equals(codeString))
8438          return IMMUNIZATION;
8439        if ("ImmunizationRecommendation".equals(codeString))
8440          return IMMUNIZATIONRECOMMENDATION;
8441        if ("ImplementationGuide".equals(codeString))
8442          return IMPLEMENTATIONGUIDE;
8443        if ("Library".equals(codeString))
8444          return LIBRARY;
8445        if ("Linkage".equals(codeString))
8446          return LINKAGE;
8447        if ("List".equals(codeString))
8448          return LIST;
8449        if ("Location".equals(codeString))
8450          return LOCATION;
8451        if ("Measure".equals(codeString))
8452          return MEASURE;
8453        if ("MeasureReport".equals(codeString))
8454          return MEASUREREPORT;
8455        if ("Media".equals(codeString))
8456          return MEDIA;
8457        if ("Medication".equals(codeString))
8458          return MEDICATION;
8459        if ("MedicationAdministration".equals(codeString))
8460          return MEDICATIONADMINISTRATION;
8461        if ("MedicationDispense".equals(codeString))
8462          return MEDICATIONDISPENSE;
8463        if ("MedicationOrder".equals(codeString))
8464          return MEDICATIONORDER;
8465        if ("MedicationStatement".equals(codeString))
8466          return MEDICATIONSTATEMENT;
8467        if ("MessageHeader".equals(codeString))
8468          return MESSAGEHEADER;
8469        if ("ModuleDefinition".equals(codeString))
8470          return MODULEDEFINITION;
8471        if ("NamingSystem".equals(codeString))
8472          return NAMINGSYSTEM;
8473        if ("NutritionOrder".equals(codeString))
8474          return NUTRITIONORDER;
8475        if ("Observation".equals(codeString))
8476          return OBSERVATION;
8477        if ("OperationDefinition".equals(codeString))
8478          return OPERATIONDEFINITION;
8479        if ("OperationOutcome".equals(codeString))
8480          return OPERATIONOUTCOME;
8481        if ("Order".equals(codeString))
8482          return ORDER;
8483        if ("OrderResponse".equals(codeString))
8484          return ORDERRESPONSE;
8485        if ("OrderSet".equals(codeString))
8486          return ORDERSET;
8487        if ("Organization".equals(codeString))
8488          return ORGANIZATION;
8489        if ("Parameters".equals(codeString))
8490          return PARAMETERS;
8491        if ("Patient".equals(codeString))
8492          return PATIENT;
8493        if ("PaymentNotice".equals(codeString))
8494          return PAYMENTNOTICE;
8495        if ("PaymentReconciliation".equals(codeString))
8496          return PAYMENTRECONCILIATION;
8497        if ("Person".equals(codeString))
8498          return PERSON;
8499        if ("Practitioner".equals(codeString))
8500          return PRACTITIONER;
8501        if ("PractitionerRole".equals(codeString))
8502          return PRACTITIONERROLE;
8503        if ("Procedure".equals(codeString))
8504          return PROCEDURE;
8505        if ("ProcedureRequest".equals(codeString))
8506          return PROCEDUREREQUEST;
8507        if ("ProcessRequest".equals(codeString))
8508          return PROCESSREQUEST;
8509        if ("ProcessResponse".equals(codeString))
8510          return PROCESSRESPONSE;
8511        if ("Protocol".equals(codeString))
8512          return PROTOCOL;
8513        if ("Provenance".equals(codeString))
8514          return PROVENANCE;
8515        if ("Questionnaire".equals(codeString))
8516          return QUESTIONNAIRE;
8517        if ("QuestionnaireResponse".equals(codeString))
8518          return QUESTIONNAIRERESPONSE;
8519        if ("ReferralRequest".equals(codeString))
8520          return REFERRALREQUEST;
8521        if ("RelatedPerson".equals(codeString))
8522          return RELATEDPERSON;
8523        if ("Resource".equals(codeString))
8524          return RESOURCE;
8525        if ("RiskAssessment".equals(codeString))
8526          return RISKASSESSMENT;
8527        if ("Schedule".equals(codeString))
8528          return SCHEDULE;
8529        if ("SearchParameter".equals(codeString))
8530          return SEARCHPARAMETER;
8531        if ("Sequence".equals(codeString))
8532          return SEQUENCE;
8533        if ("Slot".equals(codeString))
8534          return SLOT;
8535        if ("Specimen".equals(codeString))
8536          return SPECIMEN;
8537        if ("StructureDefinition".equals(codeString))
8538          return STRUCTUREDEFINITION;
8539        if ("StructureMap".equals(codeString))
8540          return STRUCTUREMAP;
8541        if ("Subscription".equals(codeString))
8542          return SUBSCRIPTION;
8543        if ("Substance".equals(codeString))
8544          return SUBSTANCE;
8545        if ("SupplyDelivery".equals(codeString))
8546          return SUPPLYDELIVERY;
8547        if ("SupplyRequest".equals(codeString))
8548          return SUPPLYREQUEST;
8549        if ("Task".equals(codeString))
8550          return TASK;
8551        if ("TestScript".equals(codeString))
8552          return TESTSCRIPT;
8553        if ("ValueSet".equals(codeString))
8554          return VALUESET;
8555        if ("VisionPrescription".equals(codeString))
8556          return VISIONPRESCRIPTION;
8557        throw new FHIRException("Unknown ResourceType code '"+codeString+"'");
8558        }
8559        public String toCode() {
8560          switch (this) {
8561            case ACCOUNT: return "Account";
8562            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
8563            case APPOINTMENT: return "Appointment";
8564            case APPOINTMENTRESPONSE: return "AppointmentResponse";
8565            case AUDITEVENT: return "AuditEvent";
8566            case BASIC: return "Basic";
8567            case BINARY: return "Binary";
8568            case BODYSITE: return "BodySite";
8569            case BUNDLE: return "Bundle";
8570            case CAREPLAN: return "CarePlan";
8571            case CARETEAM: return "CareTeam";
8572            case CLAIM: return "Claim";
8573            case CLAIMRESPONSE: return "ClaimResponse";
8574            case CLINICALIMPRESSION: return "ClinicalImpression";
8575            case CODESYSTEM: return "CodeSystem";
8576            case COMMUNICATION: return "Communication";
8577            case COMMUNICATIONREQUEST: return "CommunicationRequest";
8578            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
8579            case COMPOSITION: return "Composition";
8580            case CONCEPTMAP: return "ConceptMap";
8581            case CONDITION: return "Condition";
8582            case CONFORMANCE: return "Conformance";
8583            case CONTRACT: return "Contract";
8584            case COVERAGE: return "Coverage";
8585            case DATAELEMENT: return "DataElement";
8586            case DECISIONSUPPORTRULE: return "DecisionSupportRule";
8587            case DECISIONSUPPORTSERVICEMODULE: return "DecisionSupportServiceModule";
8588            case DETECTEDISSUE: return "DetectedIssue";
8589            case DEVICE: return "Device";
8590            case DEVICECOMPONENT: return "DeviceComponent";
8591            case DEVICEMETRIC: return "DeviceMetric";
8592            case DEVICEUSEREQUEST: return "DeviceUseRequest";
8593            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
8594            case DIAGNOSTICORDER: return "DiagnosticOrder";
8595            case DIAGNOSTICREPORT: return "DiagnosticReport";
8596            case DOCUMENTMANIFEST: return "DocumentManifest";
8597            case DOCUMENTREFERENCE: return "DocumentReference";
8598            case DOMAINRESOURCE: return "DomainResource";
8599            case ELIGIBILITYREQUEST: return "EligibilityRequest";
8600            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
8601            case ENCOUNTER: return "Encounter";
8602            case ENROLLMENTREQUEST: return "EnrollmentRequest";
8603            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
8604            case EPISODEOFCARE: return "EpisodeOfCare";
8605            case EXPANSIONPROFILE: return "ExpansionProfile";
8606            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
8607            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
8608            case FLAG: return "Flag";
8609            case GOAL: return "Goal";
8610            case GROUP: return "Group";
8611            case GUIDANCERESPONSE: return "GuidanceResponse";
8612            case HEALTHCARESERVICE: return "HealthcareService";
8613            case IMAGINGEXCERPT: return "ImagingExcerpt";
8614            case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection";
8615            case IMAGINGSTUDY: return "ImagingStudy";
8616            case IMMUNIZATION: return "Immunization";
8617            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
8618            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
8619            case LIBRARY: return "Library";
8620            case LINKAGE: return "Linkage";
8621            case LIST: return "List";
8622            case LOCATION: return "Location";
8623            case MEASURE: return "Measure";
8624            case MEASUREREPORT: return "MeasureReport";
8625            case MEDIA: return "Media";
8626            case MEDICATION: return "Medication";
8627            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
8628            case MEDICATIONDISPENSE: return "MedicationDispense";
8629            case MEDICATIONORDER: return "MedicationOrder";
8630            case MEDICATIONSTATEMENT: return "MedicationStatement";
8631            case MESSAGEHEADER: return "MessageHeader";
8632            case MODULEDEFINITION: return "ModuleDefinition";
8633            case NAMINGSYSTEM: return "NamingSystem";
8634            case NUTRITIONORDER: return "NutritionOrder";
8635            case OBSERVATION: return "Observation";
8636            case OPERATIONDEFINITION: return "OperationDefinition";
8637            case OPERATIONOUTCOME: return "OperationOutcome";
8638            case ORDER: return "Order";
8639            case ORDERRESPONSE: return "OrderResponse";
8640            case ORDERSET: return "OrderSet";
8641            case ORGANIZATION: return "Organization";
8642            case PARAMETERS: return "Parameters";
8643            case PATIENT: return "Patient";
8644            case PAYMENTNOTICE: return "PaymentNotice";
8645            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
8646            case PERSON: return "Person";
8647            case PRACTITIONER: return "Practitioner";
8648            case PRACTITIONERROLE: return "PractitionerRole";
8649            case PROCEDURE: return "Procedure";
8650            case PROCEDUREREQUEST: return "ProcedureRequest";
8651            case PROCESSREQUEST: return "ProcessRequest";
8652            case PROCESSRESPONSE: return "ProcessResponse";
8653            case PROTOCOL: return "Protocol";
8654            case PROVENANCE: return "Provenance";
8655            case QUESTIONNAIRE: return "Questionnaire";
8656            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
8657            case REFERRALREQUEST: return "ReferralRequest";
8658            case RELATEDPERSON: return "RelatedPerson";
8659            case RESOURCE: return "Resource";
8660            case RISKASSESSMENT: return "RiskAssessment";
8661            case SCHEDULE: return "Schedule";
8662            case SEARCHPARAMETER: return "SearchParameter";
8663            case SEQUENCE: return "Sequence";
8664            case SLOT: return "Slot";
8665            case SPECIMEN: return "Specimen";
8666            case STRUCTUREDEFINITION: return "StructureDefinition";
8667            case STRUCTUREMAP: return "StructureMap";
8668            case SUBSCRIPTION: return "Subscription";
8669            case SUBSTANCE: return "Substance";
8670            case SUPPLYDELIVERY: return "SupplyDelivery";
8671            case SUPPLYREQUEST: return "SupplyRequest";
8672            case TASK: return "Task";
8673            case TESTSCRIPT: return "TestScript";
8674            case VALUESET: return "ValueSet";
8675            case VISIONPRESCRIPTION: return "VisionPrescription";
8676            default: return "?";
8677          }
8678        }
8679        public String getSystem() {
8680          switch (this) {
8681            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
8682            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
8683            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
8684            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
8685            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
8686            case BASIC: return "http://hl7.org/fhir/resource-types";
8687            case BINARY: return "http://hl7.org/fhir/resource-types";
8688            case BODYSITE: return "http://hl7.org/fhir/resource-types";
8689            case BUNDLE: return "http://hl7.org/fhir/resource-types";
8690            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
8691            case CARETEAM: return "http://hl7.org/fhir/resource-types";
8692            case CLAIM: return "http://hl7.org/fhir/resource-types";
8693            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
8694            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
8695            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
8696            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
8697            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
8698            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
8699            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
8700            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
8701            case CONDITION: return "http://hl7.org/fhir/resource-types";
8702            case CONFORMANCE: return "http://hl7.org/fhir/resource-types";
8703            case CONTRACT: return "http://hl7.org/fhir/resource-types";
8704            case COVERAGE: return "http://hl7.org/fhir/resource-types";
8705            case DATAELEMENT: return "http://hl7.org/fhir/resource-types";
8706            case DECISIONSUPPORTRULE: return "http://hl7.org/fhir/resource-types";
8707            case DECISIONSUPPORTSERVICEMODULE: return "http://hl7.org/fhir/resource-types";
8708            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
8709            case DEVICE: return "http://hl7.org/fhir/resource-types";
8710            case DEVICECOMPONENT: return "http://hl7.org/fhir/resource-types";
8711            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
8712            case DEVICEUSEREQUEST: return "http://hl7.org/fhir/resource-types";
8713            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types";
8714            case DIAGNOSTICORDER: return "http://hl7.org/fhir/resource-types";
8715            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
8716            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
8717            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
8718            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
8719            case ELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
8720            case ELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
8721            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
8722            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
8723            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
8724            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
8725            case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types";
8726            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
8727            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
8728            case FLAG: return "http://hl7.org/fhir/resource-types";
8729            case GOAL: return "http://hl7.org/fhir/resource-types";
8730            case GROUP: return "http://hl7.org/fhir/resource-types";
8731            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
8732            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
8733            case IMAGINGEXCERPT: return "http://hl7.org/fhir/resource-types";
8734            case IMAGINGOBJECTSELECTION: return "http://hl7.org/fhir/resource-types";
8735            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
8736            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
8737            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
8738            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
8739            case LIBRARY: return "http://hl7.org/fhir/resource-types";
8740            case LINKAGE: return "http://hl7.org/fhir/resource-types";
8741            case LIST: return "http://hl7.org/fhir/resource-types";
8742            case LOCATION: return "http://hl7.org/fhir/resource-types";
8743            case MEASURE: return "http://hl7.org/fhir/resource-types";
8744            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
8745            case MEDIA: return "http://hl7.org/fhir/resource-types";
8746            case MEDICATION: return "http://hl7.org/fhir/resource-types";
8747            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
8748            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
8749            case MEDICATIONORDER: return "http://hl7.org/fhir/resource-types";
8750            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types";
8751            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
8752            case MODULEDEFINITION: return "http://hl7.org/fhir/resource-types";
8753            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
8754            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
8755            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
8756            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
8757            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
8758            case ORDER: return "http://hl7.org/fhir/resource-types";
8759            case ORDERRESPONSE: return "http://hl7.org/fhir/resource-types";
8760            case ORDERSET: return "http://hl7.org/fhir/resource-types";
8761            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
8762            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
8763            case PATIENT: return "http://hl7.org/fhir/resource-types";
8764            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
8765            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
8766            case PERSON: return "http://hl7.org/fhir/resource-types";
8767            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
8768            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
8769            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
8770            case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types";
8771            case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types";
8772            case PROCESSRESPONSE: return "http://hl7.org/fhir/resource-types";
8773            case PROTOCOL: return "http://hl7.org/fhir/resource-types";
8774            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
8775            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
8776            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
8777            case REFERRALREQUEST: return "http://hl7.org/fhir/resource-types";
8778            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
8779            case RESOURCE: return "http://hl7.org/fhir/resource-types";
8780            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
8781            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
8782            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
8783            case SEQUENCE: return "http://hl7.org/fhir/resource-types";
8784            case SLOT: return "http://hl7.org/fhir/resource-types";
8785            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
8786            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
8787            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
8788            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
8789            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
8790            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
8791            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
8792            case TASK: return "http://hl7.org/fhir/resource-types";
8793            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
8794            case VALUESET: return "http://hl7.org/fhir/resource-types";
8795            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
8796            default: return "?";
8797          }
8798        }
8799        public String getDefinition() {
8800          switch (this) {
8801            case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centres, etc.";
8802            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
8803            case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).";
8804            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
8805            case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.";
8806            case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.";
8807            case BINARY: return "A binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
8808            case BODYSITE: return "Record details about the anatomical location of a specimen or body part.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.";
8809            case BUNDLE: return "A container for a collection of resources.";
8810            case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.";
8811            case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.";
8812            case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.";
8813            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
8814            case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score.";
8815            case CODESYSTEM: return "A code system resource specifies a set of codes drawn from one or more code systems.";
8816            case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition.";
8817            case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.";
8818            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
8819            case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical document 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. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained.";
8820            case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models.";
8821            case CONDITION: return "Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary.";
8822            case CONFORMANCE: return "A conformance statement is a set of capabilities of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
8823            case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters.";
8824            case COVERAGE: return "Financial instrument which may be used to pay for or reimburse health care products and services.";
8825            case DATAELEMENT: return "The formal description of a single piece of information that can be gathered and reported.";
8826            case DECISIONSUPPORTRULE: return "This resource defines a decision support rule of the form [on Event] if Condition then Action. It is intended to be a shareable, computable definition of a actions that should be taken whenever some condition is met in response to a particular event or events.";
8827            case DECISIONSUPPORTSERVICEMODULE: return "The DecisionSupportServiceModule describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.";
8828            case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.";
8829            case DEVICE: return "This resource identifies an instance or 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.  Medical devices includes durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.  Non-medical devices may include items such as a machine, cellphone, computer, application, etc.";
8830            case DEVICECOMPONENT: return "Describes the characteristics, operational status and capabilities of a medical-related component of a medical device.";
8831            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
8832            case DEVICEUSEREQUEST: 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.";
8833            case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.";
8834            case DIAGNOSTICORDER: return "A record of a request for a diagnostic investigation service to be performed.";
8835            case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.";
8836            case DOCUMENTMANIFEST: return "A manifest that defines a set of documents.";
8837            case DOCUMENTREFERENCE: return "A reference to a document .";
8838            case DOMAINRESOURCE: return "A resource that includes narrative, extensions, and contained resources.";
8839            case ELIGIBILITYREQUEST: return "This resource provides the insurance eligibility details from the insurer regarding a specified coverage and optionally some class of service.";
8840            case ELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an Eligibility resource.";
8841            case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.";
8842            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
8843            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource.";
8844            case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.";
8845            case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet.";
8846            case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.";
8847            case FAMILYMEMBERHISTORY: return "Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.";
8848            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
8849            case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.";
8850            case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.";
8851            case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.";
8852            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
8853            case IMAGINGEXCERPT: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances).  The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on.";
8854            case IMAGINGOBJECTSELECTION: return "A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances).  The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingObjectSelection resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance (\"cine\" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on.";
8855            case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.";
8856            case IMMUNIZATION: return "Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed.";
8857            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification.";
8858            case IMPLEMENTATIONGUIDE: return "A set of rules or how FHIR is used to solve a particular problem. 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.";
8859            case LIBRARY: return "The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library.";
8860            case LINKAGE: return "Identifies two or more records (resource instances) that are referring to the same real-world \"occurrence\".";
8861            case LIST: return "A set of information summarized from a list of other resources.";
8862            case LOCATION: return "Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.";
8863            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
8864            case MEASUREREPORT: return "The MeasureReport resource contains the results of evaluating a measure.";
8865            case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.";
8866            case MEDICATION: return "This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.";
8867            case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.";
8868            case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.";
8869            case MEDICATIONORDER: return "An order for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationOrder\" rather than \"MedicationPrescription\" to generalize the use across inpatient and outpatient settings as well as for care plans, etc.";
8870            case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from e.g. the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains \r\rThe 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.";
8871            case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.";
8872            case MODULEDEFINITION: return "The ModuleDefinition resource defines the data requirements for a quality artifact.";
8873            case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a \"System\" used within the Identifier and Coding data types.";
8874            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
8875            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
8876            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
8877            case OPERATIONOUTCOME: return "A collection of error, warning or information messages that result from a system action.";
8878            case ORDER: return "A request to perform an action.";
8879            case ORDERRESPONSE: return "A response to an order.";
8880            case ORDERSET: return "This resource allows for the definition of an order set as a sharable, consumable, and executable artifact in support of clinical decision support.";
8881            case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc.";
8882            case PARAMETERS: return "This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it.";
8883            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
8884            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
8885            case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment.";
8886            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
8887            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
8888            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
8889            case PROCEDURE: return "An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy.";
8890            case PROCEDUREREQUEST: return "A request for a procedure to be performed. May be a proposal or an order.";
8891            case PROCESSREQUEST: return "This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources.";
8892            case PROCESSRESPONSE: return "This resource provides processing status, errors and notes from the processing of a resource.";
8893            case PROTOCOL: return "A definition of behaviors to be taken in particular circumstances, often including conditions, options and other decision points.";
8894            case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.";
8895            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.";
8896            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.";
8897            case REFERRALREQUEST: return "Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization.";
8898            case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.";
8899            case RESOURCE: return "This is the base resource type for everything.";
8900            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
8901            case SCHEDULE: return "A container for slot(s) of time that may be available for booking appointments.";
8902            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
8903            case SEQUENCE: return "Variation and Sequence data.";
8904            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
8905            case SPECIMEN: return "A sample to be used for analysis.";
8906            case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types.";
8907            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
8908            case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action.";
8909            case SUBSTANCE: return "A homogeneous material with a definite composition.";
8910            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
8911            case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting.";
8912            case TASK: return "A task to be performed.";
8913            case TESTSCRIPT: return "TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification.";
8914            case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems.";
8915            case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient.";
8916            default: return "?";
8917          }
8918        }
8919        public String getDisplay() {
8920          switch (this) {
8921            case ACCOUNT: return "Account";
8922            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
8923            case APPOINTMENT: return "Appointment";
8924            case APPOINTMENTRESPONSE: return "AppointmentResponse";
8925            case AUDITEVENT: return "AuditEvent";
8926            case BASIC: return "Basic";
8927            case BINARY: return "Binary";
8928            case BODYSITE: return "BodySite";
8929            case BUNDLE: return "Bundle";
8930            case CAREPLAN: return "CarePlan";
8931            case CARETEAM: return "CareTeam";
8932            case CLAIM: return "Claim";
8933            case CLAIMRESPONSE: return "ClaimResponse";
8934            case CLINICALIMPRESSION: return "ClinicalImpression";
8935            case CODESYSTEM: return "CodeSystem";
8936            case COMMUNICATION: return "Communication";
8937            case COMMUNICATIONREQUEST: return "CommunicationRequest";
8938            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
8939            case COMPOSITION: return "Composition";
8940            case CONCEPTMAP: return "ConceptMap";
8941            case CONDITION: return "Condition";
8942            case CONFORMANCE: return "Conformance";
8943            case CONTRACT: return "Contract";
8944            case COVERAGE: return "Coverage";
8945            case DATAELEMENT: return "DataElement";
8946            case DECISIONSUPPORTRULE: return "DecisionSupportRule";
8947            case DECISIONSUPPORTSERVICEMODULE: return "DecisionSupportServiceModule";
8948            case DETECTEDISSUE: return "DetectedIssue";
8949            case DEVICE: return "Device";
8950            case DEVICECOMPONENT: return "DeviceComponent";
8951            case DEVICEMETRIC: return "DeviceMetric";
8952            case DEVICEUSEREQUEST: return "DeviceUseRequest";
8953            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
8954            case DIAGNOSTICORDER: return "DiagnosticOrder";
8955            case DIAGNOSTICREPORT: return "DiagnosticReport";
8956            case DOCUMENTMANIFEST: return "DocumentManifest";
8957            case DOCUMENTREFERENCE: return "DocumentReference";
8958            case DOMAINRESOURCE: return "DomainResource";
8959            case ELIGIBILITYREQUEST: return "EligibilityRequest";
8960            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
8961            case ENCOUNTER: return "Encounter";
8962            case ENROLLMENTREQUEST: return "EnrollmentRequest";
8963            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
8964            case EPISODEOFCARE: return "EpisodeOfCare";
8965            case EXPANSIONPROFILE: return "ExpansionProfile";
8966            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
8967            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
8968            case FLAG: return "Flag";
8969            case GOAL: return "Goal";
8970            case GROUP: return "Group";
8971            case GUIDANCERESPONSE: return "GuidanceResponse";
8972            case HEALTHCARESERVICE: return "HealthcareService";
8973            case IMAGINGEXCERPT: return "ImagingExcerpt";
8974            case IMAGINGOBJECTSELECTION: return "ImagingObjectSelection";
8975            case IMAGINGSTUDY: return "ImagingStudy";
8976            case IMMUNIZATION: return "Immunization";
8977            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
8978            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
8979            case LIBRARY: return "Library";
8980            case LINKAGE: return "Linkage";
8981            case LIST: return "List";
8982            case LOCATION: return "Location";
8983            case MEASURE: return "Measure";
8984            case MEASUREREPORT: return "MeasureReport";
8985            case MEDIA: return "Media";
8986            case MEDICATION: return "Medication";
8987            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
8988            case MEDICATIONDISPENSE: return "MedicationDispense";
8989            case MEDICATIONORDER: return "MedicationOrder";
8990            case MEDICATIONSTATEMENT: return "MedicationStatement";
8991            case MESSAGEHEADER: return "MessageHeader";
8992            case MODULEDEFINITION: return "ModuleDefinition";
8993            case NAMINGSYSTEM: return "NamingSystem";
8994            case NUTRITIONORDER: return "NutritionOrder";
8995            case OBSERVATION: return "Observation";
8996            case OPERATIONDEFINITION: return "OperationDefinition";
8997            case OPERATIONOUTCOME: return "OperationOutcome";
8998            case ORDER: return "Order";
8999            case ORDERRESPONSE: return "OrderResponse";
9000            case ORDERSET: return "OrderSet";
9001            case ORGANIZATION: return "Organization";
9002            case PARAMETERS: return "Parameters";
9003            case PATIENT: return "Patient";
9004            case PAYMENTNOTICE: return "PaymentNotice";
9005            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
9006            case PERSON: return "Person";
9007            case PRACTITIONER: return "Practitioner";
9008            case PRACTITIONERROLE: return "PractitionerRole";
9009            case PROCEDURE: return "Procedure";
9010            case PROCEDUREREQUEST: return "ProcedureRequest";
9011            case PROCESSREQUEST: return "ProcessRequest";
9012            case PROCESSRESPONSE: return "ProcessResponse";
9013            case PROTOCOL: return "Protocol";
9014            case PROVENANCE: return "Provenance";
9015            case QUESTIONNAIRE: return "Questionnaire";
9016            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
9017            case REFERRALREQUEST: return "ReferralRequest";
9018            case RELATEDPERSON: return "RelatedPerson";
9019            case RESOURCE: return "Resource";
9020            case RISKASSESSMENT: return "RiskAssessment";
9021            case SCHEDULE: return "Schedule";
9022            case SEARCHPARAMETER: return "SearchParameter";
9023            case SEQUENCE: return "Sequence";
9024            case SLOT: return "Slot";
9025            case SPECIMEN: return "Specimen";
9026            case STRUCTUREDEFINITION: return "StructureDefinition";
9027            case STRUCTUREMAP: return "StructureMap";
9028            case SUBSCRIPTION: return "Subscription";
9029            case SUBSTANCE: return "Substance";
9030            case SUPPLYDELIVERY: return "SupplyDelivery";
9031            case SUPPLYREQUEST: return "SupplyRequest";
9032            case TASK: return "Task";
9033            case TESTSCRIPT: return "TestScript";
9034            case VALUESET: return "ValueSet";
9035            case VISIONPRESCRIPTION: return "VisionPrescription";
9036            default: return "?";
9037          }
9038        }
9039    }
9040
9041  public static class ResourceTypeEnumFactory implements EnumFactory<ResourceType> {
9042    public ResourceType fromCode(String codeString) throws IllegalArgumentException {
9043      if (codeString == null || "".equals(codeString))
9044            if (codeString == null || "".equals(codeString))
9045                return null;
9046        if ("Account".equals(codeString))
9047          return ResourceType.ACCOUNT;
9048        if ("AllergyIntolerance".equals(codeString))
9049          return ResourceType.ALLERGYINTOLERANCE;
9050        if ("Appointment".equals(codeString))
9051          return ResourceType.APPOINTMENT;
9052        if ("AppointmentResponse".equals(codeString))
9053          return ResourceType.APPOINTMENTRESPONSE;
9054        if ("AuditEvent".equals(codeString))
9055          return ResourceType.AUDITEVENT;
9056        if ("Basic".equals(codeString))
9057          return ResourceType.BASIC;
9058        if ("Binary".equals(codeString))
9059          return ResourceType.BINARY;
9060        if ("BodySite".equals(codeString))
9061          return ResourceType.BODYSITE;
9062        if ("Bundle".equals(codeString))
9063          return ResourceType.BUNDLE;
9064        if ("CarePlan".equals(codeString))
9065          return ResourceType.CAREPLAN;
9066        if ("CareTeam".equals(codeString))
9067          return ResourceType.CARETEAM;
9068        if ("Claim".equals(codeString))
9069          return ResourceType.CLAIM;
9070        if ("ClaimResponse".equals(codeString))
9071          return ResourceType.CLAIMRESPONSE;
9072        if ("ClinicalImpression".equals(codeString))
9073          return ResourceType.CLINICALIMPRESSION;
9074        if ("CodeSystem".equals(codeString))
9075          return ResourceType.CODESYSTEM;
9076        if ("Communication".equals(codeString))
9077          return ResourceType.COMMUNICATION;
9078        if ("CommunicationRequest".equals(codeString))
9079          return ResourceType.COMMUNICATIONREQUEST;
9080        if ("CompartmentDefinition".equals(codeString))
9081          return ResourceType.COMPARTMENTDEFINITION;
9082        if ("Composition".equals(codeString))
9083          return ResourceType.COMPOSITION;
9084        if ("ConceptMap".equals(codeString))
9085          return ResourceType.CONCEPTMAP;
9086        if ("Condition".equals(codeString))
9087          return ResourceType.CONDITION;
9088        if ("Conformance".equals(codeString))
9089          return ResourceType.CONFORMANCE;
9090        if ("Contract".equals(codeString))
9091          return ResourceType.CONTRACT;
9092        if ("Coverage".equals(codeString))
9093          return ResourceType.COVERAGE;
9094        if ("DataElement".equals(codeString))
9095          return ResourceType.DATAELEMENT;
9096        if ("DecisionSupportRule".equals(codeString))
9097          return ResourceType.DECISIONSUPPORTRULE;
9098        if ("DecisionSupportServiceModule".equals(codeString))
9099          return ResourceType.DECISIONSUPPORTSERVICEMODULE;
9100        if ("DetectedIssue".equals(codeString))
9101          return ResourceType.DETECTEDISSUE;
9102        if ("Device".equals(codeString))
9103          return ResourceType.DEVICE;
9104        if ("DeviceComponent".equals(codeString))
9105          return ResourceType.DEVICECOMPONENT;
9106        if ("DeviceMetric".equals(codeString))
9107          return ResourceType.DEVICEMETRIC;
9108        if ("DeviceUseRequest".equals(codeString))
9109          return ResourceType.DEVICEUSEREQUEST;
9110        if ("DeviceUseStatement".equals(codeString))
9111          return ResourceType.DEVICEUSESTATEMENT;
9112        if ("DiagnosticOrder".equals(codeString))
9113          return ResourceType.DIAGNOSTICORDER;
9114        if ("DiagnosticReport".equals(codeString))
9115          return ResourceType.DIAGNOSTICREPORT;
9116        if ("DocumentManifest".equals(codeString))
9117          return ResourceType.DOCUMENTMANIFEST;
9118        if ("DocumentReference".equals(codeString))
9119          return ResourceType.DOCUMENTREFERENCE;
9120        if ("DomainResource".equals(codeString))
9121          return ResourceType.DOMAINRESOURCE;
9122        if ("EligibilityRequest".equals(codeString))
9123          return ResourceType.ELIGIBILITYREQUEST;
9124        if ("EligibilityResponse".equals(codeString))
9125          return ResourceType.ELIGIBILITYRESPONSE;
9126        if ("Encounter".equals(codeString))
9127          return ResourceType.ENCOUNTER;
9128        if ("EnrollmentRequest".equals(codeString))
9129          return ResourceType.ENROLLMENTREQUEST;
9130        if ("EnrollmentResponse".equals(codeString))
9131          return ResourceType.ENROLLMENTRESPONSE;
9132        if ("EpisodeOfCare".equals(codeString))
9133          return ResourceType.EPISODEOFCARE;
9134        if ("ExpansionProfile".equals(codeString))
9135          return ResourceType.EXPANSIONPROFILE;
9136        if ("ExplanationOfBenefit".equals(codeString))
9137          return ResourceType.EXPLANATIONOFBENEFIT;
9138        if ("FamilyMemberHistory".equals(codeString))
9139          return ResourceType.FAMILYMEMBERHISTORY;
9140        if ("Flag".equals(codeString))
9141          return ResourceType.FLAG;
9142        if ("Goal".equals(codeString))
9143          return ResourceType.GOAL;
9144        if ("Group".equals(codeString))
9145          return ResourceType.GROUP;
9146        if ("GuidanceResponse".equals(codeString))
9147          return ResourceType.GUIDANCERESPONSE;
9148        if ("HealthcareService".equals(codeString))
9149          return ResourceType.HEALTHCARESERVICE;
9150        if ("ImagingExcerpt".equals(codeString))
9151          return ResourceType.IMAGINGEXCERPT;
9152        if ("ImagingObjectSelection".equals(codeString))
9153          return ResourceType.IMAGINGOBJECTSELECTION;
9154        if ("ImagingStudy".equals(codeString))
9155          return ResourceType.IMAGINGSTUDY;
9156        if ("Immunization".equals(codeString))
9157          return ResourceType.IMMUNIZATION;
9158        if ("ImmunizationRecommendation".equals(codeString))
9159          return ResourceType.IMMUNIZATIONRECOMMENDATION;
9160        if ("ImplementationGuide".equals(codeString))
9161          return ResourceType.IMPLEMENTATIONGUIDE;
9162        if ("Library".equals(codeString))
9163          return ResourceType.LIBRARY;
9164        if ("Linkage".equals(codeString))
9165          return ResourceType.LINKAGE;
9166        if ("List".equals(codeString))
9167          return ResourceType.LIST;
9168        if ("Location".equals(codeString))
9169          return ResourceType.LOCATION;
9170        if ("Measure".equals(codeString))
9171          return ResourceType.MEASURE;
9172        if ("MeasureReport".equals(codeString))
9173          return ResourceType.MEASUREREPORT;
9174        if ("Media".equals(codeString))
9175          return ResourceType.MEDIA;
9176        if ("Medication".equals(codeString))
9177          return ResourceType.MEDICATION;
9178        if ("MedicationAdministration".equals(codeString))
9179          return ResourceType.MEDICATIONADMINISTRATION;
9180        if ("MedicationDispense".equals(codeString))
9181          return ResourceType.MEDICATIONDISPENSE;
9182        if ("MedicationOrder".equals(codeString))
9183          return ResourceType.MEDICATIONORDER;
9184        if ("MedicationStatement".equals(codeString))
9185          return ResourceType.MEDICATIONSTATEMENT;
9186        if ("MessageHeader".equals(codeString))
9187          return ResourceType.MESSAGEHEADER;
9188        if ("ModuleDefinition".equals(codeString))
9189          return ResourceType.MODULEDEFINITION;
9190        if ("NamingSystem".equals(codeString))
9191          return ResourceType.NAMINGSYSTEM;
9192        if ("NutritionOrder".equals(codeString))
9193          return ResourceType.NUTRITIONORDER;
9194        if ("Observation".equals(codeString))
9195          return ResourceType.OBSERVATION;
9196        if ("OperationDefinition".equals(codeString))
9197          return ResourceType.OPERATIONDEFINITION;
9198        if ("OperationOutcome".equals(codeString))
9199          return ResourceType.OPERATIONOUTCOME;
9200        if ("Order".equals(codeString))
9201          return ResourceType.ORDER;
9202        if ("OrderResponse".equals(codeString))
9203          return ResourceType.ORDERRESPONSE;
9204        if ("OrderSet".equals(codeString))
9205          return ResourceType.ORDERSET;
9206        if ("Organization".equals(codeString))
9207          return ResourceType.ORGANIZATION;
9208        if ("Parameters".equals(codeString))
9209          return ResourceType.PARAMETERS;
9210        if ("Patient".equals(codeString))
9211          return ResourceType.PATIENT;
9212        if ("PaymentNotice".equals(codeString))
9213          return ResourceType.PAYMENTNOTICE;
9214        if ("PaymentReconciliation".equals(codeString))
9215          return ResourceType.PAYMENTRECONCILIATION;
9216        if ("Person".equals(codeString))
9217          return ResourceType.PERSON;
9218        if ("Practitioner".equals(codeString))
9219          return ResourceType.PRACTITIONER;
9220        if ("PractitionerRole".equals(codeString))
9221          return ResourceType.PRACTITIONERROLE;
9222        if ("Procedure".equals(codeString))
9223          return ResourceType.PROCEDURE;
9224        if ("ProcedureRequest".equals(codeString))
9225          return ResourceType.PROCEDUREREQUEST;
9226        if ("ProcessRequest".equals(codeString))
9227          return ResourceType.PROCESSREQUEST;
9228        if ("ProcessResponse".equals(codeString))
9229          return ResourceType.PROCESSRESPONSE;
9230        if ("Protocol".equals(codeString))
9231          return ResourceType.PROTOCOL;
9232        if ("Provenance".equals(codeString))
9233          return ResourceType.PROVENANCE;
9234        if ("Questionnaire".equals(codeString))
9235          return ResourceType.QUESTIONNAIRE;
9236        if ("QuestionnaireResponse".equals(codeString))
9237          return ResourceType.QUESTIONNAIRERESPONSE;
9238        if ("ReferralRequest".equals(codeString))
9239          return ResourceType.REFERRALREQUEST;
9240        if ("RelatedPerson".equals(codeString))
9241          return ResourceType.RELATEDPERSON;
9242        if ("Resource".equals(codeString))
9243          return ResourceType.RESOURCE;
9244        if ("RiskAssessment".equals(codeString))
9245          return ResourceType.RISKASSESSMENT;
9246        if ("Schedule".equals(codeString))
9247          return ResourceType.SCHEDULE;
9248        if ("SearchParameter".equals(codeString))
9249          return ResourceType.SEARCHPARAMETER;
9250        if ("Sequence".equals(codeString))
9251          return ResourceType.SEQUENCE;
9252        if ("Slot".equals(codeString))
9253          return ResourceType.SLOT;
9254        if ("Specimen".equals(codeString))
9255          return ResourceType.SPECIMEN;
9256        if ("StructureDefinition".equals(codeString))
9257          return ResourceType.STRUCTUREDEFINITION;
9258        if ("StructureMap".equals(codeString))
9259          return ResourceType.STRUCTUREMAP;
9260        if ("Subscription".equals(codeString))
9261          return ResourceType.SUBSCRIPTION;
9262        if ("Substance".equals(codeString))
9263          return ResourceType.SUBSTANCE;
9264        if ("SupplyDelivery".equals(codeString))
9265          return ResourceType.SUPPLYDELIVERY;
9266        if ("SupplyRequest".equals(codeString))
9267          return ResourceType.SUPPLYREQUEST;
9268        if ("Task".equals(codeString))
9269          return ResourceType.TASK;
9270        if ("TestScript".equals(codeString))
9271          return ResourceType.TESTSCRIPT;
9272        if ("ValueSet".equals(codeString))
9273          return ResourceType.VALUESET;
9274        if ("VisionPrescription".equals(codeString))
9275          return ResourceType.VISIONPRESCRIPTION;
9276        throw new IllegalArgumentException("Unknown ResourceType code '"+codeString+"'");
9277        }
9278        public Enumeration<ResourceType> fromType(Base code) throws FHIRException {
9279          if (code == null || code.isEmpty())
9280            return null;
9281          String codeString = ((PrimitiveType) code).asStringValue();
9282          if (codeString == null || "".equals(codeString))
9283            return null;
9284        if ("Account".equals(codeString))
9285          return new Enumeration<ResourceType>(this, ResourceType.ACCOUNT);
9286        if ("AllergyIntolerance".equals(codeString))
9287          return new Enumeration<ResourceType>(this, ResourceType.ALLERGYINTOLERANCE);
9288        if ("Appointment".equals(codeString))
9289          return new Enumeration<ResourceType>(this, ResourceType.APPOINTMENT);
9290        if ("AppointmentResponse".equals(codeString))
9291          return new Enumeration<ResourceType>(this, ResourceType.APPOINTMENTRESPONSE);
9292        if ("AuditEvent".equals(codeString))
9293          return new Enumeration<ResourceType>(this, ResourceType.AUDITEVENT);
9294        if ("Basic".equals(codeString))
9295          return new Enumeration<ResourceType>(this, ResourceType.BASIC);
9296        if ("Binary".equals(codeString))
9297          return new Enumeration<ResourceType>(this, ResourceType.BINARY);
9298        if ("BodySite".equals(codeString))
9299          return new Enumeration<ResourceType>(this, ResourceType.BODYSITE);
9300        if ("Bundle".equals(codeString))
9301          return new Enumeration<ResourceType>(this, ResourceType.BUNDLE);
9302        if ("CarePlan".equals(codeString))
9303          return new Enumeration<ResourceType>(this, ResourceType.CAREPLAN);
9304        if ("CareTeam".equals(codeString))
9305          return new Enumeration<ResourceType>(this, ResourceType.CARETEAM);
9306        if ("Claim".equals(codeString))
9307          return new Enumeration<ResourceType>(this, ResourceType.CLAIM);
9308        if ("ClaimResponse".equals(codeString))
9309          return new Enumeration<ResourceType>(this, ResourceType.CLAIMRESPONSE);
9310        if ("ClinicalImpression".equals(codeString))
9311          return new Enumeration<ResourceType>(this, ResourceType.CLINICALIMPRESSION);
9312        if ("CodeSystem".equals(codeString))
9313          return new Enumeration<ResourceType>(this, ResourceType.CODESYSTEM);
9314        if ("Communication".equals(codeString))
9315          return new Enumeration<ResourceType>(this, ResourceType.COMMUNICATION);
9316        if ("CommunicationRequest".equals(codeString))
9317          return new Enumeration<ResourceType>(this, ResourceType.COMMUNICATIONREQUEST);
9318        if ("CompartmentDefinition".equals(codeString))
9319          return new Enumeration<ResourceType>(this, ResourceType.COMPARTMENTDEFINITION);
9320        if ("Composition".equals(codeString))
9321          return new Enumeration<ResourceType>(this, ResourceType.COMPOSITION);
9322        if ("ConceptMap".equals(codeString))
9323          return new Enumeration<ResourceType>(this, ResourceType.CONCEPTMAP);
9324        if ("Condition".equals(codeString))
9325          return new Enumeration<ResourceType>(this, ResourceType.CONDITION);
9326        if ("Conformance".equals(codeString))
9327          return new Enumeration<ResourceType>(this, ResourceType.CONFORMANCE);
9328        if ("Contract".equals(codeString))
9329          return new Enumeration<ResourceType>(this, ResourceType.CONTRACT);
9330        if ("Coverage".equals(codeString))
9331          return new Enumeration<ResourceType>(this, ResourceType.COVERAGE);
9332        if ("DataElement".equals(codeString))
9333          return new Enumeration<ResourceType>(this, ResourceType.DATAELEMENT);
9334        if ("DecisionSupportRule".equals(codeString))
9335          return new Enumeration<ResourceType>(this, ResourceType.DECISIONSUPPORTRULE);
9336        if ("DecisionSupportServiceModule".equals(codeString))
9337          return new Enumeration<ResourceType>(this, ResourceType.DECISIONSUPPORTSERVICEMODULE);
9338        if ("DetectedIssue".equals(codeString))
9339          return new Enumeration<ResourceType>(this, ResourceType.DETECTEDISSUE);
9340        if ("Device".equals(codeString))
9341          return new Enumeration<ResourceType>(this, ResourceType.DEVICE);
9342        if ("DeviceComponent".equals(codeString))
9343          return new Enumeration<ResourceType>(this, ResourceType.DEVICECOMPONENT);
9344        if ("DeviceMetric".equals(codeString))
9345          return new Enumeration<ResourceType>(this, ResourceType.DEVICEMETRIC);
9346        if ("DeviceUseRequest".equals(codeString))
9347          return new Enumeration<ResourceType>(this, ResourceType.DEVICEUSEREQUEST);
9348        if ("DeviceUseStatement".equals(codeString))
9349          return new Enumeration<ResourceType>(this, ResourceType.DEVICEUSESTATEMENT);
9350        if ("DiagnosticOrder".equals(codeString))
9351          return new Enumeration<ResourceType>(this, ResourceType.DIAGNOSTICORDER);
9352        if ("DiagnosticReport".equals(codeString))
9353          return new Enumeration<ResourceType>(this, ResourceType.DIAGNOSTICREPORT);
9354        if ("DocumentManifest".equals(codeString))
9355          return new Enumeration<ResourceType>(this, ResourceType.DOCUMENTMANIFEST);
9356        if ("DocumentReference".equals(codeString))
9357          return new Enumeration<ResourceType>(this, ResourceType.DOCUMENTREFERENCE);
9358        if ("DomainResource".equals(codeString))
9359          return new Enumeration<ResourceType>(this, ResourceType.DOMAINRESOURCE);
9360        if ("EligibilityRequest".equals(codeString))
9361          return new Enumeration<ResourceType>(this, ResourceType.ELIGIBILITYREQUEST);
9362        if ("EligibilityResponse".equals(codeString))
9363          return new Enumeration<ResourceType>(this, ResourceType.ELIGIBILITYRESPONSE);
9364        if ("Encounter".equals(codeString))
9365          return new Enumeration<ResourceType>(this, ResourceType.ENCOUNTER);
9366        if ("EnrollmentRequest".equals(codeString))
9367          return new Enumeration<ResourceType>(this, ResourceType.ENROLLMENTREQUEST);
9368        if ("EnrollmentResponse".equals(codeString))
9369          return new Enumeration<ResourceType>(this, ResourceType.ENROLLMENTRESPONSE);
9370        if ("EpisodeOfCare".equals(codeString))
9371          return new Enumeration<ResourceType>(this, ResourceType.EPISODEOFCARE);
9372        if ("ExpansionProfile".equals(codeString))
9373          return new Enumeration<ResourceType>(this, ResourceType.EXPANSIONPROFILE);
9374        if ("ExplanationOfBenefit".equals(codeString))
9375          return new Enumeration<ResourceType>(this, ResourceType.EXPLANATIONOFBENEFIT);
9376        if ("FamilyMemberHistory".equals(codeString))
9377          return new Enumeration<ResourceType>(this, ResourceType.FAMILYMEMBERHISTORY);
9378        if ("Flag".equals(codeString))
9379          return new Enumeration<ResourceType>(this, ResourceType.FLAG);
9380        if ("Goal".equals(codeString))
9381          return new Enumeration<ResourceType>(this, ResourceType.GOAL);
9382        if ("Group".equals(codeString))
9383          return new Enumeration<ResourceType>(this, ResourceType.GROUP);
9384        if ("GuidanceResponse".equals(codeString))
9385          return new Enumeration<ResourceType>(this, ResourceType.GUIDANCERESPONSE);
9386        if ("HealthcareService".equals(codeString))
9387          return new Enumeration<ResourceType>(this, ResourceType.HEALTHCARESERVICE);
9388        if ("ImagingExcerpt".equals(codeString))
9389          return new Enumeration<ResourceType>(this, ResourceType.IMAGINGEXCERPT);
9390        if ("ImagingObjectSelection".equals(codeString))
9391          return new Enumeration<ResourceType>(this, ResourceType.IMAGINGOBJECTSELECTION);
9392        if ("ImagingStudy".equals(codeString))
9393          return new Enumeration<ResourceType>(this, ResourceType.IMAGINGSTUDY);
9394        if ("Immunization".equals(codeString))
9395          return new Enumeration<ResourceType>(this, ResourceType.IMMUNIZATION);
9396        if ("ImmunizationRecommendation".equals(codeString))
9397          return new Enumeration<ResourceType>(this, ResourceType.IMMUNIZATIONRECOMMENDATION);
9398        if ("ImplementationGuide".equals(codeString))
9399          return new Enumeration<ResourceType>(this, ResourceType.IMPLEMENTATIONGUIDE);
9400        if ("Library".equals(codeString))
9401          return new Enumeration<ResourceType>(this, ResourceType.LIBRARY);
9402        if ("Linkage".equals(codeString))
9403          return new Enumeration<ResourceType>(this, ResourceType.LINKAGE);
9404        if ("List".equals(codeString))
9405          return new Enumeration<ResourceType>(this, ResourceType.LIST);
9406        if ("Location".equals(codeString))
9407          return new Enumeration<ResourceType>(this, ResourceType.LOCATION);
9408        if ("Measure".equals(codeString))
9409          return new Enumeration<ResourceType>(this, ResourceType.MEASURE);
9410        if ("MeasureReport".equals(codeString))
9411          return new Enumeration<ResourceType>(this, ResourceType.MEASUREREPORT);
9412        if ("Media".equals(codeString))
9413          return new Enumeration<ResourceType>(this, ResourceType.MEDIA);
9414        if ("Medication".equals(codeString))
9415          return new Enumeration<ResourceType>(this, ResourceType.MEDICATION);
9416        if ("MedicationAdministration".equals(codeString))
9417          return new Enumeration<ResourceType>(this, ResourceType.MEDICATIONADMINISTRATION);
9418        if ("MedicationDispense".equals(codeString))
9419          return new Enumeration<ResourceType>(this, ResourceType.MEDICATIONDISPENSE);
9420        if ("MedicationOrder".equals(codeString))
9421          return new Enumeration<ResourceType>(this, ResourceType.MEDICATIONORDER);
9422        if ("MedicationStatement".equals(codeString))
9423          return new Enumeration<ResourceType>(this, ResourceType.MEDICATIONSTATEMENT);
9424        if ("MessageHeader".equals(codeString))
9425          return new Enumeration<ResourceType>(this, ResourceType.MESSAGEHEADER);
9426        if ("ModuleDefinition".equals(codeString))
9427          return new Enumeration<ResourceType>(this, ResourceType.MODULEDEFINITION);
9428        if ("NamingSystem".equals(codeString))
9429          return new Enumeration<ResourceType>(this, ResourceType.NAMINGSYSTEM);
9430        if ("NutritionOrder".equals(codeString))
9431          return new Enumeration<ResourceType>(this, ResourceType.NUTRITIONORDER);
9432        if ("Observation".equals(codeString))
9433          return new Enumeration<ResourceType>(this, ResourceType.OBSERVATION);
9434        if ("OperationDefinition".equals(codeString))
9435          return new Enumeration<ResourceType>(this, ResourceType.OPERATIONDEFINITION);
9436        if ("OperationOutcome".equals(codeString))
9437          return new Enumeration<ResourceType>(this, ResourceType.OPERATIONOUTCOME);
9438        if ("Order".equals(codeString))
9439          return new Enumeration<ResourceType>(this, ResourceType.ORDER);
9440        if ("OrderResponse".equals(codeString))
9441          return new Enumeration<ResourceType>(this, ResourceType.ORDERRESPONSE);
9442        if ("OrderSet".equals(codeString))
9443          return new Enumeration<ResourceType>(this, ResourceType.ORDERSET);
9444        if ("Organization".equals(codeString))
9445          return new Enumeration<ResourceType>(this, ResourceType.ORGANIZATION);
9446        if ("Parameters".equals(codeString))
9447          return new Enumeration<ResourceType>(this, ResourceType.PARAMETERS);
9448        if ("Patient".equals(codeString))
9449          return new Enumeration<ResourceType>(this, ResourceType.PATIENT);
9450        if ("PaymentNotice".equals(codeString))
9451          return new Enumeration<ResourceType>(this, ResourceType.PAYMENTNOTICE);
9452        if ("PaymentReconciliation".equals(codeString))
9453          return new Enumeration<ResourceType>(this, ResourceType.PAYMENTRECONCILIATION);
9454        if ("Person".equals(codeString))
9455          return new Enumeration<ResourceType>(this, ResourceType.PERSON);
9456        if ("Practitioner".equals(codeString))
9457          return new Enumeration<ResourceType>(this, ResourceType.PRACTITIONER);
9458        if ("PractitionerRole".equals(codeString))
9459          return new Enumeration<ResourceType>(this, ResourceType.PRACTITIONERROLE);
9460        if ("Procedure".equals(codeString))
9461          return new Enumeration<ResourceType>(this, ResourceType.PROCEDURE);
9462        if ("ProcedureRequest".equals(codeString))
9463          return new Enumeration<ResourceType>(this, ResourceType.PROCEDUREREQUEST);
9464        if ("ProcessRequest".equals(codeString))
9465          return new Enumeration<ResourceType>(this, ResourceType.PROCESSREQUEST);
9466        if ("ProcessResponse".equals(codeString))
9467          return new Enumeration<ResourceType>(this, ResourceType.PROCESSRESPONSE);
9468        if ("Protocol".equals(codeString))
9469          return new Enumeration<ResourceType>(this, ResourceType.PROTOCOL);
9470        if ("Provenance".equals(codeString))
9471          return new Enumeration<ResourceType>(this, ResourceType.PROVENANCE);
9472        if ("Questionnaire".equals(codeString))
9473          return new Enumeration<ResourceType>(this, ResourceType.QUESTIONNAIRE);
9474        if ("QuestionnaireResponse".equals(codeString))
9475          return new Enumeration<ResourceType>(this, ResourceType.QUESTIONNAIRERESPONSE);
9476        if ("ReferralRequest".equals(codeString))
9477          return new Enumeration<ResourceType>(this, ResourceType.REFERRALREQUEST);
9478        if ("RelatedPerson".equals(codeString))
9479          return new Enumeration<ResourceType>(this, ResourceType.RELATEDPERSON);
9480        if ("Resource".equals(codeString))
9481          return new Enumeration<ResourceType>(this, ResourceType.RESOURCE);
9482        if ("RiskAssessment".equals(codeString))
9483          return new Enumeration<ResourceType>(this, ResourceType.RISKASSESSMENT);
9484        if ("Schedule".equals(codeString))
9485          return new Enumeration<ResourceType>(this, ResourceType.SCHEDULE);
9486        if ("SearchParameter".equals(codeString))
9487          return new Enumeration<ResourceType>(this, ResourceType.SEARCHPARAMETER);
9488        if ("Sequence".equals(codeString))
9489          return new Enumeration<ResourceType>(this, ResourceType.SEQUENCE);
9490        if ("Slot".equals(codeString))
9491          return new Enumeration<ResourceType>(this, ResourceType.SLOT);
9492        if ("Specimen".equals(codeString))
9493          return new Enumeration<ResourceType>(this, ResourceType.SPECIMEN);
9494        if ("StructureDefinition".equals(codeString))
9495          return new Enumeration<ResourceType>(this, ResourceType.STRUCTUREDEFINITION);
9496        if ("StructureMap".equals(codeString))
9497          return new Enumeration<ResourceType>(this, ResourceType.STRUCTUREMAP);
9498        if ("Subscription".equals(codeString))
9499          return new Enumeration<ResourceType>(this, ResourceType.SUBSCRIPTION);
9500        if ("Substance".equals(codeString))
9501          return new Enumeration<ResourceType>(this, ResourceType.SUBSTANCE);
9502        if ("SupplyDelivery".equals(codeString))
9503          return new Enumeration<ResourceType>(this, ResourceType.SUPPLYDELIVERY);
9504        if ("SupplyRequest".equals(codeString))
9505          return new Enumeration<ResourceType>(this, ResourceType.SUPPLYREQUEST);
9506        if ("Task".equals(codeString))
9507          return new Enumeration<ResourceType>(this, ResourceType.TASK);
9508        if ("TestScript".equals(codeString))
9509          return new Enumeration<ResourceType>(this, ResourceType.TESTSCRIPT);
9510        if ("ValueSet".equals(codeString))
9511          return new Enumeration<ResourceType>(this, ResourceType.VALUESET);
9512        if ("VisionPrescription".equals(codeString))
9513          return new Enumeration<ResourceType>(this, ResourceType.VISIONPRESCRIPTION);
9514        throw new FHIRException("Unknown ResourceType code '"+codeString+"'");
9515        }
9516    public String toCode(ResourceType code) {
9517      if (code == ResourceType.ACCOUNT)
9518        return "Account";
9519      if (code == ResourceType.ALLERGYINTOLERANCE)
9520        return "AllergyIntolerance";
9521      if (code == ResourceType.APPOINTMENT)
9522        return "Appointment";
9523      if (code == ResourceType.APPOINTMENTRESPONSE)
9524        return "AppointmentResponse";
9525      if (code == ResourceType.AUDITEVENT)
9526        return "AuditEvent";
9527      if (code == ResourceType.BASIC)
9528        return "Basic";
9529      if (code == ResourceType.BINARY)
9530        return "Binary";
9531      if (code == ResourceType.BODYSITE)
9532        return "BodySite";
9533      if (code == ResourceType.BUNDLE)
9534        return "Bundle";
9535      if (code == ResourceType.CAREPLAN)
9536        return "CarePlan";
9537      if (code == ResourceType.CARETEAM)
9538        return "CareTeam";
9539      if (code == ResourceType.CLAIM)
9540        return "Claim";
9541      if (code == ResourceType.CLAIMRESPONSE)
9542        return "ClaimResponse";
9543      if (code == ResourceType.CLINICALIMPRESSION)
9544        return "ClinicalImpression";
9545      if (code == ResourceType.CODESYSTEM)
9546        return "CodeSystem";
9547      if (code == ResourceType.COMMUNICATION)
9548        return "Communication";
9549      if (code == ResourceType.COMMUNICATIONREQUEST)
9550        return "CommunicationRequest";
9551      if (code == ResourceType.COMPARTMENTDEFINITION)
9552        return "CompartmentDefinition";
9553      if (code == ResourceType.COMPOSITION)
9554        return "Composition";
9555      if (code == ResourceType.CONCEPTMAP)
9556        return "ConceptMap";
9557      if (code == ResourceType.CONDITION)
9558        return "Condition";
9559      if (code == ResourceType.CONFORMANCE)
9560        return "Conformance";
9561      if (code == ResourceType.CONTRACT)
9562        return "Contract";
9563      if (code == ResourceType.COVERAGE)
9564        return "Coverage";
9565      if (code == ResourceType.DATAELEMENT)
9566        return "DataElement";
9567      if (code == ResourceType.DECISIONSUPPORTRULE)
9568        return "DecisionSupportRule";
9569      if (code == ResourceType.DECISIONSUPPORTSERVICEMODULE)
9570        return "DecisionSupportServiceModule";
9571      if (code == ResourceType.DETECTEDISSUE)
9572        return "DetectedIssue";
9573      if (code == ResourceType.DEVICE)
9574        return "Device";
9575      if (code == ResourceType.DEVICECOMPONENT)
9576        return "DeviceComponent";
9577      if (code == ResourceType.DEVICEMETRIC)
9578        return "DeviceMetric";
9579      if (code == ResourceType.DEVICEUSEREQUEST)
9580        return "DeviceUseRequest";
9581      if (code == ResourceType.DEVICEUSESTATEMENT)
9582        return "DeviceUseStatement";
9583      if (code == ResourceType.DIAGNOSTICORDER)
9584        return "DiagnosticOrder";
9585      if (code == ResourceType.DIAGNOSTICREPORT)
9586        return "DiagnosticReport";
9587      if (code == ResourceType.DOCUMENTMANIFEST)
9588        return "DocumentManifest";
9589      if (code == ResourceType.DOCUMENTREFERENCE)
9590        return "DocumentReference";
9591      if (code == ResourceType.DOMAINRESOURCE)
9592        return "DomainResource";
9593      if (code == ResourceType.ELIGIBILITYREQUEST)
9594        return "EligibilityRequest";
9595      if (code == ResourceType.ELIGIBILITYRESPONSE)
9596        return "EligibilityResponse";
9597      if (code == ResourceType.ENCOUNTER)
9598        return "Encounter";
9599      if (code == ResourceType.ENROLLMENTREQUEST)
9600        return "EnrollmentRequest";
9601      if (code == ResourceType.ENROLLMENTRESPONSE)
9602        return "EnrollmentResponse";
9603      if (code == ResourceType.EPISODEOFCARE)
9604        return "EpisodeOfCare";
9605      if (code == ResourceType.EXPANSIONPROFILE)
9606        return "ExpansionProfile";
9607      if (code == ResourceType.EXPLANATIONOFBENEFIT)
9608        return "ExplanationOfBenefit";
9609      if (code == ResourceType.FAMILYMEMBERHISTORY)
9610        return "FamilyMemberHistory";
9611      if (code == ResourceType.FLAG)
9612        return "Flag";
9613      if (code == ResourceType.GOAL)
9614        return "Goal";
9615      if (code == ResourceType.GROUP)
9616        return "Group";
9617      if (code == ResourceType.GUIDANCERESPONSE)
9618        return "GuidanceResponse";
9619      if (code == ResourceType.HEALTHCARESERVICE)
9620        return "HealthcareService";
9621      if (code == ResourceType.IMAGINGEXCERPT)
9622        return "ImagingExcerpt";
9623      if (code == ResourceType.IMAGINGOBJECTSELECTION)
9624        return "ImagingObjectSelection";
9625      if (code == ResourceType.IMAGINGSTUDY)
9626        return "ImagingStudy";
9627      if (code == ResourceType.IMMUNIZATION)
9628        return "Immunization";
9629      if (code == ResourceType.IMMUNIZATIONRECOMMENDATION)
9630        return "ImmunizationRecommendation";
9631      if (code == ResourceType.IMPLEMENTATIONGUIDE)
9632        return "ImplementationGuide";
9633      if (code == ResourceType.LIBRARY)
9634        return "Library";
9635      if (code == ResourceType.LINKAGE)
9636        return "Linkage";
9637      if (code == ResourceType.LIST)
9638        return "List";
9639      if (code == ResourceType.LOCATION)
9640        return "Location";
9641      if (code == ResourceType.MEASURE)
9642        return "Measure";
9643      if (code == ResourceType.MEASUREREPORT)
9644        return "MeasureReport";
9645      if (code == ResourceType.MEDIA)
9646        return "Media";
9647      if (code == ResourceType.MEDICATION)
9648        return "Medication";
9649      if (code == ResourceType.MEDICATIONADMINISTRATION)
9650        return "MedicationAdministration";
9651      if (code == ResourceType.MEDICATIONDISPENSE)
9652        return "MedicationDispense";
9653      if (code == ResourceType.MEDICATIONORDER)
9654        return "MedicationOrder";
9655      if (code == ResourceType.MEDICATIONSTATEMENT)
9656        return "MedicationStatement";
9657      if (code == ResourceType.MESSAGEHEADER)
9658        return "MessageHeader";
9659      if (code == ResourceType.MODULEDEFINITION)
9660        return "ModuleDefinition";
9661      if (code == ResourceType.NAMINGSYSTEM)
9662        return "NamingSystem";
9663      if (code == ResourceType.NUTRITIONORDER)
9664        return "NutritionOrder";
9665      if (code == ResourceType.OBSERVATION)
9666        return "Observation";
9667      if (code == ResourceType.OPERATIONDEFINITION)
9668        return "OperationDefinition";
9669      if (code == ResourceType.OPERATIONOUTCOME)
9670        return "OperationOutcome";
9671      if (code == ResourceType.ORDER)
9672        return "Order";
9673      if (code == ResourceType.ORDERRESPONSE)
9674        return "OrderResponse";
9675      if (code == ResourceType.ORDERSET)
9676        return "OrderSet";
9677      if (code == ResourceType.ORGANIZATION)
9678        return "Organization";
9679      if (code == ResourceType.PARAMETERS)
9680        return "Parameters";
9681      if (code == ResourceType.PATIENT)
9682        return "Patient";
9683      if (code == ResourceType.PAYMENTNOTICE)
9684        return "PaymentNotice";
9685      if (code == ResourceType.PAYMENTRECONCILIATION)
9686        return "PaymentReconciliation";
9687      if (code == ResourceType.PERSON)
9688        return "Person";
9689      if (code == ResourceType.PRACTITIONER)
9690        return "Practitioner";
9691      if (code == ResourceType.PRACTITIONERROLE)
9692        return "PractitionerRole";
9693      if (code == ResourceType.PROCEDURE)
9694        return "Procedure";
9695      if (code == ResourceType.PROCEDUREREQUEST)
9696        return "ProcedureRequest";
9697      if (code == ResourceType.PROCESSREQUEST)
9698        return "ProcessRequest";
9699      if (code == ResourceType.PROCESSRESPONSE)
9700        return "ProcessResponse";
9701      if (code == ResourceType.PROTOCOL)
9702        return "Protocol";
9703      if (code == ResourceType.PROVENANCE)
9704        return "Provenance";
9705      if (code == ResourceType.QUESTIONNAIRE)
9706        return "Questionnaire";
9707      if (code == ResourceType.QUESTIONNAIRERESPONSE)
9708        return "QuestionnaireResponse";
9709      if (code == ResourceType.REFERRALREQUEST)
9710        return "ReferralRequest";
9711      if (code == ResourceType.RELATEDPERSON)
9712        return "RelatedPerson";
9713      if (code == ResourceType.RESOURCE)
9714        return "Resource";
9715      if (code == ResourceType.RISKASSESSMENT)
9716        return "RiskAssessment";
9717      if (code == ResourceType.SCHEDULE)
9718        return "Schedule";
9719      if (code == ResourceType.SEARCHPARAMETER)
9720        return "SearchParameter";
9721      if (code == ResourceType.SEQUENCE)
9722        return "Sequence";
9723      if (code == ResourceType.SLOT)
9724        return "Slot";
9725      if (code == ResourceType.SPECIMEN)
9726        return "Specimen";
9727      if (code == ResourceType.STRUCTUREDEFINITION)
9728        return "StructureDefinition";
9729      if (code == ResourceType.STRUCTUREMAP)
9730        return "StructureMap";
9731      if (code == ResourceType.SUBSCRIPTION)
9732        return "Subscription";
9733      if (code == ResourceType.SUBSTANCE)
9734        return "Substance";
9735      if (code == ResourceType.SUPPLYDELIVERY)
9736        return "SupplyDelivery";
9737      if (code == ResourceType.SUPPLYREQUEST)
9738        return "SupplyRequest";
9739      if (code == ResourceType.TASK)
9740        return "Task";
9741      if (code == ResourceType.TESTSCRIPT)
9742        return "TestScript";
9743      if (code == ResourceType.VALUESET)
9744        return "ValueSet";
9745      if (code == ResourceType.VISIONPRESCRIPTION)
9746        return "VisionPrescription";
9747      return "?";
9748      }
9749    public String toSystem(ResourceType code) {
9750      return code.getSystem();
9751      }
9752    }
9753
9754    public enum SearchParamType {
9755        /**
9756         * Search parameter SHALL be a number (a whole number, or a decimal).
9757         */
9758        NUMBER, 
9759        /**
9760         * Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported.
9761         */
9762        DATE, 
9763        /**
9764         * Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces.
9765         */
9766        STRING, 
9767        /**
9768         * Search parameter on a coded element or identifier. May be used to search through the text, displayname, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a "|", depending on the modifier used.
9769         */
9770        TOKEN, 
9771        /**
9772         * A reference to another resource.
9773         */
9774        REFERENCE, 
9775        /**
9776         * A composite search parameter that combines a search on two values together.
9777         */
9778        COMPOSITE, 
9779        /**
9780         * A search parameter that searches on a quantity.
9781         */
9782        QUANTITY, 
9783        /**
9784         * A search parameter that searches on a URI (RFC 3986).
9785         */
9786        URI, 
9787        /**
9788         * added to help the parsers
9789         */
9790        NULL;
9791        public static SearchParamType fromCode(String codeString) throws FHIRException {
9792            if (codeString == null || "".equals(codeString))
9793                return null;
9794        if ("number".equals(codeString))
9795          return NUMBER;
9796        if ("date".equals(codeString))
9797          return DATE;
9798        if ("string".equals(codeString))
9799          return STRING;
9800        if ("token".equals(codeString))
9801          return TOKEN;
9802        if ("reference".equals(codeString))
9803          return REFERENCE;
9804        if ("composite".equals(codeString))
9805          return COMPOSITE;
9806        if ("quantity".equals(codeString))
9807          return QUANTITY;
9808        if ("uri".equals(codeString))
9809          return URI;
9810        throw new FHIRException("Unknown SearchParamType code '"+codeString+"'");
9811        }
9812        public String toCode() {
9813          switch (this) {
9814            case NUMBER: return "number";
9815            case DATE: return "date";
9816            case STRING: return "string";
9817            case TOKEN: return "token";
9818            case REFERENCE: return "reference";
9819            case COMPOSITE: return "composite";
9820            case QUANTITY: return "quantity";
9821            case URI: return "uri";
9822            default: return "?";
9823          }
9824        }
9825        public String getSystem() {
9826          switch (this) {
9827            case NUMBER: return "http://hl7.org/fhir/search-param-type";
9828            case DATE: return "http://hl7.org/fhir/search-param-type";
9829            case STRING: return "http://hl7.org/fhir/search-param-type";
9830            case TOKEN: return "http://hl7.org/fhir/search-param-type";
9831            case REFERENCE: return "http://hl7.org/fhir/search-param-type";
9832            case COMPOSITE: return "http://hl7.org/fhir/search-param-type";
9833            case QUANTITY: return "http://hl7.org/fhir/search-param-type";
9834            case URI: return "http://hl7.org/fhir/search-param-type";
9835            default: return "?";
9836          }
9837        }
9838        public String getDefinition() {
9839          switch (this) {
9840            case NUMBER: return "Search parameter SHALL be a number (a whole number, or a decimal).";
9841            case DATE: return "Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported.";
9842            case STRING: return "Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces.";
9843            case TOKEN: return "Search parameter on a coded element or identifier. May be used to search through the text, displayname, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a \"|\", depending on the modifier used.";
9844            case REFERENCE: return "A reference to another resource.";
9845            case COMPOSITE: return "A composite search parameter that combines a search on two values together.";
9846            case QUANTITY: return "A search parameter that searches on a quantity.";
9847            case URI: return "A search parameter that searches on a URI (RFC 3986).";
9848            default: return "?";
9849          }
9850        }
9851        public String getDisplay() {
9852          switch (this) {
9853            case NUMBER: return "Number";
9854            case DATE: return "Date/DateTime";
9855            case STRING: return "String";
9856            case TOKEN: return "Token";
9857            case REFERENCE: return "Reference";
9858            case COMPOSITE: return "Composite";
9859            case QUANTITY: return "Quantity";
9860            case URI: return "URI";
9861            default: return "?";
9862          }
9863        }
9864    }
9865
9866  public static class SearchParamTypeEnumFactory implements EnumFactory<SearchParamType> {
9867    public SearchParamType fromCode(String codeString) throws IllegalArgumentException {
9868      if (codeString == null || "".equals(codeString))
9869            if (codeString == null || "".equals(codeString))
9870                return null;
9871        if ("number".equals(codeString))
9872          return SearchParamType.NUMBER;
9873        if ("date".equals(codeString))
9874          return SearchParamType.DATE;
9875        if ("string".equals(codeString))
9876          return SearchParamType.STRING;
9877        if ("token".equals(codeString))
9878          return SearchParamType.TOKEN;
9879        if ("reference".equals(codeString))
9880          return SearchParamType.REFERENCE;
9881        if ("composite".equals(codeString))
9882          return SearchParamType.COMPOSITE;
9883        if ("quantity".equals(codeString))
9884          return SearchParamType.QUANTITY;
9885        if ("uri".equals(codeString))
9886          return SearchParamType.URI;
9887        throw new IllegalArgumentException("Unknown SearchParamType code '"+codeString+"'");
9888        }
9889        public Enumeration<SearchParamType> fromType(Base code) throws FHIRException {
9890          if (code == null || code.isEmpty())
9891            return null;
9892          String codeString = ((PrimitiveType) code).asStringValue();
9893          if (codeString == null || "".equals(codeString))
9894            return null;
9895        if ("number".equals(codeString))
9896          return new Enumeration<SearchParamType>(this, SearchParamType.NUMBER);
9897        if ("date".equals(codeString))
9898          return new Enumeration<SearchParamType>(this, SearchParamType.DATE);
9899        if ("string".equals(codeString))
9900          return new Enumeration<SearchParamType>(this, SearchParamType.STRING);
9901        if ("token".equals(codeString))
9902          return new Enumeration<SearchParamType>(this, SearchParamType.TOKEN);
9903        if ("reference".equals(codeString))
9904          return new Enumeration<SearchParamType>(this, SearchParamType.REFERENCE);
9905        if ("composite".equals(codeString))
9906          return new Enumeration<SearchParamType>(this, SearchParamType.COMPOSITE);
9907        if ("quantity".equals(codeString))
9908          return new Enumeration<SearchParamType>(this, SearchParamType.QUANTITY);
9909        if ("uri".equals(codeString))
9910          return new Enumeration<SearchParamType>(this, SearchParamType.URI);
9911        throw new FHIRException("Unknown SearchParamType code '"+codeString+"'");
9912        }
9913    public String toCode(SearchParamType code) {
9914      if (code == SearchParamType.NUMBER)
9915        return "number";
9916      if (code == SearchParamType.DATE)
9917        return "date";
9918      if (code == SearchParamType.STRING)
9919        return "string";
9920      if (code == SearchParamType.TOKEN)
9921        return "token";
9922      if (code == SearchParamType.REFERENCE)
9923        return "reference";
9924      if (code == SearchParamType.COMPOSITE)
9925        return "composite";
9926      if (code == SearchParamType.QUANTITY)
9927        return "quantity";
9928      if (code == SearchParamType.URI)
9929        return "uri";
9930      return "?";
9931      }
9932    public String toSystem(SearchParamType code) {
9933      return code.getSystem();
9934      }
9935    }
9936
9937    public enum SpecialValues {
9938        /**
9939         * Boolean true.
9940         */
9941        TRUE, 
9942        /**
9943         * Boolean false.
9944         */
9945        FALSE, 
9946        /**
9947         * The content is greater than zero, but too small to be quantified.
9948         */
9949        TRACE, 
9950        /**
9951         * The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material.
9952         */
9953        SUFFICIENT, 
9954        /**
9955         * The value is no longer available.
9956         */
9957        WITHDRAWN, 
9958        /**
9959         * The are no known applicable values in this context.
9960         */
9961        NILKNOWN, 
9962        /**
9963         * added to help the parsers
9964         */
9965        NULL;
9966        public static SpecialValues fromCode(String codeString) throws FHIRException {
9967            if (codeString == null || "".equals(codeString))
9968                return null;
9969        if ("true".equals(codeString))
9970          return TRUE;
9971        if ("false".equals(codeString))
9972          return FALSE;
9973        if ("trace".equals(codeString))
9974          return TRACE;
9975        if ("sufficient".equals(codeString))
9976          return SUFFICIENT;
9977        if ("withdrawn".equals(codeString))
9978          return WITHDRAWN;
9979        if ("nil-known".equals(codeString))
9980          return NILKNOWN;
9981        throw new FHIRException("Unknown SpecialValues code '"+codeString+"'");
9982        }
9983        public String toCode() {
9984          switch (this) {
9985            case TRUE: return "true";
9986            case FALSE: return "false";
9987            case TRACE: return "trace";
9988            case SUFFICIENT: return "sufficient";
9989            case WITHDRAWN: return "withdrawn";
9990            case NILKNOWN: return "nil-known";
9991            default: return "?";
9992          }
9993        }
9994        public String getSystem() {
9995          switch (this) {
9996            case TRUE: return "http://hl7.org/fhir/special-values";
9997            case FALSE: return "http://hl7.org/fhir/special-values";
9998            case TRACE: return "http://hl7.org/fhir/special-values";
9999            case SUFFICIENT: return "http://hl7.org/fhir/special-values";
10000            case WITHDRAWN: return "http://hl7.org/fhir/special-values";
10001            case NILKNOWN: return "http://hl7.org/fhir/special-values";
10002            default: return "?";
10003          }
10004        }
10005        public String getDefinition() {
10006          switch (this) {
10007            case TRUE: return "Boolean true.";
10008            case FALSE: return "Boolean false.";
10009            case TRACE: return "The content is greater than zero, but too small to be quantified.";
10010            case SUFFICIENT: return "The specific quantity is not known, but is known to be non-zero and is not specified because it makes up the bulk of the material.";
10011            case WITHDRAWN: return "The value is no longer available.";
10012            case NILKNOWN: return "The are no known applicable values in this context.";
10013            default: return "?";
10014          }
10015        }
10016        public String getDisplay() {
10017          switch (this) {
10018            case TRUE: return "true";
10019            case FALSE: return "false";
10020            case TRACE: return "Trace Amount Detected";
10021            case SUFFICIENT: return "Sufficient Quantity";
10022            case WITHDRAWN: return "Value Withdrawn";
10023            case NILKNOWN: return "Nil Known";
10024            default: return "?";
10025          }
10026        }
10027    }
10028
10029  public static class SpecialValuesEnumFactory implements EnumFactory<SpecialValues> {
10030    public SpecialValues fromCode(String codeString) throws IllegalArgumentException {
10031      if (codeString == null || "".equals(codeString))
10032            if (codeString == null || "".equals(codeString))
10033                return null;
10034        if ("true".equals(codeString))
10035          return SpecialValues.TRUE;
10036        if ("false".equals(codeString))
10037          return SpecialValues.FALSE;
10038        if ("trace".equals(codeString))
10039          return SpecialValues.TRACE;
10040        if ("sufficient".equals(codeString))
10041          return SpecialValues.SUFFICIENT;
10042        if ("withdrawn".equals(codeString))
10043          return SpecialValues.WITHDRAWN;
10044        if ("nil-known".equals(codeString))
10045          return SpecialValues.NILKNOWN;
10046        throw new IllegalArgumentException("Unknown SpecialValues code '"+codeString+"'");
10047        }
10048        public Enumeration<SpecialValues> fromType(Base code) throws FHIRException {
10049          if (code == null || code.isEmpty())
10050            return null;
10051          String codeString = ((PrimitiveType) code).asStringValue();
10052          if (codeString == null || "".equals(codeString))
10053            return null;
10054        if ("true".equals(codeString))
10055          return new Enumeration<SpecialValues>(this, SpecialValues.TRUE);
10056        if ("false".equals(codeString))
10057          return new Enumeration<SpecialValues>(this, SpecialValues.FALSE);
10058        if ("trace".equals(codeString))
10059          return new Enumeration<SpecialValues>(this, SpecialValues.TRACE);
10060        if ("sufficient".equals(codeString))
10061          return new Enumeration<SpecialValues>(this, SpecialValues.SUFFICIENT);
10062        if ("withdrawn".equals(codeString))
10063          return new Enumeration<SpecialValues>(this, SpecialValues.WITHDRAWN);
10064        if ("nil-known".equals(codeString))
10065          return new Enumeration<SpecialValues>(this, SpecialValues.NILKNOWN);
10066        throw new FHIRException("Unknown SpecialValues code '"+codeString+"'");
10067        }
10068    public String toCode(SpecialValues code) {
10069      if (code == SpecialValues.TRUE)
10070        return "true";
10071      if (code == SpecialValues.FALSE)
10072        return "false";
10073      if (code == SpecialValues.TRACE)
10074        return "trace";
10075      if (code == SpecialValues.SUFFICIENT)
10076        return "sufficient";
10077      if (code == SpecialValues.WITHDRAWN)
10078        return "withdrawn";
10079      if (code == SpecialValues.NILKNOWN)
10080        return "nil-known";
10081      return "?";
10082      }
10083    public String toSystem(SpecialValues code) {
10084      return code.getSystem();
10085      }
10086    }
10087
10088
10089}
10090