001package org.hl7.fhir.dstu3.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1
033
034
035import org.hl7.fhir.instance.model.api.*;
036import org.hl7.fhir.exceptions.FHIRException;
037
038public class Enumerations {
039
040// In here: 
041//   AbstractType: A type defined by FHIR that is an abstract type
042//   AdministrativeGender: The gender of a person used for administrative purposes.
043//   AgeUnits: A valueSet of UCUM codes for representing age value units.
044//   BindingStrength: Indication of the degree of conformance expectations associated with a binding.
045//   ConceptMapEquivalence: The degree of equivalence between concepts.
046//   DataAbsentReason: Used to specify why the normally expected content of the data element is missing.
047//   DataType: The type of an element - one of the FHIR data types.
048//   DocumentReferenceStatus: The status of the document reference.
049//   FHIRAllTypes: Either an abstract type, a resource or a data type.
050//   FHIRDefinedType: Either a resource or a data type.
051//   MessageEvent: One of the message events defined as part of FHIR.
052//   NoteType: The presentation types of notes.
053//   PublicationStatus: The lifecycle status of a Value Set or Concept Map.
054//   RemittanceOutcome: The outcome of the processing.
055//   ResourceType: One of the resource types defined as part of FHIR.
056//   SearchParamType: Data types allowed to be used for search parameters.
057//   SpecialValues: A set of generally useful codes defined so they can be included in value sets.
058
059
060    public enum AbstractType {
061        /**
062         * A place holder that means any kind of data type
063         */
064        TYPE, 
065        /**
066         * A place holder that means any kind of resource
067         */
068        ANY, 
069        /**
070         * added to help the parsers
071         */
072        NULL;
073        public static AbstractType fromCode(String codeString) throws FHIRException {
074            if (codeString == null || "".equals(codeString))
075                return null;
076        if ("Type".equals(codeString))
077          return TYPE;
078        if ("Any".equals(codeString))
079          return ANY;
080        throw new FHIRException("Unknown AbstractType code '"+codeString+"'");
081        }
082        public String toCode() {
083          switch (this) {
084            case TYPE: return "Type";
085            case ANY: return "Any";
086            default: return "?";
087          }
088        }
089        public String getSystem() {
090          switch (this) {
091            case TYPE: return "http://hl7.org/fhir/abstract-types";
092            case ANY: return "http://hl7.org/fhir/abstract-types";
093            default: return "?";
094          }
095        }
096        public String getDefinition() {
097          switch (this) {
098            case TYPE: return "A place holder that means any kind of data type";
099            case ANY: return "A place holder that means any kind of resource";
100            default: return "?";
101          }
102        }
103        public String getDisplay() {
104          switch (this) {
105            case TYPE: return "Type";
106            case ANY: return "Any";
107            default: return "?";
108          }
109        }
110    }
111
112  public static class AbstractTypeEnumFactory implements EnumFactory<AbstractType> {
113    public AbstractType fromCode(String codeString) throws IllegalArgumentException {
114      if (codeString == null || "".equals(codeString))
115            if (codeString == null || "".equals(codeString))
116                return null;
117        if ("Type".equals(codeString))
118          return AbstractType.TYPE;
119        if ("Any".equals(codeString))
120          return AbstractType.ANY;
121        throw new IllegalArgumentException("Unknown AbstractType code '"+codeString+"'");
122        }
123        public Enumeration<AbstractType> fromType(Base code) throws FHIRException {
124          if (code == null)
125            return null;
126          if (code.isEmpty())
127            return new Enumeration<AbstractType>(this);
128          String codeString = ((PrimitiveType) code).asStringValue();
129          if (codeString == null || "".equals(codeString))
130            return null;
131        if ("Type".equals(codeString))
132          return new Enumeration<AbstractType>(this, AbstractType.TYPE);
133        if ("Any".equals(codeString))
134          return new Enumeration<AbstractType>(this, AbstractType.ANY);
135        throw new FHIRException("Unknown AbstractType code '"+codeString+"'");
136        }
137    public String toCode(AbstractType code) {
138      if (code == AbstractType.TYPE)
139        return "Type";
140      if (code == AbstractType.ANY)
141        return "Any";
142      return "?";
143      }
144    public String toSystem(AbstractType code) {
145      return code.getSystem();
146      }
147    }
148
149    public enum AdministrativeGender {
150        /**
151         * Male
152         */
153        MALE, 
154        /**
155         * Female
156         */
157        FEMALE, 
158        /**
159         * Other
160         */
161        OTHER, 
162        /**
163         * Unknown
164         */
165        UNKNOWN, 
166        /**
167         * added to help the parsers
168         */
169        NULL;
170        public static AdministrativeGender fromCode(String codeString) throws FHIRException {
171            if (codeString == null || "".equals(codeString))
172                return null;
173        if ("male".equals(codeString))
174          return MALE;
175        if ("female".equals(codeString))
176          return FEMALE;
177        if ("other".equals(codeString))
178          return OTHER;
179        if ("unknown".equals(codeString))
180          return UNKNOWN;
181        throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'");
182        }
183        public String toCode() {
184          switch (this) {
185            case MALE: return "male";
186            case FEMALE: return "female";
187            case OTHER: return "other";
188            case UNKNOWN: return "unknown";
189            default: return "?";
190          }
191        }
192        public String getSystem() {
193          switch (this) {
194            case MALE: return "http://hl7.org/fhir/administrative-gender";
195            case FEMALE: return "http://hl7.org/fhir/administrative-gender";
196            case OTHER: return "http://hl7.org/fhir/administrative-gender";
197            case UNKNOWN: return "http://hl7.org/fhir/administrative-gender";
198            default: return "?";
199          }
200        }
201        public String getDefinition() {
202          switch (this) {
203            case MALE: return "Male";
204            case FEMALE: return "Female";
205            case OTHER: return "Other";
206            case UNKNOWN: return "Unknown";
207            default: return "?";
208          }
209        }
210        public String getDisplay() {
211          switch (this) {
212            case MALE: return "Male";
213            case FEMALE: return "Female";
214            case OTHER: return "Other";
215            case UNKNOWN: return "Unknown";
216            default: return "?";
217          }
218        }
219    }
220
221  public static class AdministrativeGenderEnumFactory implements EnumFactory<AdministrativeGender> {
222    public AdministrativeGender fromCode(String codeString) throws IllegalArgumentException {
223      if (codeString == null || "".equals(codeString))
224            if (codeString == null || "".equals(codeString))
225                return null;
226        if ("male".equals(codeString))
227          return AdministrativeGender.MALE;
228        if ("female".equals(codeString))
229          return AdministrativeGender.FEMALE;
230        if ("other".equals(codeString))
231          return AdministrativeGender.OTHER;
232        if ("unknown".equals(codeString))
233          return AdministrativeGender.UNKNOWN;
234        throw new IllegalArgumentException("Unknown AdministrativeGender code '"+codeString+"'");
235        }
236        public Enumeration<AdministrativeGender> fromType(Base code) throws FHIRException {
237          if (code == null)
238            return null;
239          if (code.isEmpty())
240            return new Enumeration<AdministrativeGender>(this);
241          String codeString = ((PrimitiveType) code).asStringValue();
242          if (codeString == null || "".equals(codeString))
243            return null;
244        if ("male".equals(codeString))
245          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.MALE);
246        if ("female".equals(codeString))
247          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.FEMALE);
248        if ("other".equals(codeString))
249          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.OTHER);
250        if ("unknown".equals(codeString))
251          return new Enumeration<AdministrativeGender>(this, AdministrativeGender.UNKNOWN);
252        throw new FHIRException("Unknown AdministrativeGender code '"+codeString+"'");
253        }
254    public String toCode(AdministrativeGender code) {
255      if (code == AdministrativeGender.MALE)
256        return "male";
257      if (code == AdministrativeGender.FEMALE)
258        return "female";
259      if (code == AdministrativeGender.OTHER)
260        return "other";
261      if (code == AdministrativeGender.UNKNOWN)
262        return "unknown";
263      return "?";
264      }
265    public String toSystem(AdministrativeGender code) {
266      return code.getSystem();
267      }
268    }
269
270    public enum AgeUnits {
271        /**
272         * null
273         */
274        MIN, 
275        /**
276         * null
277         */
278        H, 
279        /**
280         * null
281         */
282        D, 
283        /**
284         * null
285         */
286        WK, 
287        /**
288         * null
289         */
290        MO, 
291        /**
292         * null
293         */
294        A, 
295        /**
296         * added to help the parsers
297         */
298        NULL;
299        public static AgeUnits fromCode(String codeString) throws FHIRException {
300            if (codeString == null || "".equals(codeString))
301                return null;
302        if ("min".equals(codeString))
303          return MIN;
304        if ("h".equals(codeString))
305          return H;
306        if ("d".equals(codeString))
307          return D;
308        if ("wk".equals(codeString))
309          return WK;
310        if ("mo".equals(codeString))
311          return MO;
312        if ("a".equals(codeString))
313          return A;
314        throw new FHIRException("Unknown AgeUnits code '"+codeString+"'");
315        }
316        public String toCode() {
317          switch (this) {
318            case MIN: return "min";
319            case H: return "h";
320            case D: return "d";
321            case WK: return "wk";
322            case MO: return "mo";
323            case A: return "a";
324            default: return "?";
325          }
326        }
327        public String getSystem() {
328          switch (this) {
329            case MIN: return "http://unitsofmeasure.org";
330            case H: return "http://unitsofmeasure.org";
331            case D: return "http://unitsofmeasure.org";
332            case WK: return "http://unitsofmeasure.org";
333            case MO: return "http://unitsofmeasure.org";
334            case A: return "http://unitsofmeasure.org";
335            default: return "?";
336          }
337        }
338        public String getDefinition() {
339          switch (this) {
340            case MIN: return "";
341            case H: return "";
342            case D: return "";
343            case WK: return "";
344            case MO: return "";
345            case A: return "";
346            default: return "?";
347          }
348        }
349        public String getDisplay() {
350          switch (this) {
351            case MIN: return "Minute";
352            case H: return "Hour";
353            case D: return "Day";
354            case WK: return "Week";
355            case MO: return "Month";
356            case A: return "Year";
357            default: return "?";
358          }
359        }
360    }
361
362  public static class AgeUnitsEnumFactory implements EnumFactory<AgeUnits> {
363    public AgeUnits fromCode(String codeString) throws IllegalArgumentException {
364      if (codeString == null || "".equals(codeString))
365            if (codeString == null || "".equals(codeString))
366                return null;
367        if ("min".equals(codeString))
368          return AgeUnits.MIN;
369        if ("h".equals(codeString))
370          return AgeUnits.H;
371        if ("d".equals(codeString))
372          return AgeUnits.D;
373        if ("wk".equals(codeString))
374          return AgeUnits.WK;
375        if ("mo".equals(codeString))
376          return AgeUnits.MO;
377        if ("a".equals(codeString))
378          return AgeUnits.A;
379        throw new IllegalArgumentException("Unknown AgeUnits code '"+codeString+"'");
380        }
381        public Enumeration<AgeUnits> fromType(Base code) throws FHIRException {
382          if (code == null)
383            return null;
384          if (code.isEmpty())
385            return new Enumeration<AgeUnits>(this);
386          String codeString = ((PrimitiveType) code).asStringValue();
387          if (codeString == null || "".equals(codeString))
388            return null;
389        if ("min".equals(codeString))
390          return new Enumeration<AgeUnits>(this, AgeUnits.MIN);
391        if ("h".equals(codeString))
392          return new Enumeration<AgeUnits>(this, AgeUnits.H);
393        if ("d".equals(codeString))
394          return new Enumeration<AgeUnits>(this, AgeUnits.D);
395        if ("wk".equals(codeString))
396          return new Enumeration<AgeUnits>(this, AgeUnits.WK);
397        if ("mo".equals(codeString))
398          return new Enumeration<AgeUnits>(this, AgeUnits.MO);
399        if ("a".equals(codeString))
400          return new Enumeration<AgeUnits>(this, AgeUnits.A);
401        throw new FHIRException("Unknown AgeUnits code '"+codeString+"'");
402        }
403    public String toCode(AgeUnits code) {
404      if (code == AgeUnits.MIN)
405        return "min";
406      if (code == AgeUnits.H)
407        return "h";
408      if (code == AgeUnits.D)
409        return "d";
410      if (code == AgeUnits.WK)
411        return "wk";
412      if (code == AgeUnits.MO)
413        return "mo";
414      if (code == AgeUnits.A)
415        return "a";
416      return "?";
417      }
418    public String toSystem(AgeUnits code) {
419      return code.getSystem();
420      }
421    }
422
423    public enum BindingStrength {
424        /**
425         * To be conformant, the concept in this element SHALL be from the specified value set
426         */
427        REQUIRED, 
428        /**
429         * To be conformant, the concept in this element SHALL be from the specified value set if any of the codes within the value set can apply to the concept being communicated.  If the value set does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead.
430         */
431        EXTENSIBLE, 
432        /**
433         * Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant.
434         */
435        PREFERRED, 
436        /**
437         * 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.
438         */
439        EXAMPLE, 
440        /**
441         * added to help the parsers
442         */
443        NULL;
444        public static BindingStrength fromCode(String codeString) throws FHIRException {
445            if (codeString == null || "".equals(codeString))
446                return null;
447        if ("required".equals(codeString))
448          return REQUIRED;
449        if ("extensible".equals(codeString))
450          return EXTENSIBLE;
451        if ("preferred".equals(codeString))
452          return PREFERRED;
453        if ("example".equals(codeString))
454          return EXAMPLE;
455        throw new FHIRException("Unknown BindingStrength code '"+codeString+"'");
456        }
457        public String toCode() {
458          switch (this) {
459            case REQUIRED: return "required";
460            case EXTENSIBLE: return "extensible";
461            case PREFERRED: return "preferred";
462            case EXAMPLE: return "example";
463            default: return "?";
464          }
465        }
466        public String getSystem() {
467          switch (this) {
468            case REQUIRED: return "http://hl7.org/fhir/binding-strength";
469            case EXTENSIBLE: return "http://hl7.org/fhir/binding-strength";
470            case PREFERRED: return "http://hl7.org/fhir/binding-strength";
471            case EXAMPLE: return "http://hl7.org/fhir/binding-strength";
472            default: return "?";
473          }
474        }
475        public String getDefinition() {
476          switch (this) {
477            case REQUIRED: return "To be conformant, the concept in this element SHALL be from the specified value set";
478            case EXTENSIBLE: return "To be conformant, the concept in this element SHALL be from the specified value set if any of the codes within the value set can apply to the concept being communicated.  If the value set does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead.";
479            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.";
480            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.";
481            default: return "?";
482          }
483        }
484        public String getDisplay() {
485          switch (this) {
486            case REQUIRED: return "Required";
487            case EXTENSIBLE: return "Extensible";
488            case PREFERRED: return "Preferred";
489            case EXAMPLE: return "Example";
490            default: return "?";
491          }
492        }
493    }
494
495  public static class BindingStrengthEnumFactory implements EnumFactory<BindingStrength> {
496    public BindingStrength fromCode(String codeString) throws IllegalArgumentException {
497      if (codeString == null || "".equals(codeString))
498            if (codeString == null || "".equals(codeString))
499                return null;
500        if ("required".equals(codeString))
501          return BindingStrength.REQUIRED;
502        if ("extensible".equals(codeString))
503          return BindingStrength.EXTENSIBLE;
504        if ("preferred".equals(codeString))
505          return BindingStrength.PREFERRED;
506        if ("example".equals(codeString))
507          return BindingStrength.EXAMPLE;
508        throw new IllegalArgumentException("Unknown BindingStrength code '"+codeString+"'");
509        }
510        public Enumeration<BindingStrength> fromType(Base code) throws FHIRException {
511          if (code == null)
512            return null;
513          if (code.isEmpty())
514            return new Enumeration<BindingStrength>(this);
515          String codeString = ((PrimitiveType) code).asStringValue();
516          if (codeString == null || "".equals(codeString))
517            return null;
518        if ("required".equals(codeString))
519          return new Enumeration<BindingStrength>(this, BindingStrength.REQUIRED);
520        if ("extensible".equals(codeString))
521          return new Enumeration<BindingStrength>(this, BindingStrength.EXTENSIBLE);
522        if ("preferred".equals(codeString))
523          return new Enumeration<BindingStrength>(this, BindingStrength.PREFERRED);
524        if ("example".equals(codeString))
525          return new Enumeration<BindingStrength>(this, BindingStrength.EXAMPLE);
526        throw new FHIRException("Unknown BindingStrength code '"+codeString+"'");
527        }
528    public String toCode(BindingStrength code) {
529      if (code == BindingStrength.REQUIRED)
530        return "required";
531      if (code == BindingStrength.EXTENSIBLE)
532        return "extensible";
533      if (code == BindingStrength.PREFERRED)
534        return "preferred";
535      if (code == BindingStrength.EXAMPLE)
536        return "example";
537      return "?";
538      }
539    public String toSystem(BindingStrength code) {
540      return code.getSystem();
541      }
542    }
543
544    public enum ConceptMapEquivalence {
545        /**
546         * The concepts are related to each other, and have at least some overlap in meaning, but the exact relationship is not known
547         */
548        RELATEDTO, 
549        /**
550         * The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical).
551         */
552        EQUIVALENT, 
553        /**
554         * 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).
555         */
556        EQUAL, 
557        /**
558         * The target mapping is wider in meaning than the source concept.
559         */
560        WIDER, 
561        /**
562         * The target mapping subsumes the meaning of the source concept (e.g. the source is-a target).
563         */
564        SUBSUMES, 
565        /**
566         * The target mapping is narrower in meaning than the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.
567         */
568        NARROWER, 
569        /**
570         * The target mapping specializes the meaning of the source concept (e.g. the target is-a source).
571         */
572        SPECIALIZES, 
573        /**
574         * 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.
575         */
576        INEXACT, 
577        /**
578         * There is no match for this concept in the destination concept system.
579         */
580        UNMATCHED, 
581        /**
582         * This is an explicit assertion that there is no mapping between the source and target concept.
583         */
584        DISJOINT, 
585        /**
586         * added to help the parsers
587         */
588        NULL;
589        public static ConceptMapEquivalence fromCode(String codeString) throws FHIRException {
590            if (codeString == null || "".equals(codeString))
591                return null;
592        if ("relatedto".equals(codeString))
593          return RELATEDTO;
594        if ("equivalent".equals(codeString))
595          return EQUIVALENT;
596        if ("equal".equals(codeString))
597          return EQUAL;
598        if ("wider".equals(codeString))
599          return WIDER;
600        if ("subsumes".equals(codeString))
601          return SUBSUMES;
602        if ("narrower".equals(codeString))
603          return NARROWER;
604        if ("specializes".equals(codeString))
605          return SPECIALIZES;
606        if ("inexact".equals(codeString))
607          return INEXACT;
608        if ("unmatched".equals(codeString))
609          return UNMATCHED;
610        if ("disjoint".equals(codeString))
611          return DISJOINT;
612        throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'");
613        }
614        public String toCode() {
615          switch (this) {
616            case RELATEDTO: return "relatedto";
617            case EQUIVALENT: return "equivalent";
618            case EQUAL: return "equal";
619            case WIDER: return "wider";
620            case SUBSUMES: return "subsumes";
621            case NARROWER: return "narrower";
622            case SPECIALIZES: return "specializes";
623            case INEXACT: return "inexact";
624            case UNMATCHED: return "unmatched";
625            case DISJOINT: return "disjoint";
626            default: return "?";
627          }
628        }
629        public String getSystem() {
630          switch (this) {
631            case RELATEDTO: return "http://hl7.org/fhir/concept-map-equivalence";
632            case EQUIVALENT: return "http://hl7.org/fhir/concept-map-equivalence";
633            case EQUAL: return "http://hl7.org/fhir/concept-map-equivalence";
634            case WIDER: return "http://hl7.org/fhir/concept-map-equivalence";
635            case SUBSUMES: return "http://hl7.org/fhir/concept-map-equivalence";
636            case NARROWER: return "http://hl7.org/fhir/concept-map-equivalence";
637            case SPECIALIZES: return "http://hl7.org/fhir/concept-map-equivalence";
638            case INEXACT: return "http://hl7.org/fhir/concept-map-equivalence";
639            case UNMATCHED: return "http://hl7.org/fhir/concept-map-equivalence";
640            case DISJOINT: return "http://hl7.org/fhir/concept-map-equivalence";
641            default: return "?";
642          }
643        }
644        public String getDefinition() {
645          switch (this) {
646            case RELATEDTO: return "The concepts are related to each other, and have at least some overlap in meaning, but the exact relationship is not known";
647            case EQUIVALENT: return "The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical).";
648            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).";
649            case WIDER: return "The target mapping is wider in meaning than the source concept.";
650            case SUBSUMES: return "The target mapping subsumes the meaning of the source concept (e.g. the source is-a target).";
651            case NARROWER: return "The target mapping is narrower in meaning than the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.";
652            case SPECIALIZES: return "The target mapping specializes the meaning of the source concept (e.g. the target is-a source).";
653            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.";
654            case UNMATCHED: return "There is no match for this concept in the destination concept system.";
655            case DISJOINT: return "This is an explicit assertion that there is no mapping between the source and target concept.";
656            default: return "?";
657          }
658        }
659        public String getDisplay() {
660          switch (this) {
661            case RELATEDTO: return "Related To";
662            case EQUIVALENT: return "Equivalent";
663            case EQUAL: return "Equal";
664            case WIDER: return "Wider";
665            case SUBSUMES: return "Subsumes";
666            case NARROWER: return "Narrower";
667            case SPECIALIZES: return "Specializes";
668            case INEXACT: return "Inexact";
669            case UNMATCHED: return "Unmatched";
670            case DISJOINT: return "Disjoint";
671            default: return "?";
672          }
673        }
674    }
675
676  public static class ConceptMapEquivalenceEnumFactory implements EnumFactory<ConceptMapEquivalence> {
677    public ConceptMapEquivalence fromCode(String codeString) throws IllegalArgumentException {
678      if (codeString == null || "".equals(codeString))
679            if (codeString == null || "".equals(codeString))
680                return null;
681        if ("relatedto".equals(codeString))
682          return ConceptMapEquivalence.RELATEDTO;
683        if ("equivalent".equals(codeString))
684          return ConceptMapEquivalence.EQUIVALENT;
685        if ("equal".equals(codeString))
686          return ConceptMapEquivalence.EQUAL;
687        if ("wider".equals(codeString))
688          return ConceptMapEquivalence.WIDER;
689        if ("subsumes".equals(codeString))
690          return ConceptMapEquivalence.SUBSUMES;
691        if ("narrower".equals(codeString))
692          return ConceptMapEquivalence.NARROWER;
693        if ("specializes".equals(codeString))
694          return ConceptMapEquivalence.SPECIALIZES;
695        if ("inexact".equals(codeString))
696          return ConceptMapEquivalence.INEXACT;
697        if ("unmatched".equals(codeString))
698          return ConceptMapEquivalence.UNMATCHED;
699        if ("disjoint".equals(codeString))
700          return ConceptMapEquivalence.DISJOINT;
701        throw new IllegalArgumentException("Unknown ConceptMapEquivalence code '"+codeString+"'");
702        }
703        public Enumeration<ConceptMapEquivalence> fromType(Base code) throws FHIRException {
704          if (code == null)
705            return null;
706          if (code.isEmpty())
707            return new Enumeration<ConceptMapEquivalence>(this);
708          String codeString = ((PrimitiveType) code).asStringValue();
709          if (codeString == null || "".equals(codeString))
710            return null;
711        if ("relatedto".equals(codeString))
712          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.RELATEDTO);
713        if ("equivalent".equals(codeString))
714          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.EQUIVALENT);
715        if ("equal".equals(codeString))
716          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.EQUAL);
717        if ("wider".equals(codeString))
718          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.WIDER);
719        if ("subsumes".equals(codeString))
720          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.SUBSUMES);
721        if ("narrower".equals(codeString))
722          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.NARROWER);
723        if ("specializes".equals(codeString))
724          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.SPECIALIZES);
725        if ("inexact".equals(codeString))
726          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.INEXACT);
727        if ("unmatched".equals(codeString))
728          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.UNMATCHED);
729        if ("disjoint".equals(codeString))
730          return new Enumeration<ConceptMapEquivalence>(this, ConceptMapEquivalence.DISJOINT);
731        throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'");
732        }
733    public String toCode(ConceptMapEquivalence code) {
734      if (code == ConceptMapEquivalence.RELATEDTO)
735        return "relatedto";
736      if (code == ConceptMapEquivalence.EQUIVALENT)
737        return "equivalent";
738      if (code == ConceptMapEquivalence.EQUAL)
739        return "equal";
740      if (code == ConceptMapEquivalence.WIDER)
741        return "wider";
742      if (code == ConceptMapEquivalence.SUBSUMES)
743        return "subsumes";
744      if (code == ConceptMapEquivalence.NARROWER)
745        return "narrower";
746      if (code == ConceptMapEquivalence.SPECIALIZES)
747        return "specializes";
748      if (code == ConceptMapEquivalence.INEXACT)
749        return "inexact";
750      if (code == ConceptMapEquivalence.UNMATCHED)
751        return "unmatched";
752      if (code == ConceptMapEquivalence.DISJOINT)
753        return "disjoint";
754      return "?";
755      }
756    public String toSystem(ConceptMapEquivalence code) {
757      return code.getSystem();
758      }
759    }
760
761    public enum DataAbsentReason {
762        /**
763         * The value is not known.
764         */
765        UNKNOWN, 
766        /**
767         * The source human does not know the value.
768         */
769        ASKED, 
770        /**
771         * There is reason to expect (from the workflow) that the value may become known.
772         */
773        TEMP, 
774        /**
775         * The workflow didn't lead to this value being known.
776         */
777        NOTASKED, 
778        /**
779         * The information is not available due to security, privacy or related reasons.
780         */
781        MASKED, 
782        /**
783         * The source system wasn't capable of supporting this element.
784         */
785        UNSUPPORTED, 
786        /**
787         * The content of the data is represented in the resource narrative.
788         */
789        ASTEXT, 
790        /**
791         * Some system or workflow process error means that the information is not available.
792         */
793        ERROR, 
794        /**
795         * NaN, standing for not a number, is a numeric data type value representing an undefined or unrepresentable value.
796         */
797        NAN, 
798        /**
799         * The value is not available because the observation procedure (test, etc.) was not performed.
800         */
801        NOTPERFORMED, 
802        /**
803         * added to help the parsers
804         */
805        NULL;
806        public static DataAbsentReason fromCode(String codeString) throws FHIRException {
807            if (codeString == null || "".equals(codeString))
808                return null;
809        if ("unknown".equals(codeString))
810          return UNKNOWN;
811        if ("asked".equals(codeString))
812          return ASKED;
813        if ("temp".equals(codeString))
814          return TEMP;
815        if ("not-asked".equals(codeString))
816          return NOTASKED;
817        if ("masked".equals(codeString))
818          return MASKED;
819        if ("unsupported".equals(codeString))
820          return UNSUPPORTED;
821        if ("astext".equals(codeString))
822          return ASTEXT;
823        if ("error".equals(codeString))
824          return ERROR;
825        if ("NaN".equals(codeString))
826          return NAN;
827        if ("not-performed".equals(codeString))
828          return NOTPERFORMED;
829        throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'");
830        }
831        public String toCode() {
832          switch (this) {
833            case UNKNOWN: return "unknown";
834            case ASKED: return "asked";
835            case TEMP: return "temp";
836            case NOTASKED: return "not-asked";
837            case MASKED: return "masked";
838            case UNSUPPORTED: return "unsupported";
839            case ASTEXT: return "astext";
840            case ERROR: return "error";
841            case NAN: return "NaN";
842            case NOTPERFORMED: return "not-performed";
843            default: return "?";
844          }
845        }
846        public String getSystem() {
847          switch (this) {
848            case UNKNOWN: return "http://hl7.org/fhir/data-absent-reason";
849            case ASKED: return "http://hl7.org/fhir/data-absent-reason";
850            case TEMP: return "http://hl7.org/fhir/data-absent-reason";
851            case NOTASKED: return "http://hl7.org/fhir/data-absent-reason";
852            case MASKED: return "http://hl7.org/fhir/data-absent-reason";
853            case UNSUPPORTED: return "http://hl7.org/fhir/data-absent-reason";
854            case ASTEXT: return "http://hl7.org/fhir/data-absent-reason";
855            case ERROR: return "http://hl7.org/fhir/data-absent-reason";
856            case NAN: return "http://hl7.org/fhir/data-absent-reason";
857            case NOTPERFORMED: return "http://hl7.org/fhir/data-absent-reason";
858            default: return "?";
859          }
860        }
861        public String getDefinition() {
862          switch (this) {
863            case UNKNOWN: return "The value is not known.";
864            case ASKED: return "The source human does not know the value.";
865            case TEMP: return "There is reason to expect (from the workflow) that the value may become known.";
866            case NOTASKED: return "The workflow didn't lead to this value being known.";
867            case MASKED: return "The information is not available due to security, privacy or related reasons.";
868            case UNSUPPORTED: return "The source system wasn't capable of supporting this element.";
869            case ASTEXT: return "The content of the data is represented in the resource narrative.";
870            case ERROR: return "Some system or workflow process error means that the information is not available.";
871            case NAN: return "NaN, standing for not a number, is a numeric data type value representing an undefined or unrepresentable value.";
872            case NOTPERFORMED: return "The value is not available because the observation procedure (test, etc.) was not performed.";
873            default: return "?";
874          }
875        }
876        public String getDisplay() {
877          switch (this) {
878            case UNKNOWN: return "Unknown";
879            case ASKED: return "Asked";
880            case TEMP: return "Temp";
881            case NOTASKED: return "Not Asked";
882            case MASKED: return "Masked";
883            case UNSUPPORTED: return "Unsupported";
884            case ASTEXT: return "As Text";
885            case ERROR: return "Error";
886            case NAN: return "Not a Number";
887            case NOTPERFORMED: return "Not Performed";
888            default: return "?";
889          }
890        }
891    }
892
893  public static class DataAbsentReasonEnumFactory implements EnumFactory<DataAbsentReason> {
894    public DataAbsentReason fromCode(String codeString) throws IllegalArgumentException {
895      if (codeString == null || "".equals(codeString))
896            if (codeString == null || "".equals(codeString))
897                return null;
898        if ("unknown".equals(codeString))
899          return DataAbsentReason.UNKNOWN;
900        if ("asked".equals(codeString))
901          return DataAbsentReason.ASKED;
902        if ("temp".equals(codeString))
903          return DataAbsentReason.TEMP;
904        if ("not-asked".equals(codeString))
905          return DataAbsentReason.NOTASKED;
906        if ("masked".equals(codeString))
907          return DataAbsentReason.MASKED;
908        if ("unsupported".equals(codeString))
909          return DataAbsentReason.UNSUPPORTED;
910        if ("astext".equals(codeString))
911          return DataAbsentReason.ASTEXT;
912        if ("error".equals(codeString))
913          return DataAbsentReason.ERROR;
914        if ("NaN".equals(codeString))
915          return DataAbsentReason.NAN;
916        if ("not-performed".equals(codeString))
917          return DataAbsentReason.NOTPERFORMED;
918        throw new IllegalArgumentException("Unknown DataAbsentReason code '"+codeString+"'");
919        }
920        public Enumeration<DataAbsentReason> fromType(Base code) throws FHIRException {
921          if (code == null)
922            return null;
923          if (code.isEmpty())
924            return new Enumeration<DataAbsentReason>(this);
925          String codeString = ((PrimitiveType) code).asStringValue();
926          if (codeString == null || "".equals(codeString))
927            return null;
928        if ("unknown".equals(codeString))
929          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.UNKNOWN);
930        if ("asked".equals(codeString))
931          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.ASKED);
932        if ("temp".equals(codeString))
933          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.TEMP);
934        if ("not-asked".equals(codeString))
935          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.NOTASKED);
936        if ("masked".equals(codeString))
937          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.MASKED);
938        if ("unsupported".equals(codeString))
939          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.UNSUPPORTED);
940        if ("astext".equals(codeString))
941          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.ASTEXT);
942        if ("error".equals(codeString))
943          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.ERROR);
944        if ("NaN".equals(codeString))
945          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.NAN);
946        if ("not-performed".equals(codeString))
947          return new Enumeration<DataAbsentReason>(this, DataAbsentReason.NOTPERFORMED);
948        throw new FHIRException("Unknown DataAbsentReason code '"+codeString+"'");
949        }
950    public String toCode(DataAbsentReason code) {
951      if (code == DataAbsentReason.UNKNOWN)
952        return "unknown";
953      if (code == DataAbsentReason.ASKED)
954        return "asked";
955      if (code == DataAbsentReason.TEMP)
956        return "temp";
957      if (code == DataAbsentReason.NOTASKED)
958        return "not-asked";
959      if (code == DataAbsentReason.MASKED)
960        return "masked";
961      if (code == DataAbsentReason.UNSUPPORTED)
962        return "unsupported";
963      if (code == DataAbsentReason.ASTEXT)
964        return "astext";
965      if (code == DataAbsentReason.ERROR)
966        return "error";
967      if (code == DataAbsentReason.NAN)
968        return "NaN";
969      if (code == DataAbsentReason.NOTPERFORMED)
970        return "not-performed";
971      return "?";
972      }
973    public String toSystem(DataAbsentReason code) {
974      return code.getSystem();
975      }
976    }
977
978    public enum DataType {
979        /**
980         * An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.
981         */
982        ADDRESS, 
983        /**
984         * A duration of time during which an organism (or a process) has existed.
985         */
986        AGE, 
987        /**
988         * A  text note which also  contains information about who made the statement and when.
989         */
990        ANNOTATION, 
991        /**
992         * For referring to data content defined in other formats.
993         */
994        ATTACHMENT, 
995        /**
996         * Base definition for all elements that are defined inside a resource - but not those in a data type.
997         */
998        BACKBONEELEMENT, 
999        /**
1000         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
1001         */
1002        CODEABLECONCEPT, 
1003        /**
1004         * A reference to a code defined by a terminology system.
1005         */
1006        CODING, 
1007        /**
1008         * Specifies contact information for a person or organization.
1009         */
1010        CONTACTDETAIL, 
1011        /**
1012         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
1013         */
1014        CONTACTPOINT, 
1015        /**
1016         * A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.
1017         */
1018        CONTRIBUTOR, 
1019        /**
1020         * 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.
1021         */
1022        COUNT, 
1023        /**
1024         * Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.
1025         */
1026        DATAREQUIREMENT, 
1027        /**
1028         * A length - a value with a unit that is a physical distance.
1029         */
1030        DISTANCE, 
1031        /**
1032         * Indicates how the medication is/was taken or should be taken by the patient.
1033         */
1034        DOSAGE, 
1035        /**
1036         * A length of time.
1037         */
1038        DURATION, 
1039        /**
1040         * Base definition for all elements in a resource.
1041         */
1042        ELEMENT, 
1043        /**
1044         * Captures constraints on each element within the resource, profile, or extension.
1045         */
1046        ELEMENTDEFINITION, 
1047        /**
1048         * Optional Extension Element - found in all resources.
1049         */
1050        EXTENSION, 
1051        /**
1052         * A human's name with the ability to identify parts and usage.
1053         */
1054        HUMANNAME, 
1055        /**
1056         * A technical identifier - identifies some entity uniquely and unambiguously.
1057         */
1058        IDENTIFIER, 
1059        /**
1060         * 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.
1061         */
1062        META, 
1063        /**
1064         * An amount of economic utility in some recognized currency.
1065         */
1066        MONEY, 
1067        /**
1068         * A human-readable formatted text, including images.
1069         */
1070        NARRATIVE, 
1071        /**
1072         * 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.
1073         */
1074        PARAMETERDEFINITION, 
1075        /**
1076         * A time period defined by a start and end date and optionally time.
1077         */
1078        PERIOD, 
1079        /**
1080         * 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.
1081         */
1082        QUANTITY, 
1083        /**
1084         * A set of ordered Quantities defined by a low and high limit.
1085         */
1086        RANGE, 
1087        /**
1088         * A relationship of two Quantity values - expressed as a numerator and a denominator.
1089         */
1090        RATIO, 
1091        /**
1092         * A reference from one resource to another.
1093         */
1094        REFERENCE, 
1095        /**
1096         * Related artifacts such as additional documentation, justification, or bibliographic references.
1097         */
1098        RELATEDARTIFACT, 
1099        /**
1100         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
1101         */
1102        SAMPLEDDATA, 
1103        /**
1104         * 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.
1105         */
1106        SIGNATURE, 
1107        /**
1108         * null
1109         */
1110        SIMPLEQUANTITY, 
1111        /**
1112         * Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.
1113         */
1114        TIMING, 
1115        /**
1116         * A description of a triggering event.
1117         */
1118        TRIGGERDEFINITION, 
1119        /**
1120         * Specifies clinical/business/etc metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).
1121         */
1122        USAGECONTEXT, 
1123        /**
1124         * A stream of bytes
1125         */
1126        BASE64BINARY, 
1127        /**
1128         * Value of "true" or "false"
1129         */
1130        BOOLEAN, 
1131        /**
1132         * 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
1133         */
1134        CODE, 
1135        /**
1136         * 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.
1137         */
1138        DATE, 
1139        /**
1140         * 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.
1141         */
1142        DATETIME, 
1143        /**
1144         * A rational number with implicit precision
1145         */
1146        DECIMAL, 
1147        /**
1148         * 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.
1149         */
1150        ID, 
1151        /**
1152         * An instant in time - known at least to the second
1153         */
1154        INSTANT, 
1155        /**
1156         * A whole number
1157         */
1158        INTEGER, 
1159        /**
1160         * A string that may contain markdown syntax for optional processing by a mark down presentation engine
1161         */
1162        MARKDOWN, 
1163        /**
1164         * An OID represented as a URI
1165         */
1166        OID, 
1167        /**
1168         * An integer with a value that is positive (e.g. >0)
1169         */
1170        POSITIVEINT, 
1171        /**
1172         * A sequence of Unicode characters
1173         */
1174        STRING, 
1175        /**
1176         * A time during the day, with no date specified
1177         */
1178        TIME, 
1179        /**
1180         * An integer with a value that is not negative (e.g. >= 0)
1181         */
1182        UNSIGNEDINT, 
1183        /**
1184         * String of characters used to identify a name or a resource
1185         */
1186        URI, 
1187        /**
1188         * A UUID, represented as a URI
1189         */
1190        UUID, 
1191        /**
1192         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
1193         */
1194        XHTML, 
1195        /**
1196         * added to help the parsers
1197         */
1198        NULL;
1199        public static DataType fromCode(String codeString) throws FHIRException {
1200            if (codeString == null || "".equals(codeString))
1201                return null;
1202        if ("Address".equals(codeString))
1203          return ADDRESS;
1204        if ("Age".equals(codeString))
1205          return AGE;
1206        if ("Annotation".equals(codeString))
1207          return ANNOTATION;
1208        if ("Attachment".equals(codeString))
1209          return ATTACHMENT;
1210        if ("BackboneElement".equals(codeString))
1211          return BACKBONEELEMENT;
1212        if ("CodeableConcept".equals(codeString))
1213          return CODEABLECONCEPT;
1214        if ("Coding".equals(codeString))
1215          return CODING;
1216        if ("ContactDetail".equals(codeString))
1217          return CONTACTDETAIL;
1218        if ("ContactPoint".equals(codeString))
1219          return CONTACTPOINT;
1220        if ("Contributor".equals(codeString))
1221          return CONTRIBUTOR;
1222        if ("Count".equals(codeString))
1223          return COUNT;
1224        if ("DataRequirement".equals(codeString))
1225          return DATAREQUIREMENT;
1226        if ("Distance".equals(codeString))
1227          return DISTANCE;
1228        if ("Dosage".equals(codeString))
1229          return DOSAGE;
1230        if ("Duration".equals(codeString))
1231          return DURATION;
1232        if ("Element".equals(codeString))
1233          return ELEMENT;
1234        if ("ElementDefinition".equals(codeString))
1235          return ELEMENTDEFINITION;
1236        if ("Extension".equals(codeString))
1237          return EXTENSION;
1238        if ("HumanName".equals(codeString))
1239          return HUMANNAME;
1240        if ("Identifier".equals(codeString))
1241          return IDENTIFIER;
1242        if ("Meta".equals(codeString))
1243          return META;
1244        if ("Money".equals(codeString))
1245          return MONEY;
1246        if ("Narrative".equals(codeString))
1247          return NARRATIVE;
1248        if ("ParameterDefinition".equals(codeString))
1249          return PARAMETERDEFINITION;
1250        if ("Period".equals(codeString))
1251          return PERIOD;
1252        if ("Quantity".equals(codeString))
1253          return QUANTITY;
1254        if ("Range".equals(codeString))
1255          return RANGE;
1256        if ("Ratio".equals(codeString))
1257          return RATIO;
1258        if ("Reference".equals(codeString))
1259          return REFERENCE;
1260        if ("RelatedArtifact".equals(codeString))
1261          return RELATEDARTIFACT;
1262        if ("SampledData".equals(codeString))
1263          return SAMPLEDDATA;
1264        if ("Signature".equals(codeString))
1265          return SIGNATURE;
1266        if ("SimpleQuantity".equals(codeString))
1267          return SIMPLEQUANTITY;
1268        if ("Timing".equals(codeString))
1269          return TIMING;
1270        if ("TriggerDefinition".equals(codeString))
1271          return TRIGGERDEFINITION;
1272        if ("UsageContext".equals(codeString))
1273          return USAGECONTEXT;
1274        if ("base64Binary".equals(codeString))
1275          return BASE64BINARY;
1276        if ("boolean".equals(codeString))
1277          return BOOLEAN;
1278        if ("code".equals(codeString))
1279          return CODE;
1280        if ("date".equals(codeString))
1281          return DATE;
1282        if ("dateTime".equals(codeString))
1283          return DATETIME;
1284        if ("decimal".equals(codeString))
1285          return DECIMAL;
1286        if ("id".equals(codeString))
1287          return ID;
1288        if ("instant".equals(codeString))
1289          return INSTANT;
1290        if ("integer".equals(codeString))
1291          return INTEGER;
1292        if ("markdown".equals(codeString))
1293          return MARKDOWN;
1294        if ("oid".equals(codeString))
1295          return OID;
1296        if ("positiveInt".equals(codeString))
1297          return POSITIVEINT;
1298        if ("string".equals(codeString))
1299          return STRING;
1300        if ("time".equals(codeString))
1301          return TIME;
1302        if ("unsignedInt".equals(codeString))
1303          return UNSIGNEDINT;
1304        if ("uri".equals(codeString))
1305          return URI;
1306        if ("uuid".equals(codeString))
1307          return UUID;
1308        if ("xhtml".equals(codeString))
1309          return XHTML;
1310        throw new FHIRException("Unknown DataType code '"+codeString+"'");
1311        }
1312        public String toCode() {
1313          switch (this) {
1314            case ADDRESS: return "Address";
1315            case AGE: return "Age";
1316            case ANNOTATION: return "Annotation";
1317            case ATTACHMENT: return "Attachment";
1318            case BACKBONEELEMENT: return "BackboneElement";
1319            case CODEABLECONCEPT: return "CodeableConcept";
1320            case CODING: return "Coding";
1321            case CONTACTDETAIL: return "ContactDetail";
1322            case CONTACTPOINT: return "ContactPoint";
1323            case CONTRIBUTOR: return "Contributor";
1324            case COUNT: return "Count";
1325            case DATAREQUIREMENT: return "DataRequirement";
1326            case DISTANCE: return "Distance";
1327            case DOSAGE: return "Dosage";
1328            case DURATION: return "Duration";
1329            case ELEMENT: return "Element";
1330            case ELEMENTDEFINITION: return "ElementDefinition";
1331            case EXTENSION: return "Extension";
1332            case HUMANNAME: return "HumanName";
1333            case IDENTIFIER: return "Identifier";
1334            case META: return "Meta";
1335            case MONEY: return "Money";
1336            case NARRATIVE: return "Narrative";
1337            case PARAMETERDEFINITION: return "ParameterDefinition";
1338            case PERIOD: return "Period";
1339            case QUANTITY: return "Quantity";
1340            case RANGE: return "Range";
1341            case RATIO: return "Ratio";
1342            case REFERENCE: return "Reference";
1343            case RELATEDARTIFACT: return "RelatedArtifact";
1344            case SAMPLEDDATA: return "SampledData";
1345            case SIGNATURE: return "Signature";
1346            case SIMPLEQUANTITY: return "SimpleQuantity";
1347            case TIMING: return "Timing";
1348            case TRIGGERDEFINITION: return "TriggerDefinition";
1349            case USAGECONTEXT: return "UsageContext";
1350            case BASE64BINARY: return "base64Binary";
1351            case BOOLEAN: return "boolean";
1352            case CODE: return "code";
1353            case DATE: return "date";
1354            case DATETIME: return "dateTime";
1355            case DECIMAL: return "decimal";
1356            case ID: return "id";
1357            case INSTANT: return "instant";
1358            case INTEGER: return "integer";
1359            case MARKDOWN: return "markdown";
1360            case OID: return "oid";
1361            case POSITIVEINT: return "positiveInt";
1362            case STRING: return "string";
1363            case TIME: return "time";
1364            case UNSIGNEDINT: return "unsignedInt";
1365            case URI: return "uri";
1366            case UUID: return "uuid";
1367            case XHTML: return "xhtml";
1368            default: return "?";
1369          }
1370        }
1371        public String getSystem() {
1372          switch (this) {
1373            case ADDRESS: return "http://hl7.org/fhir/data-types";
1374            case AGE: return "http://hl7.org/fhir/data-types";
1375            case ANNOTATION: return "http://hl7.org/fhir/data-types";
1376            case ATTACHMENT: return "http://hl7.org/fhir/data-types";
1377            case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types";
1378            case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types";
1379            case CODING: return "http://hl7.org/fhir/data-types";
1380            case CONTACTDETAIL: return "http://hl7.org/fhir/data-types";
1381            case CONTACTPOINT: return "http://hl7.org/fhir/data-types";
1382            case CONTRIBUTOR: return "http://hl7.org/fhir/data-types";
1383            case COUNT: return "http://hl7.org/fhir/data-types";
1384            case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types";
1385            case DISTANCE: return "http://hl7.org/fhir/data-types";
1386            case DOSAGE: return "http://hl7.org/fhir/data-types";
1387            case DURATION: return "http://hl7.org/fhir/data-types";
1388            case ELEMENT: return "http://hl7.org/fhir/data-types";
1389            case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types";
1390            case EXTENSION: return "http://hl7.org/fhir/data-types";
1391            case HUMANNAME: return "http://hl7.org/fhir/data-types";
1392            case IDENTIFIER: return "http://hl7.org/fhir/data-types";
1393            case META: return "http://hl7.org/fhir/data-types";
1394            case MONEY: return "http://hl7.org/fhir/data-types";
1395            case NARRATIVE: return "http://hl7.org/fhir/data-types";
1396            case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types";
1397            case PERIOD: return "http://hl7.org/fhir/data-types";
1398            case QUANTITY: return "http://hl7.org/fhir/data-types";
1399            case RANGE: return "http://hl7.org/fhir/data-types";
1400            case RATIO: return "http://hl7.org/fhir/data-types";
1401            case REFERENCE: return "http://hl7.org/fhir/data-types";
1402            case RELATEDARTIFACT: return "http://hl7.org/fhir/data-types";
1403            case SAMPLEDDATA: return "http://hl7.org/fhir/data-types";
1404            case SIGNATURE: return "http://hl7.org/fhir/data-types";
1405            case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types";
1406            case TIMING: return "http://hl7.org/fhir/data-types";
1407            case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types";
1408            case USAGECONTEXT: return "http://hl7.org/fhir/data-types";
1409            case BASE64BINARY: return "http://hl7.org/fhir/data-types";
1410            case BOOLEAN: return "http://hl7.org/fhir/data-types";
1411            case CODE: return "http://hl7.org/fhir/data-types";
1412            case DATE: return "http://hl7.org/fhir/data-types";
1413            case DATETIME: return "http://hl7.org/fhir/data-types";
1414            case DECIMAL: return "http://hl7.org/fhir/data-types";
1415            case ID: return "http://hl7.org/fhir/data-types";
1416            case INSTANT: return "http://hl7.org/fhir/data-types";
1417            case INTEGER: return "http://hl7.org/fhir/data-types";
1418            case MARKDOWN: return "http://hl7.org/fhir/data-types";
1419            case OID: return "http://hl7.org/fhir/data-types";
1420            case POSITIVEINT: return "http://hl7.org/fhir/data-types";
1421            case STRING: return "http://hl7.org/fhir/data-types";
1422            case TIME: return "http://hl7.org/fhir/data-types";
1423            case UNSIGNEDINT: return "http://hl7.org/fhir/data-types";
1424            case URI: return "http://hl7.org/fhir/data-types";
1425            case UUID: return "http://hl7.org/fhir/data-types";
1426            case XHTML: return "http://hl7.org/fhir/data-types";
1427            default: return "?";
1428          }
1429        }
1430        public String getDefinition() {
1431          switch (this) {
1432            case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.";
1433            case AGE: return "A duration of time during which an organism (or a process) has existed.";
1434            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
1435            case ATTACHMENT: return "For referring to data content defined in other formats.";
1436            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
1437            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
1438            case CODING: return "A reference to a code defined by a terminology system.";
1439            case CONTACTDETAIL: return "Specifies contact information for a person or organization.";
1440            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
1441            case CONTRIBUTOR: return "A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.";
1442            case COUNT: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
1443            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.";
1444            case DISTANCE: return "A length - a value with a unit that is a physical distance.";
1445            case DOSAGE: return "Indicates how the medication is/was taken or should be taken by the patient.";
1446            case DURATION: return "A length of time.";
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 Extension 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 MONEY: return "An amount of economic utility in some recognized currency.";
1454            case NARRATIVE: return "A human-readable formatted text, including images.";
1455            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.";
1456            case PERIOD: return "A time period defined by a start and end date and optionally time.";
1457            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.";
1458            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
1459            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
1460            case REFERENCE: return "A reference from one resource to another.";
1461            case RELATEDARTIFACT: return "Related artifacts such as additional documentation, justification, or bibliographic references.";
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 planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.";
1466            case TRIGGERDEFINITION: return "A description of a triggering event.";
1467            case USAGECONTEXT: return "Specifies clinical/business/etc metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).";
1468            case BASE64BINARY: return "A stream of bytes";
1469            case BOOLEAN: return "Value of \"true\" or \"false\"";
1470            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";
1471            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.";
1472            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.";
1473            case DECIMAL: return "A rational number with implicit precision";
1474            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.";
1475            case INSTANT: return "An instant in time - known at least to the second";
1476            case INTEGER: return "A whole number";
1477            case MARKDOWN: return "A string that may contain markdown syntax for optional processing by a mark down presentation engine";
1478            case OID: return "An OID represented as a URI";
1479            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
1480            case STRING: return "A sequence of Unicode characters";
1481            case TIME: return "A time during the day, with no date specified";
1482            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
1483            case URI: return "String of characters used to identify a name or a resource";
1484            case UUID: return "A UUID, represented as a URI";
1485            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
1486            default: return "?";
1487          }
1488        }
1489        public String getDisplay() {
1490          switch (this) {
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 CONTACTDETAIL: return "ContactDetail";
1499            case CONTACTPOINT: return "ContactPoint";
1500            case CONTRIBUTOR: return "Contributor";
1501            case COUNT: return "Count";
1502            case DATAREQUIREMENT: return "DataRequirement";
1503            case DISTANCE: return "Distance";
1504            case DOSAGE: return "Dosage";
1505            case DURATION: return "Duration";
1506            case ELEMENT: return "Element";
1507            case ELEMENTDEFINITION: return "ElementDefinition";
1508            case EXTENSION: return "Extension";
1509            case HUMANNAME: return "HumanName";
1510            case IDENTIFIER: return "Identifier";
1511            case META: return "Meta";
1512            case MONEY: return "Money";
1513            case NARRATIVE: return "Narrative";
1514            case PARAMETERDEFINITION: return "ParameterDefinition";
1515            case PERIOD: return "Period";
1516            case QUANTITY: return "Quantity";
1517            case RANGE: return "Range";
1518            case RATIO: return "Ratio";
1519            case REFERENCE: return "Reference";
1520            case RELATEDARTIFACT: return "RelatedArtifact";
1521            case SAMPLEDDATA: return "SampledData";
1522            case SIGNATURE: return "Signature";
1523            case SIMPLEQUANTITY: return "SimpleQuantity";
1524            case TIMING: return "Timing";
1525            case TRIGGERDEFINITION: return "TriggerDefinition";
1526            case USAGECONTEXT: return "UsageContext";
1527            case BASE64BINARY: return "base64Binary";
1528            case BOOLEAN: return "boolean";
1529            case CODE: return "code";
1530            case DATE: return "date";
1531            case DATETIME: return "dateTime";
1532            case DECIMAL: return "decimal";
1533            case ID: return "id";
1534            case INSTANT: return "instant";
1535            case INTEGER: return "integer";
1536            case MARKDOWN: return "markdown";
1537            case OID: return "oid";
1538            case POSITIVEINT: return "positiveInt";
1539            case STRING: return "string";
1540            case TIME: return "time";
1541            case UNSIGNEDINT: return "unsignedInt";
1542            case URI: return "uri";
1543            case UUID: return "uuid";
1544            case XHTML: return "XHTML";
1545            default: return "?";
1546          }
1547        }
1548    }
1549
1550  public static class DataTypeEnumFactory implements EnumFactory<DataType> {
1551    public DataType fromCode(String codeString) throws IllegalArgumentException {
1552      if (codeString == null || "".equals(codeString))
1553            if (codeString == null || "".equals(codeString))
1554                return null;
1555        if ("Address".equals(codeString))
1556          return DataType.ADDRESS;
1557        if ("Age".equals(codeString))
1558          return DataType.AGE;
1559        if ("Annotation".equals(codeString))
1560          return DataType.ANNOTATION;
1561        if ("Attachment".equals(codeString))
1562          return DataType.ATTACHMENT;
1563        if ("BackboneElement".equals(codeString))
1564          return DataType.BACKBONEELEMENT;
1565        if ("CodeableConcept".equals(codeString))
1566          return DataType.CODEABLECONCEPT;
1567        if ("Coding".equals(codeString))
1568          return DataType.CODING;
1569        if ("ContactDetail".equals(codeString))
1570          return DataType.CONTACTDETAIL;
1571        if ("ContactPoint".equals(codeString))
1572          return DataType.CONTACTPOINT;
1573        if ("Contributor".equals(codeString))
1574          return DataType.CONTRIBUTOR;
1575        if ("Count".equals(codeString))
1576          return DataType.COUNT;
1577        if ("DataRequirement".equals(codeString))
1578          return DataType.DATAREQUIREMENT;
1579        if ("Distance".equals(codeString))
1580          return DataType.DISTANCE;
1581        if ("Dosage".equals(codeString))
1582          return DataType.DOSAGE;
1583        if ("Duration".equals(codeString))
1584          return DataType.DURATION;
1585        if ("Element".equals(codeString))
1586          return DataType.ELEMENT;
1587        if ("ElementDefinition".equals(codeString))
1588          return DataType.ELEMENTDEFINITION;
1589        if ("Extension".equals(codeString))
1590          return DataType.EXTENSION;
1591        if ("HumanName".equals(codeString))
1592          return DataType.HUMANNAME;
1593        if ("Identifier".equals(codeString))
1594          return DataType.IDENTIFIER;
1595        if ("Meta".equals(codeString))
1596          return DataType.META;
1597        if ("Money".equals(codeString))
1598          return DataType.MONEY;
1599        if ("Narrative".equals(codeString))
1600          return DataType.NARRATIVE;
1601        if ("ParameterDefinition".equals(codeString))
1602          return DataType.PARAMETERDEFINITION;
1603        if ("Period".equals(codeString))
1604          return DataType.PERIOD;
1605        if ("Quantity".equals(codeString))
1606          return DataType.QUANTITY;
1607        if ("Range".equals(codeString))
1608          return DataType.RANGE;
1609        if ("Ratio".equals(codeString))
1610          return DataType.RATIO;
1611        if ("Reference".equals(codeString))
1612          return DataType.REFERENCE;
1613        if ("RelatedArtifact".equals(codeString))
1614          return DataType.RELATEDARTIFACT;
1615        if ("SampledData".equals(codeString))
1616          return DataType.SAMPLEDDATA;
1617        if ("Signature".equals(codeString))
1618          return DataType.SIGNATURE;
1619        if ("SimpleQuantity".equals(codeString))
1620          return DataType.SIMPLEQUANTITY;
1621        if ("Timing".equals(codeString))
1622          return DataType.TIMING;
1623        if ("TriggerDefinition".equals(codeString))
1624          return DataType.TRIGGERDEFINITION;
1625        if ("UsageContext".equals(codeString))
1626          return DataType.USAGECONTEXT;
1627        if ("base64Binary".equals(codeString))
1628          return DataType.BASE64BINARY;
1629        if ("boolean".equals(codeString))
1630          return DataType.BOOLEAN;
1631        if ("code".equals(codeString))
1632          return DataType.CODE;
1633        if ("date".equals(codeString))
1634          return DataType.DATE;
1635        if ("dateTime".equals(codeString))
1636          return DataType.DATETIME;
1637        if ("decimal".equals(codeString))
1638          return DataType.DECIMAL;
1639        if ("id".equals(codeString))
1640          return DataType.ID;
1641        if ("instant".equals(codeString))
1642          return DataType.INSTANT;
1643        if ("integer".equals(codeString))
1644          return DataType.INTEGER;
1645        if ("markdown".equals(codeString))
1646          return DataType.MARKDOWN;
1647        if ("oid".equals(codeString))
1648          return DataType.OID;
1649        if ("positiveInt".equals(codeString))
1650          return DataType.POSITIVEINT;
1651        if ("string".equals(codeString))
1652          return DataType.STRING;
1653        if ("time".equals(codeString))
1654          return DataType.TIME;
1655        if ("unsignedInt".equals(codeString))
1656          return DataType.UNSIGNEDINT;
1657        if ("uri".equals(codeString))
1658          return DataType.URI;
1659        if ("uuid".equals(codeString))
1660          return DataType.UUID;
1661        if ("xhtml".equals(codeString))
1662          return DataType.XHTML;
1663        throw new IllegalArgumentException("Unknown DataType code '"+codeString+"'");
1664        }
1665        public Enumeration<DataType> fromType(Base code) throws FHIRException {
1666          if (code == null)
1667            return null;
1668          if (code.isEmpty())
1669            return new Enumeration<DataType>(this);
1670          String codeString = ((PrimitiveType) code).asStringValue();
1671          if (codeString == null || "".equals(codeString))
1672            return null;
1673        if ("Address".equals(codeString))
1674          return new Enumeration<DataType>(this, DataType.ADDRESS);
1675        if ("Age".equals(codeString))
1676          return new Enumeration<DataType>(this, DataType.AGE);
1677        if ("Annotation".equals(codeString))
1678          return new Enumeration<DataType>(this, DataType.ANNOTATION);
1679        if ("Attachment".equals(codeString))
1680          return new Enumeration<DataType>(this, DataType.ATTACHMENT);
1681        if ("BackboneElement".equals(codeString))
1682          return new Enumeration<DataType>(this, DataType.BACKBONEELEMENT);
1683        if ("CodeableConcept".equals(codeString))
1684          return new Enumeration<DataType>(this, DataType.CODEABLECONCEPT);
1685        if ("Coding".equals(codeString))
1686          return new Enumeration<DataType>(this, DataType.CODING);
1687        if ("ContactDetail".equals(codeString))
1688          return new Enumeration<DataType>(this, DataType.CONTACTDETAIL);
1689        if ("ContactPoint".equals(codeString))
1690          return new Enumeration<DataType>(this, DataType.CONTACTPOINT);
1691        if ("Contributor".equals(codeString))
1692          return new Enumeration<DataType>(this, DataType.CONTRIBUTOR);
1693        if ("Count".equals(codeString))
1694          return new Enumeration<DataType>(this, DataType.COUNT);
1695        if ("DataRequirement".equals(codeString))
1696          return new Enumeration<DataType>(this, DataType.DATAREQUIREMENT);
1697        if ("Distance".equals(codeString))
1698          return new Enumeration<DataType>(this, DataType.DISTANCE);
1699        if ("Dosage".equals(codeString))
1700          return new Enumeration<DataType>(this, DataType.DOSAGE);
1701        if ("Duration".equals(codeString))
1702          return new Enumeration<DataType>(this, DataType.DURATION);
1703        if ("Element".equals(codeString))
1704          return new Enumeration<DataType>(this, DataType.ELEMENT);
1705        if ("ElementDefinition".equals(codeString))
1706          return new Enumeration<DataType>(this, DataType.ELEMENTDEFINITION);
1707        if ("Extension".equals(codeString))
1708          return new Enumeration<DataType>(this, DataType.EXTENSION);
1709        if ("HumanName".equals(codeString))
1710          return new Enumeration<DataType>(this, DataType.HUMANNAME);
1711        if ("Identifier".equals(codeString))
1712          return new Enumeration<DataType>(this, DataType.IDENTIFIER);
1713        if ("Meta".equals(codeString))
1714          return new Enumeration<DataType>(this, DataType.META);
1715        if ("Money".equals(codeString))
1716          return new Enumeration<DataType>(this, DataType.MONEY);
1717        if ("Narrative".equals(codeString))
1718          return new Enumeration<DataType>(this, DataType.NARRATIVE);
1719        if ("ParameterDefinition".equals(codeString))
1720          return new Enumeration<DataType>(this, DataType.PARAMETERDEFINITION);
1721        if ("Period".equals(codeString))
1722          return new Enumeration<DataType>(this, DataType.PERIOD);
1723        if ("Quantity".equals(codeString))
1724          return new Enumeration<DataType>(this, DataType.QUANTITY);
1725        if ("Range".equals(codeString))
1726          return new Enumeration<DataType>(this, DataType.RANGE);
1727        if ("Ratio".equals(codeString))
1728          return new Enumeration<DataType>(this, DataType.RATIO);
1729        if ("Reference".equals(codeString))
1730          return new Enumeration<DataType>(this, DataType.REFERENCE);
1731        if ("RelatedArtifact".equals(codeString))
1732          return new Enumeration<DataType>(this, DataType.RELATEDARTIFACT);
1733        if ("SampledData".equals(codeString))
1734          return new Enumeration<DataType>(this, DataType.SAMPLEDDATA);
1735        if ("Signature".equals(codeString))
1736          return new Enumeration<DataType>(this, DataType.SIGNATURE);
1737        if ("SimpleQuantity".equals(codeString))
1738          return new Enumeration<DataType>(this, DataType.SIMPLEQUANTITY);
1739        if ("Timing".equals(codeString))
1740          return new Enumeration<DataType>(this, DataType.TIMING);
1741        if ("TriggerDefinition".equals(codeString))
1742          return new Enumeration<DataType>(this, DataType.TRIGGERDEFINITION);
1743        if ("UsageContext".equals(codeString))
1744          return new Enumeration<DataType>(this, DataType.USAGECONTEXT);
1745        if ("base64Binary".equals(codeString))
1746          return new Enumeration<DataType>(this, DataType.BASE64BINARY);
1747        if ("boolean".equals(codeString))
1748          return new Enumeration<DataType>(this, DataType.BOOLEAN);
1749        if ("code".equals(codeString))
1750          return new Enumeration<DataType>(this, DataType.CODE);
1751        if ("date".equals(codeString))
1752          return new Enumeration<DataType>(this, DataType.DATE);
1753        if ("dateTime".equals(codeString))
1754          return new Enumeration<DataType>(this, DataType.DATETIME);
1755        if ("decimal".equals(codeString))
1756          return new Enumeration<DataType>(this, DataType.DECIMAL);
1757        if ("id".equals(codeString))
1758          return new Enumeration<DataType>(this, DataType.ID);
1759        if ("instant".equals(codeString))
1760          return new Enumeration<DataType>(this, DataType.INSTANT);
1761        if ("integer".equals(codeString))
1762          return new Enumeration<DataType>(this, DataType.INTEGER);
1763        if ("markdown".equals(codeString))
1764          return new Enumeration<DataType>(this, DataType.MARKDOWN);
1765        if ("oid".equals(codeString))
1766          return new Enumeration<DataType>(this, DataType.OID);
1767        if ("positiveInt".equals(codeString))
1768          return new Enumeration<DataType>(this, DataType.POSITIVEINT);
1769        if ("string".equals(codeString))
1770          return new Enumeration<DataType>(this, DataType.STRING);
1771        if ("time".equals(codeString))
1772          return new Enumeration<DataType>(this, DataType.TIME);
1773        if ("unsignedInt".equals(codeString))
1774          return new Enumeration<DataType>(this, DataType.UNSIGNEDINT);
1775        if ("uri".equals(codeString))
1776          return new Enumeration<DataType>(this, DataType.URI);
1777        if ("uuid".equals(codeString))
1778          return new Enumeration<DataType>(this, DataType.UUID);
1779        if ("xhtml".equals(codeString))
1780          return new Enumeration<DataType>(this, DataType.XHTML);
1781        throw new FHIRException("Unknown DataType code '"+codeString+"'");
1782        }
1783    public String toCode(DataType code) {
1784      if (code == DataType.ADDRESS)
1785        return "Address";
1786      if (code == DataType.AGE)
1787        return "Age";
1788      if (code == DataType.ANNOTATION)
1789        return "Annotation";
1790      if (code == DataType.ATTACHMENT)
1791        return "Attachment";
1792      if (code == DataType.BACKBONEELEMENT)
1793        return "BackboneElement";
1794      if (code == DataType.CODEABLECONCEPT)
1795        return "CodeableConcept";
1796      if (code == DataType.CODING)
1797        return "Coding";
1798      if (code == DataType.CONTACTDETAIL)
1799        return "ContactDetail";
1800      if (code == DataType.CONTACTPOINT)
1801        return "ContactPoint";
1802      if (code == DataType.CONTRIBUTOR)
1803        return "Contributor";
1804      if (code == DataType.COUNT)
1805        return "Count";
1806      if (code == DataType.DATAREQUIREMENT)
1807        return "DataRequirement";
1808      if (code == DataType.DISTANCE)
1809        return "Distance";
1810      if (code == DataType.DOSAGE)
1811        return "Dosage";
1812      if (code == DataType.DURATION)
1813        return "Duration";
1814      if (code == DataType.ELEMENT)
1815        return "Element";
1816      if (code == DataType.ELEMENTDEFINITION)
1817        return "ElementDefinition";
1818      if (code == DataType.EXTENSION)
1819        return "Extension";
1820      if (code == DataType.HUMANNAME)
1821        return "HumanName";
1822      if (code == DataType.IDENTIFIER)
1823        return "Identifier";
1824      if (code == DataType.META)
1825        return "Meta";
1826      if (code == DataType.MONEY)
1827        return "Money";
1828      if (code == DataType.NARRATIVE)
1829        return "Narrative";
1830      if (code == DataType.PARAMETERDEFINITION)
1831        return "ParameterDefinition";
1832      if (code == DataType.PERIOD)
1833        return "Period";
1834      if (code == DataType.QUANTITY)
1835        return "Quantity";
1836      if (code == DataType.RANGE)
1837        return "Range";
1838      if (code == DataType.RATIO)
1839        return "Ratio";
1840      if (code == DataType.REFERENCE)
1841        return "Reference";
1842      if (code == DataType.RELATEDARTIFACT)
1843        return "RelatedArtifact";
1844      if (code == DataType.SAMPLEDDATA)
1845        return "SampledData";
1846      if (code == DataType.SIGNATURE)
1847        return "Signature";
1848      if (code == DataType.SIMPLEQUANTITY)
1849        return "SimpleQuantity";
1850      if (code == DataType.TIMING)
1851        return "Timing";
1852      if (code == DataType.TRIGGERDEFINITION)
1853        return "TriggerDefinition";
1854      if (code == DataType.USAGECONTEXT)
1855        return "UsageContext";
1856      if (code == DataType.BASE64BINARY)
1857        return "base64Binary";
1858      if (code == DataType.BOOLEAN)
1859        return "boolean";
1860      if (code == DataType.CODE)
1861        return "code";
1862      if (code == DataType.DATE)
1863        return "date";
1864      if (code == DataType.DATETIME)
1865        return "dateTime";
1866      if (code == DataType.DECIMAL)
1867        return "decimal";
1868      if (code == DataType.ID)
1869        return "id";
1870      if (code == DataType.INSTANT)
1871        return "instant";
1872      if (code == DataType.INTEGER)
1873        return "integer";
1874      if (code == DataType.MARKDOWN)
1875        return "markdown";
1876      if (code == DataType.OID)
1877        return "oid";
1878      if (code == DataType.POSITIVEINT)
1879        return "positiveInt";
1880      if (code == DataType.STRING)
1881        return "string";
1882      if (code == DataType.TIME)
1883        return "time";
1884      if (code == DataType.UNSIGNEDINT)
1885        return "unsignedInt";
1886      if (code == DataType.URI)
1887        return "uri";
1888      if (code == DataType.UUID)
1889        return "uuid";
1890      if (code == DataType.XHTML)
1891        return "xhtml";
1892      return "?";
1893      }
1894    public String toSystem(DataType code) {
1895      return code.getSystem();
1896      }
1897    }
1898
1899    public enum DocumentReferenceStatus {
1900        /**
1901         * This is the current reference for this document.
1902         */
1903        CURRENT, 
1904        /**
1905         * This reference has been superseded by another reference.
1906         */
1907        SUPERSEDED, 
1908        /**
1909         * This reference was created in error.
1910         */
1911        ENTEREDINERROR, 
1912        /**
1913         * added to help the parsers
1914         */
1915        NULL;
1916        public static DocumentReferenceStatus fromCode(String codeString) throws FHIRException {
1917            if (codeString == null || "".equals(codeString))
1918                return null;
1919        if ("current".equals(codeString))
1920          return CURRENT;
1921        if ("superseded".equals(codeString))
1922          return SUPERSEDED;
1923        if ("entered-in-error".equals(codeString))
1924          return ENTEREDINERROR;
1925        throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'");
1926        }
1927        public String toCode() {
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        public String getSystem() {
1936          switch (this) {
1937            case CURRENT: return "http://hl7.org/fhir/document-reference-status";
1938            case SUPERSEDED: return "http://hl7.org/fhir/document-reference-status";
1939            case ENTEREDINERROR: return "http://hl7.org/fhir/document-reference-status";
1940            default: return "?";
1941          }
1942        }
1943        public String getDefinition() {
1944          switch (this) {
1945            case CURRENT: return "This is the current reference for this document.";
1946            case SUPERSEDED: return "This reference has been superseded by another reference.";
1947            case ENTEREDINERROR: return "This reference was created in error.";
1948            default: return "?";
1949          }
1950        }
1951        public String getDisplay() {
1952          switch (this) {
1953            case CURRENT: return "Current";
1954            case SUPERSEDED: return "Superseded";
1955            case ENTEREDINERROR: return "Entered in Error";
1956            default: return "?";
1957          }
1958        }
1959    }
1960
1961  public static class DocumentReferenceStatusEnumFactory implements EnumFactory<DocumentReferenceStatus> {
1962    public DocumentReferenceStatus fromCode(String codeString) throws IllegalArgumentException {
1963      if (codeString == null || "".equals(codeString))
1964            if (codeString == null || "".equals(codeString))
1965                return null;
1966        if ("current".equals(codeString))
1967          return DocumentReferenceStatus.CURRENT;
1968        if ("superseded".equals(codeString))
1969          return DocumentReferenceStatus.SUPERSEDED;
1970        if ("entered-in-error".equals(codeString))
1971          return DocumentReferenceStatus.ENTEREDINERROR;
1972        throw new IllegalArgumentException("Unknown DocumentReferenceStatus code '"+codeString+"'");
1973        }
1974        public Enumeration<DocumentReferenceStatus> fromType(Base code) throws FHIRException {
1975          if (code == null)
1976            return null;
1977          if (code.isEmpty())
1978            return new Enumeration<DocumentReferenceStatus>(this);
1979          String codeString = ((PrimitiveType) code).asStringValue();
1980          if (codeString == null || "".equals(codeString))
1981            return null;
1982        if ("current".equals(codeString))
1983          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.CURRENT);
1984        if ("superseded".equals(codeString))
1985          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.SUPERSEDED);
1986        if ("entered-in-error".equals(codeString))
1987          return new Enumeration<DocumentReferenceStatus>(this, DocumentReferenceStatus.ENTEREDINERROR);
1988        throw new FHIRException("Unknown DocumentReferenceStatus code '"+codeString+"'");
1989        }
1990    public String toCode(DocumentReferenceStatus code) {
1991      if (code == DocumentReferenceStatus.CURRENT)
1992        return "current";
1993      if (code == DocumentReferenceStatus.SUPERSEDED)
1994        return "superseded";
1995      if (code == DocumentReferenceStatus.ENTEREDINERROR)
1996        return "entered-in-error";
1997      return "?";
1998      }
1999    public String toSystem(DocumentReferenceStatus code) {
2000      return code.getSystem();
2001      }
2002    }
2003
2004    public enum FHIRAllTypes {
2005        /**
2006         * An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.
2007         */
2008        ADDRESS, 
2009        /**
2010         * A duration of time during which an organism (or a process) has existed.
2011         */
2012        AGE, 
2013        /**
2014         * A  text note which also  contains information about who made the statement and when.
2015         */
2016        ANNOTATION, 
2017        /**
2018         * For referring to data content defined in other formats.
2019         */
2020        ATTACHMENT, 
2021        /**
2022         * Base definition for all elements that are defined inside a resource - but not those in a data type.
2023         */
2024        BACKBONEELEMENT, 
2025        /**
2026         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
2027         */
2028        CODEABLECONCEPT, 
2029        /**
2030         * A reference to a code defined by a terminology system.
2031         */
2032        CODING, 
2033        /**
2034         * Specifies contact information for a person or organization.
2035         */
2036        CONTACTDETAIL, 
2037        /**
2038         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
2039         */
2040        CONTACTPOINT, 
2041        /**
2042         * A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.
2043         */
2044        CONTRIBUTOR, 
2045        /**
2046         * 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.
2047         */
2048        COUNT, 
2049        /**
2050         * Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.
2051         */
2052        DATAREQUIREMENT, 
2053        /**
2054         * A length - a value with a unit that is a physical distance.
2055         */
2056        DISTANCE, 
2057        /**
2058         * Indicates how the medication is/was taken or should be taken by the patient.
2059         */
2060        DOSAGE, 
2061        /**
2062         * A length of time.
2063         */
2064        DURATION, 
2065        /**
2066         * Base definition for all elements in a resource.
2067         */
2068        ELEMENT, 
2069        /**
2070         * Captures constraints on each element within the resource, profile, or extension.
2071         */
2072        ELEMENTDEFINITION, 
2073        /**
2074         * Optional Extension Element - found in all resources.
2075         */
2076        EXTENSION, 
2077        /**
2078         * A human's name with the ability to identify parts and usage.
2079         */
2080        HUMANNAME, 
2081        /**
2082         * A technical identifier - identifies some entity uniquely and unambiguously.
2083         */
2084        IDENTIFIER, 
2085        /**
2086         * 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.
2087         */
2088        META, 
2089        /**
2090         * An amount of economic utility in some recognized currency.
2091         */
2092        MONEY, 
2093        /**
2094         * A human-readable formatted text, including images.
2095         */
2096        NARRATIVE, 
2097        /**
2098         * 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.
2099         */
2100        PARAMETERDEFINITION, 
2101        /**
2102         * A time period defined by a start and end date and optionally time.
2103         */
2104        PERIOD, 
2105        /**
2106         * 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.
2107         */
2108        QUANTITY, 
2109        /**
2110         * A set of ordered Quantities defined by a low and high limit.
2111         */
2112        RANGE, 
2113        /**
2114         * A relationship of two Quantity values - expressed as a numerator and a denominator.
2115         */
2116        RATIO, 
2117        /**
2118         * A reference from one resource to another.
2119         */
2120        REFERENCE, 
2121        /**
2122         * Related artifacts such as additional documentation, justification, or bibliographic references.
2123         */
2124        RELATEDARTIFACT, 
2125        /**
2126         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
2127         */
2128        SAMPLEDDATA, 
2129        /**
2130         * 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.
2131         */
2132        SIGNATURE, 
2133        /**
2134         * null
2135         */
2136        SIMPLEQUANTITY, 
2137        /**
2138         * Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.
2139         */
2140        TIMING, 
2141        /**
2142         * A description of a triggering event.
2143         */
2144        TRIGGERDEFINITION, 
2145        /**
2146         * Specifies clinical/business/etc metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).
2147         */
2148        USAGECONTEXT, 
2149        /**
2150         * A stream of bytes
2151         */
2152        BASE64BINARY, 
2153        /**
2154         * Value of "true" or "false"
2155         */
2156        BOOLEAN, 
2157        /**
2158         * 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
2159         */
2160        CODE, 
2161        /**
2162         * A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.
2163         */
2164        DATE, 
2165        /**
2166         * 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.
2167         */
2168        DATETIME, 
2169        /**
2170         * A rational number with implicit precision
2171         */
2172        DECIMAL, 
2173        /**
2174         * 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.
2175         */
2176        ID, 
2177        /**
2178         * An instant in time - known at least to the second
2179         */
2180        INSTANT, 
2181        /**
2182         * A whole number
2183         */
2184        INTEGER, 
2185        /**
2186         * A string that may contain markdown syntax for optional processing by a mark down presentation engine
2187         */
2188        MARKDOWN, 
2189        /**
2190         * An OID represented as a URI
2191         */
2192        OID, 
2193        /**
2194         * An integer with a value that is positive (e.g. >0)
2195         */
2196        POSITIVEINT, 
2197        /**
2198         * A sequence of Unicode characters
2199         */
2200        STRING, 
2201        /**
2202         * A time during the day, with no date specified
2203         */
2204        TIME, 
2205        /**
2206         * An integer with a value that is not negative (e.g. >= 0)
2207         */
2208        UNSIGNEDINT, 
2209        /**
2210         * String of characters used to identify a name or a resource
2211         */
2212        URI, 
2213        /**
2214         * A UUID, represented as a URI
2215         */
2216        UUID, 
2217        /**
2218         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
2219         */
2220        XHTML, 
2221        /**
2222         * A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.
2223         */
2224        ACCOUNT, 
2225        /**
2226         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
2227         */
2228        ACTIVITYDEFINITION, 
2229        /**
2230         * Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.
2231         */
2232        ADVERSEEVENT, 
2233        /**
2234         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
2235         */
2236        ALLERGYINTOLERANCE, 
2237        /**
2238         * 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).
2239         */
2240        APPOINTMENT, 
2241        /**
2242         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
2243         */
2244        APPOINTMENTRESPONSE, 
2245        /**
2246         * 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.
2247         */
2248        AUDITEVENT, 
2249        /**
2250         * 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.
2251         */
2252        BASIC, 
2253        /**
2254         * A binary resource can contain any content, whether text, image, pdf, zip archive, etc.
2255         */
2256        BINARY, 
2257        /**
2258         * 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.
2259         */
2260        BODYSITE, 
2261        /**
2262         * A container for a collection of resources.
2263         */
2264        BUNDLE, 
2265        /**
2266         * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
2267         */
2268        CAPABILITYSTATEMENT, 
2269        /**
2270         * 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.
2271         */
2272        CAREPLAN, 
2273        /**
2274         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
2275         */
2276        CARETEAM, 
2277        /**
2278         * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.
2279         */
2280        CHARGEITEM, 
2281        /**
2282         * 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.
2283         */
2284        CLAIM, 
2285        /**
2286         * This resource provides the adjudication details from the processing of a Claim resource.
2287         */
2288        CLAIMRESPONSE, 
2289        /**
2290         * 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.
2291         */
2292        CLINICALIMPRESSION, 
2293        /**
2294         * A code system resource specifies a set of codes drawn from one or more code systems.
2295         */
2296        CODESYSTEM, 
2297        /**
2298         * 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.
2299         */
2300        COMMUNICATION, 
2301        /**
2302         * 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.
2303         */
2304        COMMUNICATIONREQUEST, 
2305        /**
2306         * A compartment definition that defines how resources are accessed on a server.
2307         */
2308        COMPARTMENTDEFINITION, 
2309        /**
2310         * 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.
2311         */
2312        COMPOSITION, 
2313        /**
2314         * 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.
2315         */
2316        CONCEPTMAP, 
2317        /**
2318         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
2319         */
2320        CONDITION, 
2321        /**
2322         * A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.
2323         */
2324        CONSENT, 
2325        /**
2326         * A formal agreement between parties regarding the conduct of business, exchange of information or other matters.
2327         */
2328        CONTRACT, 
2329        /**
2330         * Financial instrument which may be used to reimburse or pay for health care products and services.
2331         */
2332        COVERAGE, 
2333        /**
2334         * The formal description of a single piece of information that can be gathered and reported.
2335         */
2336        DATAELEMENT, 
2337        /**
2338         * 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.
2339         */
2340        DETECTEDISSUE, 
2341        /**
2342         * 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 include 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.
2343         */
2344        DEVICE, 
2345        /**
2346         * The characteristics, operational status and capabilities of a medical-related component of a medical device.
2347         */
2348        DEVICECOMPONENT, 
2349        /**
2350         * Describes a measurement, calculation or setting capability of a medical device.
2351         */
2352        DEVICEMETRIC, 
2353        /**
2354         * 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.
2355         */
2356        DEVICEREQUEST, 
2357        /**
2358         * 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.
2359         */
2360        DEVICEUSESTATEMENT, 
2361        /**
2362         * 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.
2363         */
2364        DIAGNOSTICREPORT, 
2365        /**
2366         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
2367         */
2368        DOCUMENTMANIFEST, 
2369        /**
2370         * A reference to a document.
2371         */
2372        DOCUMENTREFERENCE, 
2373        /**
2374         * A resource that includes narrative, extensions, and contained resources.
2375         */
2376        DOMAINRESOURCE, 
2377        /**
2378         * The EligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an EligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.
2379         */
2380        ELIGIBILITYREQUEST, 
2381        /**
2382         * This resource provides eligibility and plan details from the processing of an Eligibility resource.
2383         */
2384        ELIGIBILITYRESPONSE, 
2385        /**
2386         * 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.
2387         */
2388        ENCOUNTER, 
2389        /**
2390         * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.
2391         */
2392        ENDPOINT, 
2393        /**
2394         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
2395         */
2396        ENROLLMENTREQUEST, 
2397        /**
2398         * This resource provides enrollment and plan details from the processing of an Enrollment resource.
2399         */
2400        ENROLLMENTRESPONSE, 
2401        /**
2402         * 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.
2403         */
2404        EPISODEOFCARE, 
2405        /**
2406         * Resource to define constraints on the Expansion of a FHIR ValueSet.
2407         */
2408        EXPANSIONPROFILE, 
2409        /**
2410         * 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.
2411         */
2412        EXPLANATIONOFBENEFIT, 
2413        /**
2414         * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.
2415         */
2416        FAMILYMEMBERHISTORY, 
2417        /**
2418         * Prospective warnings of potential issues when providing care to the patient.
2419         */
2420        FLAG, 
2421        /**
2422         * 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.
2423         */
2424        GOAL, 
2425        /**
2426         * A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.
2427         */
2428        GRAPHDEFINITION, 
2429        /**
2430         * 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.
2431         */
2432        GROUP, 
2433        /**
2434         * 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.
2435         */
2436        GUIDANCERESPONSE, 
2437        /**
2438         * The details of a healthcare service available at a location.
2439         */
2440        HEALTHCARESERVICE, 
2441        /**
2442         * A text description of the DICOM SOP instances selected in the ImagingManifest; or the reason for, or significance of, the selection.
2443         */
2444        IMAGINGMANIFEST, 
2445        /**
2446         * 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.
2447         */
2448        IMAGINGSTUDY, 
2449        /**
2450         * 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.
2451         */
2452        IMMUNIZATION, 
2453        /**
2454         * 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.
2455         */
2456        IMMUNIZATIONRECOMMENDATION, 
2457        /**
2458         * A set of rules of 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.
2459         */
2460        IMPLEMENTATIONGUIDE, 
2461        /**
2462         * The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.
2463         */
2464        LIBRARY, 
2465        /**
2466         * Identifies two or more records (resource instances) that are referring to the same real-world "occurrence".
2467         */
2468        LINKAGE, 
2469        /**
2470         * A set of information summarized from a list of other resources.
2471         */
2472        LIST, 
2473        /**
2474         * Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.
2475         */
2476        LOCATION, 
2477        /**
2478         * The Measure resource provides the definition of a quality measure.
2479         */
2480        MEASURE, 
2481        /**
2482         * The MeasureReport resource contains the results of evaluating a measure.
2483         */
2484        MEASUREREPORT, 
2485        /**
2486         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
2487         */
2488        MEDIA, 
2489        /**
2490         * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.
2491         */
2492        MEDICATION, 
2493        /**
2494         * 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.
2495         */
2496        MEDICATIONADMINISTRATION, 
2497        /**
2498         * 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.
2499         */
2500        MEDICATIONDISPENSE, 
2501        /**
2502         * An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.
2503         */
2504        MEDICATIONREQUEST, 
2505        /**
2506         * A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains 
2507
2508The 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.
2509         */
2510        MEDICATIONSTATEMENT, 
2511        /**
2512         * Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.
2513         */
2514        MESSAGEDEFINITION, 
2515        /**
2516         * 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.
2517         */
2518        MESSAGEHEADER, 
2519        /**
2520         * 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.
2521         */
2522        NAMINGSYSTEM, 
2523        /**
2524         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
2525         */
2526        NUTRITIONORDER, 
2527        /**
2528         * Measurements and simple assertions made about a patient, device or other subject.
2529         */
2530        OBSERVATION, 
2531        /**
2532         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
2533         */
2534        OPERATIONDEFINITION, 
2535        /**
2536         * A collection of error, warning or information messages that result from a system action.
2537         */
2538        OPERATIONOUTCOME, 
2539        /**
2540         * 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.
2541         */
2542        ORGANIZATION, 
2543        /**
2544         * 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.
2545         */
2546        PARAMETERS, 
2547        /**
2548         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
2549         */
2550        PATIENT, 
2551        /**
2552         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
2553         */
2554        PAYMENTNOTICE, 
2555        /**
2556         * This resource provides payment details and claim references supporting a bulk payment.
2557         */
2558        PAYMENTRECONCILIATION, 
2559        /**
2560         * Demographics and administrative information about a person independent of a specific health-related context.
2561         */
2562        PERSON, 
2563        /**
2564         * This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.
2565         */
2566        PLANDEFINITION, 
2567        /**
2568         * A person who is directly or indirectly involved in the provisioning of healthcare.
2569         */
2570        PRACTITIONER, 
2571        /**
2572         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
2573         */
2574        PRACTITIONERROLE, 
2575        /**
2576         * 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.
2577         */
2578        PROCEDURE, 
2579        /**
2580         * A record of a request for diagnostic investigations, treatments, or operations to be performed.
2581         */
2582        PROCEDUREREQUEST, 
2583        /**
2584         * 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.
2585         */
2586        PROCESSREQUEST, 
2587        /**
2588         * This resource provides processing status, errors and notes from the processing of a resource.
2589         */
2590        PROCESSRESPONSE, 
2591        /**
2592         * 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.
2593         */
2594        PROVENANCE, 
2595        /**
2596         * A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.
2597         */
2598        QUESTIONNAIRE, 
2599        /**
2600         * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.
2601         */
2602        QUESTIONNAIRERESPONSE, 
2603        /**
2604         * 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.
2605         */
2606        REFERRALREQUEST, 
2607        /**
2608         * 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.
2609         */
2610        RELATEDPERSON, 
2611        /**
2612         * A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one".
2613         */
2614        REQUESTGROUP, 
2615        /**
2616         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
2617         */
2618        RESEARCHSTUDY, 
2619        /**
2620         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
2621         */
2622        RESEARCHSUBJECT, 
2623        /**
2624         * This is the base resource type for everything.
2625         */
2626        RESOURCE, 
2627        /**
2628         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
2629         */
2630        RISKASSESSMENT, 
2631        /**
2632         * A container for slots of time that may be available for booking appointments.
2633         */
2634        SCHEDULE, 
2635        /**
2636         * A search parameter that defines a named search item that can be used to search/filter on a resource.
2637         */
2638        SEARCHPARAMETER, 
2639        /**
2640         * Raw data describing a biological sequence.
2641         */
2642        SEQUENCE, 
2643        /**
2644         * The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.
2645         */
2646        SERVICEDEFINITION, 
2647        /**
2648         * A slot of time on a schedule that may be available for booking appointments.
2649         */
2650        SLOT, 
2651        /**
2652         * A sample to be used for analysis.
2653         */
2654        SPECIMEN, 
2655        /**
2656         * 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.
2657         */
2658        STRUCTUREDEFINITION, 
2659        /**
2660         * A Map of relationships between 2 structures that can be used to transform data.
2661         */
2662        STRUCTUREMAP, 
2663        /**
2664         * 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.
2665         */
2666        SUBSCRIPTION, 
2667        /**
2668         * A homogeneous material with a definite composition.
2669         */
2670        SUBSTANCE, 
2671        /**
2672         * Record of delivery of what is supplied.
2673         */
2674        SUPPLYDELIVERY, 
2675        /**
2676         * A record of a request for a medication, substance or device used in the healthcare setting.
2677         */
2678        SUPPLYREQUEST, 
2679        /**
2680         * A task to be performed.
2681         */
2682        TASK, 
2683        /**
2684         * A summary of information based on the results of executing a TestScript.
2685         */
2686        TESTREPORT, 
2687        /**
2688         * A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification.
2689         */
2690        TESTSCRIPT, 
2691        /**
2692         * A value set specifies a set of codes drawn from one or more code systems.
2693         */
2694        VALUESET, 
2695        /**
2696         * An authorization for the supply of glasses and/or contact lenses to a patient.
2697         */
2698        VISIONPRESCRIPTION, 
2699        /**
2700         * A place holder that means any kind of data type
2701         */
2702        TYPE, 
2703        /**
2704         * A place holder that means any kind of resource
2705         */
2706        ANY, 
2707        /**
2708         * added to help the parsers
2709         */
2710        NULL;
2711        public static FHIRAllTypes fromCode(String codeString) throws FHIRException {
2712            if (codeString == null || "".equals(codeString))
2713                return null;
2714        if ("Address".equals(codeString))
2715          return ADDRESS;
2716        if ("Age".equals(codeString))
2717          return AGE;
2718        if ("Annotation".equals(codeString))
2719          return ANNOTATION;
2720        if ("Attachment".equals(codeString))
2721          return ATTACHMENT;
2722        if ("BackboneElement".equals(codeString))
2723          return BACKBONEELEMENT;
2724        if ("CodeableConcept".equals(codeString))
2725          return CODEABLECONCEPT;
2726        if ("Coding".equals(codeString))
2727          return CODING;
2728        if ("ContactDetail".equals(codeString))
2729          return CONTACTDETAIL;
2730        if ("ContactPoint".equals(codeString))
2731          return CONTACTPOINT;
2732        if ("Contributor".equals(codeString))
2733          return CONTRIBUTOR;
2734        if ("Count".equals(codeString))
2735          return COUNT;
2736        if ("DataRequirement".equals(codeString))
2737          return DATAREQUIREMENT;
2738        if ("Distance".equals(codeString))
2739          return DISTANCE;
2740        if ("Dosage".equals(codeString))
2741          return DOSAGE;
2742        if ("Duration".equals(codeString))
2743          return DURATION;
2744        if ("Element".equals(codeString))
2745          return ELEMENT;
2746        if ("ElementDefinition".equals(codeString))
2747          return ELEMENTDEFINITION;
2748        if ("Extension".equals(codeString))
2749          return EXTENSION;
2750        if ("HumanName".equals(codeString))
2751          return HUMANNAME;
2752        if ("Identifier".equals(codeString))
2753          return IDENTIFIER;
2754        if ("Meta".equals(codeString))
2755          return META;
2756        if ("Money".equals(codeString))
2757          return MONEY;
2758        if ("Narrative".equals(codeString))
2759          return NARRATIVE;
2760        if ("ParameterDefinition".equals(codeString))
2761          return PARAMETERDEFINITION;
2762        if ("Period".equals(codeString))
2763          return PERIOD;
2764        if ("Quantity".equals(codeString))
2765          return QUANTITY;
2766        if ("Range".equals(codeString))
2767          return RANGE;
2768        if ("Ratio".equals(codeString))
2769          return RATIO;
2770        if ("Reference".equals(codeString))
2771          return REFERENCE;
2772        if ("RelatedArtifact".equals(codeString))
2773          return RELATEDARTIFACT;
2774        if ("SampledData".equals(codeString))
2775          return SAMPLEDDATA;
2776        if ("Signature".equals(codeString))
2777          return SIGNATURE;
2778        if ("SimpleQuantity".equals(codeString))
2779          return SIMPLEQUANTITY;
2780        if ("Timing".equals(codeString))
2781          return TIMING;
2782        if ("TriggerDefinition".equals(codeString))
2783          return TRIGGERDEFINITION;
2784        if ("UsageContext".equals(codeString))
2785          return USAGECONTEXT;
2786        if ("base64Binary".equals(codeString))
2787          return BASE64BINARY;
2788        if ("boolean".equals(codeString))
2789          return BOOLEAN;
2790        if ("code".equals(codeString))
2791          return CODE;
2792        if ("date".equals(codeString))
2793          return DATE;
2794        if ("dateTime".equals(codeString))
2795          return DATETIME;
2796        if ("decimal".equals(codeString))
2797          return DECIMAL;
2798        if ("id".equals(codeString))
2799          return ID;
2800        if ("instant".equals(codeString))
2801          return INSTANT;
2802        if ("integer".equals(codeString))
2803          return INTEGER;
2804        if ("markdown".equals(codeString))
2805          return MARKDOWN;
2806        if ("oid".equals(codeString))
2807          return OID;
2808        if ("positiveInt".equals(codeString))
2809          return POSITIVEINT;
2810        if ("string".equals(codeString))
2811          return STRING;
2812        if ("time".equals(codeString))
2813          return TIME;
2814        if ("unsignedInt".equals(codeString))
2815          return UNSIGNEDINT;
2816        if ("uri".equals(codeString))
2817          return URI;
2818        if ("uuid".equals(codeString))
2819          return UUID;
2820        if ("xhtml".equals(codeString))
2821          return XHTML;
2822        if ("Account".equals(codeString))
2823          return ACCOUNT;
2824        if ("ActivityDefinition".equals(codeString))
2825          return ACTIVITYDEFINITION;
2826        if ("AdverseEvent".equals(codeString))
2827          return ADVERSEEVENT;
2828        if ("AllergyIntolerance".equals(codeString))
2829          return ALLERGYINTOLERANCE;
2830        if ("Appointment".equals(codeString))
2831          return APPOINTMENT;
2832        if ("AppointmentResponse".equals(codeString))
2833          return APPOINTMENTRESPONSE;
2834        if ("AuditEvent".equals(codeString))
2835          return AUDITEVENT;
2836        if ("Basic".equals(codeString))
2837          return BASIC;
2838        if ("Binary".equals(codeString))
2839          return BINARY;
2840        if ("BodySite".equals(codeString))
2841          return BODYSITE;
2842        if ("Bundle".equals(codeString))
2843          return BUNDLE;
2844        if ("CapabilityStatement".equals(codeString))
2845          return CAPABILITYSTATEMENT;
2846        if ("CarePlan".equals(codeString))
2847          return CAREPLAN;
2848        if ("CareTeam".equals(codeString))
2849          return CARETEAM;
2850        if ("ChargeItem".equals(codeString))
2851          return CHARGEITEM;
2852        if ("Claim".equals(codeString))
2853          return CLAIM;
2854        if ("ClaimResponse".equals(codeString))
2855          return CLAIMRESPONSE;
2856        if ("ClinicalImpression".equals(codeString))
2857          return CLINICALIMPRESSION;
2858        if ("CodeSystem".equals(codeString))
2859          return CODESYSTEM;
2860        if ("Communication".equals(codeString))
2861          return COMMUNICATION;
2862        if ("CommunicationRequest".equals(codeString))
2863          return COMMUNICATIONREQUEST;
2864        if ("CompartmentDefinition".equals(codeString))
2865          return COMPARTMENTDEFINITION;
2866        if ("Composition".equals(codeString))
2867          return COMPOSITION;
2868        if ("ConceptMap".equals(codeString))
2869          return CONCEPTMAP;
2870        if ("Condition".equals(codeString))
2871          return CONDITION;
2872        if ("Consent".equals(codeString))
2873          return CONSENT;
2874        if ("Contract".equals(codeString))
2875          return CONTRACT;
2876        if ("Coverage".equals(codeString))
2877          return COVERAGE;
2878        if ("DataElement".equals(codeString))
2879          return DATAELEMENT;
2880        if ("DetectedIssue".equals(codeString))
2881          return DETECTEDISSUE;
2882        if ("Device".equals(codeString))
2883          return DEVICE;
2884        if ("DeviceComponent".equals(codeString))
2885          return DEVICECOMPONENT;
2886        if ("DeviceMetric".equals(codeString))
2887          return DEVICEMETRIC;
2888        if ("DeviceRequest".equals(codeString))
2889          return DEVICEREQUEST;
2890        if ("DeviceUseStatement".equals(codeString))
2891          return DEVICEUSESTATEMENT;
2892        if ("DiagnosticReport".equals(codeString))
2893          return DIAGNOSTICREPORT;
2894        if ("DocumentManifest".equals(codeString))
2895          return DOCUMENTMANIFEST;
2896        if ("DocumentReference".equals(codeString))
2897          return DOCUMENTREFERENCE;
2898        if ("DomainResource".equals(codeString))
2899          return DOMAINRESOURCE;
2900        if ("EligibilityRequest".equals(codeString))
2901          return ELIGIBILITYREQUEST;
2902        if ("EligibilityResponse".equals(codeString))
2903          return ELIGIBILITYRESPONSE;
2904        if ("Encounter".equals(codeString))
2905          return ENCOUNTER;
2906        if ("Endpoint".equals(codeString))
2907          return ENDPOINT;
2908        if ("EnrollmentRequest".equals(codeString))
2909          return ENROLLMENTREQUEST;
2910        if ("EnrollmentResponse".equals(codeString))
2911          return ENROLLMENTRESPONSE;
2912        if ("EpisodeOfCare".equals(codeString))
2913          return EPISODEOFCARE;
2914        if ("ExpansionProfile".equals(codeString))
2915          return EXPANSIONPROFILE;
2916        if ("ExplanationOfBenefit".equals(codeString))
2917          return EXPLANATIONOFBENEFIT;
2918        if ("FamilyMemberHistory".equals(codeString))
2919          return FAMILYMEMBERHISTORY;
2920        if ("Flag".equals(codeString))
2921          return FLAG;
2922        if ("Goal".equals(codeString))
2923          return GOAL;
2924        if ("GraphDefinition".equals(codeString))
2925          return GRAPHDEFINITION;
2926        if ("Group".equals(codeString))
2927          return GROUP;
2928        if ("GuidanceResponse".equals(codeString))
2929          return GUIDANCERESPONSE;
2930        if ("HealthcareService".equals(codeString))
2931          return HEALTHCARESERVICE;
2932        if ("ImagingManifest".equals(codeString))
2933          return IMAGINGMANIFEST;
2934        if ("ImagingStudy".equals(codeString))
2935          return IMAGINGSTUDY;
2936        if ("Immunization".equals(codeString))
2937          return IMMUNIZATION;
2938        if ("ImmunizationRecommendation".equals(codeString))
2939          return IMMUNIZATIONRECOMMENDATION;
2940        if ("ImplementationGuide".equals(codeString))
2941          return IMPLEMENTATIONGUIDE;
2942        if ("Library".equals(codeString))
2943          return LIBRARY;
2944        if ("Linkage".equals(codeString))
2945          return LINKAGE;
2946        if ("List".equals(codeString))
2947          return LIST;
2948        if ("Location".equals(codeString))
2949          return LOCATION;
2950        if ("Measure".equals(codeString))
2951          return MEASURE;
2952        if ("MeasureReport".equals(codeString))
2953          return MEASUREREPORT;
2954        if ("Media".equals(codeString))
2955          return MEDIA;
2956        if ("Medication".equals(codeString))
2957          return MEDICATION;
2958        if ("MedicationAdministration".equals(codeString))
2959          return MEDICATIONADMINISTRATION;
2960        if ("MedicationDispense".equals(codeString))
2961          return MEDICATIONDISPENSE;
2962        if ("MedicationRequest".equals(codeString))
2963          return MEDICATIONREQUEST;
2964        if ("MedicationStatement".equals(codeString))
2965          return MEDICATIONSTATEMENT;
2966        if ("MessageDefinition".equals(codeString))
2967          return MESSAGEDEFINITION;
2968        if ("MessageHeader".equals(codeString))
2969          return MESSAGEHEADER;
2970        if ("NamingSystem".equals(codeString))
2971          return NAMINGSYSTEM;
2972        if ("NutritionOrder".equals(codeString))
2973          return NUTRITIONORDER;
2974        if ("Observation".equals(codeString))
2975          return OBSERVATION;
2976        if ("OperationDefinition".equals(codeString))
2977          return OPERATIONDEFINITION;
2978        if ("OperationOutcome".equals(codeString))
2979          return OPERATIONOUTCOME;
2980        if ("Organization".equals(codeString))
2981          return ORGANIZATION;
2982        if ("Parameters".equals(codeString))
2983          return PARAMETERS;
2984        if ("Patient".equals(codeString))
2985          return PATIENT;
2986        if ("PaymentNotice".equals(codeString))
2987          return PAYMENTNOTICE;
2988        if ("PaymentReconciliation".equals(codeString))
2989          return PAYMENTRECONCILIATION;
2990        if ("Person".equals(codeString))
2991          return PERSON;
2992        if ("PlanDefinition".equals(codeString))
2993          return PLANDEFINITION;
2994        if ("Practitioner".equals(codeString))
2995          return PRACTITIONER;
2996        if ("PractitionerRole".equals(codeString))
2997          return PRACTITIONERROLE;
2998        if ("Procedure".equals(codeString))
2999          return PROCEDURE;
3000        if ("ProcedureRequest".equals(codeString))
3001          return PROCEDUREREQUEST;
3002        if ("ProcessRequest".equals(codeString))
3003          return PROCESSREQUEST;
3004        if ("ProcessResponse".equals(codeString))
3005          return PROCESSRESPONSE;
3006        if ("Provenance".equals(codeString))
3007          return PROVENANCE;
3008        if ("Questionnaire".equals(codeString))
3009          return QUESTIONNAIRE;
3010        if ("QuestionnaireResponse".equals(codeString))
3011          return QUESTIONNAIRERESPONSE;
3012        if ("ReferralRequest".equals(codeString))
3013          return REFERRALREQUEST;
3014        if ("RelatedPerson".equals(codeString))
3015          return RELATEDPERSON;
3016        if ("RequestGroup".equals(codeString))
3017          return REQUESTGROUP;
3018        if ("ResearchStudy".equals(codeString))
3019          return RESEARCHSTUDY;
3020        if ("ResearchSubject".equals(codeString))
3021          return RESEARCHSUBJECT;
3022        if ("Resource".equals(codeString))
3023          return RESOURCE;
3024        if ("RiskAssessment".equals(codeString))
3025          return RISKASSESSMENT;
3026        if ("Schedule".equals(codeString))
3027          return SCHEDULE;
3028        if ("SearchParameter".equals(codeString))
3029          return SEARCHPARAMETER;
3030        if ("Sequence".equals(codeString))
3031          return SEQUENCE;
3032        if ("ServiceDefinition".equals(codeString))
3033          return SERVICEDEFINITION;
3034        if ("Slot".equals(codeString))
3035          return SLOT;
3036        if ("Specimen".equals(codeString))
3037          return SPECIMEN;
3038        if ("StructureDefinition".equals(codeString))
3039          return STRUCTUREDEFINITION;
3040        if ("StructureMap".equals(codeString))
3041          return STRUCTUREMAP;
3042        if ("Subscription".equals(codeString))
3043          return SUBSCRIPTION;
3044        if ("Substance".equals(codeString))
3045          return SUBSTANCE;
3046        if ("SupplyDelivery".equals(codeString))
3047          return SUPPLYDELIVERY;
3048        if ("SupplyRequest".equals(codeString))
3049          return SUPPLYREQUEST;
3050        if ("Task".equals(codeString))
3051          return TASK;
3052        if ("TestReport".equals(codeString))
3053          return TESTREPORT;
3054        if ("TestScript".equals(codeString))
3055          return TESTSCRIPT;
3056        if ("ValueSet".equals(codeString))
3057          return VALUESET;
3058        if ("VisionPrescription".equals(codeString))
3059          return VISIONPRESCRIPTION;
3060        if ("Type".equals(codeString))
3061          return TYPE;
3062        if ("Any".equals(codeString))
3063          return ANY;
3064        throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'");
3065        }
3066        public String toCode() {
3067          switch (this) {
3068            case ADDRESS: return "Address";
3069            case AGE: return "Age";
3070            case ANNOTATION: return "Annotation";
3071            case ATTACHMENT: return "Attachment";
3072            case BACKBONEELEMENT: return "BackboneElement";
3073            case CODEABLECONCEPT: return "CodeableConcept";
3074            case CODING: return "Coding";
3075            case CONTACTDETAIL: return "ContactDetail";
3076            case CONTACTPOINT: return "ContactPoint";
3077            case CONTRIBUTOR: return "Contributor";
3078            case COUNT: return "Count";
3079            case DATAREQUIREMENT: return "DataRequirement";
3080            case DISTANCE: return "Distance";
3081            case DOSAGE: return "Dosage";
3082            case DURATION: return "Duration";
3083            case ELEMENT: return "Element";
3084            case ELEMENTDEFINITION: return "ElementDefinition";
3085            case EXTENSION: return "Extension";
3086            case HUMANNAME: return "HumanName";
3087            case IDENTIFIER: return "Identifier";
3088            case META: return "Meta";
3089            case MONEY: return "Money";
3090            case NARRATIVE: return "Narrative";
3091            case PARAMETERDEFINITION: return "ParameterDefinition";
3092            case PERIOD: return "Period";
3093            case QUANTITY: return "Quantity";
3094            case RANGE: return "Range";
3095            case RATIO: return "Ratio";
3096            case REFERENCE: return "Reference";
3097            case RELATEDARTIFACT: return "RelatedArtifact";
3098            case SAMPLEDDATA: return "SampledData";
3099            case SIGNATURE: return "Signature";
3100            case SIMPLEQUANTITY: return "SimpleQuantity";
3101            case TIMING: return "Timing";
3102            case TRIGGERDEFINITION: return "TriggerDefinition";
3103            case USAGECONTEXT: return "UsageContext";
3104            case BASE64BINARY: return "base64Binary";
3105            case BOOLEAN: return "boolean";
3106            case CODE: return "code";
3107            case DATE: return "date";
3108            case DATETIME: return "dateTime";
3109            case DECIMAL: return "decimal";
3110            case ID: return "id";
3111            case INSTANT: return "instant";
3112            case INTEGER: return "integer";
3113            case MARKDOWN: return "markdown";
3114            case OID: return "oid";
3115            case POSITIVEINT: return "positiveInt";
3116            case STRING: return "string";
3117            case TIME: return "time";
3118            case UNSIGNEDINT: return "unsignedInt";
3119            case URI: return "uri";
3120            case UUID: return "uuid";
3121            case XHTML: return "xhtml";
3122            case ACCOUNT: return "Account";
3123            case ACTIVITYDEFINITION: return "ActivityDefinition";
3124            case ADVERSEEVENT: return "AdverseEvent";
3125            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
3126            case APPOINTMENT: return "Appointment";
3127            case APPOINTMENTRESPONSE: return "AppointmentResponse";
3128            case AUDITEVENT: return "AuditEvent";
3129            case BASIC: return "Basic";
3130            case BINARY: return "Binary";
3131            case BODYSITE: return "BodySite";
3132            case BUNDLE: return "Bundle";
3133            case CAPABILITYSTATEMENT: return "CapabilityStatement";
3134            case CAREPLAN: return "CarePlan";
3135            case CARETEAM: return "CareTeam";
3136            case CHARGEITEM: return "ChargeItem";
3137            case CLAIM: return "Claim";
3138            case CLAIMRESPONSE: return "ClaimResponse";
3139            case CLINICALIMPRESSION: return "ClinicalImpression";
3140            case CODESYSTEM: return "CodeSystem";
3141            case COMMUNICATION: return "Communication";
3142            case COMMUNICATIONREQUEST: return "CommunicationRequest";
3143            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
3144            case COMPOSITION: return "Composition";
3145            case CONCEPTMAP: return "ConceptMap";
3146            case CONDITION: return "Condition";
3147            case CONSENT: return "Consent";
3148            case CONTRACT: return "Contract";
3149            case COVERAGE: return "Coverage";
3150            case DATAELEMENT: return "DataElement";
3151            case DETECTEDISSUE: return "DetectedIssue";
3152            case DEVICE: return "Device";
3153            case DEVICECOMPONENT: return "DeviceComponent";
3154            case DEVICEMETRIC: return "DeviceMetric";
3155            case DEVICEREQUEST: return "DeviceRequest";
3156            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
3157            case DIAGNOSTICREPORT: return "DiagnosticReport";
3158            case DOCUMENTMANIFEST: return "DocumentManifest";
3159            case DOCUMENTREFERENCE: return "DocumentReference";
3160            case DOMAINRESOURCE: return "DomainResource";
3161            case ELIGIBILITYREQUEST: return "EligibilityRequest";
3162            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
3163            case ENCOUNTER: return "Encounter";
3164            case ENDPOINT: return "Endpoint";
3165            case ENROLLMENTREQUEST: return "EnrollmentRequest";
3166            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
3167            case EPISODEOFCARE: return "EpisodeOfCare";
3168            case EXPANSIONPROFILE: return "ExpansionProfile";
3169            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
3170            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
3171            case FLAG: return "Flag";
3172            case GOAL: return "Goal";
3173            case GRAPHDEFINITION: return "GraphDefinition";
3174            case GROUP: return "Group";
3175            case GUIDANCERESPONSE: return "GuidanceResponse";
3176            case HEALTHCARESERVICE: return "HealthcareService";
3177            case IMAGINGMANIFEST: return "ImagingManifest";
3178            case IMAGINGSTUDY: return "ImagingStudy";
3179            case IMMUNIZATION: return "Immunization";
3180            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
3181            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
3182            case LIBRARY: return "Library";
3183            case LINKAGE: return "Linkage";
3184            case LIST: return "List";
3185            case LOCATION: return "Location";
3186            case MEASURE: return "Measure";
3187            case MEASUREREPORT: return "MeasureReport";
3188            case MEDIA: return "Media";
3189            case MEDICATION: return "Medication";
3190            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
3191            case MEDICATIONDISPENSE: return "MedicationDispense";
3192            case MEDICATIONREQUEST: return "MedicationRequest";
3193            case MEDICATIONSTATEMENT: return "MedicationStatement";
3194            case MESSAGEDEFINITION: return "MessageDefinition";
3195            case MESSAGEHEADER: return "MessageHeader";
3196            case NAMINGSYSTEM: return "NamingSystem";
3197            case NUTRITIONORDER: return "NutritionOrder";
3198            case OBSERVATION: return "Observation";
3199            case OPERATIONDEFINITION: return "OperationDefinition";
3200            case OPERATIONOUTCOME: return "OperationOutcome";
3201            case ORGANIZATION: return "Organization";
3202            case PARAMETERS: return "Parameters";
3203            case PATIENT: return "Patient";
3204            case PAYMENTNOTICE: return "PaymentNotice";
3205            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
3206            case PERSON: return "Person";
3207            case PLANDEFINITION: return "PlanDefinition";
3208            case PRACTITIONER: return "Practitioner";
3209            case PRACTITIONERROLE: return "PractitionerRole";
3210            case PROCEDURE: return "Procedure";
3211            case PROCEDUREREQUEST: return "ProcedureRequest";
3212            case PROCESSREQUEST: return "ProcessRequest";
3213            case PROCESSRESPONSE: return "ProcessResponse";
3214            case PROVENANCE: return "Provenance";
3215            case QUESTIONNAIRE: return "Questionnaire";
3216            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
3217            case REFERRALREQUEST: return "ReferralRequest";
3218            case RELATEDPERSON: return "RelatedPerson";
3219            case REQUESTGROUP: return "RequestGroup";
3220            case RESEARCHSTUDY: return "ResearchStudy";
3221            case RESEARCHSUBJECT: return "ResearchSubject";
3222            case RESOURCE: return "Resource";
3223            case RISKASSESSMENT: return "RiskAssessment";
3224            case SCHEDULE: return "Schedule";
3225            case SEARCHPARAMETER: return "SearchParameter";
3226            case SEQUENCE: return "Sequence";
3227            case SERVICEDEFINITION: return "ServiceDefinition";
3228            case SLOT: return "Slot";
3229            case SPECIMEN: return "Specimen";
3230            case STRUCTUREDEFINITION: return "StructureDefinition";
3231            case STRUCTUREMAP: return "StructureMap";
3232            case SUBSCRIPTION: return "Subscription";
3233            case SUBSTANCE: return "Substance";
3234            case SUPPLYDELIVERY: return "SupplyDelivery";
3235            case SUPPLYREQUEST: return "SupplyRequest";
3236            case TASK: return "Task";
3237            case TESTREPORT: return "TestReport";
3238            case TESTSCRIPT: return "TestScript";
3239            case VALUESET: return "ValueSet";
3240            case VISIONPRESCRIPTION: return "VisionPrescription";
3241            case TYPE: return "Type";
3242            case ANY: return "Any";
3243            default: return "?";
3244          }
3245        }
3246        public String getSystem() {
3247          switch (this) {
3248            case ADDRESS: return "http://hl7.org/fhir/data-types";
3249            case AGE: return "http://hl7.org/fhir/data-types";
3250            case ANNOTATION: return "http://hl7.org/fhir/data-types";
3251            case ATTACHMENT: return "http://hl7.org/fhir/data-types";
3252            case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types";
3253            case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types";
3254            case CODING: return "http://hl7.org/fhir/data-types";
3255            case CONTACTDETAIL: return "http://hl7.org/fhir/data-types";
3256            case CONTACTPOINT: return "http://hl7.org/fhir/data-types";
3257            case CONTRIBUTOR: return "http://hl7.org/fhir/data-types";
3258            case COUNT: return "http://hl7.org/fhir/data-types";
3259            case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types";
3260            case DISTANCE: return "http://hl7.org/fhir/data-types";
3261            case DOSAGE: return "http://hl7.org/fhir/data-types";
3262            case DURATION: return "http://hl7.org/fhir/data-types";
3263            case ELEMENT: return "http://hl7.org/fhir/data-types";
3264            case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types";
3265            case EXTENSION: return "http://hl7.org/fhir/data-types";
3266            case HUMANNAME: return "http://hl7.org/fhir/data-types";
3267            case IDENTIFIER: return "http://hl7.org/fhir/data-types";
3268            case META: return "http://hl7.org/fhir/data-types";
3269            case MONEY: return "http://hl7.org/fhir/data-types";
3270            case NARRATIVE: return "http://hl7.org/fhir/data-types";
3271            case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types";
3272            case PERIOD: return "http://hl7.org/fhir/data-types";
3273            case QUANTITY: return "http://hl7.org/fhir/data-types";
3274            case RANGE: return "http://hl7.org/fhir/data-types";
3275            case RATIO: return "http://hl7.org/fhir/data-types";
3276            case REFERENCE: return "http://hl7.org/fhir/data-types";
3277            case RELATEDARTIFACT: return "http://hl7.org/fhir/data-types";
3278            case SAMPLEDDATA: return "http://hl7.org/fhir/data-types";
3279            case SIGNATURE: return "http://hl7.org/fhir/data-types";
3280            case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types";
3281            case TIMING: return "http://hl7.org/fhir/data-types";
3282            case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types";
3283            case USAGECONTEXT: return "http://hl7.org/fhir/data-types";
3284            case BASE64BINARY: return "http://hl7.org/fhir/data-types";
3285            case BOOLEAN: return "http://hl7.org/fhir/data-types";
3286            case CODE: return "http://hl7.org/fhir/data-types";
3287            case DATE: return "http://hl7.org/fhir/data-types";
3288            case DATETIME: return "http://hl7.org/fhir/data-types";
3289            case DECIMAL: return "http://hl7.org/fhir/data-types";
3290            case ID: return "http://hl7.org/fhir/data-types";
3291            case INSTANT: return "http://hl7.org/fhir/data-types";
3292            case INTEGER: return "http://hl7.org/fhir/data-types";
3293            case MARKDOWN: return "http://hl7.org/fhir/data-types";
3294            case OID: return "http://hl7.org/fhir/data-types";
3295            case POSITIVEINT: return "http://hl7.org/fhir/data-types";
3296            case STRING: return "http://hl7.org/fhir/data-types";
3297            case TIME: return "http://hl7.org/fhir/data-types";
3298            case UNSIGNEDINT: return "http://hl7.org/fhir/data-types";
3299            case URI: return "http://hl7.org/fhir/data-types";
3300            case UUID: return "http://hl7.org/fhir/data-types";
3301            case XHTML: return "http://hl7.org/fhir/data-types";
3302            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
3303            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
3304            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
3305            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
3306            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
3307            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
3308            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
3309            case BASIC: return "http://hl7.org/fhir/resource-types";
3310            case BINARY: return "http://hl7.org/fhir/resource-types";
3311            case BODYSITE: return "http://hl7.org/fhir/resource-types";
3312            case BUNDLE: return "http://hl7.org/fhir/resource-types";
3313            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
3314            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
3315            case CARETEAM: return "http://hl7.org/fhir/resource-types";
3316            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
3317            case CLAIM: return "http://hl7.org/fhir/resource-types";
3318            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
3319            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
3320            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
3321            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
3322            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
3323            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
3324            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
3325            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
3326            case CONDITION: return "http://hl7.org/fhir/resource-types";
3327            case CONSENT: return "http://hl7.org/fhir/resource-types";
3328            case CONTRACT: return "http://hl7.org/fhir/resource-types";
3329            case COVERAGE: return "http://hl7.org/fhir/resource-types";
3330            case DATAELEMENT: return "http://hl7.org/fhir/resource-types";
3331            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
3332            case DEVICE: return "http://hl7.org/fhir/resource-types";
3333            case DEVICECOMPONENT: return "http://hl7.org/fhir/resource-types";
3334            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
3335            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
3336            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types";
3337            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
3338            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
3339            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
3340            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
3341            case ELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
3342            case ELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
3343            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
3344            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
3345            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
3346            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
3347            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
3348            case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types";
3349            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
3350            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
3351            case FLAG: return "http://hl7.org/fhir/resource-types";
3352            case GOAL: return "http://hl7.org/fhir/resource-types";
3353            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
3354            case GROUP: return "http://hl7.org/fhir/resource-types";
3355            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
3356            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
3357            case IMAGINGMANIFEST: return "http://hl7.org/fhir/resource-types";
3358            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
3359            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
3360            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
3361            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
3362            case LIBRARY: return "http://hl7.org/fhir/resource-types";
3363            case LINKAGE: return "http://hl7.org/fhir/resource-types";
3364            case LIST: return "http://hl7.org/fhir/resource-types";
3365            case LOCATION: return "http://hl7.org/fhir/resource-types";
3366            case MEASURE: return "http://hl7.org/fhir/resource-types";
3367            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
3368            case MEDIA: return "http://hl7.org/fhir/resource-types";
3369            case MEDICATION: return "http://hl7.org/fhir/resource-types";
3370            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
3371            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
3372            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
3373            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types";
3374            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
3375            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
3376            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
3377            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
3378            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
3379            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
3380            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
3381            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
3382            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
3383            case PATIENT: return "http://hl7.org/fhir/resource-types";
3384            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
3385            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
3386            case PERSON: return "http://hl7.org/fhir/resource-types";
3387            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
3388            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
3389            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
3390            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
3391            case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types";
3392            case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types";
3393            case PROCESSRESPONSE: return "http://hl7.org/fhir/resource-types";
3394            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
3395            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
3396            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
3397            case REFERRALREQUEST: return "http://hl7.org/fhir/resource-types";
3398            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
3399            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
3400            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
3401            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
3402            case RESOURCE: return "http://hl7.org/fhir/resource-types";
3403            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
3404            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
3405            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
3406            case SEQUENCE: return "http://hl7.org/fhir/resource-types";
3407            case SERVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
3408            case SLOT: return "http://hl7.org/fhir/resource-types";
3409            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
3410            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
3411            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
3412            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
3413            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
3414            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
3415            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
3416            case TASK: return "http://hl7.org/fhir/resource-types";
3417            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
3418            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
3419            case VALUESET: return "http://hl7.org/fhir/resource-types";
3420            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
3421            case TYPE: return "http://hl7.org/fhir/abstract-types";
3422            case ANY: return "http://hl7.org/fhir/abstract-types";
3423            default: return "?";
3424          }
3425        }
3426        public String getDefinition() {
3427          switch (this) {
3428            case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.";
3429            case AGE: return "A duration of time during which an organism (or a process) has existed.";
3430            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
3431            case ATTACHMENT: return "For referring to data content defined in other formats.";
3432            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
3433            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
3434            case CODING: return "A reference to a code defined by a terminology system.";
3435            case CONTACTDETAIL: return "Specifies contact information for a person or organization.";
3436            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
3437            case CONTRIBUTOR: return "A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.";
3438            case COUNT: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
3439            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.";
3440            case DISTANCE: return "A length - a value with a unit that is a physical distance.";
3441            case DOSAGE: return "Indicates how the medication is/was taken or should be taken by the patient.";
3442            case DURATION: return "A length of time.";
3443            case ELEMENT: return "Base definition for all elements in a resource.";
3444            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
3445            case EXTENSION: return "Optional Extension Element - found in all resources.";
3446            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
3447            case IDENTIFIER: return "A technical identifier - identifies some entity uniquely and unambiguously.";
3448            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.";
3449            case MONEY: return "An amount of economic utility in some recognized currency.";
3450            case NARRATIVE: return "A human-readable formatted text, including images.";
3451            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.";
3452            case PERIOD: return "A time period defined by a start and end date and optionally time.";
3453            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.";
3454            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
3455            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
3456            case REFERENCE: return "A reference from one resource to another.";
3457            case RELATEDARTIFACT: return "Related artifacts such as additional documentation, justification, or bibliographic references.";
3458            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.";
3459            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.";
3460            case SIMPLEQUANTITY: return "";
3461            case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.";
3462            case TRIGGERDEFINITION: return "A description of a triggering event.";
3463            case USAGECONTEXT: return "Specifies clinical/business/etc metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).";
3464            case BASE64BINARY: return "A stream of bytes";
3465            case BOOLEAN: return "Value of \"true\" or \"false\"";
3466            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";
3467            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.";
3468            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.";
3469            case DECIMAL: return "A rational number with implicit precision";
3470            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.";
3471            case INSTANT: return "An instant in time - known at least to the second";
3472            case INTEGER: return "A whole number";
3473            case MARKDOWN: return "A string that may contain markdown syntax for optional processing by a mark down presentation engine";
3474            case OID: return "An OID represented as a URI";
3475            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
3476            case STRING: return "A sequence of Unicode characters";
3477            case TIME: return "A time during the day, with no date specified";
3478            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
3479            case URI: return "String of characters used to identify a name or a resource";
3480            case UUID: return "A UUID, represented as a URI";
3481            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
3482            case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.";
3483            case ACTIVITYDEFINITION: return "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.";
3484            case ADVERSEEVENT: return "Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.";
3485            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
3486            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).";
3487            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
3488            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.";
3489            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.";
3490            case BINARY: return "A binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
3491            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.";
3492            case BUNDLE: return "A container for a collection of resources.";
3493            case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
3494            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.";
3495            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.";
3496            case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.";
3497            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.";
3498            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
3499            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.";
3500            case CODESYSTEM: return "A code system resource specifies a set of codes drawn from one or more code systems.";
3501            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.";
3502            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.";
3503            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
3504            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.";
3505            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.";
3506            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
3507            case CONSENT: return "A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.";
3508            case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters.";
3509            case COVERAGE: return "Financial instrument which may be used to reimburse or pay for health care products and services.";
3510            case DATAELEMENT: return "The formal description of a single piece of information that can be gathered and reported.";
3511            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.";
3512            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 include 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.";
3513            case DEVICECOMPONENT: return "The characteristics, operational status and capabilities of a medical-related component of a medical device.";
3514            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
3515            case DEVICEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.";
3516            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.";
3517            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.";
3518            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
3519            case DOCUMENTREFERENCE: return "A reference to a document.";
3520            case DOMAINRESOURCE: return "A resource that includes narrative, extensions, and contained resources.";
3521            case ELIGIBILITYREQUEST: return "The EligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an EligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.";
3522            case ELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an Eligibility resource.";
3523            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.";
3524            case ENDPOINT: return "The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.";
3525            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
3526            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource.";
3527            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.";
3528            case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet.";
3529            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.";
3530            case FAMILYMEMBERHISTORY: return "Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.";
3531            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
3532            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.";
3533            case GRAPHDEFINITION: return "A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.";
3534            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.";
3535            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.";
3536            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
3537            case IMAGINGMANIFEST: return "A text description of the DICOM SOP instances selected in the ImagingManifest; or the reason for, or significance of, the selection.";
3538            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.";
3539            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.";
3540            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.";
3541            case IMPLEMENTATIONGUIDE: return "A set of rules of 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.";
3542            case LIBRARY: return "The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.";
3543            case LINKAGE: return "Identifies two or more records (resource instances) that are referring to the same real-world \"occurrence\".";
3544            case LIST: return "A set of information summarized from a list of other resources.";
3545            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.";
3546            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
3547            case MEASUREREPORT: return "The MeasureReport resource contains the results of evaluating a measure.";
3548            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.";
3549            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.";
3550            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.";
3551            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.";
3552            case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.";
3553            case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains \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.";
3554            case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.";
3555            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.";
3556            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.";
3557            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
3558            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
3559            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
3560            case OPERATIONOUTCOME: return "A collection of error, warning or information messages that result from a system action.";
3561            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.";
3562            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.";
3563            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
3564            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
3565            case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment.";
3566            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
3567            case PLANDEFINITION: return "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.";
3568            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
3569            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
3570            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.";
3571            case PROCEDUREREQUEST: return "A record of a request for diagnostic investigations, treatments, or operations to be performed.";
3572            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.";
3573            case PROCESSRESPONSE: return "This resource provides processing status, errors and notes from the processing of a resource.";
3574            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.";
3575            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.";
3576            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.";
3577            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.";
3578            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.";
3579            case REQUESTGROUP: return "A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\".";
3580            case RESEARCHSTUDY: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
3581            case RESEARCHSUBJECT: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
3582            case RESOURCE: return "This is the base resource type for everything.";
3583            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
3584            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
3585            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
3586            case SEQUENCE: return "Raw data describing a biological sequence.";
3587            case SERVICEDEFINITION: return "The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.";
3588            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
3589            case SPECIMEN: return "A sample to be used for analysis.";
3590            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.";
3591            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
3592            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.";
3593            case SUBSTANCE: return "A homogeneous material with a definite composition.";
3594            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
3595            case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting.";
3596            case TASK: return "A task to be performed.";
3597            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
3598            case TESTSCRIPT: return "A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification.";
3599            case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems.";
3600            case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient.";
3601            case TYPE: return "A place holder that means any kind of data type";
3602            case ANY: return "A place holder that means any kind of resource";
3603            default: return "?";
3604          }
3605        }
3606        public String getDisplay() {
3607          switch (this) {
3608            case ADDRESS: return "Address";
3609            case AGE: return "Age";
3610            case ANNOTATION: return "Annotation";
3611            case ATTACHMENT: return "Attachment";
3612            case BACKBONEELEMENT: return "BackboneElement";
3613            case CODEABLECONCEPT: return "CodeableConcept";
3614            case CODING: return "Coding";
3615            case CONTACTDETAIL: return "ContactDetail";
3616            case CONTACTPOINT: return "ContactPoint";
3617            case CONTRIBUTOR: return "Contributor";
3618            case COUNT: return "Count";
3619            case DATAREQUIREMENT: return "DataRequirement";
3620            case DISTANCE: return "Distance";
3621            case DOSAGE: return "Dosage";
3622            case DURATION: return "Duration";
3623            case ELEMENT: return "Element";
3624            case ELEMENTDEFINITION: return "ElementDefinition";
3625            case EXTENSION: return "Extension";
3626            case HUMANNAME: return "HumanName";
3627            case IDENTIFIER: return "Identifier";
3628            case META: return "Meta";
3629            case MONEY: return "Money";
3630            case NARRATIVE: return "Narrative";
3631            case PARAMETERDEFINITION: return "ParameterDefinition";
3632            case PERIOD: return "Period";
3633            case QUANTITY: return "Quantity";
3634            case RANGE: return "Range";
3635            case RATIO: return "Ratio";
3636            case REFERENCE: return "Reference";
3637            case RELATEDARTIFACT: return "RelatedArtifact";
3638            case SAMPLEDDATA: return "SampledData";
3639            case SIGNATURE: return "Signature";
3640            case SIMPLEQUANTITY: return "SimpleQuantity";
3641            case TIMING: return "Timing";
3642            case TRIGGERDEFINITION: return "TriggerDefinition";
3643            case USAGECONTEXT: return "UsageContext";
3644            case BASE64BINARY: return "base64Binary";
3645            case BOOLEAN: return "boolean";
3646            case CODE: return "code";
3647            case DATE: return "date";
3648            case DATETIME: return "dateTime";
3649            case DECIMAL: return "decimal";
3650            case ID: return "id";
3651            case INSTANT: return "instant";
3652            case INTEGER: return "integer";
3653            case MARKDOWN: return "markdown";
3654            case OID: return "oid";
3655            case POSITIVEINT: return "positiveInt";
3656            case STRING: return "string";
3657            case TIME: return "time";
3658            case UNSIGNEDINT: return "unsignedInt";
3659            case URI: return "uri";
3660            case UUID: return "uuid";
3661            case XHTML: return "XHTML";
3662            case ACCOUNT: return "Account";
3663            case ACTIVITYDEFINITION: return "ActivityDefinition";
3664            case ADVERSEEVENT: return "AdverseEvent";
3665            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
3666            case APPOINTMENT: return "Appointment";
3667            case APPOINTMENTRESPONSE: return "AppointmentResponse";
3668            case AUDITEVENT: return "AuditEvent";
3669            case BASIC: return "Basic";
3670            case BINARY: return "Binary";
3671            case BODYSITE: return "BodySite";
3672            case BUNDLE: return "Bundle";
3673            case CAPABILITYSTATEMENT: return "CapabilityStatement";
3674            case CAREPLAN: return "CarePlan";
3675            case CARETEAM: return "CareTeam";
3676            case CHARGEITEM: return "ChargeItem";
3677            case CLAIM: return "Claim";
3678            case CLAIMRESPONSE: return "ClaimResponse";
3679            case CLINICALIMPRESSION: return "ClinicalImpression";
3680            case CODESYSTEM: return "CodeSystem";
3681            case COMMUNICATION: return "Communication";
3682            case COMMUNICATIONREQUEST: return "CommunicationRequest";
3683            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
3684            case COMPOSITION: return "Composition";
3685            case CONCEPTMAP: return "ConceptMap";
3686            case CONDITION: return "Condition";
3687            case CONSENT: return "Consent";
3688            case CONTRACT: return "Contract";
3689            case COVERAGE: return "Coverage";
3690            case DATAELEMENT: return "DataElement";
3691            case DETECTEDISSUE: return "DetectedIssue";
3692            case DEVICE: return "Device";
3693            case DEVICECOMPONENT: return "DeviceComponent";
3694            case DEVICEMETRIC: return "DeviceMetric";
3695            case DEVICEREQUEST: return "DeviceRequest";
3696            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
3697            case DIAGNOSTICREPORT: return "DiagnosticReport";
3698            case DOCUMENTMANIFEST: return "DocumentManifest";
3699            case DOCUMENTREFERENCE: return "DocumentReference";
3700            case DOMAINRESOURCE: return "DomainResource";
3701            case ELIGIBILITYREQUEST: return "EligibilityRequest";
3702            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
3703            case ENCOUNTER: return "Encounter";
3704            case ENDPOINT: return "Endpoint";
3705            case ENROLLMENTREQUEST: return "EnrollmentRequest";
3706            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
3707            case EPISODEOFCARE: return "EpisodeOfCare";
3708            case EXPANSIONPROFILE: return "ExpansionProfile";
3709            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
3710            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
3711            case FLAG: return "Flag";
3712            case GOAL: return "Goal";
3713            case GRAPHDEFINITION: return "GraphDefinition";
3714            case GROUP: return "Group";
3715            case GUIDANCERESPONSE: return "GuidanceResponse";
3716            case HEALTHCARESERVICE: return "HealthcareService";
3717            case IMAGINGMANIFEST: return "ImagingManifest";
3718            case IMAGINGSTUDY: return "ImagingStudy";
3719            case IMMUNIZATION: return "Immunization";
3720            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
3721            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
3722            case LIBRARY: return "Library";
3723            case LINKAGE: return "Linkage";
3724            case LIST: return "List";
3725            case LOCATION: return "Location";
3726            case MEASURE: return "Measure";
3727            case MEASUREREPORT: return "MeasureReport";
3728            case MEDIA: return "Media";
3729            case MEDICATION: return "Medication";
3730            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
3731            case MEDICATIONDISPENSE: return "MedicationDispense";
3732            case MEDICATIONREQUEST: return "MedicationRequest";
3733            case MEDICATIONSTATEMENT: return "MedicationStatement";
3734            case MESSAGEDEFINITION: return "MessageDefinition";
3735            case MESSAGEHEADER: return "MessageHeader";
3736            case NAMINGSYSTEM: return "NamingSystem";
3737            case NUTRITIONORDER: return "NutritionOrder";
3738            case OBSERVATION: return "Observation";
3739            case OPERATIONDEFINITION: return "OperationDefinition";
3740            case OPERATIONOUTCOME: return "OperationOutcome";
3741            case ORGANIZATION: return "Organization";
3742            case PARAMETERS: return "Parameters";
3743            case PATIENT: return "Patient";
3744            case PAYMENTNOTICE: return "PaymentNotice";
3745            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
3746            case PERSON: return "Person";
3747            case PLANDEFINITION: return "PlanDefinition";
3748            case PRACTITIONER: return "Practitioner";
3749            case PRACTITIONERROLE: return "PractitionerRole";
3750            case PROCEDURE: return "Procedure";
3751            case PROCEDUREREQUEST: return "ProcedureRequest";
3752            case PROCESSREQUEST: return "ProcessRequest";
3753            case PROCESSRESPONSE: return "ProcessResponse";
3754            case PROVENANCE: return "Provenance";
3755            case QUESTIONNAIRE: return "Questionnaire";
3756            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
3757            case REFERRALREQUEST: return "ReferralRequest";
3758            case RELATEDPERSON: return "RelatedPerson";
3759            case REQUESTGROUP: return "RequestGroup";
3760            case RESEARCHSTUDY: return "ResearchStudy";
3761            case RESEARCHSUBJECT: return "ResearchSubject";
3762            case RESOURCE: return "Resource";
3763            case RISKASSESSMENT: return "RiskAssessment";
3764            case SCHEDULE: return "Schedule";
3765            case SEARCHPARAMETER: return "SearchParameter";
3766            case SEQUENCE: return "Sequence";
3767            case SERVICEDEFINITION: return "ServiceDefinition";
3768            case SLOT: return "Slot";
3769            case SPECIMEN: return "Specimen";
3770            case STRUCTUREDEFINITION: return "StructureDefinition";
3771            case STRUCTUREMAP: return "StructureMap";
3772            case SUBSCRIPTION: return "Subscription";
3773            case SUBSTANCE: return "Substance";
3774            case SUPPLYDELIVERY: return "SupplyDelivery";
3775            case SUPPLYREQUEST: return "SupplyRequest";
3776            case TASK: return "Task";
3777            case TESTREPORT: return "TestReport";
3778            case TESTSCRIPT: return "TestScript";
3779            case VALUESET: return "ValueSet";
3780            case VISIONPRESCRIPTION: return "VisionPrescription";
3781            case TYPE: return "Type";
3782            case ANY: return "Any";
3783            default: return "?";
3784          }
3785        }
3786    }
3787
3788  public static class FHIRAllTypesEnumFactory implements EnumFactory<FHIRAllTypes> {
3789    public FHIRAllTypes fromCode(String codeString) throws IllegalArgumentException {
3790      if (codeString == null || "".equals(codeString))
3791            if (codeString == null || "".equals(codeString))
3792                return null;
3793        if ("Address".equals(codeString))
3794          return FHIRAllTypes.ADDRESS;
3795        if ("Age".equals(codeString))
3796          return FHIRAllTypes.AGE;
3797        if ("Annotation".equals(codeString))
3798          return FHIRAllTypes.ANNOTATION;
3799        if ("Attachment".equals(codeString))
3800          return FHIRAllTypes.ATTACHMENT;
3801        if ("BackboneElement".equals(codeString))
3802          return FHIRAllTypes.BACKBONEELEMENT;
3803        if ("CodeableConcept".equals(codeString))
3804          return FHIRAllTypes.CODEABLECONCEPT;
3805        if ("Coding".equals(codeString))
3806          return FHIRAllTypes.CODING;
3807        if ("ContactDetail".equals(codeString))
3808          return FHIRAllTypes.CONTACTDETAIL;
3809        if ("ContactPoint".equals(codeString))
3810          return FHIRAllTypes.CONTACTPOINT;
3811        if ("Contributor".equals(codeString))
3812          return FHIRAllTypes.CONTRIBUTOR;
3813        if ("Count".equals(codeString))
3814          return FHIRAllTypes.COUNT;
3815        if ("DataRequirement".equals(codeString))
3816          return FHIRAllTypes.DATAREQUIREMENT;
3817        if ("Distance".equals(codeString))
3818          return FHIRAllTypes.DISTANCE;
3819        if ("Dosage".equals(codeString))
3820          return FHIRAllTypes.DOSAGE;
3821        if ("Duration".equals(codeString))
3822          return FHIRAllTypes.DURATION;
3823        if ("Element".equals(codeString))
3824          return FHIRAllTypes.ELEMENT;
3825        if ("ElementDefinition".equals(codeString))
3826          return FHIRAllTypes.ELEMENTDEFINITION;
3827        if ("Extension".equals(codeString))
3828          return FHIRAllTypes.EXTENSION;
3829        if ("HumanName".equals(codeString))
3830          return FHIRAllTypes.HUMANNAME;
3831        if ("Identifier".equals(codeString))
3832          return FHIRAllTypes.IDENTIFIER;
3833        if ("Meta".equals(codeString))
3834          return FHIRAllTypes.META;
3835        if ("Money".equals(codeString))
3836          return FHIRAllTypes.MONEY;
3837        if ("Narrative".equals(codeString))
3838          return FHIRAllTypes.NARRATIVE;
3839        if ("ParameterDefinition".equals(codeString))
3840          return FHIRAllTypes.PARAMETERDEFINITION;
3841        if ("Period".equals(codeString))
3842          return FHIRAllTypes.PERIOD;
3843        if ("Quantity".equals(codeString))
3844          return FHIRAllTypes.QUANTITY;
3845        if ("Range".equals(codeString))
3846          return FHIRAllTypes.RANGE;
3847        if ("Ratio".equals(codeString))
3848          return FHIRAllTypes.RATIO;
3849        if ("Reference".equals(codeString))
3850          return FHIRAllTypes.REFERENCE;
3851        if ("RelatedArtifact".equals(codeString))
3852          return FHIRAllTypes.RELATEDARTIFACT;
3853        if ("SampledData".equals(codeString))
3854          return FHIRAllTypes.SAMPLEDDATA;
3855        if ("Signature".equals(codeString))
3856          return FHIRAllTypes.SIGNATURE;
3857        if ("SimpleQuantity".equals(codeString))
3858          return FHIRAllTypes.SIMPLEQUANTITY;
3859        if ("Timing".equals(codeString))
3860          return FHIRAllTypes.TIMING;
3861        if ("TriggerDefinition".equals(codeString))
3862          return FHIRAllTypes.TRIGGERDEFINITION;
3863        if ("UsageContext".equals(codeString))
3864          return FHIRAllTypes.USAGECONTEXT;
3865        if ("base64Binary".equals(codeString))
3866          return FHIRAllTypes.BASE64BINARY;
3867        if ("boolean".equals(codeString))
3868          return FHIRAllTypes.BOOLEAN;
3869        if ("code".equals(codeString))
3870          return FHIRAllTypes.CODE;
3871        if ("date".equals(codeString))
3872          return FHIRAllTypes.DATE;
3873        if ("dateTime".equals(codeString))
3874          return FHIRAllTypes.DATETIME;
3875        if ("decimal".equals(codeString))
3876          return FHIRAllTypes.DECIMAL;
3877        if ("id".equals(codeString))
3878          return FHIRAllTypes.ID;
3879        if ("instant".equals(codeString))
3880          return FHIRAllTypes.INSTANT;
3881        if ("integer".equals(codeString))
3882          return FHIRAllTypes.INTEGER;
3883        if ("markdown".equals(codeString))
3884          return FHIRAllTypes.MARKDOWN;
3885        if ("oid".equals(codeString))
3886          return FHIRAllTypes.OID;
3887        if ("positiveInt".equals(codeString))
3888          return FHIRAllTypes.POSITIVEINT;
3889        if ("string".equals(codeString))
3890          return FHIRAllTypes.STRING;
3891        if ("time".equals(codeString))
3892          return FHIRAllTypes.TIME;
3893        if ("unsignedInt".equals(codeString))
3894          return FHIRAllTypes.UNSIGNEDINT;
3895        if ("uri".equals(codeString))
3896          return FHIRAllTypes.URI;
3897        if ("uuid".equals(codeString))
3898          return FHIRAllTypes.UUID;
3899        if ("xhtml".equals(codeString))
3900          return FHIRAllTypes.XHTML;
3901        if ("Account".equals(codeString))
3902          return FHIRAllTypes.ACCOUNT;
3903        if ("ActivityDefinition".equals(codeString))
3904          return FHIRAllTypes.ACTIVITYDEFINITION;
3905        if ("AdverseEvent".equals(codeString))
3906          return FHIRAllTypes.ADVERSEEVENT;
3907        if ("AllergyIntolerance".equals(codeString))
3908          return FHIRAllTypes.ALLERGYINTOLERANCE;
3909        if ("Appointment".equals(codeString))
3910          return FHIRAllTypes.APPOINTMENT;
3911        if ("AppointmentResponse".equals(codeString))
3912          return FHIRAllTypes.APPOINTMENTRESPONSE;
3913        if ("AuditEvent".equals(codeString))
3914          return FHIRAllTypes.AUDITEVENT;
3915        if ("Basic".equals(codeString))
3916          return FHIRAllTypes.BASIC;
3917        if ("Binary".equals(codeString))
3918          return FHIRAllTypes.BINARY;
3919        if ("BodySite".equals(codeString))
3920          return FHIRAllTypes.BODYSITE;
3921        if ("Bundle".equals(codeString))
3922          return FHIRAllTypes.BUNDLE;
3923        if ("CapabilityStatement".equals(codeString))
3924          return FHIRAllTypes.CAPABILITYSTATEMENT;
3925        if ("CarePlan".equals(codeString))
3926          return FHIRAllTypes.CAREPLAN;
3927        if ("CareTeam".equals(codeString))
3928          return FHIRAllTypes.CARETEAM;
3929        if ("ChargeItem".equals(codeString))
3930          return FHIRAllTypes.CHARGEITEM;
3931        if ("Claim".equals(codeString))
3932          return FHIRAllTypes.CLAIM;
3933        if ("ClaimResponse".equals(codeString))
3934          return FHIRAllTypes.CLAIMRESPONSE;
3935        if ("ClinicalImpression".equals(codeString))
3936          return FHIRAllTypes.CLINICALIMPRESSION;
3937        if ("CodeSystem".equals(codeString))
3938          return FHIRAllTypes.CODESYSTEM;
3939        if ("Communication".equals(codeString))
3940          return FHIRAllTypes.COMMUNICATION;
3941        if ("CommunicationRequest".equals(codeString))
3942          return FHIRAllTypes.COMMUNICATIONREQUEST;
3943        if ("CompartmentDefinition".equals(codeString))
3944          return FHIRAllTypes.COMPARTMENTDEFINITION;
3945        if ("Composition".equals(codeString))
3946          return FHIRAllTypes.COMPOSITION;
3947        if ("ConceptMap".equals(codeString))
3948          return FHIRAllTypes.CONCEPTMAP;
3949        if ("Condition".equals(codeString))
3950          return FHIRAllTypes.CONDITION;
3951        if ("Consent".equals(codeString))
3952          return FHIRAllTypes.CONSENT;
3953        if ("Contract".equals(codeString))
3954          return FHIRAllTypes.CONTRACT;
3955        if ("Coverage".equals(codeString))
3956          return FHIRAllTypes.COVERAGE;
3957        if ("DataElement".equals(codeString))
3958          return FHIRAllTypes.DATAELEMENT;
3959        if ("DetectedIssue".equals(codeString))
3960          return FHIRAllTypes.DETECTEDISSUE;
3961        if ("Device".equals(codeString))
3962          return FHIRAllTypes.DEVICE;
3963        if ("DeviceComponent".equals(codeString))
3964          return FHIRAllTypes.DEVICECOMPONENT;
3965        if ("DeviceMetric".equals(codeString))
3966          return FHIRAllTypes.DEVICEMETRIC;
3967        if ("DeviceRequest".equals(codeString))
3968          return FHIRAllTypes.DEVICEREQUEST;
3969        if ("DeviceUseStatement".equals(codeString))
3970          return FHIRAllTypes.DEVICEUSESTATEMENT;
3971        if ("DiagnosticReport".equals(codeString))
3972          return FHIRAllTypes.DIAGNOSTICREPORT;
3973        if ("DocumentManifest".equals(codeString))
3974          return FHIRAllTypes.DOCUMENTMANIFEST;
3975        if ("DocumentReference".equals(codeString))
3976          return FHIRAllTypes.DOCUMENTREFERENCE;
3977        if ("DomainResource".equals(codeString))
3978          return FHIRAllTypes.DOMAINRESOURCE;
3979        if ("EligibilityRequest".equals(codeString))
3980          return FHIRAllTypes.ELIGIBILITYREQUEST;
3981        if ("EligibilityResponse".equals(codeString))
3982          return FHIRAllTypes.ELIGIBILITYRESPONSE;
3983        if ("Encounter".equals(codeString))
3984          return FHIRAllTypes.ENCOUNTER;
3985        if ("Endpoint".equals(codeString))
3986          return FHIRAllTypes.ENDPOINT;
3987        if ("EnrollmentRequest".equals(codeString))
3988          return FHIRAllTypes.ENROLLMENTREQUEST;
3989        if ("EnrollmentResponse".equals(codeString))
3990          return FHIRAllTypes.ENROLLMENTRESPONSE;
3991        if ("EpisodeOfCare".equals(codeString))
3992          return FHIRAllTypes.EPISODEOFCARE;
3993        if ("ExpansionProfile".equals(codeString))
3994          return FHIRAllTypes.EXPANSIONPROFILE;
3995        if ("ExplanationOfBenefit".equals(codeString))
3996          return FHIRAllTypes.EXPLANATIONOFBENEFIT;
3997        if ("FamilyMemberHistory".equals(codeString))
3998          return FHIRAllTypes.FAMILYMEMBERHISTORY;
3999        if ("Flag".equals(codeString))
4000          return FHIRAllTypes.FLAG;
4001        if ("Goal".equals(codeString))
4002          return FHIRAllTypes.GOAL;
4003        if ("GraphDefinition".equals(codeString))
4004          return FHIRAllTypes.GRAPHDEFINITION;
4005        if ("Group".equals(codeString))
4006          return FHIRAllTypes.GROUP;
4007        if ("GuidanceResponse".equals(codeString))
4008          return FHIRAllTypes.GUIDANCERESPONSE;
4009        if ("HealthcareService".equals(codeString))
4010          return FHIRAllTypes.HEALTHCARESERVICE;
4011        if ("ImagingManifest".equals(codeString))
4012          return FHIRAllTypes.IMAGINGMANIFEST;
4013        if ("ImagingStudy".equals(codeString))
4014          return FHIRAllTypes.IMAGINGSTUDY;
4015        if ("Immunization".equals(codeString))
4016          return FHIRAllTypes.IMMUNIZATION;
4017        if ("ImmunizationRecommendation".equals(codeString))
4018          return FHIRAllTypes.IMMUNIZATIONRECOMMENDATION;
4019        if ("ImplementationGuide".equals(codeString))
4020          return FHIRAllTypes.IMPLEMENTATIONGUIDE;
4021        if ("Library".equals(codeString))
4022          return FHIRAllTypes.LIBRARY;
4023        if ("Linkage".equals(codeString))
4024          return FHIRAllTypes.LINKAGE;
4025        if ("List".equals(codeString))
4026          return FHIRAllTypes.LIST;
4027        if ("Location".equals(codeString))
4028          return FHIRAllTypes.LOCATION;
4029        if ("Measure".equals(codeString))
4030          return FHIRAllTypes.MEASURE;
4031        if ("MeasureReport".equals(codeString))
4032          return FHIRAllTypes.MEASUREREPORT;
4033        if ("Media".equals(codeString))
4034          return FHIRAllTypes.MEDIA;
4035        if ("Medication".equals(codeString))
4036          return FHIRAllTypes.MEDICATION;
4037        if ("MedicationAdministration".equals(codeString))
4038          return FHIRAllTypes.MEDICATIONADMINISTRATION;
4039        if ("MedicationDispense".equals(codeString))
4040          return FHIRAllTypes.MEDICATIONDISPENSE;
4041        if ("MedicationRequest".equals(codeString))
4042          return FHIRAllTypes.MEDICATIONREQUEST;
4043        if ("MedicationStatement".equals(codeString))
4044          return FHIRAllTypes.MEDICATIONSTATEMENT;
4045        if ("MessageDefinition".equals(codeString))
4046          return FHIRAllTypes.MESSAGEDEFINITION;
4047        if ("MessageHeader".equals(codeString))
4048          return FHIRAllTypes.MESSAGEHEADER;
4049        if ("NamingSystem".equals(codeString))
4050          return FHIRAllTypes.NAMINGSYSTEM;
4051        if ("NutritionOrder".equals(codeString))
4052          return FHIRAllTypes.NUTRITIONORDER;
4053        if ("Observation".equals(codeString))
4054          return FHIRAllTypes.OBSERVATION;
4055        if ("OperationDefinition".equals(codeString))
4056          return FHIRAllTypes.OPERATIONDEFINITION;
4057        if ("OperationOutcome".equals(codeString))
4058          return FHIRAllTypes.OPERATIONOUTCOME;
4059        if ("Organization".equals(codeString))
4060          return FHIRAllTypes.ORGANIZATION;
4061        if ("Parameters".equals(codeString))
4062          return FHIRAllTypes.PARAMETERS;
4063        if ("Patient".equals(codeString))
4064          return FHIRAllTypes.PATIENT;
4065        if ("PaymentNotice".equals(codeString))
4066          return FHIRAllTypes.PAYMENTNOTICE;
4067        if ("PaymentReconciliation".equals(codeString))
4068          return FHIRAllTypes.PAYMENTRECONCILIATION;
4069        if ("Person".equals(codeString))
4070          return FHIRAllTypes.PERSON;
4071        if ("PlanDefinition".equals(codeString))
4072          return FHIRAllTypes.PLANDEFINITION;
4073        if ("Practitioner".equals(codeString))
4074          return FHIRAllTypes.PRACTITIONER;
4075        if ("PractitionerRole".equals(codeString))
4076          return FHIRAllTypes.PRACTITIONERROLE;
4077        if ("Procedure".equals(codeString))
4078          return FHIRAllTypes.PROCEDURE;
4079        if ("ProcedureRequest".equals(codeString))
4080          return FHIRAllTypes.PROCEDUREREQUEST;
4081        if ("ProcessRequest".equals(codeString))
4082          return FHIRAllTypes.PROCESSREQUEST;
4083        if ("ProcessResponse".equals(codeString))
4084          return FHIRAllTypes.PROCESSRESPONSE;
4085        if ("Provenance".equals(codeString))
4086          return FHIRAllTypes.PROVENANCE;
4087        if ("Questionnaire".equals(codeString))
4088          return FHIRAllTypes.QUESTIONNAIRE;
4089        if ("QuestionnaireResponse".equals(codeString))
4090          return FHIRAllTypes.QUESTIONNAIRERESPONSE;
4091        if ("ReferralRequest".equals(codeString))
4092          return FHIRAllTypes.REFERRALREQUEST;
4093        if ("RelatedPerson".equals(codeString))
4094          return FHIRAllTypes.RELATEDPERSON;
4095        if ("RequestGroup".equals(codeString))
4096          return FHIRAllTypes.REQUESTGROUP;
4097        if ("ResearchStudy".equals(codeString))
4098          return FHIRAllTypes.RESEARCHSTUDY;
4099        if ("ResearchSubject".equals(codeString))
4100          return FHIRAllTypes.RESEARCHSUBJECT;
4101        if ("Resource".equals(codeString))
4102          return FHIRAllTypes.RESOURCE;
4103        if ("RiskAssessment".equals(codeString))
4104          return FHIRAllTypes.RISKASSESSMENT;
4105        if ("Schedule".equals(codeString))
4106          return FHIRAllTypes.SCHEDULE;
4107        if ("SearchParameter".equals(codeString))
4108          return FHIRAllTypes.SEARCHPARAMETER;
4109        if ("Sequence".equals(codeString))
4110          return FHIRAllTypes.SEQUENCE;
4111        if ("ServiceDefinition".equals(codeString))
4112          return FHIRAllTypes.SERVICEDEFINITION;
4113        if ("Slot".equals(codeString))
4114          return FHIRAllTypes.SLOT;
4115        if ("Specimen".equals(codeString))
4116          return FHIRAllTypes.SPECIMEN;
4117        if ("StructureDefinition".equals(codeString))
4118          return FHIRAllTypes.STRUCTUREDEFINITION;
4119        if ("StructureMap".equals(codeString))
4120          return FHIRAllTypes.STRUCTUREMAP;
4121        if ("Subscription".equals(codeString))
4122          return FHIRAllTypes.SUBSCRIPTION;
4123        if ("Substance".equals(codeString))
4124          return FHIRAllTypes.SUBSTANCE;
4125        if ("SupplyDelivery".equals(codeString))
4126          return FHIRAllTypes.SUPPLYDELIVERY;
4127        if ("SupplyRequest".equals(codeString))
4128          return FHIRAllTypes.SUPPLYREQUEST;
4129        if ("Task".equals(codeString))
4130          return FHIRAllTypes.TASK;
4131        if ("TestReport".equals(codeString))
4132          return FHIRAllTypes.TESTREPORT;
4133        if ("TestScript".equals(codeString))
4134          return FHIRAllTypes.TESTSCRIPT;
4135        if ("ValueSet".equals(codeString))
4136          return FHIRAllTypes.VALUESET;
4137        if ("VisionPrescription".equals(codeString))
4138          return FHIRAllTypes.VISIONPRESCRIPTION;
4139        if ("Type".equals(codeString))
4140          return FHIRAllTypes.TYPE;
4141        if ("Any".equals(codeString))
4142          return FHIRAllTypes.ANY;
4143        throw new IllegalArgumentException("Unknown FHIRAllTypes code '"+codeString+"'");
4144        }
4145        public Enumeration<FHIRAllTypes> fromType(Base code) throws FHIRException {
4146          if (code == null)
4147            return null;
4148          if (code.isEmpty())
4149            return new Enumeration<FHIRAllTypes>(this);
4150          String codeString = ((PrimitiveType) code).asStringValue();
4151          if (codeString == null || "".equals(codeString))
4152            return null;
4153        if ("Address".equals(codeString))
4154          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADDRESS);
4155        if ("Age".equals(codeString))
4156          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.AGE);
4157        if ("Annotation".equals(codeString))
4158          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ANNOTATION);
4159        if ("Attachment".equals(codeString))
4160          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ATTACHMENT);
4161        if ("BackboneElement".equals(codeString))
4162          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BACKBONEELEMENT);
4163        if ("CodeableConcept".equals(codeString))
4164          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODEABLECONCEPT);
4165        if ("Coding".equals(codeString))
4166          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODING);
4167        if ("ContactDetail".equals(codeString))
4168          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTACTDETAIL);
4169        if ("ContactPoint".equals(codeString))
4170          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTACTPOINT);
4171        if ("Contributor".equals(codeString))
4172          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTRIBUTOR);
4173        if ("Count".equals(codeString))
4174          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COUNT);
4175        if ("DataRequirement".equals(codeString))
4176          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATAREQUIREMENT);
4177        if ("Distance".equals(codeString))
4178          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DISTANCE);
4179        if ("Dosage".equals(codeString))
4180          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOSAGE);
4181        if ("Duration".equals(codeString))
4182          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DURATION);
4183        if ("Element".equals(codeString))
4184          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELEMENT);
4185        if ("ElementDefinition".equals(codeString))
4186          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELEMENTDEFINITION);
4187        if ("Extension".equals(codeString))
4188          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXTENSION);
4189        if ("HumanName".equals(codeString))
4190          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.HUMANNAME);
4191        if ("Identifier".equals(codeString))
4192          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IDENTIFIER);
4193        if ("Meta".equals(codeString))
4194          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.META);
4195        if ("Money".equals(codeString))
4196          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MONEY);
4197        if ("Narrative".equals(codeString))
4198          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NARRATIVE);
4199        if ("ParameterDefinition".equals(codeString))
4200          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PARAMETERDEFINITION);
4201        if ("Period".equals(codeString))
4202          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERIOD);
4203        if ("Quantity".equals(codeString))
4204          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUANTITY);
4205        if ("Range".equals(codeString))
4206          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RANGE);
4207        if ("Ratio".equals(codeString))
4208          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RATIO);
4209        if ("Reference".equals(codeString))
4210          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REFERENCE);
4211        if ("RelatedArtifact".equals(codeString))
4212          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RELATEDARTIFACT);
4213        if ("SampledData".equals(codeString))
4214          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SAMPLEDDATA);
4215        if ("Signature".equals(codeString))
4216          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SIGNATURE);
4217        if ("SimpleQuantity".equals(codeString))
4218          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SIMPLEQUANTITY);
4219        if ("Timing".equals(codeString))
4220          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TIMING);
4221        if ("TriggerDefinition".equals(codeString))
4222          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TRIGGERDEFINITION);
4223        if ("UsageContext".equals(codeString))
4224          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.USAGECONTEXT);
4225        if ("base64Binary".equals(codeString))
4226          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASE64BINARY);
4227        if ("boolean".equals(codeString))
4228          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BOOLEAN);
4229        if ("code".equals(codeString))
4230          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODE);
4231        if ("date".equals(codeString))
4232          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATE);
4233        if ("dateTime".equals(codeString))
4234          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATETIME);
4235        if ("decimal".equals(codeString))
4236          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DECIMAL);
4237        if ("id".equals(codeString))
4238          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ID);
4239        if ("instant".equals(codeString))
4240          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INSTANT);
4241        if ("integer".equals(codeString))
4242          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.INTEGER);
4243        if ("markdown".equals(codeString))
4244          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MARKDOWN);
4245        if ("oid".equals(codeString))
4246          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OID);
4247        if ("positiveInt".equals(codeString))
4248          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.POSITIVEINT);
4249        if ("string".equals(codeString))
4250          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRING);
4251        if ("time".equals(codeString))
4252          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TIME);
4253        if ("unsignedInt".equals(codeString))
4254          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.UNSIGNEDINT);
4255        if ("uri".equals(codeString))
4256          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.URI);
4257        if ("uuid".equals(codeString))
4258          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.UUID);
4259        if ("xhtml".equals(codeString))
4260          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.XHTML);
4261        if ("Account".equals(codeString))
4262          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ACCOUNT);
4263        if ("ActivityDefinition".equals(codeString))
4264          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ACTIVITYDEFINITION);
4265        if ("AdverseEvent".equals(codeString))
4266          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ADVERSEEVENT);
4267        if ("AllergyIntolerance".equals(codeString))
4268          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ALLERGYINTOLERANCE);
4269        if ("Appointment".equals(codeString))
4270          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.APPOINTMENT);
4271        if ("AppointmentResponse".equals(codeString))
4272          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.APPOINTMENTRESPONSE);
4273        if ("AuditEvent".equals(codeString))
4274          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.AUDITEVENT);
4275        if ("Basic".equals(codeString))
4276          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BASIC);
4277        if ("Binary".equals(codeString))
4278          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BINARY);
4279        if ("BodySite".equals(codeString))
4280          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BODYSITE);
4281        if ("Bundle".equals(codeString))
4282          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.BUNDLE);
4283        if ("CapabilityStatement".equals(codeString))
4284          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CAPABILITYSTATEMENT);
4285        if ("CarePlan".equals(codeString))
4286          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CAREPLAN);
4287        if ("CareTeam".equals(codeString))
4288          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CARETEAM);
4289        if ("ChargeItem".equals(codeString))
4290          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CHARGEITEM);
4291        if ("Claim".equals(codeString))
4292          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLAIM);
4293        if ("ClaimResponse".equals(codeString))
4294          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLAIMRESPONSE);
4295        if ("ClinicalImpression".equals(codeString))
4296          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CLINICALIMPRESSION);
4297        if ("CodeSystem".equals(codeString))
4298          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CODESYSTEM);
4299        if ("Communication".equals(codeString))
4300          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMMUNICATION);
4301        if ("CommunicationRequest".equals(codeString))
4302          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMMUNICATIONREQUEST);
4303        if ("CompartmentDefinition".equals(codeString))
4304          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMPARTMENTDEFINITION);
4305        if ("Composition".equals(codeString))
4306          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COMPOSITION);
4307        if ("ConceptMap".equals(codeString))
4308          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONCEPTMAP);
4309        if ("Condition".equals(codeString))
4310          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONDITION);
4311        if ("Consent".equals(codeString))
4312          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONSENT);
4313        if ("Contract".equals(codeString))
4314          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.CONTRACT);
4315        if ("Coverage".equals(codeString))
4316          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.COVERAGE);
4317        if ("DataElement".equals(codeString))
4318          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DATAELEMENT);
4319        if ("DetectedIssue".equals(codeString))
4320          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DETECTEDISSUE);
4321        if ("Device".equals(codeString))
4322          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICE);
4323        if ("DeviceComponent".equals(codeString))
4324          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICECOMPONENT);
4325        if ("DeviceMetric".equals(codeString))
4326          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEMETRIC);
4327        if ("DeviceRequest".equals(codeString))
4328          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEREQUEST);
4329        if ("DeviceUseStatement".equals(codeString))
4330          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DEVICEUSESTATEMENT);
4331        if ("DiagnosticReport".equals(codeString))
4332          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DIAGNOSTICREPORT);
4333        if ("DocumentManifest".equals(codeString))
4334          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOCUMENTMANIFEST);
4335        if ("DocumentReference".equals(codeString))
4336          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOCUMENTREFERENCE);
4337        if ("DomainResource".equals(codeString))
4338          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.DOMAINRESOURCE);
4339        if ("EligibilityRequest".equals(codeString))
4340          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELIGIBILITYREQUEST);
4341        if ("EligibilityResponse".equals(codeString))
4342          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ELIGIBILITYRESPONSE);
4343        if ("Encounter".equals(codeString))
4344          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENCOUNTER);
4345        if ("Endpoint".equals(codeString))
4346          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENDPOINT);
4347        if ("EnrollmentRequest".equals(codeString))
4348          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENROLLMENTREQUEST);
4349        if ("EnrollmentResponse".equals(codeString))
4350          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ENROLLMENTRESPONSE);
4351        if ("EpisodeOfCare".equals(codeString))
4352          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EPISODEOFCARE);
4353        if ("ExpansionProfile".equals(codeString))
4354          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXPANSIONPROFILE);
4355        if ("ExplanationOfBenefit".equals(codeString))
4356          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.EXPLANATIONOFBENEFIT);
4357        if ("FamilyMemberHistory".equals(codeString))
4358          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.FAMILYMEMBERHISTORY);
4359        if ("Flag".equals(codeString))
4360          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.FLAG);
4361        if ("Goal".equals(codeString))
4362          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GOAL);
4363        if ("GraphDefinition".equals(codeString))
4364          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GRAPHDEFINITION);
4365        if ("Group".equals(codeString))
4366          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GROUP);
4367        if ("GuidanceResponse".equals(codeString))
4368          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.GUIDANCERESPONSE);
4369        if ("HealthcareService".equals(codeString))
4370          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.HEALTHCARESERVICE);
4371        if ("ImagingManifest".equals(codeString))
4372          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMAGINGMANIFEST);
4373        if ("ImagingStudy".equals(codeString))
4374          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMAGINGSTUDY);
4375        if ("Immunization".equals(codeString))
4376          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATION);
4377        if ("ImmunizationRecommendation".equals(codeString))
4378          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMMUNIZATIONRECOMMENDATION);
4379        if ("ImplementationGuide".equals(codeString))
4380          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.IMPLEMENTATIONGUIDE);
4381        if ("Library".equals(codeString))
4382          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LIBRARY);
4383        if ("Linkage".equals(codeString))
4384          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LINKAGE);
4385        if ("List".equals(codeString))
4386          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LIST);
4387        if ("Location".equals(codeString))
4388          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.LOCATION);
4389        if ("Measure".equals(codeString))
4390          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEASURE);
4391        if ("MeasureReport".equals(codeString))
4392          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEASUREREPORT);
4393        if ("Media".equals(codeString))
4394          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDIA);
4395        if ("Medication".equals(codeString))
4396          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATION);
4397        if ("MedicationAdministration".equals(codeString))
4398          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONADMINISTRATION);
4399        if ("MedicationDispense".equals(codeString))
4400          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONDISPENSE);
4401        if ("MedicationRequest".equals(codeString))
4402          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONREQUEST);
4403        if ("MedicationStatement".equals(codeString))
4404          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MEDICATIONSTATEMENT);
4405        if ("MessageDefinition".equals(codeString))
4406          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MESSAGEDEFINITION);
4407        if ("MessageHeader".equals(codeString))
4408          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.MESSAGEHEADER);
4409        if ("NamingSystem".equals(codeString))
4410          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NAMINGSYSTEM);
4411        if ("NutritionOrder".equals(codeString))
4412          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.NUTRITIONORDER);
4413        if ("Observation".equals(codeString))
4414          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OBSERVATION);
4415        if ("OperationDefinition".equals(codeString))
4416          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OPERATIONDEFINITION);
4417        if ("OperationOutcome".equals(codeString))
4418          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.OPERATIONOUTCOME);
4419        if ("Organization".equals(codeString))
4420          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ORGANIZATION);
4421        if ("Parameters".equals(codeString))
4422          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PARAMETERS);
4423        if ("Patient".equals(codeString))
4424          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PATIENT);
4425        if ("PaymentNotice".equals(codeString))
4426          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PAYMENTNOTICE);
4427        if ("PaymentReconciliation".equals(codeString))
4428          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PAYMENTRECONCILIATION);
4429        if ("Person".equals(codeString))
4430          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PERSON);
4431        if ("PlanDefinition".equals(codeString))
4432          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PLANDEFINITION);
4433        if ("Practitioner".equals(codeString))
4434          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRACTITIONER);
4435        if ("PractitionerRole".equals(codeString))
4436          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PRACTITIONERROLE);
4437        if ("Procedure".equals(codeString))
4438          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROCEDURE);
4439        if ("ProcedureRequest".equals(codeString))
4440          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROCEDUREREQUEST);
4441        if ("ProcessRequest".equals(codeString))
4442          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROCESSREQUEST);
4443        if ("ProcessResponse".equals(codeString))
4444          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROCESSRESPONSE);
4445        if ("Provenance".equals(codeString))
4446          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.PROVENANCE);
4447        if ("Questionnaire".equals(codeString))
4448          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUESTIONNAIRE);
4449        if ("QuestionnaireResponse".equals(codeString))
4450          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.QUESTIONNAIRERESPONSE);
4451        if ("ReferralRequest".equals(codeString))
4452          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REFERRALREQUEST);
4453        if ("RelatedPerson".equals(codeString))
4454          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RELATEDPERSON);
4455        if ("RequestGroup".equals(codeString))
4456          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.REQUESTGROUP);
4457        if ("ResearchStudy".equals(codeString))
4458          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHSTUDY);
4459        if ("ResearchSubject".equals(codeString))
4460          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESEARCHSUBJECT);
4461        if ("Resource".equals(codeString))
4462          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RESOURCE);
4463        if ("RiskAssessment".equals(codeString))
4464          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.RISKASSESSMENT);
4465        if ("Schedule".equals(codeString))
4466          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SCHEDULE);
4467        if ("SearchParameter".equals(codeString))
4468          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SEARCHPARAMETER);
4469        if ("Sequence".equals(codeString))
4470          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SEQUENCE);
4471        if ("ServiceDefinition".equals(codeString))
4472          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SERVICEDEFINITION);
4473        if ("Slot".equals(codeString))
4474          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SLOT);
4475        if ("Specimen".equals(codeString))
4476          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SPECIMEN);
4477        if ("StructureDefinition".equals(codeString))
4478          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRUCTUREDEFINITION);
4479        if ("StructureMap".equals(codeString))
4480          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.STRUCTUREMAP);
4481        if ("Subscription".equals(codeString))
4482          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSCRIPTION);
4483        if ("Substance".equals(codeString))
4484          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUBSTANCE);
4485        if ("SupplyDelivery".equals(codeString))
4486          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUPPLYDELIVERY);
4487        if ("SupplyRequest".equals(codeString))
4488          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.SUPPLYREQUEST);
4489        if ("Task".equals(codeString))
4490          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TASK);
4491        if ("TestReport".equals(codeString))
4492          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TESTREPORT);
4493        if ("TestScript".equals(codeString))
4494          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TESTSCRIPT);
4495        if ("ValueSet".equals(codeString))
4496          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VALUESET);
4497        if ("VisionPrescription".equals(codeString))
4498          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.VISIONPRESCRIPTION);
4499        if ("Type".equals(codeString))
4500          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.TYPE);
4501        if ("Any".equals(codeString))
4502          return new Enumeration<FHIRAllTypes>(this, FHIRAllTypes.ANY);
4503        throw new FHIRException("Unknown FHIRAllTypes code '"+codeString+"'");
4504        }
4505    public String toCode(FHIRAllTypes code) {
4506      if (code == FHIRAllTypes.ADDRESS)
4507        return "Address";
4508      if (code == FHIRAllTypes.AGE)
4509        return "Age";
4510      if (code == FHIRAllTypes.ANNOTATION)
4511        return "Annotation";
4512      if (code == FHIRAllTypes.ATTACHMENT)
4513        return "Attachment";
4514      if (code == FHIRAllTypes.BACKBONEELEMENT)
4515        return "BackboneElement";
4516      if (code == FHIRAllTypes.CODEABLECONCEPT)
4517        return "CodeableConcept";
4518      if (code == FHIRAllTypes.CODING)
4519        return "Coding";
4520      if (code == FHIRAllTypes.CONTACTDETAIL)
4521        return "ContactDetail";
4522      if (code == FHIRAllTypes.CONTACTPOINT)
4523        return "ContactPoint";
4524      if (code == FHIRAllTypes.CONTRIBUTOR)
4525        return "Contributor";
4526      if (code == FHIRAllTypes.COUNT)
4527        return "Count";
4528      if (code == FHIRAllTypes.DATAREQUIREMENT)
4529        return "DataRequirement";
4530      if (code == FHIRAllTypes.DISTANCE)
4531        return "Distance";
4532      if (code == FHIRAllTypes.DOSAGE)
4533        return "Dosage";
4534      if (code == FHIRAllTypes.DURATION)
4535        return "Duration";
4536      if (code == FHIRAllTypes.ELEMENT)
4537        return "Element";
4538      if (code == FHIRAllTypes.ELEMENTDEFINITION)
4539        return "ElementDefinition";
4540      if (code == FHIRAllTypes.EXTENSION)
4541        return "Extension";
4542      if (code == FHIRAllTypes.HUMANNAME)
4543        return "HumanName";
4544      if (code == FHIRAllTypes.IDENTIFIER)
4545        return "Identifier";
4546      if (code == FHIRAllTypes.META)
4547        return "Meta";
4548      if (code == FHIRAllTypes.MONEY)
4549        return "Money";
4550      if (code == FHIRAllTypes.NARRATIVE)
4551        return "Narrative";
4552      if (code == FHIRAllTypes.PARAMETERDEFINITION)
4553        return "ParameterDefinition";
4554      if (code == FHIRAllTypes.PERIOD)
4555        return "Period";
4556      if (code == FHIRAllTypes.QUANTITY)
4557        return "Quantity";
4558      if (code == FHIRAllTypes.RANGE)
4559        return "Range";
4560      if (code == FHIRAllTypes.RATIO)
4561        return "Ratio";
4562      if (code == FHIRAllTypes.REFERENCE)
4563        return "Reference";
4564      if (code == FHIRAllTypes.RELATEDARTIFACT)
4565        return "RelatedArtifact";
4566      if (code == FHIRAllTypes.SAMPLEDDATA)
4567        return "SampledData";
4568      if (code == FHIRAllTypes.SIGNATURE)
4569        return "Signature";
4570      if (code == FHIRAllTypes.SIMPLEQUANTITY)
4571        return "SimpleQuantity";
4572      if (code == FHIRAllTypes.TIMING)
4573        return "Timing";
4574      if (code == FHIRAllTypes.TRIGGERDEFINITION)
4575        return "TriggerDefinition";
4576      if (code == FHIRAllTypes.USAGECONTEXT)
4577        return "UsageContext";
4578      if (code == FHIRAllTypes.BASE64BINARY)
4579        return "base64Binary";
4580      if (code == FHIRAllTypes.BOOLEAN)
4581        return "boolean";
4582      if (code == FHIRAllTypes.CODE)
4583        return "code";
4584      if (code == FHIRAllTypes.DATE)
4585        return "date";
4586      if (code == FHIRAllTypes.DATETIME)
4587        return "dateTime";
4588      if (code == FHIRAllTypes.DECIMAL)
4589        return "decimal";
4590      if (code == FHIRAllTypes.ID)
4591        return "id";
4592      if (code == FHIRAllTypes.INSTANT)
4593        return "instant";
4594      if (code == FHIRAllTypes.INTEGER)
4595        return "integer";
4596      if (code == FHIRAllTypes.MARKDOWN)
4597        return "markdown";
4598      if (code == FHIRAllTypes.OID)
4599        return "oid";
4600      if (code == FHIRAllTypes.POSITIVEINT)
4601        return "positiveInt";
4602      if (code == FHIRAllTypes.STRING)
4603        return "string";
4604      if (code == FHIRAllTypes.TIME)
4605        return "time";
4606      if (code == FHIRAllTypes.UNSIGNEDINT)
4607        return "unsignedInt";
4608      if (code == FHIRAllTypes.URI)
4609        return "uri";
4610      if (code == FHIRAllTypes.UUID)
4611        return "uuid";
4612      if (code == FHIRAllTypes.XHTML)
4613        return "xhtml";
4614      if (code == FHIRAllTypes.ACCOUNT)
4615        return "Account";
4616      if (code == FHIRAllTypes.ACTIVITYDEFINITION)
4617        return "ActivityDefinition";
4618      if (code == FHIRAllTypes.ADVERSEEVENT)
4619        return "AdverseEvent";
4620      if (code == FHIRAllTypes.ALLERGYINTOLERANCE)
4621        return "AllergyIntolerance";
4622      if (code == FHIRAllTypes.APPOINTMENT)
4623        return "Appointment";
4624      if (code == FHIRAllTypes.APPOINTMENTRESPONSE)
4625        return "AppointmentResponse";
4626      if (code == FHIRAllTypes.AUDITEVENT)
4627        return "AuditEvent";
4628      if (code == FHIRAllTypes.BASIC)
4629        return "Basic";
4630      if (code == FHIRAllTypes.BINARY)
4631        return "Binary";
4632      if (code == FHIRAllTypes.BODYSITE)
4633        return "BodySite";
4634      if (code == FHIRAllTypes.BUNDLE)
4635        return "Bundle";
4636      if (code == FHIRAllTypes.CAPABILITYSTATEMENT)
4637        return "CapabilityStatement";
4638      if (code == FHIRAllTypes.CAREPLAN)
4639        return "CarePlan";
4640      if (code == FHIRAllTypes.CARETEAM)
4641        return "CareTeam";
4642      if (code == FHIRAllTypes.CHARGEITEM)
4643        return "ChargeItem";
4644      if (code == FHIRAllTypes.CLAIM)
4645        return "Claim";
4646      if (code == FHIRAllTypes.CLAIMRESPONSE)
4647        return "ClaimResponse";
4648      if (code == FHIRAllTypes.CLINICALIMPRESSION)
4649        return "ClinicalImpression";
4650      if (code == FHIRAllTypes.CODESYSTEM)
4651        return "CodeSystem";
4652      if (code == FHIRAllTypes.COMMUNICATION)
4653        return "Communication";
4654      if (code == FHIRAllTypes.COMMUNICATIONREQUEST)
4655        return "CommunicationRequest";
4656      if (code == FHIRAllTypes.COMPARTMENTDEFINITION)
4657        return "CompartmentDefinition";
4658      if (code == FHIRAllTypes.COMPOSITION)
4659        return "Composition";
4660      if (code == FHIRAllTypes.CONCEPTMAP)
4661        return "ConceptMap";
4662      if (code == FHIRAllTypes.CONDITION)
4663        return "Condition";
4664      if (code == FHIRAllTypes.CONSENT)
4665        return "Consent";
4666      if (code == FHIRAllTypes.CONTRACT)
4667        return "Contract";
4668      if (code == FHIRAllTypes.COVERAGE)
4669        return "Coverage";
4670      if (code == FHIRAllTypes.DATAELEMENT)
4671        return "DataElement";
4672      if (code == FHIRAllTypes.DETECTEDISSUE)
4673        return "DetectedIssue";
4674      if (code == FHIRAllTypes.DEVICE)
4675        return "Device";
4676      if (code == FHIRAllTypes.DEVICECOMPONENT)
4677        return "DeviceComponent";
4678      if (code == FHIRAllTypes.DEVICEMETRIC)
4679        return "DeviceMetric";
4680      if (code == FHIRAllTypes.DEVICEREQUEST)
4681        return "DeviceRequest";
4682      if (code == FHIRAllTypes.DEVICEUSESTATEMENT)
4683        return "DeviceUseStatement";
4684      if (code == FHIRAllTypes.DIAGNOSTICREPORT)
4685        return "DiagnosticReport";
4686      if (code == FHIRAllTypes.DOCUMENTMANIFEST)
4687        return "DocumentManifest";
4688      if (code == FHIRAllTypes.DOCUMENTREFERENCE)
4689        return "DocumentReference";
4690      if (code == FHIRAllTypes.DOMAINRESOURCE)
4691        return "DomainResource";
4692      if (code == FHIRAllTypes.ELIGIBILITYREQUEST)
4693        return "EligibilityRequest";
4694      if (code == FHIRAllTypes.ELIGIBILITYRESPONSE)
4695        return "EligibilityResponse";
4696      if (code == FHIRAllTypes.ENCOUNTER)
4697        return "Encounter";
4698      if (code == FHIRAllTypes.ENDPOINT)
4699        return "Endpoint";
4700      if (code == FHIRAllTypes.ENROLLMENTREQUEST)
4701        return "EnrollmentRequest";
4702      if (code == FHIRAllTypes.ENROLLMENTRESPONSE)
4703        return "EnrollmentResponse";
4704      if (code == FHIRAllTypes.EPISODEOFCARE)
4705        return "EpisodeOfCare";
4706      if (code == FHIRAllTypes.EXPANSIONPROFILE)
4707        return "ExpansionProfile";
4708      if (code == FHIRAllTypes.EXPLANATIONOFBENEFIT)
4709        return "ExplanationOfBenefit";
4710      if (code == FHIRAllTypes.FAMILYMEMBERHISTORY)
4711        return "FamilyMemberHistory";
4712      if (code == FHIRAllTypes.FLAG)
4713        return "Flag";
4714      if (code == FHIRAllTypes.GOAL)
4715        return "Goal";
4716      if (code == FHIRAllTypes.GRAPHDEFINITION)
4717        return "GraphDefinition";
4718      if (code == FHIRAllTypes.GROUP)
4719        return "Group";
4720      if (code == FHIRAllTypes.GUIDANCERESPONSE)
4721        return "GuidanceResponse";
4722      if (code == FHIRAllTypes.HEALTHCARESERVICE)
4723        return "HealthcareService";
4724      if (code == FHIRAllTypes.IMAGINGMANIFEST)
4725        return "ImagingManifest";
4726      if (code == FHIRAllTypes.IMAGINGSTUDY)
4727        return "ImagingStudy";
4728      if (code == FHIRAllTypes.IMMUNIZATION)
4729        return "Immunization";
4730      if (code == FHIRAllTypes.IMMUNIZATIONRECOMMENDATION)
4731        return "ImmunizationRecommendation";
4732      if (code == FHIRAllTypes.IMPLEMENTATIONGUIDE)
4733        return "ImplementationGuide";
4734      if (code == FHIRAllTypes.LIBRARY)
4735        return "Library";
4736      if (code == FHIRAllTypes.LINKAGE)
4737        return "Linkage";
4738      if (code == FHIRAllTypes.LIST)
4739        return "List";
4740      if (code == FHIRAllTypes.LOCATION)
4741        return "Location";
4742      if (code == FHIRAllTypes.MEASURE)
4743        return "Measure";
4744      if (code == FHIRAllTypes.MEASUREREPORT)
4745        return "MeasureReport";
4746      if (code == FHIRAllTypes.MEDIA)
4747        return "Media";
4748      if (code == FHIRAllTypes.MEDICATION)
4749        return "Medication";
4750      if (code == FHIRAllTypes.MEDICATIONADMINISTRATION)
4751        return "MedicationAdministration";
4752      if (code == FHIRAllTypes.MEDICATIONDISPENSE)
4753        return "MedicationDispense";
4754      if (code == FHIRAllTypes.MEDICATIONREQUEST)
4755        return "MedicationRequest";
4756      if (code == FHIRAllTypes.MEDICATIONSTATEMENT)
4757        return "MedicationStatement";
4758      if (code == FHIRAllTypes.MESSAGEDEFINITION)
4759        return "MessageDefinition";
4760      if (code == FHIRAllTypes.MESSAGEHEADER)
4761        return "MessageHeader";
4762      if (code == FHIRAllTypes.NAMINGSYSTEM)
4763        return "NamingSystem";
4764      if (code == FHIRAllTypes.NUTRITIONORDER)
4765        return "NutritionOrder";
4766      if (code == FHIRAllTypes.OBSERVATION)
4767        return "Observation";
4768      if (code == FHIRAllTypes.OPERATIONDEFINITION)
4769        return "OperationDefinition";
4770      if (code == FHIRAllTypes.OPERATIONOUTCOME)
4771        return "OperationOutcome";
4772      if (code == FHIRAllTypes.ORGANIZATION)
4773        return "Organization";
4774      if (code == FHIRAllTypes.PARAMETERS)
4775        return "Parameters";
4776      if (code == FHIRAllTypes.PATIENT)
4777        return "Patient";
4778      if (code == FHIRAllTypes.PAYMENTNOTICE)
4779        return "PaymentNotice";
4780      if (code == FHIRAllTypes.PAYMENTRECONCILIATION)
4781        return "PaymentReconciliation";
4782      if (code == FHIRAllTypes.PERSON)
4783        return "Person";
4784      if (code == FHIRAllTypes.PLANDEFINITION)
4785        return "PlanDefinition";
4786      if (code == FHIRAllTypes.PRACTITIONER)
4787        return "Practitioner";
4788      if (code == FHIRAllTypes.PRACTITIONERROLE)
4789        return "PractitionerRole";
4790      if (code == FHIRAllTypes.PROCEDURE)
4791        return "Procedure";
4792      if (code == FHIRAllTypes.PROCEDUREREQUEST)
4793        return "ProcedureRequest";
4794      if (code == FHIRAllTypes.PROCESSREQUEST)
4795        return "ProcessRequest";
4796      if (code == FHIRAllTypes.PROCESSRESPONSE)
4797        return "ProcessResponse";
4798      if (code == FHIRAllTypes.PROVENANCE)
4799        return "Provenance";
4800      if (code == FHIRAllTypes.QUESTIONNAIRE)
4801        return "Questionnaire";
4802      if (code == FHIRAllTypes.QUESTIONNAIRERESPONSE)
4803        return "QuestionnaireResponse";
4804      if (code == FHIRAllTypes.REFERRALREQUEST)
4805        return "ReferralRequest";
4806      if (code == FHIRAllTypes.RELATEDPERSON)
4807        return "RelatedPerson";
4808      if (code == FHIRAllTypes.REQUESTGROUP)
4809        return "RequestGroup";
4810      if (code == FHIRAllTypes.RESEARCHSTUDY)
4811        return "ResearchStudy";
4812      if (code == FHIRAllTypes.RESEARCHSUBJECT)
4813        return "ResearchSubject";
4814      if (code == FHIRAllTypes.RESOURCE)
4815        return "Resource";
4816      if (code == FHIRAllTypes.RISKASSESSMENT)
4817        return "RiskAssessment";
4818      if (code == FHIRAllTypes.SCHEDULE)
4819        return "Schedule";
4820      if (code == FHIRAllTypes.SEARCHPARAMETER)
4821        return "SearchParameter";
4822      if (code == FHIRAllTypes.SEQUENCE)
4823        return "Sequence";
4824      if (code == FHIRAllTypes.SERVICEDEFINITION)
4825        return "ServiceDefinition";
4826      if (code == FHIRAllTypes.SLOT)
4827        return "Slot";
4828      if (code == FHIRAllTypes.SPECIMEN)
4829        return "Specimen";
4830      if (code == FHIRAllTypes.STRUCTUREDEFINITION)
4831        return "StructureDefinition";
4832      if (code == FHIRAllTypes.STRUCTUREMAP)
4833        return "StructureMap";
4834      if (code == FHIRAllTypes.SUBSCRIPTION)
4835        return "Subscription";
4836      if (code == FHIRAllTypes.SUBSTANCE)
4837        return "Substance";
4838      if (code == FHIRAllTypes.SUPPLYDELIVERY)
4839        return "SupplyDelivery";
4840      if (code == FHIRAllTypes.SUPPLYREQUEST)
4841        return "SupplyRequest";
4842      if (code == FHIRAllTypes.TASK)
4843        return "Task";
4844      if (code == FHIRAllTypes.TESTREPORT)
4845        return "TestReport";
4846      if (code == FHIRAllTypes.TESTSCRIPT)
4847        return "TestScript";
4848      if (code == FHIRAllTypes.VALUESET)
4849        return "ValueSet";
4850      if (code == FHIRAllTypes.VISIONPRESCRIPTION)
4851        return "VisionPrescription";
4852      if (code == FHIRAllTypes.TYPE)
4853        return "Type";
4854      if (code == FHIRAllTypes.ANY)
4855        return "Any";
4856      return "?";
4857      }
4858    public String toSystem(FHIRAllTypes code) {
4859      return code.getSystem();
4860      }
4861    }
4862
4863    public enum FHIRDefinedType {
4864        /**
4865         * An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.
4866         */
4867        ADDRESS, 
4868        /**
4869         * A duration of time during which an organism (or a process) has existed.
4870         */
4871        AGE, 
4872        /**
4873         * A  text note which also  contains information about who made the statement and when.
4874         */
4875        ANNOTATION, 
4876        /**
4877         * For referring to data content defined in other formats.
4878         */
4879        ATTACHMENT, 
4880        /**
4881         * Base definition for all elements that are defined inside a resource - but not those in a data type.
4882         */
4883        BACKBONEELEMENT, 
4884        /**
4885         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
4886         */
4887        CODEABLECONCEPT, 
4888        /**
4889         * A reference to a code defined by a terminology system.
4890         */
4891        CODING, 
4892        /**
4893         * Specifies contact information for a person or organization.
4894         */
4895        CONTACTDETAIL, 
4896        /**
4897         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
4898         */
4899        CONTACTPOINT, 
4900        /**
4901         * A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.
4902         */
4903        CONTRIBUTOR, 
4904        /**
4905         * 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.
4906         */
4907        COUNT, 
4908        /**
4909         * Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.
4910         */
4911        DATAREQUIREMENT, 
4912        /**
4913         * A length - a value with a unit that is a physical distance.
4914         */
4915        DISTANCE, 
4916        /**
4917         * Indicates how the medication is/was taken or should be taken by the patient.
4918         */
4919        DOSAGE, 
4920        /**
4921         * A length of time.
4922         */
4923        DURATION, 
4924        /**
4925         * Base definition for all elements in a resource.
4926         */
4927        ELEMENT, 
4928        /**
4929         * Captures constraints on each element within the resource, profile, or extension.
4930         */
4931        ELEMENTDEFINITION, 
4932        /**
4933         * Optional Extension Element - found in all resources.
4934         */
4935        EXTENSION, 
4936        /**
4937         * A human's name with the ability to identify parts and usage.
4938         */
4939        HUMANNAME, 
4940        /**
4941         * A technical identifier - identifies some entity uniquely and unambiguously.
4942         */
4943        IDENTIFIER, 
4944        /**
4945         * 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.
4946         */
4947        META, 
4948        /**
4949         * An amount of economic utility in some recognized currency.
4950         */
4951        MONEY, 
4952        /**
4953         * A human-readable formatted text, including images.
4954         */
4955        NARRATIVE, 
4956        /**
4957         * 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.
4958         */
4959        PARAMETERDEFINITION, 
4960        /**
4961         * A time period defined by a start and end date and optionally time.
4962         */
4963        PERIOD, 
4964        /**
4965         * 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.
4966         */
4967        QUANTITY, 
4968        /**
4969         * A set of ordered Quantities defined by a low and high limit.
4970         */
4971        RANGE, 
4972        /**
4973         * A relationship of two Quantity values - expressed as a numerator and a denominator.
4974         */
4975        RATIO, 
4976        /**
4977         * A reference from one resource to another.
4978         */
4979        REFERENCE, 
4980        /**
4981         * Related artifacts such as additional documentation, justification, or bibliographic references.
4982         */
4983        RELATEDARTIFACT, 
4984        /**
4985         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
4986         */
4987        SAMPLEDDATA, 
4988        /**
4989         * 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.
4990         */
4991        SIGNATURE, 
4992        /**
4993         * null
4994         */
4995        SIMPLEQUANTITY, 
4996        /**
4997         * Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.
4998         */
4999        TIMING, 
5000        /**
5001         * A description of a triggering event.
5002         */
5003        TRIGGERDEFINITION, 
5004        /**
5005         * Specifies clinical/business/etc metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).
5006         */
5007        USAGECONTEXT, 
5008        /**
5009         * A stream of bytes
5010         */
5011        BASE64BINARY, 
5012        /**
5013         * Value of "true" or "false"
5014         */
5015        BOOLEAN, 
5016        /**
5017         * 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
5018         */
5019        CODE, 
5020        /**
5021         * 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.
5022         */
5023        DATE, 
5024        /**
5025         * 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.
5026         */
5027        DATETIME, 
5028        /**
5029         * A rational number with implicit precision
5030         */
5031        DECIMAL, 
5032        /**
5033         * 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.
5034         */
5035        ID, 
5036        /**
5037         * An instant in time - known at least to the second
5038         */
5039        INSTANT, 
5040        /**
5041         * A whole number
5042         */
5043        INTEGER, 
5044        /**
5045         * A string that may contain markdown syntax for optional processing by a mark down presentation engine
5046         */
5047        MARKDOWN, 
5048        /**
5049         * An OID represented as a URI
5050         */
5051        OID, 
5052        /**
5053         * An integer with a value that is positive (e.g. >0)
5054         */
5055        POSITIVEINT, 
5056        /**
5057         * A sequence of Unicode characters
5058         */
5059        STRING, 
5060        /**
5061         * A time during the day, with no date specified
5062         */
5063        TIME, 
5064        /**
5065         * An integer with a value that is not negative (e.g. >= 0)
5066         */
5067        UNSIGNEDINT, 
5068        /**
5069         * String of characters used to identify a name or a resource
5070         */
5071        URI, 
5072        /**
5073         * A UUID, represented as a URI
5074         */
5075        UUID, 
5076        /**
5077         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
5078         */
5079        XHTML, 
5080        /**
5081         * A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.
5082         */
5083        ACCOUNT, 
5084        /**
5085         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
5086         */
5087        ACTIVITYDEFINITION, 
5088        /**
5089         * Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.
5090         */
5091        ADVERSEEVENT, 
5092        /**
5093         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
5094         */
5095        ALLERGYINTOLERANCE, 
5096        /**
5097         * 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).
5098         */
5099        APPOINTMENT, 
5100        /**
5101         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
5102         */
5103        APPOINTMENTRESPONSE, 
5104        /**
5105         * 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.
5106         */
5107        AUDITEVENT, 
5108        /**
5109         * 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.
5110         */
5111        BASIC, 
5112        /**
5113         * A binary resource can contain any content, whether text, image, pdf, zip archive, etc.
5114         */
5115        BINARY, 
5116        /**
5117         * 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.
5118         */
5119        BODYSITE, 
5120        /**
5121         * A container for a collection of resources.
5122         */
5123        BUNDLE, 
5124        /**
5125         * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
5126         */
5127        CAPABILITYSTATEMENT, 
5128        /**
5129         * 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.
5130         */
5131        CAREPLAN, 
5132        /**
5133         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
5134         */
5135        CARETEAM, 
5136        /**
5137         * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.
5138         */
5139        CHARGEITEM, 
5140        /**
5141         * 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.
5142         */
5143        CLAIM, 
5144        /**
5145         * This resource provides the adjudication details from the processing of a Claim resource.
5146         */
5147        CLAIMRESPONSE, 
5148        /**
5149         * 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.
5150         */
5151        CLINICALIMPRESSION, 
5152        /**
5153         * A code system resource specifies a set of codes drawn from one or more code systems.
5154         */
5155        CODESYSTEM, 
5156        /**
5157         * 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.
5158         */
5159        COMMUNICATION, 
5160        /**
5161         * 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.
5162         */
5163        COMMUNICATIONREQUEST, 
5164        /**
5165         * A compartment definition that defines how resources are accessed on a server.
5166         */
5167        COMPARTMENTDEFINITION, 
5168        /**
5169         * 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.
5170         */
5171        COMPOSITION, 
5172        /**
5173         * 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.
5174         */
5175        CONCEPTMAP, 
5176        /**
5177         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
5178         */
5179        CONDITION, 
5180        /**
5181         * A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.
5182         */
5183        CONSENT, 
5184        /**
5185         * A formal agreement between parties regarding the conduct of business, exchange of information or other matters.
5186         */
5187        CONTRACT, 
5188        /**
5189         * Financial instrument which may be used to reimburse or pay for health care products and services.
5190         */
5191        COVERAGE, 
5192        /**
5193         * The formal description of a single piece of information that can be gathered and reported.
5194         */
5195        DATAELEMENT, 
5196        /**
5197         * 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.
5198         */
5199        DETECTEDISSUE, 
5200        /**
5201         * 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 include 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.
5202         */
5203        DEVICE, 
5204        /**
5205         * The characteristics, operational status and capabilities of a medical-related component of a medical device.
5206         */
5207        DEVICECOMPONENT, 
5208        /**
5209         * Describes a measurement, calculation or setting capability of a medical device.
5210         */
5211        DEVICEMETRIC, 
5212        /**
5213         * 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.
5214         */
5215        DEVICEREQUEST, 
5216        /**
5217         * 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.
5218         */
5219        DEVICEUSESTATEMENT, 
5220        /**
5221         * 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.
5222         */
5223        DIAGNOSTICREPORT, 
5224        /**
5225         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
5226         */
5227        DOCUMENTMANIFEST, 
5228        /**
5229         * A reference to a document.
5230         */
5231        DOCUMENTREFERENCE, 
5232        /**
5233         * A resource that includes narrative, extensions, and contained resources.
5234         */
5235        DOMAINRESOURCE, 
5236        /**
5237         * The EligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an EligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.
5238         */
5239        ELIGIBILITYREQUEST, 
5240        /**
5241         * This resource provides eligibility and plan details from the processing of an Eligibility resource.
5242         */
5243        ELIGIBILITYRESPONSE, 
5244        /**
5245         * 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.
5246         */
5247        ENCOUNTER, 
5248        /**
5249         * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.
5250         */
5251        ENDPOINT, 
5252        /**
5253         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
5254         */
5255        ENROLLMENTREQUEST, 
5256        /**
5257         * This resource provides enrollment and plan details from the processing of an Enrollment resource.
5258         */
5259        ENROLLMENTRESPONSE, 
5260        /**
5261         * 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.
5262         */
5263        EPISODEOFCARE, 
5264        /**
5265         * Resource to define constraints on the Expansion of a FHIR ValueSet.
5266         */
5267        EXPANSIONPROFILE, 
5268        /**
5269         * 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.
5270         */
5271        EXPLANATIONOFBENEFIT, 
5272        /**
5273         * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.
5274         */
5275        FAMILYMEMBERHISTORY, 
5276        /**
5277         * Prospective warnings of potential issues when providing care to the patient.
5278         */
5279        FLAG, 
5280        /**
5281         * 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.
5282         */
5283        GOAL, 
5284        /**
5285         * A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.
5286         */
5287        GRAPHDEFINITION, 
5288        /**
5289         * 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.
5290         */
5291        GROUP, 
5292        /**
5293         * 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.
5294         */
5295        GUIDANCERESPONSE, 
5296        /**
5297         * The details of a healthcare service available at a location.
5298         */
5299        HEALTHCARESERVICE, 
5300        /**
5301         * A text description of the DICOM SOP instances selected in the ImagingManifest; or the reason for, or significance of, the selection.
5302         */
5303        IMAGINGMANIFEST, 
5304        /**
5305         * 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.
5306         */
5307        IMAGINGSTUDY, 
5308        /**
5309         * 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.
5310         */
5311        IMMUNIZATION, 
5312        /**
5313         * 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.
5314         */
5315        IMMUNIZATIONRECOMMENDATION, 
5316        /**
5317         * A set of rules of 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.
5318         */
5319        IMPLEMENTATIONGUIDE, 
5320        /**
5321         * The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.
5322         */
5323        LIBRARY, 
5324        /**
5325         * Identifies two or more records (resource instances) that are referring to the same real-world "occurrence".
5326         */
5327        LINKAGE, 
5328        /**
5329         * A set of information summarized from a list of other resources.
5330         */
5331        LIST, 
5332        /**
5333         * Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.
5334         */
5335        LOCATION, 
5336        /**
5337         * The Measure resource provides the definition of a quality measure.
5338         */
5339        MEASURE, 
5340        /**
5341         * The MeasureReport resource contains the results of evaluating a measure.
5342         */
5343        MEASUREREPORT, 
5344        /**
5345         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
5346         */
5347        MEDIA, 
5348        /**
5349         * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.
5350         */
5351        MEDICATION, 
5352        /**
5353         * 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.
5354         */
5355        MEDICATIONADMINISTRATION, 
5356        /**
5357         * 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.
5358         */
5359        MEDICATIONDISPENSE, 
5360        /**
5361         * An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.
5362         */
5363        MEDICATIONREQUEST, 
5364        /**
5365         * A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains 
5366
5367The 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.
5368         */
5369        MEDICATIONSTATEMENT, 
5370        /**
5371         * Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.
5372         */
5373        MESSAGEDEFINITION, 
5374        /**
5375         * 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.
5376         */
5377        MESSAGEHEADER, 
5378        /**
5379         * 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.
5380         */
5381        NAMINGSYSTEM, 
5382        /**
5383         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
5384         */
5385        NUTRITIONORDER, 
5386        /**
5387         * Measurements and simple assertions made about a patient, device or other subject.
5388         */
5389        OBSERVATION, 
5390        /**
5391         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
5392         */
5393        OPERATIONDEFINITION, 
5394        /**
5395         * A collection of error, warning or information messages that result from a system action.
5396         */
5397        OPERATIONOUTCOME, 
5398        /**
5399         * 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.
5400         */
5401        ORGANIZATION, 
5402        /**
5403         * 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.
5404         */
5405        PARAMETERS, 
5406        /**
5407         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
5408         */
5409        PATIENT, 
5410        /**
5411         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
5412         */
5413        PAYMENTNOTICE, 
5414        /**
5415         * This resource provides payment details and claim references supporting a bulk payment.
5416         */
5417        PAYMENTRECONCILIATION, 
5418        /**
5419         * Demographics and administrative information about a person independent of a specific health-related context.
5420         */
5421        PERSON, 
5422        /**
5423         * This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.
5424         */
5425        PLANDEFINITION, 
5426        /**
5427         * A person who is directly or indirectly involved in the provisioning of healthcare.
5428         */
5429        PRACTITIONER, 
5430        /**
5431         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
5432         */
5433        PRACTITIONERROLE, 
5434        /**
5435         * 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.
5436         */
5437        PROCEDURE, 
5438        /**
5439         * A record of a request for diagnostic investigations, treatments, or operations to be performed.
5440         */
5441        PROCEDUREREQUEST, 
5442        /**
5443         * 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.
5444         */
5445        PROCESSREQUEST, 
5446        /**
5447         * This resource provides processing status, errors and notes from the processing of a resource.
5448         */
5449        PROCESSRESPONSE, 
5450        /**
5451         * 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.
5452         */
5453        PROVENANCE, 
5454        /**
5455         * A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.
5456         */
5457        QUESTIONNAIRE, 
5458        /**
5459         * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.
5460         */
5461        QUESTIONNAIRERESPONSE, 
5462        /**
5463         * 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.
5464         */
5465        REFERRALREQUEST, 
5466        /**
5467         * 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.
5468         */
5469        RELATEDPERSON, 
5470        /**
5471         * A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one".
5472         */
5473        REQUESTGROUP, 
5474        /**
5475         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
5476         */
5477        RESEARCHSTUDY, 
5478        /**
5479         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
5480         */
5481        RESEARCHSUBJECT, 
5482        /**
5483         * This is the base resource type for everything.
5484         */
5485        RESOURCE, 
5486        /**
5487         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
5488         */
5489        RISKASSESSMENT, 
5490        /**
5491         * A container for slots of time that may be available for booking appointments.
5492         */
5493        SCHEDULE, 
5494        /**
5495         * A search parameter that defines a named search item that can be used to search/filter on a resource.
5496         */
5497        SEARCHPARAMETER, 
5498        /**
5499         * Raw data describing a biological sequence.
5500         */
5501        SEQUENCE, 
5502        /**
5503         * The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.
5504         */
5505        SERVICEDEFINITION, 
5506        /**
5507         * A slot of time on a schedule that may be available for booking appointments.
5508         */
5509        SLOT, 
5510        /**
5511         * A sample to be used for analysis.
5512         */
5513        SPECIMEN, 
5514        /**
5515         * 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.
5516         */
5517        STRUCTUREDEFINITION, 
5518        /**
5519         * A Map of relationships between 2 structures that can be used to transform data.
5520         */
5521        STRUCTUREMAP, 
5522        /**
5523         * 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.
5524         */
5525        SUBSCRIPTION, 
5526        /**
5527         * A homogeneous material with a definite composition.
5528         */
5529        SUBSTANCE, 
5530        /**
5531         * Record of delivery of what is supplied.
5532         */
5533        SUPPLYDELIVERY, 
5534        /**
5535         * A record of a request for a medication, substance or device used in the healthcare setting.
5536         */
5537        SUPPLYREQUEST, 
5538        /**
5539         * A task to be performed.
5540         */
5541        TASK, 
5542        /**
5543         * A summary of information based on the results of executing a TestScript.
5544         */
5545        TESTREPORT, 
5546        /**
5547         * A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification.
5548         */
5549        TESTSCRIPT, 
5550        /**
5551         * A value set specifies a set of codes drawn from one or more code systems.
5552         */
5553        VALUESET, 
5554        /**
5555         * An authorization for the supply of glasses and/or contact lenses to a patient.
5556         */
5557        VISIONPRESCRIPTION, 
5558        /**
5559         * added to help the parsers
5560         */
5561        NULL;
5562        public static FHIRDefinedType fromCode(String codeString) throws FHIRException {
5563            if (codeString == null || "".equals(codeString))
5564                return null;
5565        if ("Address".equals(codeString))
5566          return ADDRESS;
5567        if ("Age".equals(codeString))
5568          return AGE;
5569        if ("Annotation".equals(codeString))
5570          return ANNOTATION;
5571        if ("Attachment".equals(codeString))
5572          return ATTACHMENT;
5573        if ("BackboneElement".equals(codeString))
5574          return BACKBONEELEMENT;
5575        if ("CodeableConcept".equals(codeString))
5576          return CODEABLECONCEPT;
5577        if ("Coding".equals(codeString))
5578          return CODING;
5579        if ("ContactDetail".equals(codeString))
5580          return CONTACTDETAIL;
5581        if ("ContactPoint".equals(codeString))
5582          return CONTACTPOINT;
5583        if ("Contributor".equals(codeString))
5584          return CONTRIBUTOR;
5585        if ("Count".equals(codeString))
5586          return COUNT;
5587        if ("DataRequirement".equals(codeString))
5588          return DATAREQUIREMENT;
5589        if ("Distance".equals(codeString))
5590          return DISTANCE;
5591        if ("Dosage".equals(codeString))
5592          return DOSAGE;
5593        if ("Duration".equals(codeString))
5594          return DURATION;
5595        if ("Element".equals(codeString))
5596          return ELEMENT;
5597        if ("ElementDefinition".equals(codeString))
5598          return ELEMENTDEFINITION;
5599        if ("Extension".equals(codeString))
5600          return EXTENSION;
5601        if ("HumanName".equals(codeString))
5602          return HUMANNAME;
5603        if ("Identifier".equals(codeString))
5604          return IDENTIFIER;
5605        if ("Meta".equals(codeString))
5606          return META;
5607        if ("Money".equals(codeString))
5608          return MONEY;
5609        if ("Narrative".equals(codeString))
5610          return NARRATIVE;
5611        if ("ParameterDefinition".equals(codeString))
5612          return PARAMETERDEFINITION;
5613        if ("Period".equals(codeString))
5614          return PERIOD;
5615        if ("Quantity".equals(codeString))
5616          return QUANTITY;
5617        if ("Range".equals(codeString))
5618          return RANGE;
5619        if ("Ratio".equals(codeString))
5620          return RATIO;
5621        if ("Reference".equals(codeString))
5622          return REFERENCE;
5623        if ("RelatedArtifact".equals(codeString))
5624          return RELATEDARTIFACT;
5625        if ("SampledData".equals(codeString))
5626          return SAMPLEDDATA;
5627        if ("Signature".equals(codeString))
5628          return SIGNATURE;
5629        if ("SimpleQuantity".equals(codeString))
5630          return SIMPLEQUANTITY;
5631        if ("Timing".equals(codeString))
5632          return TIMING;
5633        if ("TriggerDefinition".equals(codeString))
5634          return TRIGGERDEFINITION;
5635        if ("UsageContext".equals(codeString))
5636          return USAGECONTEXT;
5637        if ("base64Binary".equals(codeString))
5638          return BASE64BINARY;
5639        if ("boolean".equals(codeString))
5640          return BOOLEAN;
5641        if ("code".equals(codeString))
5642          return CODE;
5643        if ("date".equals(codeString))
5644          return DATE;
5645        if ("dateTime".equals(codeString))
5646          return DATETIME;
5647        if ("decimal".equals(codeString))
5648          return DECIMAL;
5649        if ("id".equals(codeString))
5650          return ID;
5651        if ("instant".equals(codeString))
5652          return INSTANT;
5653        if ("integer".equals(codeString))
5654          return INTEGER;
5655        if ("markdown".equals(codeString))
5656          return MARKDOWN;
5657        if ("oid".equals(codeString))
5658          return OID;
5659        if ("positiveInt".equals(codeString))
5660          return POSITIVEINT;
5661        if ("string".equals(codeString))
5662          return STRING;
5663        if ("time".equals(codeString))
5664          return TIME;
5665        if ("unsignedInt".equals(codeString))
5666          return UNSIGNEDINT;
5667        if ("uri".equals(codeString))
5668          return URI;
5669        if ("uuid".equals(codeString))
5670          return UUID;
5671        if ("xhtml".equals(codeString))
5672          return XHTML;
5673        if ("Account".equals(codeString))
5674          return ACCOUNT;
5675        if ("ActivityDefinition".equals(codeString))
5676          return ACTIVITYDEFINITION;
5677        if ("AdverseEvent".equals(codeString))
5678          return ADVERSEEVENT;
5679        if ("AllergyIntolerance".equals(codeString))
5680          return ALLERGYINTOLERANCE;
5681        if ("Appointment".equals(codeString))
5682          return APPOINTMENT;
5683        if ("AppointmentResponse".equals(codeString))
5684          return APPOINTMENTRESPONSE;
5685        if ("AuditEvent".equals(codeString))
5686          return AUDITEVENT;
5687        if ("Basic".equals(codeString))
5688          return BASIC;
5689        if ("Binary".equals(codeString))
5690          return BINARY;
5691        if ("BodySite".equals(codeString))
5692          return BODYSITE;
5693        if ("Bundle".equals(codeString))
5694          return BUNDLE;
5695        if ("CapabilityStatement".equals(codeString))
5696          return CAPABILITYSTATEMENT;
5697        if ("CarePlan".equals(codeString))
5698          return CAREPLAN;
5699        if ("CareTeam".equals(codeString))
5700          return CARETEAM;
5701        if ("ChargeItem".equals(codeString))
5702          return CHARGEITEM;
5703        if ("Claim".equals(codeString))
5704          return CLAIM;
5705        if ("ClaimResponse".equals(codeString))
5706          return CLAIMRESPONSE;
5707        if ("ClinicalImpression".equals(codeString))
5708          return CLINICALIMPRESSION;
5709        if ("CodeSystem".equals(codeString))
5710          return CODESYSTEM;
5711        if ("Communication".equals(codeString))
5712          return COMMUNICATION;
5713        if ("CommunicationRequest".equals(codeString))
5714          return COMMUNICATIONREQUEST;
5715        if ("CompartmentDefinition".equals(codeString))
5716          return COMPARTMENTDEFINITION;
5717        if ("Composition".equals(codeString))
5718          return COMPOSITION;
5719        if ("ConceptMap".equals(codeString))
5720          return CONCEPTMAP;
5721        if ("Condition".equals(codeString))
5722          return CONDITION;
5723        if ("Consent".equals(codeString))
5724          return CONSENT;
5725        if ("Contract".equals(codeString))
5726          return CONTRACT;
5727        if ("Coverage".equals(codeString))
5728          return COVERAGE;
5729        if ("DataElement".equals(codeString))
5730          return DATAELEMENT;
5731        if ("DetectedIssue".equals(codeString))
5732          return DETECTEDISSUE;
5733        if ("Device".equals(codeString))
5734          return DEVICE;
5735        if ("DeviceComponent".equals(codeString))
5736          return DEVICECOMPONENT;
5737        if ("DeviceMetric".equals(codeString))
5738          return DEVICEMETRIC;
5739        if ("DeviceRequest".equals(codeString))
5740          return DEVICEREQUEST;
5741        if ("DeviceUseStatement".equals(codeString))
5742          return DEVICEUSESTATEMENT;
5743        if ("DiagnosticReport".equals(codeString))
5744          return DIAGNOSTICREPORT;
5745        if ("DocumentManifest".equals(codeString))
5746          return DOCUMENTMANIFEST;
5747        if ("DocumentReference".equals(codeString))
5748          return DOCUMENTREFERENCE;
5749        if ("DomainResource".equals(codeString))
5750          return DOMAINRESOURCE;
5751        if ("EligibilityRequest".equals(codeString))
5752          return ELIGIBILITYREQUEST;
5753        if ("EligibilityResponse".equals(codeString))
5754          return ELIGIBILITYRESPONSE;
5755        if ("Encounter".equals(codeString))
5756          return ENCOUNTER;
5757        if ("Endpoint".equals(codeString))
5758          return ENDPOINT;
5759        if ("EnrollmentRequest".equals(codeString))
5760          return ENROLLMENTREQUEST;
5761        if ("EnrollmentResponse".equals(codeString))
5762          return ENROLLMENTRESPONSE;
5763        if ("EpisodeOfCare".equals(codeString))
5764          return EPISODEOFCARE;
5765        if ("ExpansionProfile".equals(codeString))
5766          return EXPANSIONPROFILE;
5767        if ("ExplanationOfBenefit".equals(codeString))
5768          return EXPLANATIONOFBENEFIT;
5769        if ("FamilyMemberHistory".equals(codeString))
5770          return FAMILYMEMBERHISTORY;
5771        if ("Flag".equals(codeString))
5772          return FLAG;
5773        if ("Goal".equals(codeString))
5774          return GOAL;
5775        if ("GraphDefinition".equals(codeString))
5776          return GRAPHDEFINITION;
5777        if ("Group".equals(codeString))
5778          return GROUP;
5779        if ("GuidanceResponse".equals(codeString))
5780          return GUIDANCERESPONSE;
5781        if ("HealthcareService".equals(codeString))
5782          return HEALTHCARESERVICE;
5783        if ("ImagingManifest".equals(codeString))
5784          return IMAGINGMANIFEST;
5785        if ("ImagingStudy".equals(codeString))
5786          return IMAGINGSTUDY;
5787        if ("Immunization".equals(codeString))
5788          return IMMUNIZATION;
5789        if ("ImmunizationRecommendation".equals(codeString))
5790          return IMMUNIZATIONRECOMMENDATION;
5791        if ("ImplementationGuide".equals(codeString))
5792          return IMPLEMENTATIONGUIDE;
5793        if ("Library".equals(codeString))
5794          return LIBRARY;
5795        if ("Linkage".equals(codeString))
5796          return LINKAGE;
5797        if ("List".equals(codeString))
5798          return LIST;
5799        if ("Location".equals(codeString))
5800          return LOCATION;
5801        if ("Measure".equals(codeString))
5802          return MEASURE;
5803        if ("MeasureReport".equals(codeString))
5804          return MEASUREREPORT;
5805        if ("Media".equals(codeString))
5806          return MEDIA;
5807        if ("Medication".equals(codeString))
5808          return MEDICATION;
5809        if ("MedicationAdministration".equals(codeString))
5810          return MEDICATIONADMINISTRATION;
5811        if ("MedicationDispense".equals(codeString))
5812          return MEDICATIONDISPENSE;
5813        if ("MedicationRequest".equals(codeString))
5814          return MEDICATIONREQUEST;
5815        if ("MedicationStatement".equals(codeString))
5816          return MEDICATIONSTATEMENT;
5817        if ("MessageDefinition".equals(codeString))
5818          return MESSAGEDEFINITION;
5819        if ("MessageHeader".equals(codeString))
5820          return MESSAGEHEADER;
5821        if ("NamingSystem".equals(codeString))
5822          return NAMINGSYSTEM;
5823        if ("NutritionOrder".equals(codeString))
5824          return NUTRITIONORDER;
5825        if ("Observation".equals(codeString))
5826          return OBSERVATION;
5827        if ("OperationDefinition".equals(codeString))
5828          return OPERATIONDEFINITION;
5829        if ("OperationOutcome".equals(codeString))
5830          return OPERATIONOUTCOME;
5831        if ("Organization".equals(codeString))
5832          return ORGANIZATION;
5833        if ("Parameters".equals(codeString))
5834          return PARAMETERS;
5835        if ("Patient".equals(codeString))
5836          return PATIENT;
5837        if ("PaymentNotice".equals(codeString))
5838          return PAYMENTNOTICE;
5839        if ("PaymentReconciliation".equals(codeString))
5840          return PAYMENTRECONCILIATION;
5841        if ("Person".equals(codeString))
5842          return PERSON;
5843        if ("PlanDefinition".equals(codeString))
5844          return PLANDEFINITION;
5845        if ("Practitioner".equals(codeString))
5846          return PRACTITIONER;
5847        if ("PractitionerRole".equals(codeString))
5848          return PRACTITIONERROLE;
5849        if ("Procedure".equals(codeString))
5850          return PROCEDURE;
5851        if ("ProcedureRequest".equals(codeString))
5852          return PROCEDUREREQUEST;
5853        if ("ProcessRequest".equals(codeString))
5854          return PROCESSREQUEST;
5855        if ("ProcessResponse".equals(codeString))
5856          return PROCESSRESPONSE;
5857        if ("Provenance".equals(codeString))
5858          return PROVENANCE;
5859        if ("Questionnaire".equals(codeString))
5860          return QUESTIONNAIRE;
5861        if ("QuestionnaireResponse".equals(codeString))
5862          return QUESTIONNAIRERESPONSE;
5863        if ("ReferralRequest".equals(codeString))
5864          return REFERRALREQUEST;
5865        if ("RelatedPerson".equals(codeString))
5866          return RELATEDPERSON;
5867        if ("RequestGroup".equals(codeString))
5868          return REQUESTGROUP;
5869        if ("ResearchStudy".equals(codeString))
5870          return RESEARCHSTUDY;
5871        if ("ResearchSubject".equals(codeString))
5872          return RESEARCHSUBJECT;
5873        if ("Resource".equals(codeString))
5874          return RESOURCE;
5875        if ("RiskAssessment".equals(codeString))
5876          return RISKASSESSMENT;
5877        if ("Schedule".equals(codeString))
5878          return SCHEDULE;
5879        if ("SearchParameter".equals(codeString))
5880          return SEARCHPARAMETER;
5881        if ("Sequence".equals(codeString))
5882          return SEQUENCE;
5883        if ("ServiceDefinition".equals(codeString))
5884          return SERVICEDEFINITION;
5885        if ("Slot".equals(codeString))
5886          return SLOT;
5887        if ("Specimen".equals(codeString))
5888          return SPECIMEN;
5889        if ("StructureDefinition".equals(codeString))
5890          return STRUCTUREDEFINITION;
5891        if ("StructureMap".equals(codeString))
5892          return STRUCTUREMAP;
5893        if ("Subscription".equals(codeString))
5894          return SUBSCRIPTION;
5895        if ("Substance".equals(codeString))
5896          return SUBSTANCE;
5897        if ("SupplyDelivery".equals(codeString))
5898          return SUPPLYDELIVERY;
5899        if ("SupplyRequest".equals(codeString))
5900          return SUPPLYREQUEST;
5901        if ("Task".equals(codeString))
5902          return TASK;
5903        if ("TestReport".equals(codeString))
5904          return TESTREPORT;
5905        if ("TestScript".equals(codeString))
5906          return TESTSCRIPT;
5907        if ("ValueSet".equals(codeString))
5908          return VALUESET;
5909        if ("VisionPrescription".equals(codeString))
5910          return VISIONPRESCRIPTION;
5911        throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'");
5912        }
5913        public String toCode() {
5914          switch (this) {
5915            case ADDRESS: return "Address";
5916            case AGE: return "Age";
5917            case ANNOTATION: return "Annotation";
5918            case ATTACHMENT: return "Attachment";
5919            case BACKBONEELEMENT: return "BackboneElement";
5920            case CODEABLECONCEPT: return "CodeableConcept";
5921            case CODING: return "Coding";
5922            case CONTACTDETAIL: return "ContactDetail";
5923            case CONTACTPOINT: return "ContactPoint";
5924            case CONTRIBUTOR: return "Contributor";
5925            case COUNT: return "Count";
5926            case DATAREQUIREMENT: return "DataRequirement";
5927            case DISTANCE: return "Distance";
5928            case DOSAGE: return "Dosage";
5929            case DURATION: return "Duration";
5930            case ELEMENT: return "Element";
5931            case ELEMENTDEFINITION: return "ElementDefinition";
5932            case EXTENSION: return "Extension";
5933            case HUMANNAME: return "HumanName";
5934            case IDENTIFIER: return "Identifier";
5935            case META: return "Meta";
5936            case MONEY: return "Money";
5937            case NARRATIVE: return "Narrative";
5938            case PARAMETERDEFINITION: return "ParameterDefinition";
5939            case PERIOD: return "Period";
5940            case QUANTITY: return "Quantity";
5941            case RANGE: return "Range";
5942            case RATIO: return "Ratio";
5943            case REFERENCE: return "Reference";
5944            case RELATEDARTIFACT: return "RelatedArtifact";
5945            case SAMPLEDDATA: return "SampledData";
5946            case SIGNATURE: return "Signature";
5947            case SIMPLEQUANTITY: return "SimpleQuantity";
5948            case TIMING: return "Timing";
5949            case TRIGGERDEFINITION: return "TriggerDefinition";
5950            case USAGECONTEXT: return "UsageContext";
5951            case BASE64BINARY: return "base64Binary";
5952            case BOOLEAN: return "boolean";
5953            case CODE: return "code";
5954            case DATE: return "date";
5955            case DATETIME: return "dateTime";
5956            case DECIMAL: return "decimal";
5957            case ID: return "id";
5958            case INSTANT: return "instant";
5959            case INTEGER: return "integer";
5960            case MARKDOWN: return "markdown";
5961            case OID: return "oid";
5962            case POSITIVEINT: return "positiveInt";
5963            case STRING: return "string";
5964            case TIME: return "time";
5965            case UNSIGNEDINT: return "unsignedInt";
5966            case URI: return "uri";
5967            case UUID: return "uuid";
5968            case XHTML: return "xhtml";
5969            case ACCOUNT: return "Account";
5970            case ACTIVITYDEFINITION: return "ActivityDefinition";
5971            case ADVERSEEVENT: return "AdverseEvent";
5972            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
5973            case APPOINTMENT: return "Appointment";
5974            case APPOINTMENTRESPONSE: return "AppointmentResponse";
5975            case AUDITEVENT: return "AuditEvent";
5976            case BASIC: return "Basic";
5977            case BINARY: return "Binary";
5978            case BODYSITE: return "BodySite";
5979            case BUNDLE: return "Bundle";
5980            case CAPABILITYSTATEMENT: return "CapabilityStatement";
5981            case CAREPLAN: return "CarePlan";
5982            case CARETEAM: return "CareTeam";
5983            case CHARGEITEM: return "ChargeItem";
5984            case CLAIM: return "Claim";
5985            case CLAIMRESPONSE: return "ClaimResponse";
5986            case CLINICALIMPRESSION: return "ClinicalImpression";
5987            case CODESYSTEM: return "CodeSystem";
5988            case COMMUNICATION: return "Communication";
5989            case COMMUNICATIONREQUEST: return "CommunicationRequest";
5990            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
5991            case COMPOSITION: return "Composition";
5992            case CONCEPTMAP: return "ConceptMap";
5993            case CONDITION: return "Condition";
5994            case CONSENT: return "Consent";
5995            case CONTRACT: return "Contract";
5996            case COVERAGE: return "Coverage";
5997            case DATAELEMENT: return "DataElement";
5998            case DETECTEDISSUE: return "DetectedIssue";
5999            case DEVICE: return "Device";
6000            case DEVICECOMPONENT: return "DeviceComponent";
6001            case DEVICEMETRIC: return "DeviceMetric";
6002            case DEVICEREQUEST: return "DeviceRequest";
6003            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
6004            case DIAGNOSTICREPORT: return "DiagnosticReport";
6005            case DOCUMENTMANIFEST: return "DocumentManifest";
6006            case DOCUMENTREFERENCE: return "DocumentReference";
6007            case DOMAINRESOURCE: return "DomainResource";
6008            case ELIGIBILITYREQUEST: return "EligibilityRequest";
6009            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
6010            case ENCOUNTER: return "Encounter";
6011            case ENDPOINT: return "Endpoint";
6012            case ENROLLMENTREQUEST: return "EnrollmentRequest";
6013            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
6014            case EPISODEOFCARE: return "EpisodeOfCare";
6015            case EXPANSIONPROFILE: return "ExpansionProfile";
6016            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
6017            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
6018            case FLAG: return "Flag";
6019            case GOAL: return "Goal";
6020            case GRAPHDEFINITION: return "GraphDefinition";
6021            case GROUP: return "Group";
6022            case GUIDANCERESPONSE: return "GuidanceResponse";
6023            case HEALTHCARESERVICE: return "HealthcareService";
6024            case IMAGINGMANIFEST: return "ImagingManifest";
6025            case IMAGINGSTUDY: return "ImagingStudy";
6026            case IMMUNIZATION: return "Immunization";
6027            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
6028            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
6029            case LIBRARY: return "Library";
6030            case LINKAGE: return "Linkage";
6031            case LIST: return "List";
6032            case LOCATION: return "Location";
6033            case MEASURE: return "Measure";
6034            case MEASUREREPORT: return "MeasureReport";
6035            case MEDIA: return "Media";
6036            case MEDICATION: return "Medication";
6037            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
6038            case MEDICATIONDISPENSE: return "MedicationDispense";
6039            case MEDICATIONREQUEST: return "MedicationRequest";
6040            case MEDICATIONSTATEMENT: return "MedicationStatement";
6041            case MESSAGEDEFINITION: return "MessageDefinition";
6042            case MESSAGEHEADER: return "MessageHeader";
6043            case NAMINGSYSTEM: return "NamingSystem";
6044            case NUTRITIONORDER: return "NutritionOrder";
6045            case OBSERVATION: return "Observation";
6046            case OPERATIONDEFINITION: return "OperationDefinition";
6047            case OPERATIONOUTCOME: return "OperationOutcome";
6048            case ORGANIZATION: return "Organization";
6049            case PARAMETERS: return "Parameters";
6050            case PATIENT: return "Patient";
6051            case PAYMENTNOTICE: return "PaymentNotice";
6052            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
6053            case PERSON: return "Person";
6054            case PLANDEFINITION: return "PlanDefinition";
6055            case PRACTITIONER: return "Practitioner";
6056            case PRACTITIONERROLE: return "PractitionerRole";
6057            case PROCEDURE: return "Procedure";
6058            case PROCEDUREREQUEST: return "ProcedureRequest";
6059            case PROCESSREQUEST: return "ProcessRequest";
6060            case PROCESSRESPONSE: return "ProcessResponse";
6061            case PROVENANCE: return "Provenance";
6062            case QUESTIONNAIRE: return "Questionnaire";
6063            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
6064            case REFERRALREQUEST: return "ReferralRequest";
6065            case RELATEDPERSON: return "RelatedPerson";
6066            case REQUESTGROUP: return "RequestGroup";
6067            case RESEARCHSTUDY: return "ResearchStudy";
6068            case RESEARCHSUBJECT: return "ResearchSubject";
6069            case RESOURCE: return "Resource";
6070            case RISKASSESSMENT: return "RiskAssessment";
6071            case SCHEDULE: return "Schedule";
6072            case SEARCHPARAMETER: return "SearchParameter";
6073            case SEQUENCE: return "Sequence";
6074            case SERVICEDEFINITION: return "ServiceDefinition";
6075            case SLOT: return "Slot";
6076            case SPECIMEN: return "Specimen";
6077            case STRUCTUREDEFINITION: return "StructureDefinition";
6078            case STRUCTUREMAP: return "StructureMap";
6079            case SUBSCRIPTION: return "Subscription";
6080            case SUBSTANCE: return "Substance";
6081            case SUPPLYDELIVERY: return "SupplyDelivery";
6082            case SUPPLYREQUEST: return "SupplyRequest";
6083            case TASK: return "Task";
6084            case TESTREPORT: return "TestReport";
6085            case TESTSCRIPT: return "TestScript";
6086            case VALUESET: return "ValueSet";
6087            case VISIONPRESCRIPTION: return "VisionPrescription";
6088            default: return "?";
6089          }
6090        }
6091        public String getSystem() {
6092          switch (this) {
6093            case ADDRESS: return "http://hl7.org/fhir/data-types";
6094            case AGE: return "http://hl7.org/fhir/data-types";
6095            case ANNOTATION: return "http://hl7.org/fhir/data-types";
6096            case ATTACHMENT: return "http://hl7.org/fhir/data-types";
6097            case BACKBONEELEMENT: return "http://hl7.org/fhir/data-types";
6098            case CODEABLECONCEPT: return "http://hl7.org/fhir/data-types";
6099            case CODING: return "http://hl7.org/fhir/data-types";
6100            case CONTACTDETAIL: return "http://hl7.org/fhir/data-types";
6101            case CONTACTPOINT: return "http://hl7.org/fhir/data-types";
6102            case CONTRIBUTOR: return "http://hl7.org/fhir/data-types";
6103            case COUNT: return "http://hl7.org/fhir/data-types";
6104            case DATAREQUIREMENT: return "http://hl7.org/fhir/data-types";
6105            case DISTANCE: return "http://hl7.org/fhir/data-types";
6106            case DOSAGE: return "http://hl7.org/fhir/data-types";
6107            case DURATION: return "http://hl7.org/fhir/data-types";
6108            case ELEMENT: return "http://hl7.org/fhir/data-types";
6109            case ELEMENTDEFINITION: return "http://hl7.org/fhir/data-types";
6110            case EXTENSION: return "http://hl7.org/fhir/data-types";
6111            case HUMANNAME: return "http://hl7.org/fhir/data-types";
6112            case IDENTIFIER: return "http://hl7.org/fhir/data-types";
6113            case META: return "http://hl7.org/fhir/data-types";
6114            case MONEY: return "http://hl7.org/fhir/data-types";
6115            case NARRATIVE: return "http://hl7.org/fhir/data-types";
6116            case PARAMETERDEFINITION: return "http://hl7.org/fhir/data-types";
6117            case PERIOD: return "http://hl7.org/fhir/data-types";
6118            case QUANTITY: return "http://hl7.org/fhir/data-types";
6119            case RANGE: return "http://hl7.org/fhir/data-types";
6120            case RATIO: return "http://hl7.org/fhir/data-types";
6121            case REFERENCE: return "http://hl7.org/fhir/data-types";
6122            case RELATEDARTIFACT: return "http://hl7.org/fhir/data-types";
6123            case SAMPLEDDATA: return "http://hl7.org/fhir/data-types";
6124            case SIGNATURE: return "http://hl7.org/fhir/data-types";
6125            case SIMPLEQUANTITY: return "http://hl7.org/fhir/data-types";
6126            case TIMING: return "http://hl7.org/fhir/data-types";
6127            case TRIGGERDEFINITION: return "http://hl7.org/fhir/data-types";
6128            case USAGECONTEXT: return "http://hl7.org/fhir/data-types";
6129            case BASE64BINARY: return "http://hl7.org/fhir/data-types";
6130            case BOOLEAN: return "http://hl7.org/fhir/data-types";
6131            case CODE: return "http://hl7.org/fhir/data-types";
6132            case DATE: return "http://hl7.org/fhir/data-types";
6133            case DATETIME: return "http://hl7.org/fhir/data-types";
6134            case DECIMAL: return "http://hl7.org/fhir/data-types";
6135            case ID: return "http://hl7.org/fhir/data-types";
6136            case INSTANT: return "http://hl7.org/fhir/data-types";
6137            case INTEGER: return "http://hl7.org/fhir/data-types";
6138            case MARKDOWN: return "http://hl7.org/fhir/data-types";
6139            case OID: return "http://hl7.org/fhir/data-types";
6140            case POSITIVEINT: return "http://hl7.org/fhir/data-types";
6141            case STRING: return "http://hl7.org/fhir/data-types";
6142            case TIME: return "http://hl7.org/fhir/data-types";
6143            case UNSIGNEDINT: return "http://hl7.org/fhir/data-types";
6144            case URI: return "http://hl7.org/fhir/data-types";
6145            case UUID: return "http://hl7.org/fhir/data-types";
6146            case XHTML: return "http://hl7.org/fhir/data-types";
6147            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
6148            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
6149            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
6150            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
6151            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
6152            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
6153            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
6154            case BASIC: return "http://hl7.org/fhir/resource-types";
6155            case BINARY: return "http://hl7.org/fhir/resource-types";
6156            case BODYSITE: return "http://hl7.org/fhir/resource-types";
6157            case BUNDLE: return "http://hl7.org/fhir/resource-types";
6158            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
6159            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
6160            case CARETEAM: return "http://hl7.org/fhir/resource-types";
6161            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
6162            case CLAIM: return "http://hl7.org/fhir/resource-types";
6163            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
6164            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
6165            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
6166            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
6167            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
6168            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
6169            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
6170            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
6171            case CONDITION: return "http://hl7.org/fhir/resource-types";
6172            case CONSENT: return "http://hl7.org/fhir/resource-types";
6173            case CONTRACT: return "http://hl7.org/fhir/resource-types";
6174            case COVERAGE: return "http://hl7.org/fhir/resource-types";
6175            case DATAELEMENT: return "http://hl7.org/fhir/resource-types";
6176            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
6177            case DEVICE: return "http://hl7.org/fhir/resource-types";
6178            case DEVICECOMPONENT: return "http://hl7.org/fhir/resource-types";
6179            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
6180            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
6181            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types";
6182            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
6183            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
6184            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
6185            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
6186            case ELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
6187            case ELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
6188            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
6189            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
6190            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
6191            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
6192            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
6193            case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types";
6194            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
6195            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
6196            case FLAG: return "http://hl7.org/fhir/resource-types";
6197            case GOAL: return "http://hl7.org/fhir/resource-types";
6198            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
6199            case GROUP: return "http://hl7.org/fhir/resource-types";
6200            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
6201            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
6202            case IMAGINGMANIFEST: return "http://hl7.org/fhir/resource-types";
6203            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
6204            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
6205            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
6206            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
6207            case LIBRARY: return "http://hl7.org/fhir/resource-types";
6208            case LINKAGE: return "http://hl7.org/fhir/resource-types";
6209            case LIST: return "http://hl7.org/fhir/resource-types";
6210            case LOCATION: return "http://hl7.org/fhir/resource-types";
6211            case MEASURE: return "http://hl7.org/fhir/resource-types";
6212            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
6213            case MEDIA: return "http://hl7.org/fhir/resource-types";
6214            case MEDICATION: return "http://hl7.org/fhir/resource-types";
6215            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
6216            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
6217            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
6218            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types";
6219            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
6220            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
6221            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
6222            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
6223            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
6224            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
6225            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
6226            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
6227            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
6228            case PATIENT: return "http://hl7.org/fhir/resource-types";
6229            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
6230            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
6231            case PERSON: return "http://hl7.org/fhir/resource-types";
6232            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
6233            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
6234            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
6235            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
6236            case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types";
6237            case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types";
6238            case PROCESSRESPONSE: return "http://hl7.org/fhir/resource-types";
6239            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
6240            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
6241            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
6242            case REFERRALREQUEST: return "http://hl7.org/fhir/resource-types";
6243            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
6244            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
6245            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
6246            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
6247            case RESOURCE: return "http://hl7.org/fhir/resource-types";
6248            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
6249            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
6250            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
6251            case SEQUENCE: return "http://hl7.org/fhir/resource-types";
6252            case SERVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
6253            case SLOT: return "http://hl7.org/fhir/resource-types";
6254            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
6255            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
6256            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
6257            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
6258            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
6259            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
6260            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
6261            case TASK: return "http://hl7.org/fhir/resource-types";
6262            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
6263            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
6264            case VALUESET: return "http://hl7.org/fhir/resource-types";
6265            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
6266            default: return "?";
6267          }
6268        }
6269        public String getDefinition() {
6270          switch (this) {
6271            case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.";
6272            case AGE: return "A duration of time during which an organism (or a process) has existed.";
6273            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
6274            case ATTACHMENT: return "For referring to data content defined in other formats.";
6275            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
6276            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
6277            case CODING: return "A reference to a code defined by a terminology system.";
6278            case CONTACTDETAIL: return "Specifies contact information for a person or organization.";
6279            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
6280            case CONTRIBUTOR: return "A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.";
6281            case COUNT: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
6282            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.";
6283            case DISTANCE: return "A length - a value with a unit that is a physical distance.";
6284            case DOSAGE: return "Indicates how the medication is/was taken or should be taken by the patient.";
6285            case DURATION: return "A length of time.";
6286            case ELEMENT: return "Base definition for all elements in a resource.";
6287            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
6288            case EXTENSION: return "Optional Extension Element - found in all resources.";
6289            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
6290            case IDENTIFIER: return "A technical identifier - identifies some entity uniquely and unambiguously.";
6291            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.";
6292            case MONEY: return "An amount of economic utility in some recognized currency.";
6293            case NARRATIVE: return "A human-readable formatted text, including images.";
6294            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.";
6295            case PERIOD: return "A time period defined by a start and end date and optionally time.";
6296            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.";
6297            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
6298            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
6299            case REFERENCE: return "A reference from one resource to another.";
6300            case RELATEDARTIFACT: return "Related artifacts such as additional documentation, justification, or bibliographic references.";
6301            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.";
6302            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.";
6303            case SIMPLEQUANTITY: return "";
6304            case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out.";
6305            case TRIGGERDEFINITION: return "A description of a triggering event.";
6306            case USAGECONTEXT: return "Specifies clinical/business/etc metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).";
6307            case BASE64BINARY: return "A stream of bytes";
6308            case BOOLEAN: return "Value of \"true\" or \"false\"";
6309            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";
6310            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.";
6311            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.";
6312            case DECIMAL: return "A rational number with implicit precision";
6313            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.";
6314            case INSTANT: return "An instant in time - known at least to the second";
6315            case INTEGER: return "A whole number";
6316            case MARKDOWN: return "A string that may contain markdown syntax for optional processing by a mark down presentation engine";
6317            case OID: return "An OID represented as a URI";
6318            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
6319            case STRING: return "A sequence of Unicode characters";
6320            case TIME: return "A time during the day, with no date specified";
6321            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
6322            case URI: return "String of characters used to identify a name or a resource";
6323            case UUID: return "A UUID, represented as a URI";
6324            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
6325            case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.";
6326            case ACTIVITYDEFINITION: return "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.";
6327            case ADVERSEEVENT: return "Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.";
6328            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
6329            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).";
6330            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
6331            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.";
6332            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.";
6333            case BINARY: return "A binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
6334            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.";
6335            case BUNDLE: return "A container for a collection of resources.";
6336            case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
6337            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.";
6338            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.";
6339            case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.";
6340            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.";
6341            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
6342            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.";
6343            case CODESYSTEM: return "A code system resource specifies a set of codes drawn from one or more code systems.";
6344            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.";
6345            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.";
6346            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
6347            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.";
6348            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.";
6349            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
6350            case CONSENT: return "A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.";
6351            case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters.";
6352            case COVERAGE: return "Financial instrument which may be used to reimburse or pay for health care products and services.";
6353            case DATAELEMENT: return "The formal description of a single piece of information that can be gathered and reported.";
6354            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.";
6355            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 include 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.";
6356            case DEVICECOMPONENT: return "The characteristics, operational status and capabilities of a medical-related component of a medical device.";
6357            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
6358            case DEVICEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.";
6359            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.";
6360            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.";
6361            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
6362            case DOCUMENTREFERENCE: return "A reference to a document.";
6363            case DOMAINRESOURCE: return "A resource that includes narrative, extensions, and contained resources.";
6364            case ELIGIBILITYREQUEST: return "The EligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an EligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.";
6365            case ELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an Eligibility resource.";
6366            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.";
6367            case ENDPOINT: return "The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.";
6368            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
6369            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource.";
6370            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.";
6371            case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet.";
6372            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.";
6373            case FAMILYMEMBERHISTORY: return "Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.";
6374            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
6375            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.";
6376            case GRAPHDEFINITION: return "A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.";
6377            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.";
6378            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.";
6379            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
6380            case IMAGINGMANIFEST: return "A text description of the DICOM SOP instances selected in the ImagingManifest; or the reason for, or significance of, the selection.";
6381            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.";
6382            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.";
6383            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.";
6384            case IMPLEMENTATIONGUIDE: return "A set of rules of 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.";
6385            case LIBRARY: return "The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.";
6386            case LINKAGE: return "Identifies two or more records (resource instances) that are referring to the same real-world \"occurrence\".";
6387            case LIST: return "A set of information summarized from a list of other resources.";
6388            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.";
6389            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
6390            case MEASUREREPORT: return "The MeasureReport resource contains the results of evaluating a measure.";
6391            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.";
6392            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.";
6393            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.";
6394            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.";
6395            case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.";
6396            case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains \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.";
6397            case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.";
6398            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.";
6399            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.";
6400            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
6401            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
6402            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
6403            case OPERATIONOUTCOME: return "A collection of error, warning or information messages that result from a system action.";
6404            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.";
6405            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.";
6406            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
6407            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
6408            case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment.";
6409            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
6410            case PLANDEFINITION: return "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.";
6411            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
6412            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
6413            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.";
6414            case PROCEDUREREQUEST: return "A record of a request for diagnostic investigations, treatments, or operations to be performed.";
6415            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.";
6416            case PROCESSRESPONSE: return "This resource provides processing status, errors and notes from the processing of a resource.";
6417            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.";
6418            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.";
6419            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.";
6420            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.";
6421            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.";
6422            case REQUESTGROUP: return "A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\".";
6423            case RESEARCHSTUDY: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
6424            case RESEARCHSUBJECT: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
6425            case RESOURCE: return "This is the base resource type for everything.";
6426            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
6427            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
6428            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
6429            case SEQUENCE: return "Raw data describing a biological sequence.";
6430            case SERVICEDEFINITION: return "The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.";
6431            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
6432            case SPECIMEN: return "A sample to be used for analysis.";
6433            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.";
6434            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
6435            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.";
6436            case SUBSTANCE: return "A homogeneous material with a definite composition.";
6437            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
6438            case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting.";
6439            case TASK: return "A task to be performed.";
6440            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
6441            case TESTSCRIPT: return "A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification.";
6442            case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems.";
6443            case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient.";
6444            default: return "?";
6445          }
6446        }
6447        public String getDisplay() {
6448          switch (this) {
6449            case ADDRESS: return "Address";
6450            case AGE: return "Age";
6451            case ANNOTATION: return "Annotation";
6452            case ATTACHMENT: return "Attachment";
6453            case BACKBONEELEMENT: return "BackboneElement";
6454            case CODEABLECONCEPT: return "CodeableConcept";
6455            case CODING: return "Coding";
6456            case CONTACTDETAIL: return "ContactDetail";
6457            case CONTACTPOINT: return "ContactPoint";
6458            case CONTRIBUTOR: return "Contributor";
6459            case COUNT: return "Count";
6460            case DATAREQUIREMENT: return "DataRequirement";
6461            case DISTANCE: return "Distance";
6462            case DOSAGE: return "Dosage";
6463            case DURATION: return "Duration";
6464            case ELEMENT: return "Element";
6465            case ELEMENTDEFINITION: return "ElementDefinition";
6466            case EXTENSION: return "Extension";
6467            case HUMANNAME: return "HumanName";
6468            case IDENTIFIER: return "Identifier";
6469            case META: return "Meta";
6470            case MONEY: return "Money";
6471            case NARRATIVE: return "Narrative";
6472            case PARAMETERDEFINITION: return "ParameterDefinition";
6473            case PERIOD: return "Period";
6474            case QUANTITY: return "Quantity";
6475            case RANGE: return "Range";
6476            case RATIO: return "Ratio";
6477            case REFERENCE: return "Reference";
6478            case RELATEDARTIFACT: return "RelatedArtifact";
6479            case SAMPLEDDATA: return "SampledData";
6480            case SIGNATURE: return "Signature";
6481            case SIMPLEQUANTITY: return "SimpleQuantity";
6482            case TIMING: return "Timing";
6483            case TRIGGERDEFINITION: return "TriggerDefinition";
6484            case USAGECONTEXT: return "UsageContext";
6485            case BASE64BINARY: return "base64Binary";
6486            case BOOLEAN: return "boolean";
6487            case CODE: return "code";
6488            case DATE: return "date";
6489            case DATETIME: return "dateTime";
6490            case DECIMAL: return "decimal";
6491            case ID: return "id";
6492            case INSTANT: return "instant";
6493            case INTEGER: return "integer";
6494            case MARKDOWN: return "markdown";
6495            case OID: return "oid";
6496            case POSITIVEINT: return "positiveInt";
6497            case STRING: return "string";
6498            case TIME: return "time";
6499            case UNSIGNEDINT: return "unsignedInt";
6500            case URI: return "uri";
6501            case UUID: return "uuid";
6502            case XHTML: return "XHTML";
6503            case ACCOUNT: return "Account";
6504            case ACTIVITYDEFINITION: return "ActivityDefinition";
6505            case ADVERSEEVENT: return "AdverseEvent";
6506            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
6507            case APPOINTMENT: return "Appointment";
6508            case APPOINTMENTRESPONSE: return "AppointmentResponse";
6509            case AUDITEVENT: return "AuditEvent";
6510            case BASIC: return "Basic";
6511            case BINARY: return "Binary";
6512            case BODYSITE: return "BodySite";
6513            case BUNDLE: return "Bundle";
6514            case CAPABILITYSTATEMENT: return "CapabilityStatement";
6515            case CAREPLAN: return "CarePlan";
6516            case CARETEAM: return "CareTeam";
6517            case CHARGEITEM: return "ChargeItem";
6518            case CLAIM: return "Claim";
6519            case CLAIMRESPONSE: return "ClaimResponse";
6520            case CLINICALIMPRESSION: return "ClinicalImpression";
6521            case CODESYSTEM: return "CodeSystem";
6522            case COMMUNICATION: return "Communication";
6523            case COMMUNICATIONREQUEST: return "CommunicationRequest";
6524            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
6525            case COMPOSITION: return "Composition";
6526            case CONCEPTMAP: return "ConceptMap";
6527            case CONDITION: return "Condition";
6528            case CONSENT: return "Consent";
6529            case CONTRACT: return "Contract";
6530            case COVERAGE: return "Coverage";
6531            case DATAELEMENT: return "DataElement";
6532            case DETECTEDISSUE: return "DetectedIssue";
6533            case DEVICE: return "Device";
6534            case DEVICECOMPONENT: return "DeviceComponent";
6535            case DEVICEMETRIC: return "DeviceMetric";
6536            case DEVICEREQUEST: return "DeviceRequest";
6537            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
6538            case DIAGNOSTICREPORT: return "DiagnosticReport";
6539            case DOCUMENTMANIFEST: return "DocumentManifest";
6540            case DOCUMENTREFERENCE: return "DocumentReference";
6541            case DOMAINRESOURCE: return "DomainResource";
6542            case ELIGIBILITYREQUEST: return "EligibilityRequest";
6543            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
6544            case ENCOUNTER: return "Encounter";
6545            case ENDPOINT: return "Endpoint";
6546            case ENROLLMENTREQUEST: return "EnrollmentRequest";
6547            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
6548            case EPISODEOFCARE: return "EpisodeOfCare";
6549            case EXPANSIONPROFILE: return "ExpansionProfile";
6550            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
6551            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
6552            case FLAG: return "Flag";
6553            case GOAL: return "Goal";
6554            case GRAPHDEFINITION: return "GraphDefinition";
6555            case GROUP: return "Group";
6556            case GUIDANCERESPONSE: return "GuidanceResponse";
6557            case HEALTHCARESERVICE: return "HealthcareService";
6558            case IMAGINGMANIFEST: return "ImagingManifest";
6559            case IMAGINGSTUDY: return "ImagingStudy";
6560            case IMMUNIZATION: return "Immunization";
6561            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
6562            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
6563            case LIBRARY: return "Library";
6564            case LINKAGE: return "Linkage";
6565            case LIST: return "List";
6566            case LOCATION: return "Location";
6567            case MEASURE: return "Measure";
6568            case MEASUREREPORT: return "MeasureReport";
6569            case MEDIA: return "Media";
6570            case MEDICATION: return "Medication";
6571            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
6572            case MEDICATIONDISPENSE: return "MedicationDispense";
6573            case MEDICATIONREQUEST: return "MedicationRequest";
6574            case MEDICATIONSTATEMENT: return "MedicationStatement";
6575            case MESSAGEDEFINITION: return "MessageDefinition";
6576            case MESSAGEHEADER: return "MessageHeader";
6577            case NAMINGSYSTEM: return "NamingSystem";
6578            case NUTRITIONORDER: return "NutritionOrder";
6579            case OBSERVATION: return "Observation";
6580            case OPERATIONDEFINITION: return "OperationDefinition";
6581            case OPERATIONOUTCOME: return "OperationOutcome";
6582            case ORGANIZATION: return "Organization";
6583            case PARAMETERS: return "Parameters";
6584            case PATIENT: return "Patient";
6585            case PAYMENTNOTICE: return "PaymentNotice";
6586            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
6587            case PERSON: return "Person";
6588            case PLANDEFINITION: return "PlanDefinition";
6589            case PRACTITIONER: return "Practitioner";
6590            case PRACTITIONERROLE: return "PractitionerRole";
6591            case PROCEDURE: return "Procedure";
6592            case PROCEDUREREQUEST: return "ProcedureRequest";
6593            case PROCESSREQUEST: return "ProcessRequest";
6594            case PROCESSRESPONSE: return "ProcessResponse";
6595            case PROVENANCE: return "Provenance";
6596            case QUESTIONNAIRE: return "Questionnaire";
6597            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
6598            case REFERRALREQUEST: return "ReferralRequest";
6599            case RELATEDPERSON: return "RelatedPerson";
6600            case REQUESTGROUP: return "RequestGroup";
6601            case RESEARCHSTUDY: return "ResearchStudy";
6602            case RESEARCHSUBJECT: return "ResearchSubject";
6603            case RESOURCE: return "Resource";
6604            case RISKASSESSMENT: return "RiskAssessment";
6605            case SCHEDULE: return "Schedule";
6606            case SEARCHPARAMETER: return "SearchParameter";
6607            case SEQUENCE: return "Sequence";
6608            case SERVICEDEFINITION: return "ServiceDefinition";
6609            case SLOT: return "Slot";
6610            case SPECIMEN: return "Specimen";
6611            case STRUCTUREDEFINITION: return "StructureDefinition";
6612            case STRUCTUREMAP: return "StructureMap";
6613            case SUBSCRIPTION: return "Subscription";
6614            case SUBSTANCE: return "Substance";
6615            case SUPPLYDELIVERY: return "SupplyDelivery";
6616            case SUPPLYREQUEST: return "SupplyRequest";
6617            case TASK: return "Task";
6618            case TESTREPORT: return "TestReport";
6619            case TESTSCRIPT: return "TestScript";
6620            case VALUESET: return "ValueSet";
6621            case VISIONPRESCRIPTION: return "VisionPrescription";
6622            default: return "?";
6623          }
6624        }
6625    }
6626
6627  public static class FHIRDefinedTypeEnumFactory implements EnumFactory<FHIRDefinedType> {
6628    public FHIRDefinedType fromCode(String codeString) throws IllegalArgumentException {
6629      if (codeString == null || "".equals(codeString))
6630            if (codeString == null || "".equals(codeString))
6631                return null;
6632        if ("Address".equals(codeString))
6633          return FHIRDefinedType.ADDRESS;
6634        if ("Age".equals(codeString))
6635          return FHIRDefinedType.AGE;
6636        if ("Annotation".equals(codeString))
6637          return FHIRDefinedType.ANNOTATION;
6638        if ("Attachment".equals(codeString))
6639          return FHIRDefinedType.ATTACHMENT;
6640        if ("BackboneElement".equals(codeString))
6641          return FHIRDefinedType.BACKBONEELEMENT;
6642        if ("CodeableConcept".equals(codeString))
6643          return FHIRDefinedType.CODEABLECONCEPT;
6644        if ("Coding".equals(codeString))
6645          return FHIRDefinedType.CODING;
6646        if ("ContactDetail".equals(codeString))
6647          return FHIRDefinedType.CONTACTDETAIL;
6648        if ("ContactPoint".equals(codeString))
6649          return FHIRDefinedType.CONTACTPOINT;
6650        if ("Contributor".equals(codeString))
6651          return FHIRDefinedType.CONTRIBUTOR;
6652        if ("Count".equals(codeString))
6653          return FHIRDefinedType.COUNT;
6654        if ("DataRequirement".equals(codeString))
6655          return FHIRDefinedType.DATAREQUIREMENT;
6656        if ("Distance".equals(codeString))
6657          return FHIRDefinedType.DISTANCE;
6658        if ("Dosage".equals(codeString))
6659          return FHIRDefinedType.DOSAGE;
6660        if ("Duration".equals(codeString))
6661          return FHIRDefinedType.DURATION;
6662        if ("Element".equals(codeString))
6663          return FHIRDefinedType.ELEMENT;
6664        if ("ElementDefinition".equals(codeString))
6665          return FHIRDefinedType.ELEMENTDEFINITION;
6666        if ("Extension".equals(codeString))
6667          return FHIRDefinedType.EXTENSION;
6668        if ("HumanName".equals(codeString))
6669          return FHIRDefinedType.HUMANNAME;
6670        if ("Identifier".equals(codeString))
6671          return FHIRDefinedType.IDENTIFIER;
6672        if ("Meta".equals(codeString))
6673          return FHIRDefinedType.META;
6674        if ("Money".equals(codeString))
6675          return FHIRDefinedType.MONEY;
6676        if ("Narrative".equals(codeString))
6677          return FHIRDefinedType.NARRATIVE;
6678        if ("ParameterDefinition".equals(codeString))
6679          return FHIRDefinedType.PARAMETERDEFINITION;
6680        if ("Period".equals(codeString))
6681          return FHIRDefinedType.PERIOD;
6682        if ("Quantity".equals(codeString))
6683          return FHIRDefinedType.QUANTITY;
6684        if ("Range".equals(codeString))
6685          return FHIRDefinedType.RANGE;
6686        if ("Ratio".equals(codeString))
6687          return FHIRDefinedType.RATIO;
6688        if ("Reference".equals(codeString))
6689          return FHIRDefinedType.REFERENCE;
6690        if ("RelatedArtifact".equals(codeString))
6691          return FHIRDefinedType.RELATEDARTIFACT;
6692        if ("SampledData".equals(codeString))
6693          return FHIRDefinedType.SAMPLEDDATA;
6694        if ("Signature".equals(codeString))
6695          return FHIRDefinedType.SIGNATURE;
6696        if ("SimpleQuantity".equals(codeString))
6697          return FHIRDefinedType.SIMPLEQUANTITY;
6698        if ("Timing".equals(codeString))
6699          return FHIRDefinedType.TIMING;
6700        if ("TriggerDefinition".equals(codeString))
6701          return FHIRDefinedType.TRIGGERDEFINITION;
6702        if ("UsageContext".equals(codeString))
6703          return FHIRDefinedType.USAGECONTEXT;
6704        if ("base64Binary".equals(codeString))
6705          return FHIRDefinedType.BASE64BINARY;
6706        if ("boolean".equals(codeString))
6707          return FHIRDefinedType.BOOLEAN;
6708        if ("code".equals(codeString))
6709          return FHIRDefinedType.CODE;
6710        if ("date".equals(codeString))
6711          return FHIRDefinedType.DATE;
6712        if ("dateTime".equals(codeString))
6713          return FHIRDefinedType.DATETIME;
6714        if ("decimal".equals(codeString))
6715          return FHIRDefinedType.DECIMAL;
6716        if ("id".equals(codeString))
6717          return FHIRDefinedType.ID;
6718        if ("instant".equals(codeString))
6719          return FHIRDefinedType.INSTANT;
6720        if ("integer".equals(codeString))
6721          return FHIRDefinedType.INTEGER;
6722        if ("markdown".equals(codeString))
6723          return FHIRDefinedType.MARKDOWN;
6724        if ("oid".equals(codeString))
6725          return FHIRDefinedType.OID;
6726        if ("positiveInt".equals(codeString))
6727          return FHIRDefinedType.POSITIVEINT;
6728        if ("string".equals(codeString))
6729          return FHIRDefinedType.STRING;
6730        if ("time".equals(codeString))
6731          return FHIRDefinedType.TIME;
6732        if ("unsignedInt".equals(codeString))
6733          return FHIRDefinedType.UNSIGNEDINT;
6734        if ("uri".equals(codeString))
6735          return FHIRDefinedType.URI;
6736        if ("uuid".equals(codeString))
6737          return FHIRDefinedType.UUID;
6738        if ("xhtml".equals(codeString))
6739          return FHIRDefinedType.XHTML;
6740        if ("Account".equals(codeString))
6741          return FHIRDefinedType.ACCOUNT;
6742        if ("ActivityDefinition".equals(codeString))
6743          return FHIRDefinedType.ACTIVITYDEFINITION;
6744        if ("AdverseEvent".equals(codeString))
6745          return FHIRDefinedType.ADVERSEEVENT;
6746        if ("AllergyIntolerance".equals(codeString))
6747          return FHIRDefinedType.ALLERGYINTOLERANCE;
6748        if ("Appointment".equals(codeString))
6749          return FHIRDefinedType.APPOINTMENT;
6750        if ("AppointmentResponse".equals(codeString))
6751          return FHIRDefinedType.APPOINTMENTRESPONSE;
6752        if ("AuditEvent".equals(codeString))
6753          return FHIRDefinedType.AUDITEVENT;
6754        if ("Basic".equals(codeString))
6755          return FHIRDefinedType.BASIC;
6756        if ("Binary".equals(codeString))
6757          return FHIRDefinedType.BINARY;
6758        if ("BodySite".equals(codeString))
6759          return FHIRDefinedType.BODYSITE;
6760        if ("Bundle".equals(codeString))
6761          return FHIRDefinedType.BUNDLE;
6762        if ("CapabilityStatement".equals(codeString))
6763          return FHIRDefinedType.CAPABILITYSTATEMENT;
6764        if ("CarePlan".equals(codeString))
6765          return FHIRDefinedType.CAREPLAN;
6766        if ("CareTeam".equals(codeString))
6767          return FHIRDefinedType.CARETEAM;
6768        if ("ChargeItem".equals(codeString))
6769          return FHIRDefinedType.CHARGEITEM;
6770        if ("Claim".equals(codeString))
6771          return FHIRDefinedType.CLAIM;
6772        if ("ClaimResponse".equals(codeString))
6773          return FHIRDefinedType.CLAIMRESPONSE;
6774        if ("ClinicalImpression".equals(codeString))
6775          return FHIRDefinedType.CLINICALIMPRESSION;
6776        if ("CodeSystem".equals(codeString))
6777          return FHIRDefinedType.CODESYSTEM;
6778        if ("Communication".equals(codeString))
6779          return FHIRDefinedType.COMMUNICATION;
6780        if ("CommunicationRequest".equals(codeString))
6781          return FHIRDefinedType.COMMUNICATIONREQUEST;
6782        if ("CompartmentDefinition".equals(codeString))
6783          return FHIRDefinedType.COMPARTMENTDEFINITION;
6784        if ("Composition".equals(codeString))
6785          return FHIRDefinedType.COMPOSITION;
6786        if ("ConceptMap".equals(codeString))
6787          return FHIRDefinedType.CONCEPTMAP;
6788        if ("Condition".equals(codeString))
6789          return FHIRDefinedType.CONDITION;
6790        if ("Consent".equals(codeString))
6791          return FHIRDefinedType.CONSENT;
6792        if ("Contract".equals(codeString))
6793          return FHIRDefinedType.CONTRACT;
6794        if ("Coverage".equals(codeString))
6795          return FHIRDefinedType.COVERAGE;
6796        if ("DataElement".equals(codeString))
6797          return FHIRDefinedType.DATAELEMENT;
6798        if ("DetectedIssue".equals(codeString))
6799          return FHIRDefinedType.DETECTEDISSUE;
6800        if ("Device".equals(codeString))
6801          return FHIRDefinedType.DEVICE;
6802        if ("DeviceComponent".equals(codeString))
6803          return FHIRDefinedType.DEVICECOMPONENT;
6804        if ("DeviceMetric".equals(codeString))
6805          return FHIRDefinedType.DEVICEMETRIC;
6806        if ("DeviceRequest".equals(codeString))
6807          return FHIRDefinedType.DEVICEREQUEST;
6808        if ("DeviceUseStatement".equals(codeString))
6809          return FHIRDefinedType.DEVICEUSESTATEMENT;
6810        if ("DiagnosticReport".equals(codeString))
6811          return FHIRDefinedType.DIAGNOSTICREPORT;
6812        if ("DocumentManifest".equals(codeString))
6813          return FHIRDefinedType.DOCUMENTMANIFEST;
6814        if ("DocumentReference".equals(codeString))
6815          return FHIRDefinedType.DOCUMENTREFERENCE;
6816        if ("DomainResource".equals(codeString))
6817          return FHIRDefinedType.DOMAINRESOURCE;
6818        if ("EligibilityRequest".equals(codeString))
6819          return FHIRDefinedType.ELIGIBILITYREQUEST;
6820        if ("EligibilityResponse".equals(codeString))
6821          return FHIRDefinedType.ELIGIBILITYRESPONSE;
6822        if ("Encounter".equals(codeString))
6823          return FHIRDefinedType.ENCOUNTER;
6824        if ("Endpoint".equals(codeString))
6825          return FHIRDefinedType.ENDPOINT;
6826        if ("EnrollmentRequest".equals(codeString))
6827          return FHIRDefinedType.ENROLLMENTREQUEST;
6828        if ("EnrollmentResponse".equals(codeString))
6829          return FHIRDefinedType.ENROLLMENTRESPONSE;
6830        if ("EpisodeOfCare".equals(codeString))
6831          return FHIRDefinedType.EPISODEOFCARE;
6832        if ("ExpansionProfile".equals(codeString))
6833          return FHIRDefinedType.EXPANSIONPROFILE;
6834        if ("ExplanationOfBenefit".equals(codeString))
6835          return FHIRDefinedType.EXPLANATIONOFBENEFIT;
6836        if ("FamilyMemberHistory".equals(codeString))
6837          return FHIRDefinedType.FAMILYMEMBERHISTORY;
6838        if ("Flag".equals(codeString))
6839          return FHIRDefinedType.FLAG;
6840        if ("Goal".equals(codeString))
6841          return FHIRDefinedType.GOAL;
6842        if ("GraphDefinition".equals(codeString))
6843          return FHIRDefinedType.GRAPHDEFINITION;
6844        if ("Group".equals(codeString))
6845          return FHIRDefinedType.GROUP;
6846        if ("GuidanceResponse".equals(codeString))
6847          return FHIRDefinedType.GUIDANCERESPONSE;
6848        if ("HealthcareService".equals(codeString))
6849          return FHIRDefinedType.HEALTHCARESERVICE;
6850        if ("ImagingManifest".equals(codeString))
6851          return FHIRDefinedType.IMAGINGMANIFEST;
6852        if ("ImagingStudy".equals(codeString))
6853          return FHIRDefinedType.IMAGINGSTUDY;
6854        if ("Immunization".equals(codeString))
6855          return FHIRDefinedType.IMMUNIZATION;
6856        if ("ImmunizationRecommendation".equals(codeString))
6857          return FHIRDefinedType.IMMUNIZATIONRECOMMENDATION;
6858        if ("ImplementationGuide".equals(codeString))
6859          return FHIRDefinedType.IMPLEMENTATIONGUIDE;
6860        if ("Library".equals(codeString))
6861          return FHIRDefinedType.LIBRARY;
6862        if ("Linkage".equals(codeString))
6863          return FHIRDefinedType.LINKAGE;
6864        if ("List".equals(codeString))
6865          return FHIRDefinedType.LIST;
6866        if ("Location".equals(codeString))
6867          return FHIRDefinedType.LOCATION;
6868        if ("Measure".equals(codeString))
6869          return FHIRDefinedType.MEASURE;
6870        if ("MeasureReport".equals(codeString))
6871          return FHIRDefinedType.MEASUREREPORT;
6872        if ("Media".equals(codeString))
6873          return FHIRDefinedType.MEDIA;
6874        if ("Medication".equals(codeString))
6875          return FHIRDefinedType.MEDICATION;
6876        if ("MedicationAdministration".equals(codeString))
6877          return FHIRDefinedType.MEDICATIONADMINISTRATION;
6878        if ("MedicationDispense".equals(codeString))
6879          return FHIRDefinedType.MEDICATIONDISPENSE;
6880        if ("MedicationRequest".equals(codeString))
6881          return FHIRDefinedType.MEDICATIONREQUEST;
6882        if ("MedicationStatement".equals(codeString))
6883          return FHIRDefinedType.MEDICATIONSTATEMENT;
6884        if ("MessageDefinition".equals(codeString))
6885          return FHIRDefinedType.MESSAGEDEFINITION;
6886        if ("MessageHeader".equals(codeString))
6887          return FHIRDefinedType.MESSAGEHEADER;
6888        if ("NamingSystem".equals(codeString))
6889          return FHIRDefinedType.NAMINGSYSTEM;
6890        if ("NutritionOrder".equals(codeString))
6891          return FHIRDefinedType.NUTRITIONORDER;
6892        if ("Observation".equals(codeString))
6893          return FHIRDefinedType.OBSERVATION;
6894        if ("OperationDefinition".equals(codeString))
6895          return FHIRDefinedType.OPERATIONDEFINITION;
6896        if ("OperationOutcome".equals(codeString))
6897          return FHIRDefinedType.OPERATIONOUTCOME;
6898        if ("Organization".equals(codeString))
6899          return FHIRDefinedType.ORGANIZATION;
6900        if ("Parameters".equals(codeString))
6901          return FHIRDefinedType.PARAMETERS;
6902        if ("Patient".equals(codeString))
6903          return FHIRDefinedType.PATIENT;
6904        if ("PaymentNotice".equals(codeString))
6905          return FHIRDefinedType.PAYMENTNOTICE;
6906        if ("PaymentReconciliation".equals(codeString))
6907          return FHIRDefinedType.PAYMENTRECONCILIATION;
6908        if ("Person".equals(codeString))
6909          return FHIRDefinedType.PERSON;
6910        if ("PlanDefinition".equals(codeString))
6911          return FHIRDefinedType.PLANDEFINITION;
6912        if ("Practitioner".equals(codeString))
6913          return FHIRDefinedType.PRACTITIONER;
6914        if ("PractitionerRole".equals(codeString))
6915          return FHIRDefinedType.PRACTITIONERROLE;
6916        if ("Procedure".equals(codeString))
6917          return FHIRDefinedType.PROCEDURE;
6918        if ("ProcedureRequest".equals(codeString))
6919          return FHIRDefinedType.PROCEDUREREQUEST;
6920        if ("ProcessRequest".equals(codeString))
6921          return FHIRDefinedType.PROCESSREQUEST;
6922        if ("ProcessResponse".equals(codeString))
6923          return FHIRDefinedType.PROCESSRESPONSE;
6924        if ("Provenance".equals(codeString))
6925          return FHIRDefinedType.PROVENANCE;
6926        if ("Questionnaire".equals(codeString))
6927          return FHIRDefinedType.QUESTIONNAIRE;
6928        if ("QuestionnaireResponse".equals(codeString))
6929          return FHIRDefinedType.QUESTIONNAIRERESPONSE;
6930        if ("ReferralRequest".equals(codeString))
6931          return FHIRDefinedType.REFERRALREQUEST;
6932        if ("RelatedPerson".equals(codeString))
6933          return FHIRDefinedType.RELATEDPERSON;
6934        if ("RequestGroup".equals(codeString))
6935          return FHIRDefinedType.REQUESTGROUP;
6936        if ("ResearchStudy".equals(codeString))
6937          return FHIRDefinedType.RESEARCHSTUDY;
6938        if ("ResearchSubject".equals(codeString))
6939          return FHIRDefinedType.RESEARCHSUBJECT;
6940        if ("Resource".equals(codeString))
6941          return FHIRDefinedType.RESOURCE;
6942        if ("RiskAssessment".equals(codeString))
6943          return FHIRDefinedType.RISKASSESSMENT;
6944        if ("Schedule".equals(codeString))
6945          return FHIRDefinedType.SCHEDULE;
6946        if ("SearchParameter".equals(codeString))
6947          return FHIRDefinedType.SEARCHPARAMETER;
6948        if ("Sequence".equals(codeString))
6949          return FHIRDefinedType.SEQUENCE;
6950        if ("ServiceDefinition".equals(codeString))
6951          return FHIRDefinedType.SERVICEDEFINITION;
6952        if ("Slot".equals(codeString))
6953          return FHIRDefinedType.SLOT;
6954        if ("Specimen".equals(codeString))
6955          return FHIRDefinedType.SPECIMEN;
6956        if ("StructureDefinition".equals(codeString))
6957          return FHIRDefinedType.STRUCTUREDEFINITION;
6958        if ("StructureMap".equals(codeString))
6959          return FHIRDefinedType.STRUCTUREMAP;
6960        if ("Subscription".equals(codeString))
6961          return FHIRDefinedType.SUBSCRIPTION;
6962        if ("Substance".equals(codeString))
6963          return FHIRDefinedType.SUBSTANCE;
6964        if ("SupplyDelivery".equals(codeString))
6965          return FHIRDefinedType.SUPPLYDELIVERY;
6966        if ("SupplyRequest".equals(codeString))
6967          return FHIRDefinedType.SUPPLYREQUEST;
6968        if ("Task".equals(codeString))
6969          return FHIRDefinedType.TASK;
6970        if ("TestReport".equals(codeString))
6971          return FHIRDefinedType.TESTREPORT;
6972        if ("TestScript".equals(codeString))
6973          return FHIRDefinedType.TESTSCRIPT;
6974        if ("ValueSet".equals(codeString))
6975          return FHIRDefinedType.VALUESET;
6976        if ("VisionPrescription".equals(codeString))
6977          return FHIRDefinedType.VISIONPRESCRIPTION;
6978        throw new IllegalArgumentException("Unknown FHIRDefinedType code '"+codeString+"'");
6979        }
6980        public Enumeration<FHIRDefinedType> fromType(Base code) throws FHIRException {
6981          if (code == null)
6982            return null;
6983          if (code.isEmpty())
6984            return new Enumeration<FHIRDefinedType>(this);
6985          String codeString = ((PrimitiveType) code).asStringValue();
6986          if (codeString == null || "".equals(codeString))
6987            return null;
6988        if ("Address".equals(codeString))
6989          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ADDRESS);
6990        if ("Age".equals(codeString))
6991          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.AGE);
6992        if ("Annotation".equals(codeString))
6993          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ANNOTATION);
6994        if ("Attachment".equals(codeString))
6995          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ATTACHMENT);
6996        if ("BackboneElement".equals(codeString))
6997          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BACKBONEELEMENT);
6998        if ("CodeableConcept".equals(codeString))
6999          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODEABLECONCEPT);
7000        if ("Coding".equals(codeString))
7001          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODING);
7002        if ("ContactDetail".equals(codeString))
7003          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTACTDETAIL);
7004        if ("ContactPoint".equals(codeString))
7005          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTACTPOINT);
7006        if ("Contributor".equals(codeString))
7007          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTRIBUTOR);
7008        if ("Count".equals(codeString))
7009          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COUNT);
7010        if ("DataRequirement".equals(codeString))
7011          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATAREQUIREMENT);
7012        if ("Distance".equals(codeString))
7013          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DISTANCE);
7014        if ("Dosage".equals(codeString))
7015          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOSAGE);
7016        if ("Duration".equals(codeString))
7017          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DURATION);
7018        if ("Element".equals(codeString))
7019          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ELEMENT);
7020        if ("ElementDefinition".equals(codeString))
7021          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ELEMENTDEFINITION);
7022        if ("Extension".equals(codeString))
7023          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXTENSION);
7024        if ("HumanName".equals(codeString))
7025          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.HUMANNAME);
7026        if ("Identifier".equals(codeString))
7027          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IDENTIFIER);
7028        if ("Meta".equals(codeString))
7029          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.META);
7030        if ("Money".equals(codeString))
7031          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MONEY);
7032        if ("Narrative".equals(codeString))
7033          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NARRATIVE);
7034        if ("ParameterDefinition".equals(codeString))
7035          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PARAMETERDEFINITION);
7036        if ("Period".equals(codeString))
7037          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PERIOD);
7038        if ("Quantity".equals(codeString))
7039          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.QUANTITY);
7040        if ("Range".equals(codeString))
7041          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RANGE);
7042        if ("Ratio".equals(codeString))
7043          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RATIO);
7044        if ("Reference".equals(codeString))
7045          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.REFERENCE);
7046        if ("RelatedArtifact".equals(codeString))
7047          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RELATEDARTIFACT);
7048        if ("SampledData".equals(codeString))
7049          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SAMPLEDDATA);
7050        if ("Signature".equals(codeString))
7051          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SIGNATURE);
7052        if ("SimpleQuantity".equals(codeString))
7053          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SIMPLEQUANTITY);
7054        if ("Timing".equals(codeString))
7055          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TIMING);
7056        if ("TriggerDefinition".equals(codeString))
7057          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TRIGGERDEFINITION);
7058        if ("UsageContext".equals(codeString))
7059          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.USAGECONTEXT);
7060        if ("base64Binary".equals(codeString))
7061          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BASE64BINARY);
7062        if ("boolean".equals(codeString))
7063          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BOOLEAN);
7064        if ("code".equals(codeString))
7065          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODE);
7066        if ("date".equals(codeString))
7067          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATE);
7068        if ("dateTime".equals(codeString))
7069          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATETIME);
7070        if ("decimal".equals(codeString))
7071          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DECIMAL);
7072        if ("id".equals(codeString))
7073          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ID);
7074        if ("instant".equals(codeString))
7075          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INSTANT);
7076        if ("integer".equals(codeString))
7077          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.INTEGER);
7078        if ("markdown".equals(codeString))
7079          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MARKDOWN);
7080        if ("oid".equals(codeString))
7081          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OID);
7082        if ("positiveInt".equals(codeString))
7083          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.POSITIVEINT);
7084        if ("string".equals(codeString))
7085          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.STRING);
7086        if ("time".equals(codeString))
7087          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TIME);
7088        if ("unsignedInt".equals(codeString))
7089          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.UNSIGNEDINT);
7090        if ("uri".equals(codeString))
7091          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.URI);
7092        if ("uuid".equals(codeString))
7093          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.UUID);
7094        if ("xhtml".equals(codeString))
7095          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.XHTML);
7096        if ("Account".equals(codeString))
7097          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ACCOUNT);
7098        if ("ActivityDefinition".equals(codeString))
7099          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ACTIVITYDEFINITION);
7100        if ("AdverseEvent".equals(codeString))
7101          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ADVERSEEVENT);
7102        if ("AllergyIntolerance".equals(codeString))
7103          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ALLERGYINTOLERANCE);
7104        if ("Appointment".equals(codeString))
7105          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.APPOINTMENT);
7106        if ("AppointmentResponse".equals(codeString))
7107          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.APPOINTMENTRESPONSE);
7108        if ("AuditEvent".equals(codeString))
7109          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.AUDITEVENT);
7110        if ("Basic".equals(codeString))
7111          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BASIC);
7112        if ("Binary".equals(codeString))
7113          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BINARY);
7114        if ("BodySite".equals(codeString))
7115          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BODYSITE);
7116        if ("Bundle".equals(codeString))
7117          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.BUNDLE);
7118        if ("CapabilityStatement".equals(codeString))
7119          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CAPABILITYSTATEMENT);
7120        if ("CarePlan".equals(codeString))
7121          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CAREPLAN);
7122        if ("CareTeam".equals(codeString))
7123          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CARETEAM);
7124        if ("ChargeItem".equals(codeString))
7125          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CHARGEITEM);
7126        if ("Claim".equals(codeString))
7127          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CLAIM);
7128        if ("ClaimResponse".equals(codeString))
7129          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CLAIMRESPONSE);
7130        if ("ClinicalImpression".equals(codeString))
7131          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CLINICALIMPRESSION);
7132        if ("CodeSystem".equals(codeString))
7133          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CODESYSTEM);
7134        if ("Communication".equals(codeString))
7135          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMMUNICATION);
7136        if ("CommunicationRequest".equals(codeString))
7137          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMMUNICATIONREQUEST);
7138        if ("CompartmentDefinition".equals(codeString))
7139          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMPARTMENTDEFINITION);
7140        if ("Composition".equals(codeString))
7141          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COMPOSITION);
7142        if ("ConceptMap".equals(codeString))
7143          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONCEPTMAP);
7144        if ("Condition".equals(codeString))
7145          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONDITION);
7146        if ("Consent".equals(codeString))
7147          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONSENT);
7148        if ("Contract".equals(codeString))
7149          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.CONTRACT);
7150        if ("Coverage".equals(codeString))
7151          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.COVERAGE);
7152        if ("DataElement".equals(codeString))
7153          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DATAELEMENT);
7154        if ("DetectedIssue".equals(codeString))
7155          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DETECTEDISSUE);
7156        if ("Device".equals(codeString))
7157          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICE);
7158        if ("DeviceComponent".equals(codeString))
7159          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICECOMPONENT);
7160        if ("DeviceMetric".equals(codeString))
7161          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEMETRIC);
7162        if ("DeviceRequest".equals(codeString))
7163          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEREQUEST);
7164        if ("DeviceUseStatement".equals(codeString))
7165          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DEVICEUSESTATEMENT);
7166        if ("DiagnosticReport".equals(codeString))
7167          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DIAGNOSTICREPORT);
7168        if ("DocumentManifest".equals(codeString))
7169          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOCUMENTMANIFEST);
7170        if ("DocumentReference".equals(codeString))
7171          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOCUMENTREFERENCE);
7172        if ("DomainResource".equals(codeString))
7173          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.DOMAINRESOURCE);
7174        if ("EligibilityRequest".equals(codeString))
7175          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ELIGIBILITYREQUEST);
7176        if ("EligibilityResponse".equals(codeString))
7177          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ELIGIBILITYRESPONSE);
7178        if ("Encounter".equals(codeString))
7179          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENCOUNTER);
7180        if ("Endpoint".equals(codeString))
7181          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENDPOINT);
7182        if ("EnrollmentRequest".equals(codeString))
7183          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENROLLMENTREQUEST);
7184        if ("EnrollmentResponse".equals(codeString))
7185          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ENROLLMENTRESPONSE);
7186        if ("EpisodeOfCare".equals(codeString))
7187          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EPISODEOFCARE);
7188        if ("ExpansionProfile".equals(codeString))
7189          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXPANSIONPROFILE);
7190        if ("ExplanationOfBenefit".equals(codeString))
7191          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.EXPLANATIONOFBENEFIT);
7192        if ("FamilyMemberHistory".equals(codeString))
7193          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.FAMILYMEMBERHISTORY);
7194        if ("Flag".equals(codeString))
7195          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.FLAG);
7196        if ("Goal".equals(codeString))
7197          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GOAL);
7198        if ("GraphDefinition".equals(codeString))
7199          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GRAPHDEFINITION);
7200        if ("Group".equals(codeString))
7201          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GROUP);
7202        if ("GuidanceResponse".equals(codeString))
7203          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.GUIDANCERESPONSE);
7204        if ("HealthcareService".equals(codeString))
7205          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.HEALTHCARESERVICE);
7206        if ("ImagingManifest".equals(codeString))
7207          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMAGINGMANIFEST);
7208        if ("ImagingStudy".equals(codeString))
7209          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMAGINGSTUDY);
7210        if ("Immunization".equals(codeString))
7211          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMMUNIZATION);
7212        if ("ImmunizationRecommendation".equals(codeString))
7213          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMMUNIZATIONRECOMMENDATION);
7214        if ("ImplementationGuide".equals(codeString))
7215          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.IMPLEMENTATIONGUIDE);
7216        if ("Library".equals(codeString))
7217          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LIBRARY);
7218        if ("Linkage".equals(codeString))
7219          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LINKAGE);
7220        if ("List".equals(codeString))
7221          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LIST);
7222        if ("Location".equals(codeString))
7223          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.LOCATION);
7224        if ("Measure".equals(codeString))
7225          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEASURE);
7226        if ("MeasureReport".equals(codeString))
7227          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEASUREREPORT);
7228        if ("Media".equals(codeString))
7229          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDIA);
7230        if ("Medication".equals(codeString))
7231          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATION);
7232        if ("MedicationAdministration".equals(codeString))
7233          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONADMINISTRATION);
7234        if ("MedicationDispense".equals(codeString))
7235          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONDISPENSE);
7236        if ("MedicationRequest".equals(codeString))
7237          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONREQUEST);
7238        if ("MedicationStatement".equals(codeString))
7239          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MEDICATIONSTATEMENT);
7240        if ("MessageDefinition".equals(codeString))
7241          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MESSAGEDEFINITION);
7242        if ("MessageHeader".equals(codeString))
7243          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.MESSAGEHEADER);
7244        if ("NamingSystem".equals(codeString))
7245          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NAMINGSYSTEM);
7246        if ("NutritionOrder".equals(codeString))
7247          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.NUTRITIONORDER);
7248        if ("Observation".equals(codeString))
7249          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OBSERVATION);
7250        if ("OperationDefinition".equals(codeString))
7251          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OPERATIONDEFINITION);
7252        if ("OperationOutcome".equals(codeString))
7253          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.OPERATIONOUTCOME);
7254        if ("Organization".equals(codeString))
7255          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.ORGANIZATION);
7256        if ("Parameters".equals(codeString))
7257          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PARAMETERS);
7258        if ("Patient".equals(codeString))
7259          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PATIENT);
7260        if ("PaymentNotice".equals(codeString))
7261          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PAYMENTNOTICE);
7262        if ("PaymentReconciliation".equals(codeString))
7263          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PAYMENTRECONCILIATION);
7264        if ("Person".equals(codeString))
7265          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PERSON);
7266        if ("PlanDefinition".equals(codeString))
7267          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PLANDEFINITION);
7268        if ("Practitioner".equals(codeString))
7269          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PRACTITIONER);
7270        if ("PractitionerRole".equals(codeString))
7271          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PRACTITIONERROLE);
7272        if ("Procedure".equals(codeString))
7273          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROCEDURE);
7274        if ("ProcedureRequest".equals(codeString))
7275          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROCEDUREREQUEST);
7276        if ("ProcessRequest".equals(codeString))
7277          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROCESSREQUEST);
7278        if ("ProcessResponse".equals(codeString))
7279          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROCESSRESPONSE);
7280        if ("Provenance".equals(codeString))
7281          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.PROVENANCE);
7282        if ("Questionnaire".equals(codeString))
7283          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.QUESTIONNAIRE);
7284        if ("QuestionnaireResponse".equals(codeString))
7285          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.QUESTIONNAIRERESPONSE);
7286        if ("ReferralRequest".equals(codeString))
7287          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.REFERRALREQUEST);
7288        if ("RelatedPerson".equals(codeString))
7289          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RELATEDPERSON);
7290        if ("RequestGroup".equals(codeString))
7291          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.REQUESTGROUP);
7292        if ("ResearchStudy".equals(codeString))
7293          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RESEARCHSTUDY);
7294        if ("ResearchSubject".equals(codeString))
7295          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RESEARCHSUBJECT);
7296        if ("Resource".equals(codeString))
7297          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RESOURCE);
7298        if ("RiskAssessment".equals(codeString))
7299          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.RISKASSESSMENT);
7300        if ("Schedule".equals(codeString))
7301          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SCHEDULE);
7302        if ("SearchParameter".equals(codeString))
7303          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SEARCHPARAMETER);
7304        if ("Sequence".equals(codeString))
7305          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SEQUENCE);
7306        if ("ServiceDefinition".equals(codeString))
7307          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SERVICEDEFINITION);
7308        if ("Slot".equals(codeString))
7309          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SLOT);
7310        if ("Specimen".equals(codeString))
7311          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SPECIMEN);
7312        if ("StructureDefinition".equals(codeString))
7313          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.STRUCTUREDEFINITION);
7314        if ("StructureMap".equals(codeString))
7315          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.STRUCTUREMAP);
7316        if ("Subscription".equals(codeString))
7317          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSCRIPTION);
7318        if ("Substance".equals(codeString))
7319          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUBSTANCE);
7320        if ("SupplyDelivery".equals(codeString))
7321          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUPPLYDELIVERY);
7322        if ("SupplyRequest".equals(codeString))
7323          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.SUPPLYREQUEST);
7324        if ("Task".equals(codeString))
7325          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TASK);
7326        if ("TestReport".equals(codeString))
7327          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TESTREPORT);
7328        if ("TestScript".equals(codeString))
7329          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.TESTSCRIPT);
7330        if ("ValueSet".equals(codeString))
7331          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.VALUESET);
7332        if ("VisionPrescription".equals(codeString))
7333          return new Enumeration<FHIRDefinedType>(this, FHIRDefinedType.VISIONPRESCRIPTION);
7334        throw new FHIRException("Unknown FHIRDefinedType code '"+codeString+"'");
7335        }
7336    public String toCode(FHIRDefinedType code) {
7337      if (code == FHIRDefinedType.ADDRESS)
7338        return "Address";
7339      if (code == FHIRDefinedType.AGE)
7340        return "Age";
7341      if (code == FHIRDefinedType.ANNOTATION)
7342        return "Annotation";
7343      if (code == FHIRDefinedType.ATTACHMENT)
7344        return "Attachment";
7345      if (code == FHIRDefinedType.BACKBONEELEMENT)
7346        return "BackboneElement";
7347      if (code == FHIRDefinedType.CODEABLECONCEPT)
7348        return "CodeableConcept";
7349      if (code == FHIRDefinedType.CODING)
7350        return "Coding";
7351      if (code == FHIRDefinedType.CONTACTDETAIL)
7352        return "ContactDetail";
7353      if (code == FHIRDefinedType.CONTACTPOINT)
7354        return "ContactPoint";
7355      if (code == FHIRDefinedType.CONTRIBUTOR)
7356        return "Contributor";
7357      if (code == FHIRDefinedType.COUNT)
7358        return "Count";
7359      if (code == FHIRDefinedType.DATAREQUIREMENT)
7360        return "DataRequirement";
7361      if (code == FHIRDefinedType.DISTANCE)
7362        return "Distance";
7363      if (code == FHIRDefinedType.DOSAGE)
7364        return "Dosage";
7365      if (code == FHIRDefinedType.DURATION)
7366        return "Duration";
7367      if (code == FHIRDefinedType.ELEMENT)
7368        return "Element";
7369      if (code == FHIRDefinedType.ELEMENTDEFINITION)
7370        return "ElementDefinition";
7371      if (code == FHIRDefinedType.EXTENSION)
7372        return "Extension";
7373      if (code == FHIRDefinedType.HUMANNAME)
7374        return "HumanName";
7375      if (code == FHIRDefinedType.IDENTIFIER)
7376        return "Identifier";
7377      if (code == FHIRDefinedType.META)
7378        return "Meta";
7379      if (code == FHIRDefinedType.MONEY)
7380        return "Money";
7381      if (code == FHIRDefinedType.NARRATIVE)
7382        return "Narrative";
7383      if (code == FHIRDefinedType.PARAMETERDEFINITION)
7384        return "ParameterDefinition";
7385      if (code == FHIRDefinedType.PERIOD)
7386        return "Period";
7387      if (code == FHIRDefinedType.QUANTITY)
7388        return "Quantity";
7389      if (code == FHIRDefinedType.RANGE)
7390        return "Range";
7391      if (code == FHIRDefinedType.RATIO)
7392        return "Ratio";
7393      if (code == FHIRDefinedType.REFERENCE)
7394        return "Reference";
7395      if (code == FHIRDefinedType.RELATEDARTIFACT)
7396        return "RelatedArtifact";
7397      if (code == FHIRDefinedType.SAMPLEDDATA)
7398        return "SampledData";
7399      if (code == FHIRDefinedType.SIGNATURE)
7400        return "Signature";
7401      if (code == FHIRDefinedType.SIMPLEQUANTITY)
7402        return "SimpleQuantity";
7403      if (code == FHIRDefinedType.TIMING)
7404        return "Timing";
7405      if (code == FHIRDefinedType.TRIGGERDEFINITION)
7406        return "TriggerDefinition";
7407      if (code == FHIRDefinedType.USAGECONTEXT)
7408        return "UsageContext";
7409      if (code == FHIRDefinedType.BASE64BINARY)
7410        return "base64Binary";
7411      if (code == FHIRDefinedType.BOOLEAN)
7412        return "boolean";
7413      if (code == FHIRDefinedType.CODE)
7414        return "code";
7415      if (code == FHIRDefinedType.DATE)
7416        return "date";
7417      if (code == FHIRDefinedType.DATETIME)
7418        return "dateTime";
7419      if (code == FHIRDefinedType.DECIMAL)
7420        return "decimal";
7421      if (code == FHIRDefinedType.ID)
7422        return "id";
7423      if (code == FHIRDefinedType.INSTANT)
7424        return "instant";
7425      if (code == FHIRDefinedType.INTEGER)
7426        return "integer";
7427      if (code == FHIRDefinedType.MARKDOWN)
7428        return "markdown";
7429      if (code == FHIRDefinedType.OID)
7430        return "oid";
7431      if (code == FHIRDefinedType.POSITIVEINT)
7432        return "positiveInt";
7433      if (code == FHIRDefinedType.STRING)
7434        return "string";
7435      if (code == FHIRDefinedType.TIME)
7436        return "time";
7437      if (code == FHIRDefinedType.UNSIGNEDINT)
7438        return "unsignedInt";
7439      if (code == FHIRDefinedType.URI)
7440        return "uri";
7441      if (code == FHIRDefinedType.UUID)
7442        return "uuid";
7443      if (code == FHIRDefinedType.XHTML)
7444        return "xhtml";
7445      if (code == FHIRDefinedType.ACCOUNT)
7446        return "Account";
7447      if (code == FHIRDefinedType.ACTIVITYDEFINITION)
7448        return "ActivityDefinition";
7449      if (code == FHIRDefinedType.ADVERSEEVENT)
7450        return "AdverseEvent";
7451      if (code == FHIRDefinedType.ALLERGYINTOLERANCE)
7452        return "AllergyIntolerance";
7453      if (code == FHIRDefinedType.APPOINTMENT)
7454        return "Appointment";
7455      if (code == FHIRDefinedType.APPOINTMENTRESPONSE)
7456        return "AppointmentResponse";
7457      if (code == FHIRDefinedType.AUDITEVENT)
7458        return "AuditEvent";
7459      if (code == FHIRDefinedType.BASIC)
7460        return "Basic";
7461      if (code == FHIRDefinedType.BINARY)
7462        return "Binary";
7463      if (code == FHIRDefinedType.BODYSITE)
7464        return "BodySite";
7465      if (code == FHIRDefinedType.BUNDLE)
7466        return "Bundle";
7467      if (code == FHIRDefinedType.CAPABILITYSTATEMENT)
7468        return "CapabilityStatement";
7469      if (code == FHIRDefinedType.CAREPLAN)
7470        return "CarePlan";
7471      if (code == FHIRDefinedType.CARETEAM)
7472        return "CareTeam";
7473      if (code == FHIRDefinedType.CHARGEITEM)
7474        return "ChargeItem";
7475      if (code == FHIRDefinedType.CLAIM)
7476        return "Claim";
7477      if (code == FHIRDefinedType.CLAIMRESPONSE)
7478        return "ClaimResponse";
7479      if (code == FHIRDefinedType.CLINICALIMPRESSION)
7480        return "ClinicalImpression";
7481      if (code == FHIRDefinedType.CODESYSTEM)
7482        return "CodeSystem";
7483      if (code == FHIRDefinedType.COMMUNICATION)
7484        return "Communication";
7485      if (code == FHIRDefinedType.COMMUNICATIONREQUEST)
7486        return "CommunicationRequest";
7487      if (code == FHIRDefinedType.COMPARTMENTDEFINITION)
7488        return "CompartmentDefinition";
7489      if (code == FHIRDefinedType.COMPOSITION)
7490        return "Composition";
7491      if (code == FHIRDefinedType.CONCEPTMAP)
7492        return "ConceptMap";
7493      if (code == FHIRDefinedType.CONDITION)
7494        return "Condition";
7495      if (code == FHIRDefinedType.CONSENT)
7496        return "Consent";
7497      if (code == FHIRDefinedType.CONTRACT)
7498        return "Contract";
7499      if (code == FHIRDefinedType.COVERAGE)
7500        return "Coverage";
7501      if (code == FHIRDefinedType.DATAELEMENT)
7502        return "DataElement";
7503      if (code == FHIRDefinedType.DETECTEDISSUE)
7504        return "DetectedIssue";
7505      if (code == FHIRDefinedType.DEVICE)
7506        return "Device";
7507      if (code == FHIRDefinedType.DEVICECOMPONENT)
7508        return "DeviceComponent";
7509      if (code == FHIRDefinedType.DEVICEMETRIC)
7510        return "DeviceMetric";
7511      if (code == FHIRDefinedType.DEVICEREQUEST)
7512        return "DeviceRequest";
7513      if (code == FHIRDefinedType.DEVICEUSESTATEMENT)
7514        return "DeviceUseStatement";
7515      if (code == FHIRDefinedType.DIAGNOSTICREPORT)
7516        return "DiagnosticReport";
7517      if (code == FHIRDefinedType.DOCUMENTMANIFEST)
7518        return "DocumentManifest";
7519      if (code == FHIRDefinedType.DOCUMENTREFERENCE)
7520        return "DocumentReference";
7521      if (code == FHIRDefinedType.DOMAINRESOURCE)
7522        return "DomainResource";
7523      if (code == FHIRDefinedType.ELIGIBILITYREQUEST)
7524        return "EligibilityRequest";
7525      if (code == FHIRDefinedType.ELIGIBILITYRESPONSE)
7526        return "EligibilityResponse";
7527      if (code == FHIRDefinedType.ENCOUNTER)
7528        return "Encounter";
7529      if (code == FHIRDefinedType.ENDPOINT)
7530        return "Endpoint";
7531      if (code == FHIRDefinedType.ENROLLMENTREQUEST)
7532        return "EnrollmentRequest";
7533      if (code == FHIRDefinedType.ENROLLMENTRESPONSE)
7534        return "EnrollmentResponse";
7535      if (code == FHIRDefinedType.EPISODEOFCARE)
7536        return "EpisodeOfCare";
7537      if (code == FHIRDefinedType.EXPANSIONPROFILE)
7538        return "ExpansionProfile";
7539      if (code == FHIRDefinedType.EXPLANATIONOFBENEFIT)
7540        return "ExplanationOfBenefit";
7541      if (code == FHIRDefinedType.FAMILYMEMBERHISTORY)
7542        return "FamilyMemberHistory";
7543      if (code == FHIRDefinedType.FLAG)
7544        return "Flag";
7545      if (code == FHIRDefinedType.GOAL)
7546        return "Goal";
7547      if (code == FHIRDefinedType.GRAPHDEFINITION)
7548        return "GraphDefinition";
7549      if (code == FHIRDefinedType.GROUP)
7550        return "Group";
7551      if (code == FHIRDefinedType.GUIDANCERESPONSE)
7552        return "GuidanceResponse";
7553      if (code == FHIRDefinedType.HEALTHCARESERVICE)
7554        return "HealthcareService";
7555      if (code == FHIRDefinedType.IMAGINGMANIFEST)
7556        return "ImagingManifest";
7557      if (code == FHIRDefinedType.IMAGINGSTUDY)
7558        return "ImagingStudy";
7559      if (code == FHIRDefinedType.IMMUNIZATION)
7560        return "Immunization";
7561      if (code == FHIRDefinedType.IMMUNIZATIONRECOMMENDATION)
7562        return "ImmunizationRecommendation";
7563      if (code == FHIRDefinedType.IMPLEMENTATIONGUIDE)
7564        return "ImplementationGuide";
7565      if (code == FHIRDefinedType.LIBRARY)
7566        return "Library";
7567      if (code == FHIRDefinedType.LINKAGE)
7568        return "Linkage";
7569      if (code == FHIRDefinedType.LIST)
7570        return "List";
7571      if (code == FHIRDefinedType.LOCATION)
7572        return "Location";
7573      if (code == FHIRDefinedType.MEASURE)
7574        return "Measure";
7575      if (code == FHIRDefinedType.MEASUREREPORT)
7576        return "MeasureReport";
7577      if (code == FHIRDefinedType.MEDIA)
7578        return "Media";
7579      if (code == FHIRDefinedType.MEDICATION)
7580        return "Medication";
7581      if (code == FHIRDefinedType.MEDICATIONADMINISTRATION)
7582        return "MedicationAdministration";
7583      if (code == FHIRDefinedType.MEDICATIONDISPENSE)
7584        return "MedicationDispense";
7585      if (code == FHIRDefinedType.MEDICATIONREQUEST)
7586        return "MedicationRequest";
7587      if (code == FHIRDefinedType.MEDICATIONSTATEMENT)
7588        return "MedicationStatement";
7589      if (code == FHIRDefinedType.MESSAGEDEFINITION)
7590        return "MessageDefinition";
7591      if (code == FHIRDefinedType.MESSAGEHEADER)
7592        return "MessageHeader";
7593      if (code == FHIRDefinedType.NAMINGSYSTEM)
7594        return "NamingSystem";
7595      if (code == FHIRDefinedType.NUTRITIONORDER)
7596        return "NutritionOrder";
7597      if (code == FHIRDefinedType.OBSERVATION)
7598        return "Observation";
7599      if (code == FHIRDefinedType.OPERATIONDEFINITION)
7600        return "OperationDefinition";
7601      if (code == FHIRDefinedType.OPERATIONOUTCOME)
7602        return "OperationOutcome";
7603      if (code == FHIRDefinedType.ORGANIZATION)
7604        return "Organization";
7605      if (code == FHIRDefinedType.PARAMETERS)
7606        return "Parameters";
7607      if (code == FHIRDefinedType.PATIENT)
7608        return "Patient";
7609      if (code == FHIRDefinedType.PAYMENTNOTICE)
7610        return "PaymentNotice";
7611      if (code == FHIRDefinedType.PAYMENTRECONCILIATION)
7612        return "PaymentReconciliation";
7613      if (code == FHIRDefinedType.PERSON)
7614        return "Person";
7615      if (code == FHIRDefinedType.PLANDEFINITION)
7616        return "PlanDefinition";
7617      if (code == FHIRDefinedType.PRACTITIONER)
7618        return "Practitioner";
7619      if (code == FHIRDefinedType.PRACTITIONERROLE)
7620        return "PractitionerRole";
7621      if (code == FHIRDefinedType.PROCEDURE)
7622        return "Procedure";
7623      if (code == FHIRDefinedType.PROCEDUREREQUEST)
7624        return "ProcedureRequest";
7625      if (code == FHIRDefinedType.PROCESSREQUEST)
7626        return "ProcessRequest";
7627      if (code == FHIRDefinedType.PROCESSRESPONSE)
7628        return "ProcessResponse";
7629      if (code == FHIRDefinedType.PROVENANCE)
7630        return "Provenance";
7631      if (code == FHIRDefinedType.QUESTIONNAIRE)
7632        return "Questionnaire";
7633      if (code == FHIRDefinedType.QUESTIONNAIRERESPONSE)
7634        return "QuestionnaireResponse";
7635      if (code == FHIRDefinedType.REFERRALREQUEST)
7636        return "ReferralRequest";
7637      if (code == FHIRDefinedType.RELATEDPERSON)
7638        return "RelatedPerson";
7639      if (code == FHIRDefinedType.REQUESTGROUP)
7640        return "RequestGroup";
7641      if (code == FHIRDefinedType.RESEARCHSTUDY)
7642        return "ResearchStudy";
7643      if (code == FHIRDefinedType.RESEARCHSUBJECT)
7644        return "ResearchSubject";
7645      if (code == FHIRDefinedType.RESOURCE)
7646        return "Resource";
7647      if (code == FHIRDefinedType.RISKASSESSMENT)
7648        return "RiskAssessment";
7649      if (code == FHIRDefinedType.SCHEDULE)
7650        return "Schedule";
7651      if (code == FHIRDefinedType.SEARCHPARAMETER)
7652        return "SearchParameter";
7653      if (code == FHIRDefinedType.SEQUENCE)
7654        return "Sequence";
7655      if (code == FHIRDefinedType.SERVICEDEFINITION)
7656        return "ServiceDefinition";
7657      if (code == FHIRDefinedType.SLOT)
7658        return "Slot";
7659      if (code == FHIRDefinedType.SPECIMEN)
7660        return "Specimen";
7661      if (code == FHIRDefinedType.STRUCTUREDEFINITION)
7662        return "StructureDefinition";
7663      if (code == FHIRDefinedType.STRUCTUREMAP)
7664        return "StructureMap";
7665      if (code == FHIRDefinedType.SUBSCRIPTION)
7666        return "Subscription";
7667      if (code == FHIRDefinedType.SUBSTANCE)
7668        return "Substance";
7669      if (code == FHIRDefinedType.SUPPLYDELIVERY)
7670        return "SupplyDelivery";
7671      if (code == FHIRDefinedType.SUPPLYREQUEST)
7672        return "SupplyRequest";
7673      if (code == FHIRDefinedType.TASK)
7674        return "Task";
7675      if (code == FHIRDefinedType.TESTREPORT)
7676        return "TestReport";
7677      if (code == FHIRDefinedType.TESTSCRIPT)
7678        return "TestScript";
7679      if (code == FHIRDefinedType.VALUESET)
7680        return "ValueSet";
7681      if (code == FHIRDefinedType.VISIONPRESCRIPTION)
7682        return "VisionPrescription";
7683      return "?";
7684      }
7685    public String toSystem(FHIRDefinedType code) {
7686      return code.getSystem();
7687      }
7688    }
7689
7690    public enum MessageEvent {
7691        /**
7692         * 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.
7693         */
7694        CODESYSTEMEXPAND, 
7695        /**
7696         * Change the status of a Medication Administration to show that it is complete.
7697         */
7698        MEDICATIONADMINISTRATIONCOMPLETE, 
7699        /**
7700         * Someone wishes to record that the record of administration of a medication is in error and should be ignored.
7701         */
7702        MEDICATIONADMINISTRATIONNULLIFICATION, 
7703        /**
7704         * Indicates that a medication has been recorded against the patient's record.
7705         */
7706        MEDICATIONADMINISTRATIONRECORDING, 
7707        /**
7708         * Update a Medication Administration record.
7709         */
7710        MEDICATIONADMINISTRATIONUPDATE, 
7711        /**
7712         * 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.
7713         */
7714        ADMINNOTIFY, 
7715        /**
7716         * Notification to convey information.
7717         */
7718        COMMUNICATIONREQUEST, 
7719        /**
7720         * Provide a diagnostic report, or update a previously provided diagnostic report.
7721         */
7722        DIAGNOSTICREPORTPROVIDE, 
7723        /**
7724         * Provide a simple observation or update a previously provided simple observation.
7725         */
7726        OBSERVATIONPROVIDE, 
7727        /**
7728         * Notification that two patient records actually identify the same patient.
7729         */
7730        PATIENTLINK, 
7731        /**
7732         * Notification that previous advice that two patient records concern the same patient is now considered incorrect.
7733         */
7734        PATIENTUNLINK, 
7735        /**
7736         * 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.
7737         */
7738        VALUESETEXPAND, 
7739        /**
7740         * added to help the parsers
7741         */
7742        NULL;
7743        public static MessageEvent fromCode(String codeString) throws FHIRException {
7744            if (codeString == null || "".equals(codeString))
7745                return null;
7746        if ("CodeSystem-expand".equals(codeString))
7747          return CODESYSTEMEXPAND;
7748        if ("MedicationAdministration-Complete".equals(codeString))
7749          return MEDICATIONADMINISTRATIONCOMPLETE;
7750        if ("MedicationAdministration-Nullification".equals(codeString))
7751          return MEDICATIONADMINISTRATIONNULLIFICATION;
7752        if ("MedicationAdministration-Recording".equals(codeString))
7753          return MEDICATIONADMINISTRATIONRECORDING;
7754        if ("MedicationAdministration-Update".equals(codeString))
7755          return MEDICATIONADMINISTRATIONUPDATE;
7756        if ("admin-notify".equals(codeString))
7757          return ADMINNOTIFY;
7758        if ("communication-request".equals(codeString))
7759          return COMMUNICATIONREQUEST;
7760        if ("diagnosticreport-provide".equals(codeString))
7761          return DIAGNOSTICREPORTPROVIDE;
7762        if ("observation-provide".equals(codeString))
7763          return OBSERVATIONPROVIDE;
7764        if ("patient-link".equals(codeString))
7765          return PATIENTLINK;
7766        if ("patient-unlink".equals(codeString))
7767          return PATIENTUNLINK;
7768        if ("valueset-expand".equals(codeString))
7769          return VALUESETEXPAND;
7770        throw new FHIRException("Unknown MessageEvent code '"+codeString+"'");
7771        }
7772        public String toCode() {
7773          switch (this) {
7774            case CODESYSTEMEXPAND: return "CodeSystem-expand";
7775            case MEDICATIONADMINISTRATIONCOMPLETE: return "MedicationAdministration-Complete";
7776            case MEDICATIONADMINISTRATIONNULLIFICATION: return "MedicationAdministration-Nullification";
7777            case MEDICATIONADMINISTRATIONRECORDING: return "MedicationAdministration-Recording";
7778            case MEDICATIONADMINISTRATIONUPDATE: return "MedicationAdministration-Update";
7779            case ADMINNOTIFY: return "admin-notify";
7780            case COMMUNICATIONREQUEST: return "communication-request";
7781            case DIAGNOSTICREPORTPROVIDE: return "diagnosticreport-provide";
7782            case OBSERVATIONPROVIDE: return "observation-provide";
7783            case PATIENTLINK: return "patient-link";
7784            case PATIENTUNLINK: return "patient-unlink";
7785            case VALUESETEXPAND: return "valueset-expand";
7786            default: return "?";
7787          }
7788        }
7789        public String getSystem() {
7790          switch (this) {
7791            case CODESYSTEMEXPAND: return "http://hl7.org/fhir/message-events";
7792            case MEDICATIONADMINISTRATIONCOMPLETE: return "http://hl7.org/fhir/message-events";
7793            case MEDICATIONADMINISTRATIONNULLIFICATION: return "http://hl7.org/fhir/message-events";
7794            case MEDICATIONADMINISTRATIONRECORDING: return "http://hl7.org/fhir/message-events";
7795            case MEDICATIONADMINISTRATIONUPDATE: return "http://hl7.org/fhir/message-events";
7796            case ADMINNOTIFY: return "http://hl7.org/fhir/message-events";
7797            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/message-events";
7798            case DIAGNOSTICREPORTPROVIDE: return "http://hl7.org/fhir/message-events";
7799            case OBSERVATIONPROVIDE: return "http://hl7.org/fhir/message-events";
7800            case PATIENTLINK: return "http://hl7.org/fhir/message-events";
7801            case PATIENTUNLINK: return "http://hl7.org/fhir/message-events";
7802            case VALUESETEXPAND: return "http://hl7.org/fhir/message-events";
7803            default: return "?";
7804          }
7805        }
7806        public String getDefinition() {
7807          switch (this) {
7808            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.";
7809            case MEDICATIONADMINISTRATIONCOMPLETE: return "Change the status of a Medication Administration to show that it is complete.";
7810            case MEDICATIONADMINISTRATIONNULLIFICATION: return "Someone wishes to record that the record of administration of a medication is in error and should be ignored.";
7811            case MEDICATIONADMINISTRATIONRECORDING: return "Indicates that a medication has been recorded against the patient's record.";
7812            case MEDICATIONADMINISTRATIONUPDATE: return "Update a Medication Administration record.";
7813            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.";
7814            case COMMUNICATIONREQUEST: return "Notification to convey information.";
7815            case DIAGNOSTICREPORTPROVIDE: return "Provide a diagnostic report, or update a previously provided diagnostic report.";
7816            case OBSERVATIONPROVIDE: return "Provide a simple observation or update a previously provided simple observation.";
7817            case PATIENTLINK: return "Notification that two patient records actually identify the same patient.";
7818            case PATIENTUNLINK: return "Notification that previous advice that two patient records concern the same patient is now considered incorrect.";
7819            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.";
7820            default: return "?";
7821          }
7822        }
7823        public String getDisplay() {
7824          switch (this) {
7825            case CODESYSTEMEXPAND: return "CodeSystem-expand";
7826            case MEDICATIONADMINISTRATIONCOMPLETE: return "MedicationAdministration-Complete";
7827            case MEDICATIONADMINISTRATIONNULLIFICATION: return "MedicationAdministration-Nullification";
7828            case MEDICATIONADMINISTRATIONRECORDING: return "MedicationAdministration-Recording";
7829            case MEDICATIONADMINISTRATIONUPDATE: return "MedicationAdministration-Update";
7830            case ADMINNOTIFY: return "admin-notify";
7831            case COMMUNICATIONREQUEST: return "communication-request";
7832            case DIAGNOSTICREPORTPROVIDE: return "diagnosticreport-provide";
7833            case OBSERVATIONPROVIDE: return "observation-provide";
7834            case PATIENTLINK: return "patient-link";
7835            case PATIENTUNLINK: return "patient-unlink";
7836            case VALUESETEXPAND: return "valueset-expand";
7837            default: return "?";
7838          }
7839        }
7840    }
7841
7842  public static class MessageEventEnumFactory implements EnumFactory<MessageEvent> {
7843    public MessageEvent fromCode(String codeString) throws IllegalArgumentException {
7844      if (codeString == null || "".equals(codeString))
7845            if (codeString == null || "".equals(codeString))
7846                return null;
7847        if ("CodeSystem-expand".equals(codeString))
7848          return MessageEvent.CODESYSTEMEXPAND;
7849        if ("MedicationAdministration-Complete".equals(codeString))
7850          return MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE;
7851        if ("MedicationAdministration-Nullification".equals(codeString))
7852          return MessageEvent.MEDICATIONADMINISTRATIONNULLIFICATION;
7853        if ("MedicationAdministration-Recording".equals(codeString))
7854          return MessageEvent.MEDICATIONADMINISTRATIONRECORDING;
7855        if ("MedicationAdministration-Update".equals(codeString))
7856          return MessageEvent.MEDICATIONADMINISTRATIONUPDATE;
7857        if ("admin-notify".equals(codeString))
7858          return MessageEvent.ADMINNOTIFY;
7859        if ("communication-request".equals(codeString))
7860          return MessageEvent.COMMUNICATIONREQUEST;
7861        if ("diagnosticreport-provide".equals(codeString))
7862          return MessageEvent.DIAGNOSTICREPORTPROVIDE;
7863        if ("observation-provide".equals(codeString))
7864          return MessageEvent.OBSERVATIONPROVIDE;
7865        if ("patient-link".equals(codeString))
7866          return MessageEvent.PATIENTLINK;
7867        if ("patient-unlink".equals(codeString))
7868          return MessageEvent.PATIENTUNLINK;
7869        if ("valueset-expand".equals(codeString))
7870          return MessageEvent.VALUESETEXPAND;
7871        throw new IllegalArgumentException("Unknown MessageEvent code '"+codeString+"'");
7872        }
7873        public Enumeration<MessageEvent> fromType(Base code) throws FHIRException {
7874          if (code == null)
7875            return null;
7876          if (code.isEmpty())
7877            return new Enumeration<MessageEvent>(this);
7878          String codeString = ((PrimitiveType) code).asStringValue();
7879          if (codeString == null || "".equals(codeString))
7880            return null;
7881        if ("CodeSystem-expand".equals(codeString))
7882          return new Enumeration<MessageEvent>(this, MessageEvent.CODESYSTEMEXPAND);
7883        if ("MedicationAdministration-Complete".equals(codeString))
7884          return new Enumeration<MessageEvent>(this, MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE);
7885        if ("MedicationAdministration-Nullification".equals(codeString))
7886          return new Enumeration<MessageEvent>(this, MessageEvent.MEDICATIONADMINISTRATIONNULLIFICATION);
7887        if ("MedicationAdministration-Recording".equals(codeString))
7888          return new Enumeration<MessageEvent>(this, MessageEvent.MEDICATIONADMINISTRATIONRECORDING);
7889        if ("MedicationAdministration-Update".equals(codeString))
7890          return new Enumeration<MessageEvent>(this, MessageEvent.MEDICATIONADMINISTRATIONUPDATE);
7891        if ("admin-notify".equals(codeString))
7892          return new Enumeration<MessageEvent>(this, MessageEvent.ADMINNOTIFY);
7893        if ("communication-request".equals(codeString))
7894          return new Enumeration<MessageEvent>(this, MessageEvent.COMMUNICATIONREQUEST);
7895        if ("diagnosticreport-provide".equals(codeString))
7896          return new Enumeration<MessageEvent>(this, MessageEvent.DIAGNOSTICREPORTPROVIDE);
7897        if ("observation-provide".equals(codeString))
7898          return new Enumeration<MessageEvent>(this, MessageEvent.OBSERVATIONPROVIDE);
7899        if ("patient-link".equals(codeString))
7900          return new Enumeration<MessageEvent>(this, MessageEvent.PATIENTLINK);
7901        if ("patient-unlink".equals(codeString))
7902          return new Enumeration<MessageEvent>(this, MessageEvent.PATIENTUNLINK);
7903        if ("valueset-expand".equals(codeString))
7904          return new Enumeration<MessageEvent>(this, MessageEvent.VALUESETEXPAND);
7905        throw new FHIRException("Unknown MessageEvent code '"+codeString+"'");
7906        }
7907    public String toCode(MessageEvent code) {
7908      if (code == MessageEvent.CODESYSTEMEXPAND)
7909        return "CodeSystem-expand";
7910      if (code == MessageEvent.MEDICATIONADMINISTRATIONCOMPLETE)
7911        return "MedicationAdministration-Complete";
7912      if (code == MessageEvent.MEDICATIONADMINISTRATIONNULLIFICATION)
7913        return "MedicationAdministration-Nullification";
7914      if (code == MessageEvent.MEDICATIONADMINISTRATIONRECORDING)
7915        return "MedicationAdministration-Recording";
7916      if (code == MessageEvent.MEDICATIONADMINISTRATIONUPDATE)
7917        return "MedicationAdministration-Update";
7918      if (code == MessageEvent.ADMINNOTIFY)
7919        return "admin-notify";
7920      if (code == MessageEvent.COMMUNICATIONREQUEST)
7921        return "communication-request";
7922      if (code == MessageEvent.DIAGNOSTICREPORTPROVIDE)
7923        return "diagnosticreport-provide";
7924      if (code == MessageEvent.OBSERVATIONPROVIDE)
7925        return "observation-provide";
7926      if (code == MessageEvent.PATIENTLINK)
7927        return "patient-link";
7928      if (code == MessageEvent.PATIENTUNLINK)
7929        return "patient-unlink";
7930      if (code == MessageEvent.VALUESETEXPAND)
7931        return "valueset-expand";
7932      return "?";
7933      }
7934    public String toSystem(MessageEvent code) {
7935      return code.getSystem();
7936      }
7937    }
7938
7939    public enum NoteType {
7940        /**
7941         * Display the note.
7942         */
7943        DISPLAY, 
7944        /**
7945         * Print the note on the form.
7946         */
7947        PRINT, 
7948        /**
7949         * Print the note for the operator.
7950         */
7951        PRINTOPER, 
7952        /**
7953         * added to help the parsers
7954         */
7955        NULL;
7956        public static NoteType fromCode(String codeString) throws FHIRException {
7957            if (codeString == null || "".equals(codeString))
7958                return null;
7959        if ("display".equals(codeString))
7960          return DISPLAY;
7961        if ("print".equals(codeString))
7962          return PRINT;
7963        if ("printoper".equals(codeString))
7964          return PRINTOPER;
7965        throw new FHIRException("Unknown NoteType code '"+codeString+"'");
7966        }
7967        public String toCode() {
7968          switch (this) {
7969            case DISPLAY: return "display";
7970            case PRINT: return "print";
7971            case PRINTOPER: return "printoper";
7972            default: return "?";
7973          }
7974        }
7975        public String getSystem() {
7976          switch (this) {
7977            case DISPLAY: return "http://hl7.org/fhir/note-type";
7978            case PRINT: return "http://hl7.org/fhir/note-type";
7979            case PRINTOPER: return "http://hl7.org/fhir/note-type";
7980            default: return "?";
7981          }
7982        }
7983        public String getDefinition() {
7984          switch (this) {
7985            case DISPLAY: return "Display the note.";
7986            case PRINT: return "Print the note on the form.";
7987            case PRINTOPER: return "Print the note for the operator.";
7988            default: return "?";
7989          }
7990        }
7991        public String getDisplay() {
7992          switch (this) {
7993            case DISPLAY: return "Display";
7994            case PRINT: return "Print (Form)";
7995            case PRINTOPER: return "Print (Operator)";
7996            default: return "?";
7997          }
7998        }
7999    }
8000
8001  public static class NoteTypeEnumFactory implements EnumFactory<NoteType> {
8002    public NoteType fromCode(String codeString) throws IllegalArgumentException {
8003      if (codeString == null || "".equals(codeString))
8004            if (codeString == null || "".equals(codeString))
8005                return null;
8006        if ("display".equals(codeString))
8007          return NoteType.DISPLAY;
8008        if ("print".equals(codeString))
8009          return NoteType.PRINT;
8010        if ("printoper".equals(codeString))
8011          return NoteType.PRINTOPER;
8012        throw new IllegalArgumentException("Unknown NoteType code '"+codeString+"'");
8013        }
8014        public Enumeration<NoteType> fromType(Base code) throws FHIRException {
8015          if (code == null)
8016            return null;
8017          if (code.isEmpty())
8018            return new Enumeration<NoteType>(this);
8019          String codeString = ((PrimitiveType) code).asStringValue();
8020          if (codeString == null || "".equals(codeString))
8021            return null;
8022        if ("display".equals(codeString))
8023          return new Enumeration<NoteType>(this, NoteType.DISPLAY);
8024        if ("print".equals(codeString))
8025          return new Enumeration<NoteType>(this, NoteType.PRINT);
8026        if ("printoper".equals(codeString))
8027          return new Enumeration<NoteType>(this, NoteType.PRINTOPER);
8028        throw new FHIRException("Unknown NoteType code '"+codeString+"'");
8029        }
8030    public String toCode(NoteType code) {
8031      if (code == NoteType.DISPLAY)
8032        return "display";
8033      if (code == NoteType.PRINT)
8034        return "print";
8035      if (code == NoteType.PRINTOPER)
8036        return "printoper";
8037      return "?";
8038      }
8039    public String toSystem(NoteType code) {
8040      return code.getSystem();
8041      }
8042    }
8043
8044    public enum PublicationStatus {
8045        /**
8046         * This resource is still under development and is not yet considered to be ready for normal use.
8047         */
8048        DRAFT, 
8049        /**
8050         * This resource is ready for normal use.
8051         */
8052        ACTIVE, 
8053        /**
8054         * This resource has been withdrawn or superseded and should no longer be used.
8055         */
8056        RETIRED, 
8057        /**
8058         * The authoring system does not know which of the status values currently applies for this resource.  Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one.
8059         */
8060        UNKNOWN, 
8061        /**
8062         * added to help the parsers
8063         */
8064        NULL;
8065        public static PublicationStatus fromCode(String codeString) throws FHIRException {
8066            if (codeString == null || "".equals(codeString))
8067                return null;
8068        if ("draft".equals(codeString))
8069          return DRAFT;
8070        if ("active".equals(codeString))
8071          return ACTIVE;
8072        if ("retired".equals(codeString))
8073          return RETIRED;
8074        if ("unknown".equals(codeString))
8075          return UNKNOWN;
8076        throw new FHIRException("Unknown PublicationStatus code '"+codeString+"'");
8077        }
8078        public String toCode() {
8079          switch (this) {
8080            case DRAFT: return "draft";
8081            case ACTIVE: return "active";
8082            case RETIRED: return "retired";
8083            case UNKNOWN: return "unknown";
8084            default: return "?";
8085          }
8086        }
8087        public String getSystem() {
8088          switch (this) {
8089            case DRAFT: return "http://hl7.org/fhir/publication-status";
8090            case ACTIVE: return "http://hl7.org/fhir/publication-status";
8091            case RETIRED: return "http://hl7.org/fhir/publication-status";
8092            case UNKNOWN: return "http://hl7.org/fhir/publication-status";
8093            default: return "?";
8094          }
8095        }
8096        public String getDefinition() {
8097          switch (this) {
8098            case DRAFT: return "This resource is still under development and is not yet considered to be ready for normal use.";
8099            case ACTIVE: return "This resource is ready for normal use.";
8100            case RETIRED: return "This resource has been withdrawn or superseded and should no longer be used.";
8101            case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this resource.  Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one.";
8102            default: return "?";
8103          }
8104        }
8105        public String getDisplay() {
8106          switch (this) {
8107            case DRAFT: return "Draft";
8108            case ACTIVE: return "Active";
8109            case RETIRED: return "Retired";
8110            case UNKNOWN: return "Unknown";
8111            default: return "?";
8112          }
8113        }
8114    }
8115
8116  public static class PublicationStatusEnumFactory implements EnumFactory<PublicationStatus> {
8117    public PublicationStatus fromCode(String codeString) throws IllegalArgumentException {
8118      if (codeString == null || "".equals(codeString))
8119            if (codeString == null || "".equals(codeString))
8120                return null;
8121        if ("draft".equals(codeString))
8122          return PublicationStatus.DRAFT;
8123        if ("active".equals(codeString))
8124          return PublicationStatus.ACTIVE;
8125        if ("retired".equals(codeString))
8126          return PublicationStatus.RETIRED;
8127        if ("unknown".equals(codeString))
8128          return PublicationStatus.UNKNOWN;
8129        throw new IllegalArgumentException("Unknown PublicationStatus code '"+codeString+"'");
8130        }
8131        public Enumeration<PublicationStatus> fromType(Base code) throws FHIRException {
8132          if (code == null)
8133            return null;
8134          if (code.isEmpty())
8135            return new Enumeration<PublicationStatus>(this);
8136          String codeString = ((PrimitiveType) code).asStringValue();
8137          if (codeString == null || "".equals(codeString))
8138            return null;
8139        if ("draft".equals(codeString))
8140          return new Enumeration<PublicationStatus>(this, PublicationStatus.DRAFT);
8141        if ("active".equals(codeString))
8142          return new Enumeration<PublicationStatus>(this, PublicationStatus.ACTIVE);
8143        if ("retired".equals(codeString))
8144          return new Enumeration<PublicationStatus>(this, PublicationStatus.RETIRED);
8145        if ("unknown".equals(codeString))
8146          return new Enumeration<PublicationStatus>(this, PublicationStatus.UNKNOWN);
8147        throw new FHIRException("Unknown PublicationStatus code '"+codeString+"'");
8148        }
8149    public String toCode(PublicationStatus code) {
8150      if (code == PublicationStatus.DRAFT)
8151        return "draft";
8152      if (code == PublicationStatus.ACTIVE)
8153        return "active";
8154      if (code == PublicationStatus.RETIRED)
8155        return "retired";
8156      if (code == PublicationStatus.UNKNOWN)
8157        return "unknown";
8158      return "?";
8159      }
8160    public String toSystem(PublicationStatus code) {
8161      return code.getSystem();
8162      }
8163    }
8164
8165    public enum RemittanceOutcome {
8166        /**
8167         * The processing has completed without errors
8168         */
8169        COMPLETE, 
8170        /**
8171         * One or more errors have been detected in the Claim
8172         */
8173        ERROR, 
8174        /**
8175         * No errors have been detected in the Claim and some of the adjudication has been performed.
8176         */
8177        PARTIAL, 
8178        /**
8179         * added to help the parsers
8180         */
8181        NULL;
8182        public static RemittanceOutcome fromCode(String codeString) throws FHIRException {
8183            if (codeString == null || "".equals(codeString))
8184                return null;
8185        if ("complete".equals(codeString))
8186          return COMPLETE;
8187        if ("error".equals(codeString))
8188          return ERROR;
8189        if ("partial".equals(codeString))
8190          return PARTIAL;
8191        throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'");
8192        }
8193        public String toCode() {
8194          switch (this) {
8195            case COMPLETE: return "complete";
8196            case ERROR: return "error";
8197            case PARTIAL: return "partial";
8198            default: return "?";
8199          }
8200        }
8201        public String getSystem() {
8202          switch (this) {
8203            case COMPLETE: return "http://hl7.org/fhir/remittance-outcome";
8204            case ERROR: return "http://hl7.org/fhir/remittance-outcome";
8205            case PARTIAL: return "http://hl7.org/fhir/remittance-outcome";
8206            default: return "?";
8207          }
8208        }
8209        public String getDefinition() {
8210          switch (this) {
8211            case COMPLETE: return "The processing has completed without errors";
8212            case ERROR: return "One or more errors have been detected in the Claim";
8213            case PARTIAL: return "No errors have been detected in the Claim and some of the adjudication has been performed.";
8214            default: return "?";
8215          }
8216        }
8217        public String getDisplay() {
8218          switch (this) {
8219            case COMPLETE: return "Processing Complete";
8220            case ERROR: return "Error";
8221            case PARTIAL: return "Partial Processing";
8222            default: return "?";
8223          }
8224        }
8225    }
8226
8227  public static class RemittanceOutcomeEnumFactory implements EnumFactory<RemittanceOutcome> {
8228    public RemittanceOutcome fromCode(String codeString) throws IllegalArgumentException {
8229      if (codeString == null || "".equals(codeString))
8230            if (codeString == null || "".equals(codeString))
8231                return null;
8232        if ("complete".equals(codeString))
8233          return RemittanceOutcome.COMPLETE;
8234        if ("error".equals(codeString))
8235          return RemittanceOutcome.ERROR;
8236        if ("partial".equals(codeString))
8237          return RemittanceOutcome.PARTIAL;
8238        throw new IllegalArgumentException("Unknown RemittanceOutcome code '"+codeString+"'");
8239        }
8240        public Enumeration<RemittanceOutcome> fromType(Base code) throws FHIRException {
8241          if (code == null)
8242            return null;
8243          if (code.isEmpty())
8244            return new Enumeration<RemittanceOutcome>(this);
8245          String codeString = ((PrimitiveType) code).asStringValue();
8246          if (codeString == null || "".equals(codeString))
8247            return null;
8248        if ("complete".equals(codeString))
8249          return new Enumeration<RemittanceOutcome>(this, RemittanceOutcome.COMPLETE);
8250        if ("error".equals(codeString))
8251          return new Enumeration<RemittanceOutcome>(this, RemittanceOutcome.ERROR);
8252        if ("partial".equals(codeString))
8253          return new Enumeration<RemittanceOutcome>(this, RemittanceOutcome.PARTIAL);
8254        throw new FHIRException("Unknown RemittanceOutcome code '"+codeString+"'");
8255        }
8256    public String toCode(RemittanceOutcome code) {
8257      if (code == RemittanceOutcome.COMPLETE)
8258        return "complete";
8259      if (code == RemittanceOutcome.ERROR)
8260        return "error";
8261      if (code == RemittanceOutcome.PARTIAL)
8262        return "partial";
8263      return "?";
8264      }
8265    public String toSystem(RemittanceOutcome code) {
8266      return code.getSystem();
8267      }
8268    }
8269
8270    public enum ResourceType {
8271        /**
8272         * A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.
8273         */
8274        ACCOUNT, 
8275        /**
8276         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
8277         */
8278        ACTIVITYDEFINITION, 
8279        /**
8280         * Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.
8281         */
8282        ADVERSEEVENT, 
8283        /**
8284         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
8285         */
8286        ALLERGYINTOLERANCE, 
8287        /**
8288         * 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).
8289         */
8290        APPOINTMENT, 
8291        /**
8292         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
8293         */
8294        APPOINTMENTRESPONSE, 
8295        /**
8296         * 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.
8297         */
8298        AUDITEVENT, 
8299        /**
8300         * 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.
8301         */
8302        BASIC, 
8303        /**
8304         * A binary resource can contain any content, whether text, image, pdf, zip archive, etc.
8305         */
8306        BINARY, 
8307        /**
8308         * 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.
8309         */
8310        BODYSITE, 
8311        /**
8312         * A container for a collection of resources.
8313         */
8314        BUNDLE, 
8315        /**
8316         * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
8317         */
8318        CAPABILITYSTATEMENT, 
8319        /**
8320         * 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.
8321         */
8322        CAREPLAN, 
8323        /**
8324         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
8325         */
8326        CARETEAM, 
8327        /**
8328         * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.
8329         */
8330        CHARGEITEM, 
8331        /**
8332         * 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.
8333         */
8334        CLAIM, 
8335        /**
8336         * This resource provides the adjudication details from the processing of a Claim resource.
8337         */
8338        CLAIMRESPONSE, 
8339        /**
8340         * 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.
8341         */
8342        CLINICALIMPRESSION, 
8343        /**
8344         * A code system resource specifies a set of codes drawn from one or more code systems.
8345         */
8346        CODESYSTEM, 
8347        /**
8348         * 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.
8349         */
8350        COMMUNICATION, 
8351        /**
8352         * 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.
8353         */
8354        COMMUNICATIONREQUEST, 
8355        /**
8356         * A compartment definition that defines how resources are accessed on a server.
8357         */
8358        COMPARTMENTDEFINITION, 
8359        /**
8360         * 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.
8361         */
8362        COMPOSITION, 
8363        /**
8364         * 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.
8365         */
8366        CONCEPTMAP, 
8367        /**
8368         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
8369         */
8370        CONDITION, 
8371        /**
8372         * A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.
8373         */
8374        CONSENT, 
8375        /**
8376         * A formal agreement between parties regarding the conduct of business, exchange of information or other matters.
8377         */
8378        CONTRACT, 
8379        /**
8380         * Financial instrument which may be used to reimburse or pay for health care products and services.
8381         */
8382        COVERAGE, 
8383        /**
8384         * The formal description of a single piece of information that can be gathered and reported.
8385         */
8386        DATAELEMENT, 
8387        /**
8388         * 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.
8389         */
8390        DETECTEDISSUE, 
8391        /**
8392         * 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 include 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.
8393         */
8394        DEVICE, 
8395        /**
8396         * The characteristics, operational status and capabilities of a medical-related component of a medical device.
8397         */
8398        DEVICECOMPONENT, 
8399        /**
8400         * Describes a measurement, calculation or setting capability of a medical device.
8401         */
8402        DEVICEMETRIC, 
8403        /**
8404         * 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.
8405         */
8406        DEVICEREQUEST, 
8407        /**
8408         * 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.
8409         */
8410        DEVICEUSESTATEMENT, 
8411        /**
8412         * 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.
8413         */
8414        DIAGNOSTICREPORT, 
8415        /**
8416         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
8417         */
8418        DOCUMENTMANIFEST, 
8419        /**
8420         * A reference to a document.
8421         */
8422        DOCUMENTREFERENCE, 
8423        /**
8424         * A resource that includes narrative, extensions, and contained resources.
8425         */
8426        DOMAINRESOURCE, 
8427        /**
8428         * The EligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an EligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.
8429         */
8430        ELIGIBILITYREQUEST, 
8431        /**
8432         * This resource provides eligibility and plan details from the processing of an Eligibility resource.
8433         */
8434        ELIGIBILITYRESPONSE, 
8435        /**
8436         * 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.
8437         */
8438        ENCOUNTER, 
8439        /**
8440         * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.
8441         */
8442        ENDPOINT, 
8443        /**
8444         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
8445         */
8446        ENROLLMENTREQUEST, 
8447        /**
8448         * This resource provides enrollment and plan details from the processing of an Enrollment resource.
8449         */
8450        ENROLLMENTRESPONSE, 
8451        /**
8452         * 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.
8453         */
8454        EPISODEOFCARE, 
8455        /**
8456         * Resource to define constraints on the Expansion of a FHIR ValueSet.
8457         */
8458        EXPANSIONPROFILE, 
8459        /**
8460         * 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.
8461         */
8462        EXPLANATIONOFBENEFIT, 
8463        /**
8464         * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.
8465         */
8466        FAMILYMEMBERHISTORY, 
8467        /**
8468         * Prospective warnings of potential issues when providing care to the patient.
8469         */
8470        FLAG, 
8471        /**
8472         * 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.
8473         */
8474        GOAL, 
8475        /**
8476         * A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.
8477         */
8478        GRAPHDEFINITION, 
8479        /**
8480         * 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.
8481         */
8482        GROUP, 
8483        /**
8484         * 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.
8485         */
8486        GUIDANCERESPONSE, 
8487        /**
8488         * The details of a healthcare service available at a location.
8489         */
8490        HEALTHCARESERVICE, 
8491        /**
8492         * A text description of the DICOM SOP instances selected in the ImagingManifest; or the reason for, or significance of, the selection.
8493         */
8494        IMAGINGMANIFEST, 
8495        /**
8496         * 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.
8497         */
8498        IMAGINGSTUDY, 
8499        /**
8500         * 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.
8501         */
8502        IMMUNIZATION, 
8503        /**
8504         * 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.
8505         */
8506        IMMUNIZATIONRECOMMENDATION, 
8507        /**
8508         * A set of rules of 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.
8509         */
8510        IMPLEMENTATIONGUIDE, 
8511        /**
8512         * The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.
8513         */
8514        LIBRARY, 
8515        /**
8516         * Identifies two or more records (resource instances) that are referring to the same real-world "occurrence".
8517         */
8518        LINKAGE, 
8519        /**
8520         * A set of information summarized from a list of other resources.
8521         */
8522        LIST, 
8523        /**
8524         * Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.
8525         */
8526        LOCATION, 
8527        /**
8528         * The Measure resource provides the definition of a quality measure.
8529         */
8530        MEASURE, 
8531        /**
8532         * The MeasureReport resource contains the results of evaluating a measure.
8533         */
8534        MEASUREREPORT, 
8535        /**
8536         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
8537         */
8538        MEDIA, 
8539        /**
8540         * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.
8541         */
8542        MEDICATION, 
8543        /**
8544         * 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.
8545         */
8546        MEDICATIONADMINISTRATION, 
8547        /**
8548         * 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.
8549         */
8550        MEDICATIONDISPENSE, 
8551        /**
8552         * An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.
8553         */
8554        MEDICATIONREQUEST, 
8555        /**
8556         * A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains 
8557
8558The 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.
8559         */
8560        MEDICATIONSTATEMENT, 
8561        /**
8562         * Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.
8563         */
8564        MESSAGEDEFINITION, 
8565        /**
8566         * 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.
8567         */
8568        MESSAGEHEADER, 
8569        /**
8570         * 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.
8571         */
8572        NAMINGSYSTEM, 
8573        /**
8574         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
8575         */
8576        NUTRITIONORDER, 
8577        /**
8578         * Measurements and simple assertions made about a patient, device or other subject.
8579         */
8580        OBSERVATION, 
8581        /**
8582         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
8583         */
8584        OPERATIONDEFINITION, 
8585        /**
8586         * A collection of error, warning or information messages that result from a system action.
8587         */
8588        OPERATIONOUTCOME, 
8589        /**
8590         * 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.
8591         */
8592        ORGANIZATION, 
8593        /**
8594         * 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.
8595         */
8596        PARAMETERS, 
8597        /**
8598         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
8599         */
8600        PATIENT, 
8601        /**
8602         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
8603         */
8604        PAYMENTNOTICE, 
8605        /**
8606         * This resource provides payment details and claim references supporting a bulk payment.
8607         */
8608        PAYMENTRECONCILIATION, 
8609        /**
8610         * Demographics and administrative information about a person independent of a specific health-related context.
8611         */
8612        PERSON, 
8613        /**
8614         * This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.
8615         */
8616        PLANDEFINITION, 
8617        /**
8618         * A person who is directly or indirectly involved in the provisioning of healthcare.
8619         */
8620        PRACTITIONER, 
8621        /**
8622         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
8623         */
8624        PRACTITIONERROLE, 
8625        /**
8626         * 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.
8627         */
8628        PROCEDURE, 
8629        /**
8630         * A record of a request for diagnostic investigations, treatments, or operations to be performed.
8631         */
8632        PROCEDUREREQUEST, 
8633        /**
8634         * 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.
8635         */
8636        PROCESSREQUEST, 
8637        /**
8638         * This resource provides processing status, errors and notes from the processing of a resource.
8639         */
8640        PROCESSRESPONSE, 
8641        /**
8642         * 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.
8643         */
8644        PROVENANCE, 
8645        /**
8646         * A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.
8647         */
8648        QUESTIONNAIRE, 
8649        /**
8650         * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.
8651         */
8652        QUESTIONNAIRERESPONSE, 
8653        /**
8654         * 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.
8655         */
8656        REFERRALREQUEST, 
8657        /**
8658         * 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.
8659         */
8660        RELATEDPERSON, 
8661        /**
8662         * A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one".
8663         */
8664        REQUESTGROUP, 
8665        /**
8666         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
8667         */
8668        RESEARCHSTUDY, 
8669        /**
8670         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
8671         */
8672        RESEARCHSUBJECT, 
8673        /**
8674         * This is the base resource type for everything.
8675         */
8676        RESOURCE, 
8677        /**
8678         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
8679         */
8680        RISKASSESSMENT, 
8681        /**
8682         * A container for slots of time that may be available for booking appointments.
8683         */
8684        SCHEDULE, 
8685        /**
8686         * A search parameter that defines a named search item that can be used to search/filter on a resource.
8687         */
8688        SEARCHPARAMETER, 
8689        /**
8690         * Raw data describing a biological sequence.
8691         */
8692        SEQUENCE, 
8693        /**
8694         * The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.
8695         */
8696        SERVICEDEFINITION, 
8697        /**
8698         * A slot of time on a schedule that may be available for booking appointments.
8699         */
8700        SLOT, 
8701        /**
8702         * A sample to be used for analysis.
8703         */
8704        SPECIMEN, 
8705        /**
8706         * 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.
8707         */
8708        STRUCTUREDEFINITION, 
8709        /**
8710         * A Map of relationships between 2 structures that can be used to transform data.
8711         */
8712        STRUCTUREMAP, 
8713        /**
8714         * 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.
8715         */
8716        SUBSCRIPTION, 
8717        /**
8718         * A homogeneous material with a definite composition.
8719         */
8720        SUBSTANCE, 
8721        /**
8722         * Record of delivery of what is supplied.
8723         */
8724        SUPPLYDELIVERY, 
8725        /**
8726         * A record of a request for a medication, substance or device used in the healthcare setting.
8727         */
8728        SUPPLYREQUEST, 
8729        /**
8730         * A task to be performed.
8731         */
8732        TASK, 
8733        /**
8734         * A summary of information based on the results of executing a TestScript.
8735         */
8736        TESTREPORT, 
8737        /**
8738         * A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification.
8739         */
8740        TESTSCRIPT, 
8741        /**
8742         * A value set specifies a set of codes drawn from one or more code systems.
8743         */
8744        VALUESET, 
8745        /**
8746         * An authorization for the supply of glasses and/or contact lenses to a patient.
8747         */
8748        VISIONPRESCRIPTION, 
8749        /**
8750         * added to help the parsers
8751         */
8752        NULL;
8753        public static ResourceType fromCode(String codeString) throws FHIRException {
8754            if (codeString == null || "".equals(codeString))
8755                return null;
8756        if ("Account".equals(codeString))
8757          return ACCOUNT;
8758        if ("ActivityDefinition".equals(codeString))
8759          return ACTIVITYDEFINITION;
8760        if ("AdverseEvent".equals(codeString))
8761          return ADVERSEEVENT;
8762        if ("AllergyIntolerance".equals(codeString))
8763          return ALLERGYINTOLERANCE;
8764        if ("Appointment".equals(codeString))
8765          return APPOINTMENT;
8766        if ("AppointmentResponse".equals(codeString))
8767          return APPOINTMENTRESPONSE;
8768        if ("AuditEvent".equals(codeString))
8769          return AUDITEVENT;
8770        if ("Basic".equals(codeString))
8771          return BASIC;
8772        if ("Binary".equals(codeString))
8773          return BINARY;
8774        if ("BodySite".equals(codeString))
8775          return BODYSITE;
8776        if ("Bundle".equals(codeString))
8777          return BUNDLE;
8778        if ("CapabilityStatement".equals(codeString))
8779          return CAPABILITYSTATEMENT;
8780        if ("CarePlan".equals(codeString))
8781          return CAREPLAN;
8782        if ("CareTeam".equals(codeString))
8783          return CARETEAM;
8784        if ("ChargeItem".equals(codeString))
8785          return CHARGEITEM;
8786        if ("Claim".equals(codeString))
8787          return CLAIM;
8788        if ("ClaimResponse".equals(codeString))
8789          return CLAIMRESPONSE;
8790        if ("ClinicalImpression".equals(codeString))
8791          return CLINICALIMPRESSION;
8792        if ("CodeSystem".equals(codeString))
8793          return CODESYSTEM;
8794        if ("Communication".equals(codeString))
8795          return COMMUNICATION;
8796        if ("CommunicationRequest".equals(codeString))
8797          return COMMUNICATIONREQUEST;
8798        if ("CompartmentDefinition".equals(codeString))
8799          return COMPARTMENTDEFINITION;
8800        if ("Composition".equals(codeString))
8801          return COMPOSITION;
8802        if ("ConceptMap".equals(codeString))
8803          return CONCEPTMAP;
8804        if ("Condition".equals(codeString))
8805          return CONDITION;
8806        if ("Consent".equals(codeString))
8807          return CONSENT;
8808        if ("Contract".equals(codeString))
8809          return CONTRACT;
8810        if ("Coverage".equals(codeString))
8811          return COVERAGE;
8812        if ("DataElement".equals(codeString))
8813          return DATAELEMENT;
8814        if ("DetectedIssue".equals(codeString))
8815          return DETECTEDISSUE;
8816        if ("Device".equals(codeString))
8817          return DEVICE;
8818        if ("DeviceComponent".equals(codeString))
8819          return DEVICECOMPONENT;
8820        if ("DeviceMetric".equals(codeString))
8821          return DEVICEMETRIC;
8822        if ("DeviceRequest".equals(codeString))
8823          return DEVICEREQUEST;
8824        if ("DeviceUseStatement".equals(codeString))
8825          return DEVICEUSESTATEMENT;
8826        if ("DiagnosticReport".equals(codeString))
8827          return DIAGNOSTICREPORT;
8828        if ("DocumentManifest".equals(codeString))
8829          return DOCUMENTMANIFEST;
8830        if ("DocumentReference".equals(codeString))
8831          return DOCUMENTREFERENCE;
8832        if ("DomainResource".equals(codeString))
8833          return DOMAINRESOURCE;
8834        if ("EligibilityRequest".equals(codeString))
8835          return ELIGIBILITYREQUEST;
8836        if ("EligibilityResponse".equals(codeString))
8837          return ELIGIBILITYRESPONSE;
8838        if ("Encounter".equals(codeString))
8839          return ENCOUNTER;
8840        if ("Endpoint".equals(codeString))
8841          return ENDPOINT;
8842        if ("EnrollmentRequest".equals(codeString))
8843          return ENROLLMENTREQUEST;
8844        if ("EnrollmentResponse".equals(codeString))
8845          return ENROLLMENTRESPONSE;
8846        if ("EpisodeOfCare".equals(codeString))
8847          return EPISODEOFCARE;
8848        if ("ExpansionProfile".equals(codeString))
8849          return EXPANSIONPROFILE;
8850        if ("ExplanationOfBenefit".equals(codeString))
8851          return EXPLANATIONOFBENEFIT;
8852        if ("FamilyMemberHistory".equals(codeString))
8853          return FAMILYMEMBERHISTORY;
8854        if ("Flag".equals(codeString))
8855          return FLAG;
8856        if ("Goal".equals(codeString))
8857          return GOAL;
8858        if ("GraphDefinition".equals(codeString))
8859          return GRAPHDEFINITION;
8860        if ("Group".equals(codeString))
8861          return GROUP;
8862        if ("GuidanceResponse".equals(codeString))
8863          return GUIDANCERESPONSE;
8864        if ("HealthcareService".equals(codeString))
8865          return HEALTHCARESERVICE;
8866        if ("ImagingManifest".equals(codeString))
8867          return IMAGINGMANIFEST;
8868        if ("ImagingStudy".equals(codeString))
8869          return IMAGINGSTUDY;
8870        if ("Immunization".equals(codeString))
8871          return IMMUNIZATION;
8872        if ("ImmunizationRecommendation".equals(codeString))
8873          return IMMUNIZATIONRECOMMENDATION;
8874        if ("ImplementationGuide".equals(codeString))
8875          return IMPLEMENTATIONGUIDE;
8876        if ("Library".equals(codeString))
8877          return LIBRARY;
8878        if ("Linkage".equals(codeString))
8879          return LINKAGE;
8880        if ("List".equals(codeString))
8881          return LIST;
8882        if ("Location".equals(codeString))
8883          return LOCATION;
8884        if ("Measure".equals(codeString))
8885          return MEASURE;
8886        if ("MeasureReport".equals(codeString))
8887          return MEASUREREPORT;
8888        if ("Media".equals(codeString))
8889          return MEDIA;
8890        if ("Medication".equals(codeString))
8891          return MEDICATION;
8892        if ("MedicationAdministration".equals(codeString))
8893          return MEDICATIONADMINISTRATION;
8894        if ("MedicationDispense".equals(codeString))
8895          return MEDICATIONDISPENSE;
8896        if ("MedicationRequest".equals(codeString))
8897          return MEDICATIONREQUEST;
8898        if ("MedicationStatement".equals(codeString))
8899          return MEDICATIONSTATEMENT;
8900        if ("MessageDefinition".equals(codeString))
8901          return MESSAGEDEFINITION;
8902        if ("MessageHeader".equals(codeString))
8903          return MESSAGEHEADER;
8904        if ("NamingSystem".equals(codeString))
8905          return NAMINGSYSTEM;
8906        if ("NutritionOrder".equals(codeString))
8907          return NUTRITIONORDER;
8908        if ("Observation".equals(codeString))
8909          return OBSERVATION;
8910        if ("OperationDefinition".equals(codeString))
8911          return OPERATIONDEFINITION;
8912        if ("OperationOutcome".equals(codeString))
8913          return OPERATIONOUTCOME;
8914        if ("Organization".equals(codeString))
8915          return ORGANIZATION;
8916        if ("Parameters".equals(codeString))
8917          return PARAMETERS;
8918        if ("Patient".equals(codeString))
8919          return PATIENT;
8920        if ("PaymentNotice".equals(codeString))
8921          return PAYMENTNOTICE;
8922        if ("PaymentReconciliation".equals(codeString))
8923          return PAYMENTRECONCILIATION;
8924        if ("Person".equals(codeString))
8925          return PERSON;
8926        if ("PlanDefinition".equals(codeString))
8927          return PLANDEFINITION;
8928        if ("Practitioner".equals(codeString))
8929          return PRACTITIONER;
8930        if ("PractitionerRole".equals(codeString))
8931          return PRACTITIONERROLE;
8932        if ("Procedure".equals(codeString))
8933          return PROCEDURE;
8934        if ("ProcedureRequest".equals(codeString))
8935          return PROCEDUREREQUEST;
8936        if ("ProcessRequest".equals(codeString))
8937          return PROCESSREQUEST;
8938        if ("ProcessResponse".equals(codeString))
8939          return PROCESSRESPONSE;
8940        if ("Provenance".equals(codeString))
8941          return PROVENANCE;
8942        if ("Questionnaire".equals(codeString))
8943          return QUESTIONNAIRE;
8944        if ("QuestionnaireResponse".equals(codeString))
8945          return QUESTIONNAIRERESPONSE;
8946        if ("ReferralRequest".equals(codeString))
8947          return REFERRALREQUEST;
8948        if ("RelatedPerson".equals(codeString))
8949          return RELATEDPERSON;
8950        if ("RequestGroup".equals(codeString))
8951          return REQUESTGROUP;
8952        if ("ResearchStudy".equals(codeString))
8953          return RESEARCHSTUDY;
8954        if ("ResearchSubject".equals(codeString))
8955          return RESEARCHSUBJECT;
8956        if ("Resource".equals(codeString))
8957          return RESOURCE;
8958        if ("RiskAssessment".equals(codeString))
8959          return RISKASSESSMENT;
8960        if ("Schedule".equals(codeString))
8961          return SCHEDULE;
8962        if ("SearchParameter".equals(codeString))
8963          return SEARCHPARAMETER;
8964        if ("Sequence".equals(codeString))
8965          return SEQUENCE;
8966        if ("ServiceDefinition".equals(codeString))
8967          return SERVICEDEFINITION;
8968        if ("Slot".equals(codeString))
8969          return SLOT;
8970        if ("Specimen".equals(codeString))
8971          return SPECIMEN;
8972        if ("StructureDefinition".equals(codeString))
8973          return STRUCTUREDEFINITION;
8974        if ("StructureMap".equals(codeString))
8975          return STRUCTUREMAP;
8976        if ("Subscription".equals(codeString))
8977          return SUBSCRIPTION;
8978        if ("Substance".equals(codeString))
8979          return SUBSTANCE;
8980        if ("SupplyDelivery".equals(codeString))
8981          return SUPPLYDELIVERY;
8982        if ("SupplyRequest".equals(codeString))
8983          return SUPPLYREQUEST;
8984        if ("Task".equals(codeString))
8985          return TASK;
8986        if ("TestReport".equals(codeString))
8987          return TESTREPORT;
8988        if ("TestScript".equals(codeString))
8989          return TESTSCRIPT;
8990        if ("ValueSet".equals(codeString))
8991          return VALUESET;
8992        if ("VisionPrescription".equals(codeString))
8993          return VISIONPRESCRIPTION;
8994        throw new FHIRException("Unknown ResourceType code '"+codeString+"'");
8995        }
8996        public String toCode() {
8997          switch (this) {
8998            case ACCOUNT: return "Account";
8999            case ACTIVITYDEFINITION: return "ActivityDefinition";
9000            case ADVERSEEVENT: return "AdverseEvent";
9001            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
9002            case APPOINTMENT: return "Appointment";
9003            case APPOINTMENTRESPONSE: return "AppointmentResponse";
9004            case AUDITEVENT: return "AuditEvent";
9005            case BASIC: return "Basic";
9006            case BINARY: return "Binary";
9007            case BODYSITE: return "BodySite";
9008            case BUNDLE: return "Bundle";
9009            case CAPABILITYSTATEMENT: return "CapabilityStatement";
9010            case CAREPLAN: return "CarePlan";
9011            case CARETEAM: return "CareTeam";
9012            case CHARGEITEM: return "ChargeItem";
9013            case CLAIM: return "Claim";
9014            case CLAIMRESPONSE: return "ClaimResponse";
9015            case CLINICALIMPRESSION: return "ClinicalImpression";
9016            case CODESYSTEM: return "CodeSystem";
9017            case COMMUNICATION: return "Communication";
9018            case COMMUNICATIONREQUEST: return "CommunicationRequest";
9019            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
9020            case COMPOSITION: return "Composition";
9021            case CONCEPTMAP: return "ConceptMap";
9022            case CONDITION: return "Condition";
9023            case CONSENT: return "Consent";
9024            case CONTRACT: return "Contract";
9025            case COVERAGE: return "Coverage";
9026            case DATAELEMENT: return "DataElement";
9027            case DETECTEDISSUE: return "DetectedIssue";
9028            case DEVICE: return "Device";
9029            case DEVICECOMPONENT: return "DeviceComponent";
9030            case DEVICEMETRIC: return "DeviceMetric";
9031            case DEVICEREQUEST: return "DeviceRequest";
9032            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
9033            case DIAGNOSTICREPORT: return "DiagnosticReport";
9034            case DOCUMENTMANIFEST: return "DocumentManifest";
9035            case DOCUMENTREFERENCE: return "DocumentReference";
9036            case DOMAINRESOURCE: return "DomainResource";
9037            case ELIGIBILITYREQUEST: return "EligibilityRequest";
9038            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
9039            case ENCOUNTER: return "Encounter";
9040            case ENDPOINT: return "Endpoint";
9041            case ENROLLMENTREQUEST: return "EnrollmentRequest";
9042            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
9043            case EPISODEOFCARE: return "EpisodeOfCare";
9044            case EXPANSIONPROFILE: return "ExpansionProfile";
9045            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
9046            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
9047            case FLAG: return "Flag";
9048            case GOAL: return "Goal";
9049            case GRAPHDEFINITION: return "GraphDefinition";
9050            case GROUP: return "Group";
9051            case GUIDANCERESPONSE: return "GuidanceResponse";
9052            case HEALTHCARESERVICE: return "HealthcareService";
9053            case IMAGINGMANIFEST: return "ImagingManifest";
9054            case IMAGINGSTUDY: return "ImagingStudy";
9055            case IMMUNIZATION: return "Immunization";
9056            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
9057            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
9058            case LIBRARY: return "Library";
9059            case LINKAGE: return "Linkage";
9060            case LIST: return "List";
9061            case LOCATION: return "Location";
9062            case MEASURE: return "Measure";
9063            case MEASUREREPORT: return "MeasureReport";
9064            case MEDIA: return "Media";
9065            case MEDICATION: return "Medication";
9066            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
9067            case MEDICATIONDISPENSE: return "MedicationDispense";
9068            case MEDICATIONREQUEST: return "MedicationRequest";
9069            case MEDICATIONSTATEMENT: return "MedicationStatement";
9070            case MESSAGEDEFINITION: return "MessageDefinition";
9071            case MESSAGEHEADER: return "MessageHeader";
9072            case NAMINGSYSTEM: return "NamingSystem";
9073            case NUTRITIONORDER: return "NutritionOrder";
9074            case OBSERVATION: return "Observation";
9075            case OPERATIONDEFINITION: return "OperationDefinition";
9076            case OPERATIONOUTCOME: return "OperationOutcome";
9077            case ORGANIZATION: return "Organization";
9078            case PARAMETERS: return "Parameters";
9079            case PATIENT: return "Patient";
9080            case PAYMENTNOTICE: return "PaymentNotice";
9081            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
9082            case PERSON: return "Person";
9083            case PLANDEFINITION: return "PlanDefinition";
9084            case PRACTITIONER: return "Practitioner";
9085            case PRACTITIONERROLE: return "PractitionerRole";
9086            case PROCEDURE: return "Procedure";
9087            case PROCEDUREREQUEST: return "ProcedureRequest";
9088            case PROCESSREQUEST: return "ProcessRequest";
9089            case PROCESSRESPONSE: return "ProcessResponse";
9090            case PROVENANCE: return "Provenance";
9091            case QUESTIONNAIRE: return "Questionnaire";
9092            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
9093            case REFERRALREQUEST: return "ReferralRequest";
9094            case RELATEDPERSON: return "RelatedPerson";
9095            case REQUESTGROUP: return "RequestGroup";
9096            case RESEARCHSTUDY: return "ResearchStudy";
9097            case RESEARCHSUBJECT: return "ResearchSubject";
9098            case RESOURCE: return "Resource";
9099            case RISKASSESSMENT: return "RiskAssessment";
9100            case SCHEDULE: return "Schedule";
9101            case SEARCHPARAMETER: return "SearchParameter";
9102            case SEQUENCE: return "Sequence";
9103            case SERVICEDEFINITION: return "ServiceDefinition";
9104            case SLOT: return "Slot";
9105            case SPECIMEN: return "Specimen";
9106            case STRUCTUREDEFINITION: return "StructureDefinition";
9107            case STRUCTUREMAP: return "StructureMap";
9108            case SUBSCRIPTION: return "Subscription";
9109            case SUBSTANCE: return "Substance";
9110            case SUPPLYDELIVERY: return "SupplyDelivery";
9111            case SUPPLYREQUEST: return "SupplyRequest";
9112            case TASK: return "Task";
9113            case TESTREPORT: return "TestReport";
9114            case TESTSCRIPT: return "TestScript";
9115            case VALUESET: return "ValueSet";
9116            case VISIONPRESCRIPTION: return "VisionPrescription";
9117            default: return "?";
9118          }
9119        }
9120        public String getSystem() {
9121          switch (this) {
9122            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
9123            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
9124            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
9125            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
9126            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
9127            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
9128            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
9129            case BASIC: return "http://hl7.org/fhir/resource-types";
9130            case BINARY: return "http://hl7.org/fhir/resource-types";
9131            case BODYSITE: return "http://hl7.org/fhir/resource-types";
9132            case BUNDLE: return "http://hl7.org/fhir/resource-types";
9133            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
9134            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
9135            case CARETEAM: return "http://hl7.org/fhir/resource-types";
9136            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
9137            case CLAIM: return "http://hl7.org/fhir/resource-types";
9138            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
9139            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
9140            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
9141            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
9142            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
9143            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
9144            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
9145            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
9146            case CONDITION: return "http://hl7.org/fhir/resource-types";
9147            case CONSENT: return "http://hl7.org/fhir/resource-types";
9148            case CONTRACT: return "http://hl7.org/fhir/resource-types";
9149            case COVERAGE: return "http://hl7.org/fhir/resource-types";
9150            case DATAELEMENT: return "http://hl7.org/fhir/resource-types";
9151            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
9152            case DEVICE: return "http://hl7.org/fhir/resource-types";
9153            case DEVICECOMPONENT: return "http://hl7.org/fhir/resource-types";
9154            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
9155            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
9156            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types";
9157            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
9158            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
9159            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
9160            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
9161            case ELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
9162            case ELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
9163            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
9164            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
9165            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
9166            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
9167            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
9168            case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types";
9169            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
9170            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
9171            case FLAG: return "http://hl7.org/fhir/resource-types";
9172            case GOAL: return "http://hl7.org/fhir/resource-types";
9173            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
9174            case GROUP: return "http://hl7.org/fhir/resource-types";
9175            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
9176            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
9177            case IMAGINGMANIFEST: return "http://hl7.org/fhir/resource-types";
9178            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
9179            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
9180            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
9181            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
9182            case LIBRARY: return "http://hl7.org/fhir/resource-types";
9183            case LINKAGE: return "http://hl7.org/fhir/resource-types";
9184            case LIST: return "http://hl7.org/fhir/resource-types";
9185            case LOCATION: return "http://hl7.org/fhir/resource-types";
9186            case MEASURE: return "http://hl7.org/fhir/resource-types";
9187            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
9188            case MEDIA: return "http://hl7.org/fhir/resource-types";
9189            case MEDICATION: return "http://hl7.org/fhir/resource-types";
9190            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
9191            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
9192            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
9193            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types";
9194            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
9195            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
9196            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
9197            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
9198            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
9199            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
9200            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
9201            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
9202            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
9203            case PATIENT: return "http://hl7.org/fhir/resource-types";
9204            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
9205            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
9206            case PERSON: return "http://hl7.org/fhir/resource-types";
9207            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
9208            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
9209            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
9210            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
9211            case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types";
9212            case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types";
9213            case PROCESSRESPONSE: return "http://hl7.org/fhir/resource-types";
9214            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
9215            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
9216            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
9217            case REFERRALREQUEST: return "http://hl7.org/fhir/resource-types";
9218            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
9219            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
9220            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
9221            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
9222            case RESOURCE: return "http://hl7.org/fhir/resource-types";
9223            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
9224            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
9225            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
9226            case SEQUENCE: return "http://hl7.org/fhir/resource-types";
9227            case SERVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
9228            case SLOT: return "http://hl7.org/fhir/resource-types";
9229            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
9230            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
9231            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
9232            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
9233            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
9234            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
9235            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
9236            case TASK: return "http://hl7.org/fhir/resource-types";
9237            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
9238            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
9239            case VALUESET: return "http://hl7.org/fhir/resource-types";
9240            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
9241            default: return "?";
9242          }
9243        }
9244        public String getDefinition() {
9245          switch (this) {
9246            case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.";
9247            case ACTIVITYDEFINITION: return "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.";
9248            case ADVERSEEVENT: return "Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.";
9249            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
9250            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).";
9251            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
9252            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.";
9253            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.";
9254            case BINARY: return "A binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
9255            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.";
9256            case BUNDLE: return "A container for a collection of resources.";
9257            case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
9258            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.";
9259            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.";
9260            case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.";
9261            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.";
9262            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
9263            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.";
9264            case CODESYSTEM: return "A code system resource specifies a set of codes drawn from one or more code systems.";
9265            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.";
9266            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.";
9267            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
9268            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.";
9269            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.";
9270            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
9271            case CONSENT: return "A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.";
9272            case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters.";
9273            case COVERAGE: return "Financial instrument which may be used to reimburse or pay for health care products and services.";
9274            case DATAELEMENT: return "The formal description of a single piece of information that can be gathered and reported.";
9275            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.";
9276            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 include 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.";
9277            case DEVICECOMPONENT: return "The characteristics, operational status and capabilities of a medical-related component of a medical device.";
9278            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
9279            case DEVICEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.";
9280            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.";
9281            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.";
9282            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
9283            case DOCUMENTREFERENCE: return "A reference to a document.";
9284            case DOMAINRESOURCE: return "A resource that includes narrative, extensions, and contained resources.";
9285            case ELIGIBILITYREQUEST: return "The EligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an EligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.";
9286            case ELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an Eligibility resource.";
9287            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.";
9288            case ENDPOINT: return "The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.";
9289            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
9290            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource.";
9291            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.";
9292            case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet.";
9293            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.";
9294            case FAMILYMEMBERHISTORY: return "Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.";
9295            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
9296            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.";
9297            case GRAPHDEFINITION: return "A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.";
9298            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.";
9299            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.";
9300            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
9301            case IMAGINGMANIFEST: return "A text description of the DICOM SOP instances selected in the ImagingManifest; or the reason for, or significance of, the selection.";
9302            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.";
9303            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.";
9304            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.";
9305            case IMPLEMENTATIONGUIDE: return "A set of rules of 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.";
9306            case LIBRARY: return "The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.";
9307            case LINKAGE: return "Identifies two or more records (resource instances) that are referring to the same real-world \"occurrence\".";
9308            case LIST: return "A set of information summarized from a list of other resources.";
9309            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.";
9310            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
9311            case MEASUREREPORT: return "The MeasureReport resource contains the results of evaluating a measure.";
9312            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.";
9313            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.";
9314            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.";
9315            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.";
9316            case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.";
9317            case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains \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.";
9318            case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.";
9319            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.";
9320            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.";
9321            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
9322            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
9323            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
9324            case OPERATIONOUTCOME: return "A collection of error, warning or information messages that result from a system action.";
9325            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.";
9326            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.";
9327            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
9328            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
9329            case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment.";
9330            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
9331            case PLANDEFINITION: return "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.";
9332            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
9333            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
9334            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.";
9335            case PROCEDUREREQUEST: return "A record of a request for diagnostic investigations, treatments, or operations to be performed.";
9336            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.";
9337            case PROCESSRESPONSE: return "This resource provides processing status, errors and notes from the processing of a resource.";
9338            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.";
9339            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.";
9340            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.";
9341            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.";
9342            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.";
9343            case REQUESTGROUP: return "A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\".";
9344            case RESEARCHSTUDY: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
9345            case RESEARCHSUBJECT: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
9346            case RESOURCE: return "This is the base resource type for everything.";
9347            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
9348            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
9349            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
9350            case SEQUENCE: return "Raw data describing a biological sequence.";
9351            case SERVICEDEFINITION: return "The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.";
9352            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
9353            case SPECIMEN: return "A sample to be used for analysis.";
9354            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.";
9355            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
9356            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.";
9357            case SUBSTANCE: return "A homogeneous material with a definite composition.";
9358            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
9359            case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting.";
9360            case TASK: return "A task to be performed.";
9361            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
9362            case TESTSCRIPT: return "A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification.";
9363            case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems.";
9364            case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient.";
9365            default: return "?";
9366          }
9367        }
9368        public String getDisplay() {
9369          switch (this) {
9370            case ACCOUNT: return "Account";
9371            case ACTIVITYDEFINITION: return "ActivityDefinition";
9372            case ADVERSEEVENT: return "AdverseEvent";
9373            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
9374            case APPOINTMENT: return "Appointment";
9375            case APPOINTMENTRESPONSE: return "AppointmentResponse";
9376            case AUDITEVENT: return "AuditEvent";
9377            case BASIC: return "Basic";
9378            case BINARY: return "Binary";
9379            case BODYSITE: return "BodySite";
9380            case BUNDLE: return "Bundle";
9381            case CAPABILITYSTATEMENT: return "CapabilityStatement";
9382            case CAREPLAN: return "CarePlan";
9383            case CARETEAM: return "CareTeam";
9384            case CHARGEITEM: return "ChargeItem";
9385            case CLAIM: return "Claim";
9386            case CLAIMRESPONSE: return "ClaimResponse";
9387            case CLINICALIMPRESSION: return "ClinicalImpression";
9388            case CODESYSTEM: return "CodeSystem";
9389            case COMMUNICATION: return "Communication";
9390            case COMMUNICATIONREQUEST: return "CommunicationRequest";
9391            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
9392            case COMPOSITION: return "Composition";
9393            case CONCEPTMAP: return "ConceptMap";
9394            case CONDITION: return "Condition";
9395            case CONSENT: return "Consent";
9396            case CONTRACT: return "Contract";
9397            case COVERAGE: return "Coverage";
9398            case DATAELEMENT: return "DataElement";
9399            case DETECTEDISSUE: return "DetectedIssue";
9400            case DEVICE: return "Device";
9401            case DEVICECOMPONENT: return "DeviceComponent";
9402            case DEVICEMETRIC: return "DeviceMetric";
9403            case DEVICEREQUEST: return "DeviceRequest";
9404            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
9405            case DIAGNOSTICREPORT: return "DiagnosticReport";
9406            case DOCUMENTMANIFEST: return "DocumentManifest";
9407            case DOCUMENTREFERENCE: return "DocumentReference";
9408            case DOMAINRESOURCE: return "DomainResource";
9409            case ELIGIBILITYREQUEST: return "EligibilityRequest";
9410            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
9411            case ENCOUNTER: return "Encounter";
9412            case ENDPOINT: return "Endpoint";
9413            case ENROLLMENTREQUEST: return "EnrollmentRequest";
9414            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
9415            case EPISODEOFCARE: return "EpisodeOfCare";
9416            case EXPANSIONPROFILE: return "ExpansionProfile";
9417            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
9418            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
9419            case FLAG: return "Flag";
9420            case GOAL: return "Goal";
9421            case GRAPHDEFINITION: return "GraphDefinition";
9422            case GROUP: return "Group";
9423            case GUIDANCERESPONSE: return "GuidanceResponse";
9424            case HEALTHCARESERVICE: return "HealthcareService";
9425            case IMAGINGMANIFEST: return "ImagingManifest";
9426            case IMAGINGSTUDY: return "ImagingStudy";
9427            case IMMUNIZATION: return "Immunization";
9428            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
9429            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
9430            case LIBRARY: return "Library";
9431            case LINKAGE: return "Linkage";
9432            case LIST: return "List";
9433            case LOCATION: return "Location";
9434            case MEASURE: return "Measure";
9435            case MEASUREREPORT: return "MeasureReport";
9436            case MEDIA: return "Media";
9437            case MEDICATION: return "Medication";
9438            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
9439            case MEDICATIONDISPENSE: return "MedicationDispense";
9440            case MEDICATIONREQUEST: return "MedicationRequest";
9441            case MEDICATIONSTATEMENT: return "MedicationStatement";
9442            case MESSAGEDEFINITION: return "MessageDefinition";
9443            case MESSAGEHEADER: return "MessageHeader";
9444            case NAMINGSYSTEM: return "NamingSystem";
9445            case NUTRITIONORDER: return "NutritionOrder";
9446            case OBSERVATION: return "Observation";
9447            case OPERATIONDEFINITION: return "OperationDefinition";
9448            case OPERATIONOUTCOME: return "OperationOutcome";
9449            case ORGANIZATION: return "Organization";
9450            case PARAMETERS: return "Parameters";
9451            case PATIENT: return "Patient";
9452            case PAYMENTNOTICE: return "PaymentNotice";
9453            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
9454            case PERSON: return "Person";
9455            case PLANDEFINITION: return "PlanDefinition";
9456            case PRACTITIONER: return "Practitioner";
9457            case PRACTITIONERROLE: return "PractitionerRole";
9458            case PROCEDURE: return "Procedure";
9459            case PROCEDUREREQUEST: return "ProcedureRequest";
9460            case PROCESSREQUEST: return "ProcessRequest";
9461            case PROCESSRESPONSE: return "ProcessResponse";
9462            case PROVENANCE: return "Provenance";
9463            case QUESTIONNAIRE: return "Questionnaire";
9464            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
9465            case REFERRALREQUEST: return "ReferralRequest";
9466            case RELATEDPERSON: return "RelatedPerson";
9467            case REQUESTGROUP: return "RequestGroup";
9468            case RESEARCHSTUDY: return "ResearchStudy";
9469            case RESEARCHSUBJECT: return "ResearchSubject";
9470            case RESOURCE: return "Resource";
9471            case RISKASSESSMENT: return "RiskAssessment";
9472            case SCHEDULE: return "Schedule";
9473            case SEARCHPARAMETER: return "SearchParameter";
9474            case SEQUENCE: return "Sequence";
9475            case SERVICEDEFINITION: return "ServiceDefinition";
9476            case SLOT: return "Slot";
9477            case SPECIMEN: return "Specimen";
9478            case STRUCTUREDEFINITION: return "StructureDefinition";
9479            case STRUCTUREMAP: return "StructureMap";
9480            case SUBSCRIPTION: return "Subscription";
9481            case SUBSTANCE: return "Substance";
9482            case SUPPLYDELIVERY: return "SupplyDelivery";
9483            case SUPPLYREQUEST: return "SupplyRequest";
9484            case TASK: return "Task";
9485            case TESTREPORT: return "TestReport";
9486            case TESTSCRIPT: return "TestScript";
9487            case VALUESET: return "ValueSet";
9488            case VISIONPRESCRIPTION: return "VisionPrescription";
9489            default: return "?";
9490          }
9491        }
9492    }
9493
9494  public static class ResourceTypeEnumFactory implements EnumFactory<ResourceType> {
9495    public ResourceType fromCode(String codeString) throws IllegalArgumentException {
9496      if (codeString == null || "".equals(codeString))
9497            if (codeString == null || "".equals(codeString))
9498                return null;
9499        if ("Account".equals(codeString))
9500          return ResourceType.ACCOUNT;
9501        if ("ActivityDefinition".equals(codeString))
9502          return ResourceType.ACTIVITYDEFINITION;
9503        if ("AdverseEvent".equals(codeString))
9504          return ResourceType.ADVERSEEVENT;
9505        if ("AllergyIntolerance".equals(codeString))
9506          return ResourceType.ALLERGYINTOLERANCE;
9507        if ("Appointment".equals(codeString))
9508          return ResourceType.APPOINTMENT;
9509        if ("AppointmentResponse".equals(codeString))
9510          return ResourceType.APPOINTMENTRESPONSE;
9511        if ("AuditEvent".equals(codeString))
9512          return ResourceType.AUDITEVENT;
9513        if ("Basic".equals(codeString))
9514          return ResourceType.BASIC;
9515        if ("Binary".equals(codeString))
9516          return ResourceType.BINARY;
9517        if ("BodySite".equals(codeString))
9518          return ResourceType.BODYSITE;
9519        if ("Bundle".equals(codeString))
9520          return ResourceType.BUNDLE;
9521        if ("CapabilityStatement".equals(codeString))
9522          return ResourceType.CAPABILITYSTATEMENT;
9523        if ("CarePlan".equals(codeString))
9524          return ResourceType.CAREPLAN;
9525        if ("CareTeam".equals(codeString))
9526          return ResourceType.CARETEAM;
9527        if ("ChargeItem".equals(codeString))
9528          return ResourceType.CHARGEITEM;
9529        if ("Claim".equals(codeString))
9530          return ResourceType.CLAIM;
9531        if ("ClaimResponse".equals(codeString))
9532          return ResourceType.CLAIMRESPONSE;
9533        if ("ClinicalImpression".equals(codeString))
9534          return ResourceType.CLINICALIMPRESSION;
9535        if ("CodeSystem".equals(codeString))
9536          return ResourceType.CODESYSTEM;
9537        if ("Communication".equals(codeString))
9538          return ResourceType.COMMUNICATION;
9539        if ("CommunicationRequest".equals(codeString))
9540          return ResourceType.COMMUNICATIONREQUEST;
9541        if ("CompartmentDefinition".equals(codeString))
9542          return ResourceType.COMPARTMENTDEFINITION;
9543        if ("Composition".equals(codeString))
9544          return ResourceType.COMPOSITION;
9545        if ("ConceptMap".equals(codeString))
9546          return ResourceType.CONCEPTMAP;
9547        if ("Condition".equals(codeString))
9548          return ResourceType.CONDITION;
9549        if ("Consent".equals(codeString))
9550          return ResourceType.CONSENT;
9551        if ("Contract".equals(codeString))
9552          return ResourceType.CONTRACT;
9553        if ("Coverage".equals(codeString))
9554          return ResourceType.COVERAGE;
9555        if ("DataElement".equals(codeString))
9556          return ResourceType.DATAELEMENT;
9557        if ("DetectedIssue".equals(codeString))
9558          return ResourceType.DETECTEDISSUE;
9559        if ("Device".equals(codeString))
9560          return ResourceType.DEVICE;
9561        if ("DeviceComponent".equals(codeString))
9562          return ResourceType.DEVICECOMPONENT;
9563        if ("DeviceMetric".equals(codeString))
9564          return ResourceType.DEVICEMETRIC;
9565        if ("DeviceRequest".equals(codeString))
9566          return ResourceType.DEVICEREQUEST;
9567        if ("DeviceUseStatement".equals(codeString))
9568          return ResourceType.DEVICEUSESTATEMENT;
9569        if ("DiagnosticReport".equals(codeString))
9570          return ResourceType.DIAGNOSTICREPORT;
9571        if ("DocumentManifest".equals(codeString))
9572          return ResourceType.DOCUMENTMANIFEST;
9573        if ("DocumentReference".equals(codeString))
9574          return ResourceType.DOCUMENTREFERENCE;
9575        if ("DomainResource".equals(codeString))
9576          return ResourceType.DOMAINRESOURCE;
9577        if ("EligibilityRequest".equals(codeString))
9578          return ResourceType.ELIGIBILITYREQUEST;
9579        if ("EligibilityResponse".equals(codeString))
9580          return ResourceType.ELIGIBILITYRESPONSE;
9581        if ("Encounter".equals(codeString))
9582          return ResourceType.ENCOUNTER;
9583        if ("Endpoint".equals(codeString))
9584          return ResourceType.ENDPOINT;
9585        if ("EnrollmentRequest".equals(codeString))
9586          return ResourceType.ENROLLMENTREQUEST;
9587        if ("EnrollmentResponse".equals(codeString))
9588          return ResourceType.ENROLLMENTRESPONSE;
9589        if ("EpisodeOfCare".equals(codeString))
9590          return ResourceType.EPISODEOFCARE;
9591        if ("ExpansionProfile".equals(codeString))
9592          return ResourceType.EXPANSIONPROFILE;
9593        if ("ExplanationOfBenefit".equals(codeString))
9594          return ResourceType.EXPLANATIONOFBENEFIT;
9595        if ("FamilyMemberHistory".equals(codeString))
9596          return ResourceType.FAMILYMEMBERHISTORY;
9597        if ("Flag".equals(codeString))
9598          return ResourceType.FLAG;
9599        if ("Goal".equals(codeString))
9600          return ResourceType.GOAL;
9601        if ("GraphDefinition".equals(codeString))
9602          return ResourceType.GRAPHDEFINITION;
9603        if ("Group".equals(codeString))
9604          return ResourceType.GROUP;
9605        if ("GuidanceResponse".equals(codeString))
9606          return ResourceType.GUIDANCERESPONSE;
9607        if ("HealthcareService".equals(codeString))
9608          return ResourceType.HEALTHCARESERVICE;
9609        if ("ImagingManifest".equals(codeString))
9610          return ResourceType.IMAGINGMANIFEST;
9611        if ("ImagingStudy".equals(codeString))
9612          return ResourceType.IMAGINGSTUDY;
9613        if ("Immunization".equals(codeString))
9614          return ResourceType.IMMUNIZATION;
9615        if ("ImmunizationRecommendation".equals(codeString))
9616          return ResourceType.IMMUNIZATIONRECOMMENDATION;
9617        if ("ImplementationGuide".equals(codeString))
9618          return ResourceType.IMPLEMENTATIONGUIDE;
9619        if ("Library".equals(codeString))
9620          return ResourceType.LIBRARY;
9621        if ("Linkage".equals(codeString))
9622          return ResourceType.LINKAGE;
9623        if ("List".equals(codeString))
9624          return ResourceType.LIST;
9625        if ("Location".equals(codeString))
9626          return ResourceType.LOCATION;
9627        if ("Measure".equals(codeString))
9628          return ResourceType.MEASURE;
9629        if ("MeasureReport".equals(codeString))
9630          return ResourceType.MEASUREREPORT;
9631        if ("Media".equals(codeString))
9632          return ResourceType.MEDIA;
9633        if ("Medication".equals(codeString))
9634          return ResourceType.MEDICATION;
9635        if ("MedicationAdministration".equals(codeString))
9636          return ResourceType.MEDICATIONADMINISTRATION;
9637        if ("MedicationDispense".equals(codeString))
9638          return ResourceType.MEDICATIONDISPENSE;
9639        if ("MedicationRequest".equals(codeString))
9640          return ResourceType.MEDICATIONREQUEST;
9641        if ("MedicationStatement".equals(codeString))
9642          return ResourceType.MEDICATIONSTATEMENT;
9643        if ("MessageDefinition".equals(codeString))
9644          return ResourceType.MESSAGEDEFINITION;
9645        if ("MessageHeader".equals(codeString))
9646          return ResourceType.MESSAGEHEADER;
9647        if ("NamingSystem".equals(codeString))
9648          return ResourceType.NAMINGSYSTEM;
9649        if ("NutritionOrder".equals(codeString))
9650          return ResourceType.NUTRITIONORDER;
9651        if ("Observation".equals(codeString))
9652          return ResourceType.OBSERVATION;
9653        if ("OperationDefinition".equals(codeString))
9654          return ResourceType.OPERATIONDEFINITION;
9655        if ("OperationOutcome".equals(codeString))
9656          return ResourceType.OPERATIONOUTCOME;
9657        if ("Organization".equals(codeString))
9658          return ResourceType.ORGANIZATION;
9659        if ("Parameters".equals(codeString))
9660          return ResourceType.PARAMETERS;
9661        if ("Patient".equals(codeString))
9662          return ResourceType.PATIENT;
9663        if ("PaymentNotice".equals(codeString))
9664          return ResourceType.PAYMENTNOTICE;
9665        if ("PaymentReconciliation".equals(codeString))
9666          return ResourceType.PAYMENTRECONCILIATION;
9667        if ("Person".equals(codeString))
9668          return ResourceType.PERSON;
9669        if ("PlanDefinition".equals(codeString))
9670          return ResourceType.PLANDEFINITION;
9671        if ("Practitioner".equals(codeString))
9672          return ResourceType.PRACTITIONER;
9673        if ("PractitionerRole".equals(codeString))
9674          return ResourceType.PRACTITIONERROLE;
9675        if ("Procedure".equals(codeString))
9676          return ResourceType.PROCEDURE;
9677        if ("ProcedureRequest".equals(codeString))
9678          return ResourceType.PROCEDUREREQUEST;
9679        if ("ProcessRequest".equals(codeString))
9680          return ResourceType.PROCESSREQUEST;
9681        if ("ProcessResponse".equals(codeString))
9682          return ResourceType.PROCESSRESPONSE;
9683        if ("Provenance".equals(codeString))
9684          return ResourceType.PROVENANCE;
9685        if ("Questionnaire".equals(codeString))
9686          return ResourceType.QUESTIONNAIRE;
9687        if ("QuestionnaireResponse".equals(codeString))
9688          return ResourceType.QUESTIONNAIRERESPONSE;
9689        if ("ReferralRequest".equals(codeString))
9690          return ResourceType.REFERRALREQUEST;
9691        if ("RelatedPerson".equals(codeString))
9692          return ResourceType.RELATEDPERSON;
9693        if ("RequestGroup".equals(codeString))
9694          return ResourceType.REQUESTGROUP;
9695        if ("ResearchStudy".equals(codeString))
9696          return ResourceType.RESEARCHSTUDY;
9697        if ("ResearchSubject".equals(codeString))
9698          return ResourceType.RESEARCHSUBJECT;
9699        if ("Resource".equals(codeString))
9700          return ResourceType.RESOURCE;
9701        if ("RiskAssessment".equals(codeString))
9702          return ResourceType.RISKASSESSMENT;
9703        if ("Schedule".equals(codeString))
9704          return ResourceType.SCHEDULE;
9705        if ("SearchParameter".equals(codeString))
9706          return ResourceType.SEARCHPARAMETER;
9707        if ("Sequence".equals(codeString))
9708          return ResourceType.SEQUENCE;
9709        if ("ServiceDefinition".equals(codeString))
9710          return ResourceType.SERVICEDEFINITION;
9711        if ("Slot".equals(codeString))
9712          return ResourceType.SLOT;
9713        if ("Specimen".equals(codeString))
9714          return ResourceType.SPECIMEN;
9715        if ("StructureDefinition".equals(codeString))
9716          return ResourceType.STRUCTUREDEFINITION;
9717        if ("StructureMap".equals(codeString))
9718          return ResourceType.STRUCTUREMAP;
9719        if ("Subscription".equals(codeString))
9720          return ResourceType.SUBSCRIPTION;
9721        if ("Substance".equals(codeString))
9722          return ResourceType.SUBSTANCE;
9723        if ("SupplyDelivery".equals(codeString))
9724          return ResourceType.SUPPLYDELIVERY;
9725        if ("SupplyRequest".equals(codeString))
9726          return ResourceType.SUPPLYREQUEST;
9727        if ("Task".equals(codeString))
9728          return ResourceType.TASK;
9729        if ("TestReport".equals(codeString))
9730          return ResourceType.TESTREPORT;
9731        if ("TestScript".equals(codeString))
9732          return ResourceType.TESTSCRIPT;
9733        if ("ValueSet".equals(codeString))
9734          return ResourceType.VALUESET;
9735        if ("VisionPrescription".equals(codeString))
9736          return ResourceType.VISIONPRESCRIPTION;
9737        throw new IllegalArgumentException("Unknown ResourceType code '"+codeString+"'");
9738        }
9739        public Enumeration<ResourceType> fromType(Base code) throws FHIRException {
9740          if (code == null)
9741            return null;
9742          if (code.isEmpty())
9743            return new Enumeration<ResourceType>(this);
9744          String codeString = ((PrimitiveType) code).asStringValue();
9745          if (codeString == null || "".equals(codeString))
9746            return null;
9747        if ("Account".equals(codeString))
9748          return new Enumeration<ResourceType>(this, ResourceType.ACCOUNT);
9749        if ("ActivityDefinition".equals(codeString))
9750          return new Enumeration<ResourceType>(this, ResourceType.ACTIVITYDEFINITION);
9751        if ("AdverseEvent".equals(codeString))
9752          return new Enumeration<ResourceType>(this, ResourceType.ADVERSEEVENT);
9753        if ("AllergyIntolerance".equals(codeString))
9754          return new Enumeration<ResourceType>(this, ResourceType.ALLERGYINTOLERANCE);
9755        if ("Appointment".equals(codeString))
9756          return new Enumeration<ResourceType>(this, ResourceType.APPOINTMENT);
9757        if ("AppointmentResponse".equals(codeString))
9758          return new Enumeration<ResourceType>(this, ResourceType.APPOINTMENTRESPONSE);
9759        if ("AuditEvent".equals(codeString))
9760          return new Enumeration<ResourceType>(this, ResourceType.AUDITEVENT);
9761        if ("Basic".equals(codeString))
9762          return new Enumeration<ResourceType>(this, ResourceType.BASIC);
9763        if ("Binary".equals(codeString))
9764          return new Enumeration<ResourceType>(this, ResourceType.BINARY);
9765        if ("BodySite".equals(codeString))
9766          return new Enumeration<ResourceType>(this, ResourceType.BODYSITE);
9767        if ("Bundle".equals(codeString))
9768          return new Enumeration<ResourceType>(this, ResourceType.BUNDLE);
9769        if ("CapabilityStatement".equals(codeString))
9770          return new Enumeration<ResourceType>(this, ResourceType.CAPABILITYSTATEMENT);
9771        if ("CarePlan".equals(codeString))
9772          return new Enumeration<ResourceType>(this, ResourceType.CAREPLAN);
9773        if ("CareTeam".equals(codeString))
9774          return new Enumeration<ResourceType>(this, ResourceType.CARETEAM);
9775        if ("ChargeItem".equals(codeString))
9776          return new Enumeration<ResourceType>(this, ResourceType.CHARGEITEM);
9777        if ("Claim".equals(codeString))
9778          return new Enumeration<ResourceType>(this, ResourceType.CLAIM);
9779        if ("ClaimResponse".equals(codeString))
9780          return new Enumeration<ResourceType>(this, ResourceType.CLAIMRESPONSE);
9781        if ("ClinicalImpression".equals(codeString))
9782          return new Enumeration<ResourceType>(this, ResourceType.CLINICALIMPRESSION);
9783        if ("CodeSystem".equals(codeString))
9784          return new Enumeration<ResourceType>(this, ResourceType.CODESYSTEM);
9785        if ("Communication".equals(codeString))
9786          return new Enumeration<ResourceType>(this, ResourceType.COMMUNICATION);
9787        if ("CommunicationRequest".equals(codeString))
9788          return new Enumeration<ResourceType>(this, ResourceType.COMMUNICATIONREQUEST);
9789        if ("CompartmentDefinition".equals(codeString))
9790          return new Enumeration<ResourceType>(this, ResourceType.COMPARTMENTDEFINITION);
9791        if ("Composition".equals(codeString))
9792          return new Enumeration<ResourceType>(this, ResourceType.COMPOSITION);
9793        if ("ConceptMap".equals(codeString))
9794          return new Enumeration<ResourceType>(this, ResourceType.CONCEPTMAP);
9795        if ("Condition".equals(codeString))
9796          return new Enumeration<ResourceType>(this, ResourceType.CONDITION);
9797        if ("Consent".equals(codeString))
9798          return new Enumeration<ResourceType>(this, ResourceType.CONSENT);
9799        if ("Contract".equals(codeString))
9800          return new Enumeration<ResourceType>(this, ResourceType.CONTRACT);
9801        if ("Coverage".equals(codeString))
9802          return new Enumeration<ResourceType>(this, ResourceType.COVERAGE);
9803        if ("DataElement".equals(codeString))
9804          return new Enumeration<ResourceType>(this, ResourceType.DATAELEMENT);
9805        if ("DetectedIssue".equals(codeString))
9806          return new Enumeration<ResourceType>(this, ResourceType.DETECTEDISSUE);
9807        if ("Device".equals(codeString))
9808          return new Enumeration<ResourceType>(this, ResourceType.DEVICE);
9809        if ("DeviceComponent".equals(codeString))
9810          return new Enumeration<ResourceType>(this, ResourceType.DEVICECOMPONENT);
9811        if ("DeviceMetric".equals(codeString))
9812          return new Enumeration<ResourceType>(this, ResourceType.DEVICEMETRIC);
9813        if ("DeviceRequest".equals(codeString))
9814          return new Enumeration<ResourceType>(this, ResourceType.DEVICEREQUEST);
9815        if ("DeviceUseStatement".equals(codeString))
9816          return new Enumeration<ResourceType>(this, ResourceType.DEVICEUSESTATEMENT);
9817        if ("DiagnosticReport".equals(codeString))
9818          return new Enumeration<ResourceType>(this, ResourceType.DIAGNOSTICREPORT);
9819        if ("DocumentManifest".equals(codeString))
9820          return new Enumeration<ResourceType>(this, ResourceType.DOCUMENTMANIFEST);
9821        if ("DocumentReference".equals(codeString))
9822          return new Enumeration<ResourceType>(this, ResourceType.DOCUMENTREFERENCE);
9823        if ("DomainResource".equals(codeString))
9824          return new Enumeration<ResourceType>(this, ResourceType.DOMAINRESOURCE);
9825        if ("EligibilityRequest".equals(codeString))
9826          return new Enumeration<ResourceType>(this, ResourceType.ELIGIBILITYREQUEST);
9827        if ("EligibilityResponse".equals(codeString))
9828          return new Enumeration<ResourceType>(this, ResourceType.ELIGIBILITYRESPONSE);
9829        if ("Encounter".equals(codeString))
9830          return new Enumeration<ResourceType>(this, ResourceType.ENCOUNTER);
9831        if ("Endpoint".equals(codeString))
9832          return new Enumeration<ResourceType>(this, ResourceType.ENDPOINT);
9833        if ("EnrollmentRequest".equals(codeString))
9834          return new Enumeration<ResourceType>(this, ResourceType.ENROLLMENTREQUEST);
9835        if ("EnrollmentResponse".equals(codeString))
9836          return new Enumeration<ResourceType>(this, ResourceType.ENROLLMENTRESPONSE);
9837        if ("EpisodeOfCare".equals(codeString))
9838          return new Enumeration<ResourceType>(this, ResourceType.EPISODEOFCARE);
9839        if ("ExpansionProfile".equals(codeString))
9840          return new Enumeration<ResourceType>(this, ResourceType.EXPANSIONPROFILE);
9841        if ("ExplanationOfBenefit".equals(codeString))
9842          return new Enumeration<ResourceType>(this, ResourceType.EXPLANATIONOFBENEFIT);
9843        if ("FamilyMemberHistory".equals(codeString))
9844          return new Enumeration<ResourceType>(this, ResourceType.FAMILYMEMBERHISTORY);
9845        if ("Flag".equals(codeString))
9846          return new Enumeration<ResourceType>(this, ResourceType.FLAG);
9847        if ("Goal".equals(codeString))
9848          return new Enumeration<ResourceType>(this, ResourceType.GOAL);
9849        if ("GraphDefinition".equals(codeString))
9850          return new Enumeration<ResourceType>(this, ResourceType.GRAPHDEFINITION);
9851        if ("Group".equals(codeString))
9852          return new Enumeration<ResourceType>(this, ResourceType.GROUP);
9853        if ("GuidanceResponse".equals(codeString))
9854          return new Enumeration<ResourceType>(this, ResourceType.GUIDANCERESPONSE);
9855        if ("HealthcareService".equals(codeString))
9856          return new Enumeration<ResourceType>(this, ResourceType.HEALTHCARESERVICE);
9857        if ("ImagingManifest".equals(codeString))
9858          return new Enumeration<ResourceType>(this, ResourceType.IMAGINGMANIFEST);
9859        if ("ImagingStudy".equals(codeString))
9860          return new Enumeration<ResourceType>(this, ResourceType.IMAGINGSTUDY);
9861        if ("Immunization".equals(codeString))
9862          return new Enumeration<ResourceType>(this, ResourceType.IMMUNIZATION);
9863        if ("ImmunizationRecommendation".equals(codeString))
9864          return new Enumeration<ResourceType>(this, ResourceType.IMMUNIZATIONRECOMMENDATION);
9865        if ("ImplementationGuide".equals(codeString))
9866          return new Enumeration<ResourceType>(this, ResourceType.IMPLEMENTATIONGUIDE);
9867        if ("Library".equals(codeString))
9868          return new Enumeration<ResourceType>(this, ResourceType.LIBRARY);
9869        if ("Linkage".equals(codeString))
9870          return new Enumeration<ResourceType>(this, ResourceType.LINKAGE);
9871        if ("List".equals(codeString))
9872          return new Enumeration<ResourceType>(this, ResourceType.LIST);
9873        if ("Location".equals(codeString))
9874          return new Enumeration<ResourceType>(this, ResourceType.LOCATION);
9875        if ("Measure".equals(codeString))
9876          return new Enumeration<ResourceType>(this, ResourceType.MEASURE);
9877        if ("MeasureReport".equals(codeString))
9878          return new Enumeration<ResourceType>(this, ResourceType.MEASUREREPORT);
9879        if ("Media".equals(codeString))
9880          return new Enumeration<ResourceType>(this, ResourceType.MEDIA);
9881        if ("Medication".equals(codeString))
9882          return new Enumeration<ResourceType>(this, ResourceType.MEDICATION);
9883        if ("MedicationAdministration".equals(codeString))
9884          return new Enumeration<ResourceType>(this, ResourceType.MEDICATIONADMINISTRATION);
9885        if ("MedicationDispense".equals(codeString))
9886          return new Enumeration<ResourceType>(this, ResourceType.MEDICATIONDISPENSE);
9887        if ("MedicationRequest".equals(codeString))
9888          return new Enumeration<ResourceType>(this, ResourceType.MEDICATIONREQUEST);
9889        if ("MedicationStatement".equals(codeString))
9890          return new Enumeration<ResourceType>(this, ResourceType.MEDICATIONSTATEMENT);
9891        if ("MessageDefinition".equals(codeString))
9892          return new Enumeration<ResourceType>(this, ResourceType.MESSAGEDEFINITION);
9893        if ("MessageHeader".equals(codeString))
9894          return new Enumeration<ResourceType>(this, ResourceType.MESSAGEHEADER);
9895        if ("NamingSystem".equals(codeString))
9896          return new Enumeration<ResourceType>(this, ResourceType.NAMINGSYSTEM);
9897        if ("NutritionOrder".equals(codeString))
9898          return new Enumeration<ResourceType>(this, ResourceType.NUTRITIONORDER);
9899        if ("Observation".equals(codeString))
9900          return new Enumeration<ResourceType>(this, ResourceType.OBSERVATION);
9901        if ("OperationDefinition".equals(codeString))
9902          return new Enumeration<ResourceType>(this, ResourceType.OPERATIONDEFINITION);
9903        if ("OperationOutcome".equals(codeString))
9904          return new Enumeration<ResourceType>(this, ResourceType.OPERATIONOUTCOME);
9905        if ("Organization".equals(codeString))
9906          return new Enumeration<ResourceType>(this, ResourceType.ORGANIZATION);
9907        if ("Parameters".equals(codeString))
9908          return new Enumeration<ResourceType>(this, ResourceType.PARAMETERS);
9909        if ("Patient".equals(codeString))
9910          return new Enumeration<ResourceType>(this, ResourceType.PATIENT);
9911        if ("PaymentNotice".equals(codeString))
9912          return new Enumeration<ResourceType>(this, ResourceType.PAYMENTNOTICE);
9913        if ("PaymentReconciliation".equals(codeString))
9914          return new Enumeration<ResourceType>(this, ResourceType.PAYMENTRECONCILIATION);
9915        if ("Person".equals(codeString))
9916          return new Enumeration<ResourceType>(this, ResourceType.PERSON);
9917        if ("PlanDefinition".equals(codeString))
9918          return new Enumeration<ResourceType>(this, ResourceType.PLANDEFINITION);
9919        if ("Practitioner".equals(codeString))
9920          return new Enumeration<ResourceType>(this, ResourceType.PRACTITIONER);
9921        if ("PractitionerRole".equals(codeString))
9922          return new Enumeration<ResourceType>(this, ResourceType.PRACTITIONERROLE);
9923        if ("Procedure".equals(codeString))
9924          return new Enumeration<ResourceType>(this, ResourceType.PROCEDURE);
9925        if ("ProcedureRequest".equals(codeString))
9926          return new Enumeration<ResourceType>(this, ResourceType.PROCEDUREREQUEST);
9927        if ("ProcessRequest".equals(codeString))
9928          return new Enumeration<ResourceType>(this, ResourceType.PROCESSREQUEST);
9929        if ("ProcessResponse".equals(codeString))
9930          return new Enumeration<ResourceType>(this, ResourceType.PROCESSRESPONSE);
9931        if ("Provenance".equals(codeString))
9932          return new Enumeration<ResourceType>(this, ResourceType.PROVENANCE);
9933        if ("Questionnaire".equals(codeString))
9934          return new Enumeration<ResourceType>(this, ResourceType.QUESTIONNAIRE);
9935        if ("QuestionnaireResponse".equals(codeString))
9936          return new Enumeration<ResourceType>(this, ResourceType.QUESTIONNAIRERESPONSE);
9937        if ("ReferralRequest".equals(codeString))
9938          return new Enumeration<ResourceType>(this, ResourceType.REFERRALREQUEST);
9939        if ("RelatedPerson".equals(codeString))
9940          return new Enumeration<ResourceType>(this, ResourceType.RELATEDPERSON);
9941        if ("RequestGroup".equals(codeString))
9942          return new Enumeration<ResourceType>(this, ResourceType.REQUESTGROUP);
9943        if ("ResearchStudy".equals(codeString))
9944          return new Enumeration<ResourceType>(this, ResourceType.RESEARCHSTUDY);
9945        if ("ResearchSubject".equals(codeString))
9946          return new Enumeration<ResourceType>(this, ResourceType.RESEARCHSUBJECT);
9947        if ("Resource".equals(codeString))
9948          return new Enumeration<ResourceType>(this, ResourceType.RESOURCE);
9949        if ("RiskAssessment".equals(codeString))
9950          return new Enumeration<ResourceType>(this, ResourceType.RISKASSESSMENT);
9951        if ("Schedule".equals(codeString))
9952          return new Enumeration<ResourceType>(this, ResourceType.SCHEDULE);
9953        if ("SearchParameter".equals(codeString))
9954          return new Enumeration<ResourceType>(this, ResourceType.SEARCHPARAMETER);
9955        if ("Sequence".equals(codeString))
9956          return new Enumeration<ResourceType>(this, ResourceType.SEQUENCE);
9957        if ("ServiceDefinition".equals(codeString))
9958          return new Enumeration<ResourceType>(this, ResourceType.SERVICEDEFINITION);
9959        if ("Slot".equals(codeString))
9960          return new Enumeration<ResourceType>(this, ResourceType.SLOT);
9961        if ("Specimen".equals(codeString))
9962          return new Enumeration<ResourceType>(this, ResourceType.SPECIMEN);
9963        if ("StructureDefinition".equals(codeString))
9964          return new Enumeration<ResourceType>(this, ResourceType.STRUCTUREDEFINITION);
9965        if ("StructureMap".equals(codeString))
9966          return new Enumeration<ResourceType>(this, ResourceType.STRUCTUREMAP);
9967        if ("Subscription".equals(codeString))
9968          return new Enumeration<ResourceType>(this, ResourceType.SUBSCRIPTION);
9969        if ("Substance".equals(codeString))
9970          return new Enumeration<ResourceType>(this, ResourceType.SUBSTANCE);
9971        if ("SupplyDelivery".equals(codeString))
9972          return new Enumeration<ResourceType>(this, ResourceType.SUPPLYDELIVERY);
9973        if ("SupplyRequest".equals(codeString))
9974          return new Enumeration<ResourceType>(this, ResourceType.SUPPLYREQUEST);
9975        if ("Task".equals(codeString))
9976          return new Enumeration<ResourceType>(this, ResourceType.TASK);
9977        if ("TestReport".equals(codeString))
9978          return new Enumeration<ResourceType>(this, ResourceType.TESTREPORT);
9979        if ("TestScript".equals(codeString))
9980          return new Enumeration<ResourceType>(this, ResourceType.TESTSCRIPT);
9981        if ("ValueSet".equals(codeString))
9982          return new Enumeration<ResourceType>(this, ResourceType.VALUESET);
9983        if ("VisionPrescription".equals(codeString))
9984          return new Enumeration<ResourceType>(this, ResourceType.VISIONPRESCRIPTION);
9985        throw new FHIRException("Unknown ResourceType code '"+codeString+"'");
9986        }
9987    public String toCode(ResourceType code) {
9988      if (code == ResourceType.ACCOUNT)
9989        return "Account";
9990      if (code == ResourceType.ACTIVITYDEFINITION)
9991        return "ActivityDefinition";
9992      if (code == ResourceType.ADVERSEEVENT)
9993        return "AdverseEvent";
9994      if (code == ResourceType.ALLERGYINTOLERANCE)
9995        return "AllergyIntolerance";
9996      if (code == ResourceType.APPOINTMENT)
9997        return "Appointment";
9998      if (code == ResourceType.APPOINTMENTRESPONSE)
9999        return "AppointmentResponse";
10000      if (code == ResourceType.AUDITEVENT)
10001        return "AuditEvent";
10002      if (code == ResourceType.BASIC)
10003        return "Basic";
10004      if (code == ResourceType.BINARY)
10005        return "Binary";
10006      if (code == ResourceType.BODYSITE)
10007        return "BodySite";
10008      if (code == ResourceType.BUNDLE)
10009        return "Bundle";
10010      if (code == ResourceType.CAPABILITYSTATEMENT)
10011        return "CapabilityStatement";
10012      if (code == ResourceType.CAREPLAN)
10013        return "CarePlan";
10014      if (code == ResourceType.CARETEAM)
10015        return "CareTeam";
10016      if (code == ResourceType.CHARGEITEM)
10017        return "ChargeItem";
10018      if (code == ResourceType.CLAIM)
10019        return "Claim";
10020      if (code == ResourceType.CLAIMRESPONSE)
10021        return "ClaimResponse";
10022      if (code == ResourceType.CLINICALIMPRESSION)
10023        return "ClinicalImpression";
10024      if (code == ResourceType.CODESYSTEM)
10025        return "CodeSystem";
10026      if (code == ResourceType.COMMUNICATION)
10027        return "Communication";
10028      if (code == ResourceType.COMMUNICATIONREQUEST)
10029        return "CommunicationRequest";
10030      if (code == ResourceType.COMPARTMENTDEFINITION)
10031        return "CompartmentDefinition";
10032      if (code == ResourceType.COMPOSITION)
10033        return "Composition";
10034      if (code == ResourceType.CONCEPTMAP)
10035        return "ConceptMap";
10036      if (code == ResourceType.CONDITION)
10037        return "Condition";
10038      if (code == ResourceType.CONSENT)
10039        return "Consent";
10040      if (code == ResourceType.CONTRACT)
10041        return "Contract";
10042      if (code == ResourceType.COVERAGE)
10043        return "Coverage";
10044      if (code == ResourceType.DATAELEMENT)
10045        return "DataElement";
10046      if (code == ResourceType.DETECTEDISSUE)
10047        return "DetectedIssue";
10048      if (code == ResourceType.DEVICE)
10049        return "Device";
10050      if (code == ResourceType.DEVICECOMPONENT)
10051        return "DeviceComponent";
10052      if (code == ResourceType.DEVICEMETRIC)
10053        return "DeviceMetric";
10054      if (code == ResourceType.DEVICEREQUEST)
10055        return "DeviceRequest";
10056      if (code == ResourceType.DEVICEUSESTATEMENT)
10057        return "DeviceUseStatement";
10058      if (code == ResourceType.DIAGNOSTICREPORT)
10059        return "DiagnosticReport";
10060      if (code == ResourceType.DOCUMENTMANIFEST)
10061        return "DocumentManifest";
10062      if (code == ResourceType.DOCUMENTREFERENCE)
10063        return "DocumentReference";
10064      if (code == ResourceType.DOMAINRESOURCE)
10065        return "DomainResource";
10066      if (code == ResourceType.ELIGIBILITYREQUEST)
10067        return "EligibilityRequest";
10068      if (code == ResourceType.ELIGIBILITYRESPONSE)
10069        return "EligibilityResponse";
10070      if (code == ResourceType.ENCOUNTER)
10071        return "Encounter";
10072      if (code == ResourceType.ENDPOINT)
10073        return "Endpoint";
10074      if (code == ResourceType.ENROLLMENTREQUEST)
10075        return "EnrollmentRequest";
10076      if (code == ResourceType.ENROLLMENTRESPONSE)
10077        return "EnrollmentResponse";
10078      if (code == ResourceType.EPISODEOFCARE)
10079        return "EpisodeOfCare";
10080      if (code == ResourceType.EXPANSIONPROFILE)
10081        return "ExpansionProfile";
10082      if (code == ResourceType.EXPLANATIONOFBENEFIT)
10083        return "ExplanationOfBenefit";
10084      if (code == ResourceType.FAMILYMEMBERHISTORY)
10085        return "FamilyMemberHistory";
10086      if (code == ResourceType.FLAG)
10087        return "Flag";
10088      if (code == ResourceType.GOAL)
10089        return "Goal";
10090      if (code == ResourceType.GRAPHDEFINITION)
10091        return "GraphDefinition";
10092      if (code == ResourceType.GROUP)
10093        return "Group";
10094      if (code == ResourceType.GUIDANCERESPONSE)
10095        return "GuidanceResponse";
10096      if (code == ResourceType.HEALTHCARESERVICE)
10097        return "HealthcareService";
10098      if (code == ResourceType.IMAGINGMANIFEST)
10099        return "ImagingManifest";
10100      if (code == ResourceType.IMAGINGSTUDY)
10101        return "ImagingStudy";
10102      if (code == ResourceType.IMMUNIZATION)
10103        return "Immunization";
10104      if (code == ResourceType.IMMUNIZATIONRECOMMENDATION)
10105        return "ImmunizationRecommendation";
10106      if (code == ResourceType.IMPLEMENTATIONGUIDE)
10107        return "ImplementationGuide";
10108      if (code == ResourceType.LIBRARY)
10109        return "Library";
10110      if (code == ResourceType.LINKAGE)
10111        return "Linkage";
10112      if (code == ResourceType.LIST)
10113        return "List";
10114      if (code == ResourceType.LOCATION)
10115        return "Location";
10116      if (code == ResourceType.MEASURE)
10117        return "Measure";
10118      if (code == ResourceType.MEASUREREPORT)
10119        return "MeasureReport";
10120      if (code == ResourceType.MEDIA)
10121        return "Media";
10122      if (code == ResourceType.MEDICATION)
10123        return "Medication";
10124      if (code == ResourceType.MEDICATIONADMINISTRATION)
10125        return "MedicationAdministration";
10126      if (code == ResourceType.MEDICATIONDISPENSE)
10127        return "MedicationDispense";
10128      if (code == ResourceType.MEDICATIONREQUEST)
10129        return "MedicationRequest";
10130      if (code == ResourceType.MEDICATIONSTATEMENT)
10131        return "MedicationStatement";
10132      if (code == ResourceType.MESSAGEDEFINITION)
10133        return "MessageDefinition";
10134      if (code == ResourceType.MESSAGEHEADER)
10135        return "MessageHeader";
10136      if (code == ResourceType.NAMINGSYSTEM)
10137        return "NamingSystem";
10138      if (code == ResourceType.NUTRITIONORDER)
10139        return "NutritionOrder";
10140      if (code == ResourceType.OBSERVATION)
10141        return "Observation";
10142      if (code == ResourceType.OPERATIONDEFINITION)
10143        return "OperationDefinition";
10144      if (code == ResourceType.OPERATIONOUTCOME)
10145        return "OperationOutcome";
10146      if (code == ResourceType.ORGANIZATION)
10147        return "Organization";
10148      if (code == ResourceType.PARAMETERS)
10149        return "Parameters";
10150      if (code == ResourceType.PATIENT)
10151        return "Patient";
10152      if (code == ResourceType.PAYMENTNOTICE)
10153        return "PaymentNotice";
10154      if (code == ResourceType.PAYMENTRECONCILIATION)
10155        return "PaymentReconciliation";
10156      if (code == ResourceType.PERSON)
10157        return "Person";
10158      if (code == ResourceType.PLANDEFINITION)
10159        return "PlanDefinition";
10160      if (code == ResourceType.PRACTITIONER)
10161        return "Practitioner";
10162      if (code == ResourceType.PRACTITIONERROLE)
10163        return "PractitionerRole";
10164      if (code == ResourceType.PROCEDURE)
10165        return "Procedure";
10166      if (code == ResourceType.PROCEDUREREQUEST)
10167        return "ProcedureRequest";
10168      if (code == ResourceType.PROCESSREQUEST)
10169        return "ProcessRequest";
10170      if (code == ResourceType.PROCESSRESPONSE)
10171        return "ProcessResponse";
10172      if (code == ResourceType.PROVENANCE)
10173        return "Provenance";
10174      if (code == ResourceType.QUESTIONNAIRE)
10175        return "Questionnaire";
10176      if (code == ResourceType.QUESTIONNAIRERESPONSE)
10177        return "QuestionnaireResponse";
10178      if (code == ResourceType.REFERRALREQUEST)
10179        return "ReferralRequest";
10180      if (code == ResourceType.RELATEDPERSON)
10181        return "RelatedPerson";
10182      if (code == ResourceType.REQUESTGROUP)
10183        return "RequestGroup";
10184      if (code == ResourceType.RESEARCHSTUDY)
10185        return "ResearchStudy";
10186      if (code == ResourceType.RESEARCHSUBJECT)
10187        return "ResearchSubject";
10188      if (code == ResourceType.RESOURCE)
10189        return "Resource";
10190      if (code == ResourceType.RISKASSESSMENT)
10191        return "RiskAssessment";
10192      if (code == ResourceType.SCHEDULE)
10193        return "Schedule";
10194      if (code == ResourceType.SEARCHPARAMETER)
10195        return "SearchParameter";
10196      if (code == ResourceType.SEQUENCE)
10197        return "Sequence";
10198      if (code == ResourceType.SERVICEDEFINITION)
10199        return "ServiceDefinition";
10200      if (code == ResourceType.SLOT)
10201        return "Slot";
10202      if (code == ResourceType.SPECIMEN)
10203        return "Specimen";
10204      if (code == ResourceType.STRUCTUREDEFINITION)
10205        return "StructureDefinition";
10206      if (code == ResourceType.STRUCTUREMAP)
10207        return "StructureMap";
10208      if (code == ResourceType.SUBSCRIPTION)
10209        return "Subscription";
10210      if (code == ResourceType.SUBSTANCE)
10211        return "Substance";
10212      if (code == ResourceType.SUPPLYDELIVERY)
10213        return "SupplyDelivery";
10214      if (code == ResourceType.SUPPLYREQUEST)
10215        return "SupplyRequest";
10216      if (code == ResourceType.TASK)
10217        return "Task";
10218      if (code == ResourceType.TESTREPORT)
10219        return "TestReport";
10220      if (code == ResourceType.TESTSCRIPT)
10221        return "TestScript";
10222      if (code == ResourceType.VALUESET)
10223        return "ValueSet";
10224      if (code == ResourceType.VISIONPRESCRIPTION)
10225        return "VisionPrescription";
10226      return "?";
10227      }
10228    public String toSystem(ResourceType code) {
10229      return code.getSystem();
10230      }
10231    }
10232
10233    public enum SearchParamType {
10234        /**
10235         * Search parameter SHALL be a number (a whole number, or a decimal).
10236         */
10237        NUMBER, 
10238        /**
10239         * Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported.
10240         */
10241        DATE, 
10242        /**
10243         * 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.
10244         */
10245        STRING, 
10246        /**
10247         * 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.
10248         */
10249        TOKEN, 
10250        /**
10251         * A reference to another resource.
10252         */
10253        REFERENCE, 
10254        /**
10255         * A composite search parameter that combines a search on two values together.
10256         */
10257        COMPOSITE, 
10258        /**
10259         * A search parameter that searches on a quantity.
10260         */
10261        QUANTITY, 
10262        /**
10263         * A search parameter that searches on a URI (RFC 3986).
10264         */
10265        URI, 
10266        /**
10267         * added to help the parsers
10268         */
10269        NULL;
10270        public static SearchParamType fromCode(String codeString) throws FHIRException {
10271            if (codeString == null || "".equals(codeString))
10272                return null;
10273        if ("number".equals(codeString))
10274          return NUMBER;
10275        if ("date".equals(codeString))
10276          return DATE;
10277        if ("string".equals(codeString))
10278          return STRING;
10279        if ("token".equals(codeString))
10280          return TOKEN;
10281        if ("reference".equals(codeString))
10282          return REFERENCE;
10283        if ("composite".equals(codeString))
10284          return COMPOSITE;
10285        if ("quantity".equals(codeString))
10286          return QUANTITY;
10287        if ("uri".equals(codeString))
10288          return URI;
10289        throw new FHIRException("Unknown SearchParamType code '"+codeString+"'");
10290        }
10291        public String toCode() {
10292          switch (this) {
10293            case NUMBER: return "number";
10294            case DATE: return "date";
10295            case STRING: return "string";
10296            case TOKEN: return "token";
10297            case REFERENCE: return "reference";
10298            case COMPOSITE: return "composite";
10299            case QUANTITY: return "quantity";
10300            case URI: return "uri";
10301            default: return "?";
10302          }
10303        }
10304        public String getSystem() {
10305          switch (this) {
10306            case NUMBER: return "http://hl7.org/fhir/search-param-type";
10307            case DATE: return "http://hl7.org/fhir/search-param-type";
10308            case STRING: return "http://hl7.org/fhir/search-param-type";
10309            case TOKEN: return "http://hl7.org/fhir/search-param-type";
10310            case REFERENCE: return "http://hl7.org/fhir/search-param-type";
10311            case COMPOSITE: return "http://hl7.org/fhir/search-param-type";
10312            case QUANTITY: return "http://hl7.org/fhir/search-param-type";
10313            case URI: return "http://hl7.org/fhir/search-param-type";
10314            default: return "?";
10315          }
10316        }
10317        public String getDefinition() {
10318          switch (this) {
10319            case NUMBER: return "Search parameter SHALL be a number (a whole number, or a decimal).";
10320            case DATE: return "Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported.";
10321            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.";
10322            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.";
10323            case REFERENCE: return "A reference to another resource.";
10324            case COMPOSITE: return "A composite search parameter that combines a search on two values together.";
10325            case QUANTITY: return "A search parameter that searches on a quantity.";
10326            case URI: return "A search parameter that searches on a URI (RFC 3986).";
10327            default: return "?";
10328          }
10329        }
10330        public String getDisplay() {
10331          switch (this) {
10332            case NUMBER: return "Number";
10333            case DATE: return "Date/DateTime";
10334            case STRING: return "String";
10335            case TOKEN: return "Token";
10336            case REFERENCE: return "Reference";
10337            case COMPOSITE: return "Composite";
10338            case QUANTITY: return "Quantity";
10339            case URI: return "URI";
10340            default: return "?";
10341          }
10342        }
10343    }
10344
10345  public static class SearchParamTypeEnumFactory implements EnumFactory<SearchParamType> {
10346    public SearchParamType fromCode(String codeString) throws IllegalArgumentException {
10347      if (codeString == null || "".equals(codeString))
10348            if (codeString == null || "".equals(codeString))
10349                return null;
10350        if ("number".equals(codeString))
10351          return SearchParamType.NUMBER;
10352        if ("date".equals(codeString))
10353          return SearchParamType.DATE;
10354        if ("string".equals(codeString))
10355          return SearchParamType.STRING;
10356        if ("token".equals(codeString))
10357          return SearchParamType.TOKEN;
10358        if ("reference".equals(codeString))
10359          return SearchParamType.REFERENCE;
10360        if ("composite".equals(codeString))
10361          return SearchParamType.COMPOSITE;
10362        if ("quantity".equals(codeString))
10363          return SearchParamType.QUANTITY;
10364        if ("uri".equals(codeString))
10365          return SearchParamType.URI;
10366        throw new IllegalArgumentException("Unknown SearchParamType code '"+codeString+"'");
10367        }
10368        public Enumeration<SearchParamType> fromType(Base code) throws FHIRException {
10369          if (code == null)
10370            return null;
10371          if (code.isEmpty())
10372            return new Enumeration<SearchParamType>(this);
10373          String codeString = ((PrimitiveType) code).asStringValue();
10374          if (codeString == null || "".equals(codeString))
10375            return null;
10376        if ("number".equals(codeString))
10377          return new Enumeration<SearchParamType>(this, SearchParamType.NUMBER);
10378        if ("date".equals(codeString))
10379          return new Enumeration<SearchParamType>(this, SearchParamType.DATE);
10380        if ("string".equals(codeString))
10381          return new Enumeration<SearchParamType>(this, SearchParamType.STRING);
10382        if ("token".equals(codeString))
10383          return new Enumeration<SearchParamType>(this, SearchParamType.TOKEN);
10384        if ("reference".equals(codeString))
10385          return new Enumeration<SearchParamType>(this, SearchParamType.REFERENCE);
10386        if ("composite".equals(codeString))
10387          return new Enumeration<SearchParamType>(this, SearchParamType.COMPOSITE);
10388        if ("quantity".equals(codeString))
10389          return new Enumeration<SearchParamType>(this, SearchParamType.QUANTITY);
10390        if ("uri".equals(codeString))
10391          return new Enumeration<SearchParamType>(this, SearchParamType.URI);
10392        throw new FHIRException("Unknown SearchParamType code '"+codeString+"'");
10393        }
10394    public String toCode(SearchParamType code) {
10395      if (code == SearchParamType.NUMBER)
10396        return "number";
10397      if (code == SearchParamType.DATE)
10398        return "date";
10399      if (code == SearchParamType.STRING)
10400        return "string";
10401      if (code == SearchParamType.TOKEN)
10402        return "token";
10403      if (code == SearchParamType.REFERENCE)
10404        return "reference";
10405      if (code == SearchParamType.COMPOSITE)
10406        return "composite";
10407      if (code == SearchParamType.QUANTITY)
10408        return "quantity";
10409      if (code == SearchParamType.URI)
10410        return "uri";
10411      return "?";
10412      }
10413    public String toSystem(SearchParamType code) {
10414      return code.getSystem();
10415      }
10416    }
10417
10418    public enum SpecialValues {
10419        /**
10420         * Boolean true.
10421         */
10422        TRUE, 
10423        /**
10424         * Boolean false.
10425         */
10426        FALSE, 
10427        /**
10428         * The content is greater than zero, but too small to be quantified.
10429         */
10430        TRACE, 
10431        /**
10432         * 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.
10433         */
10434        SUFFICIENT, 
10435        /**
10436         * The value is no longer available.
10437         */
10438        WITHDRAWN, 
10439        /**
10440         * The are no known applicable values in this context.
10441         */
10442        NILKNOWN, 
10443        /**
10444         * added to help the parsers
10445         */
10446        NULL;
10447        public static SpecialValues fromCode(String codeString) throws FHIRException {
10448            if (codeString == null || "".equals(codeString))
10449                return null;
10450        if ("true".equals(codeString))
10451          return TRUE;
10452        if ("false".equals(codeString))
10453          return FALSE;
10454        if ("trace".equals(codeString))
10455          return TRACE;
10456        if ("sufficient".equals(codeString))
10457          return SUFFICIENT;
10458        if ("withdrawn".equals(codeString))
10459          return WITHDRAWN;
10460        if ("nil-known".equals(codeString))
10461          return NILKNOWN;
10462        throw new FHIRException("Unknown SpecialValues code '"+codeString+"'");
10463        }
10464        public String toCode() {
10465          switch (this) {
10466            case TRUE: return "true";
10467            case FALSE: return "false";
10468            case TRACE: return "trace";
10469            case SUFFICIENT: return "sufficient";
10470            case WITHDRAWN: return "withdrawn";
10471            case NILKNOWN: return "nil-known";
10472            default: return "?";
10473          }
10474        }
10475        public String getSystem() {
10476          switch (this) {
10477            case TRUE: return "http://hl7.org/fhir/special-values";
10478            case FALSE: return "http://hl7.org/fhir/special-values";
10479            case TRACE: return "http://hl7.org/fhir/special-values";
10480            case SUFFICIENT: return "http://hl7.org/fhir/special-values";
10481            case WITHDRAWN: return "http://hl7.org/fhir/special-values";
10482            case NILKNOWN: return "http://hl7.org/fhir/special-values";
10483            default: return "?";
10484          }
10485        }
10486        public String getDefinition() {
10487          switch (this) {
10488            case TRUE: return "Boolean true.";
10489            case FALSE: return "Boolean false.";
10490            case TRACE: return "The content is greater than zero, but too small to be quantified.";
10491            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.";
10492            case WITHDRAWN: return "The value is no longer available.";
10493            case NILKNOWN: return "The are no known applicable values in this context.";
10494            default: return "?";
10495          }
10496        }
10497        public String getDisplay() {
10498          switch (this) {
10499            case TRUE: return "true";
10500            case FALSE: return "false";
10501            case TRACE: return "Trace Amount Detected";
10502            case SUFFICIENT: return "Sufficient Quantity";
10503            case WITHDRAWN: return "Value Withdrawn";
10504            case NILKNOWN: return "Nil Known";
10505            default: return "?";
10506          }
10507        }
10508    }
10509
10510  public static class SpecialValuesEnumFactory implements EnumFactory<SpecialValues> {
10511    public SpecialValues fromCode(String codeString) throws IllegalArgumentException {
10512      if (codeString == null || "".equals(codeString))
10513            if (codeString == null || "".equals(codeString))
10514                return null;
10515        if ("true".equals(codeString))
10516          return SpecialValues.TRUE;
10517        if ("false".equals(codeString))
10518          return SpecialValues.FALSE;
10519        if ("trace".equals(codeString))
10520          return SpecialValues.TRACE;
10521        if ("sufficient".equals(codeString))
10522          return SpecialValues.SUFFICIENT;
10523        if ("withdrawn".equals(codeString))
10524          return SpecialValues.WITHDRAWN;
10525        if ("nil-known".equals(codeString))
10526          return SpecialValues.NILKNOWN;
10527        throw new IllegalArgumentException("Unknown SpecialValues code '"+codeString+"'");
10528        }
10529        public Enumeration<SpecialValues> fromType(Base code) throws FHIRException {
10530          if (code == null)
10531            return null;
10532          if (code.isEmpty())
10533            return new Enumeration<SpecialValues>(this);
10534          String codeString = ((PrimitiveType) code).asStringValue();
10535          if (codeString == null || "".equals(codeString))
10536            return null;
10537        if ("true".equals(codeString))
10538          return new Enumeration<SpecialValues>(this, SpecialValues.TRUE);
10539        if ("false".equals(codeString))
10540          return new Enumeration<SpecialValues>(this, SpecialValues.FALSE);
10541        if ("trace".equals(codeString))
10542          return new Enumeration<SpecialValues>(this, SpecialValues.TRACE);
10543        if ("sufficient".equals(codeString))
10544          return new Enumeration<SpecialValues>(this, SpecialValues.SUFFICIENT);
10545        if ("withdrawn".equals(codeString))
10546          return new Enumeration<SpecialValues>(this, SpecialValues.WITHDRAWN);
10547        if ("nil-known".equals(codeString))
10548          return new Enumeration<SpecialValues>(this, SpecialValues.NILKNOWN);
10549        throw new FHIRException("Unknown SpecialValues code '"+codeString+"'");
10550        }
10551    public String toCode(SpecialValues code) {
10552      if (code == SpecialValues.TRUE)
10553        return "true";
10554      if (code == SpecialValues.FALSE)
10555        return "false";
10556      if (code == SpecialValues.TRACE)
10557        return "trace";
10558      if (code == SpecialValues.SUFFICIENT)
10559        return "sufficient";
10560      if (code == SpecialValues.WITHDRAWN)
10561        return "withdrawn";
10562      if (code == SpecialValues.NILKNOWN)
10563        return "nil-known";
10564      return "?";
10565      }
10566    public String toSystem(SpecialValues code) {
10567      return code.getSystem();
10568      }
10569    }
10570
10571
10572}
10573