001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
052 */
053@ResourceDef(name="AllergyIntolerance", profile="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance")
054public class AllergyIntolerance extends DomainResource {
055
056    public enum AllergyIntoleranceCategory {
057        /**
058         * Any substance consumed to provide nutritional support for the body.
059         */
060        FOOD, 
061        /**
062         * Substances administered to achieve a physiological effect.
063         */
064        MEDICATION, 
065        /**
066         * Any substances that are encountered in the environment, including any substance not already classified as food, medication, or biologic.
067         */
068        ENVIRONMENT, 
069        /**
070         * A preparation that is synthesized from living organisms or their products, especially a human or animal protein, such as a hormone or antitoxin, that is used as a diagnostic, preventive, or therapeutic agent. Examples of biologic medications include: vaccines; allergenic extracts, which are used for both diagnosis and treatment (for example, allergy shots); gene therapies; cellular therapies.  There are other biologic products, such as tissues, which are not typically associated with allergies.
071         */
072        BIOLOGIC, 
073        /**
074         * added to help the parsers with the generic types
075         */
076        NULL;
077        public static AllergyIntoleranceCategory fromCode(String codeString) throws FHIRException {
078            if (codeString == null || "".equals(codeString))
079                return null;
080        if ("food".equals(codeString))
081          return FOOD;
082        if ("medication".equals(codeString))
083          return MEDICATION;
084        if ("environment".equals(codeString))
085          return ENVIRONMENT;
086        if ("biologic".equals(codeString))
087          return BIOLOGIC;
088        if (Configuration.isAcceptInvalidEnums())
089          return null;
090        else
091          throw new FHIRException("Unknown AllergyIntoleranceCategory code '"+codeString+"'");
092        }
093        public String toCode() {
094          switch (this) {
095            case FOOD: return "food";
096            case MEDICATION: return "medication";
097            case ENVIRONMENT: return "environment";
098            case BIOLOGIC: return "biologic";
099            case NULL: return null;
100            default: return "?";
101          }
102        }
103        public String getSystem() {
104          switch (this) {
105            case FOOD: return "http://hl7.org/fhir/allergy-intolerance-category";
106            case MEDICATION: return "http://hl7.org/fhir/allergy-intolerance-category";
107            case ENVIRONMENT: return "http://hl7.org/fhir/allergy-intolerance-category";
108            case BIOLOGIC: return "http://hl7.org/fhir/allergy-intolerance-category";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113        public String getDefinition() {
114          switch (this) {
115            case FOOD: return "Any substance consumed to provide nutritional support for the body.";
116            case MEDICATION: return "Substances administered to achieve a physiological effect.";
117            case ENVIRONMENT: return "Any substances that are encountered in the environment, including any substance not already classified as food, medication, or biologic.";
118            case BIOLOGIC: return "A preparation that is synthesized from living organisms or their products, especially a human or animal protein, such as a hormone or antitoxin, that is used as a diagnostic, preventive, or therapeutic agent. Examples of biologic medications include: vaccines; allergenic extracts, which are used for both diagnosis and treatment (for example, allergy shots); gene therapies; cellular therapies.  There are other biologic products, such as tissues, which are not typically associated with allergies.";
119            case NULL: return null;
120            default: return "?";
121          }
122        }
123        public String getDisplay() {
124          switch (this) {
125            case FOOD: return "Food";
126            case MEDICATION: return "Medication";
127            case ENVIRONMENT: return "Environment";
128            case BIOLOGIC: return "Biologic";
129            case NULL: return null;
130            default: return "?";
131          }
132        }
133    }
134
135  public static class AllergyIntoleranceCategoryEnumFactory implements EnumFactory<AllergyIntoleranceCategory> {
136    public AllergyIntoleranceCategory fromCode(String codeString) throws IllegalArgumentException {
137      if (codeString == null || "".equals(codeString))
138            if (codeString == null || "".equals(codeString))
139                return null;
140        if ("food".equals(codeString))
141          return AllergyIntoleranceCategory.FOOD;
142        if ("medication".equals(codeString))
143          return AllergyIntoleranceCategory.MEDICATION;
144        if ("environment".equals(codeString))
145          return AllergyIntoleranceCategory.ENVIRONMENT;
146        if ("biologic".equals(codeString))
147          return AllergyIntoleranceCategory.BIOLOGIC;
148        throw new IllegalArgumentException("Unknown AllergyIntoleranceCategory code '"+codeString+"'");
149        }
150        public Enumeration<AllergyIntoleranceCategory> fromType(PrimitiveType<?> code) throws FHIRException {
151          if (code == null)
152            return null;
153          if (code.isEmpty())
154            return new Enumeration<AllergyIntoleranceCategory>(this, AllergyIntoleranceCategory.NULL, code);
155          String codeString = ((PrimitiveType) code).asStringValue();
156          if (codeString == null || "".equals(codeString))
157            return new Enumeration<AllergyIntoleranceCategory>(this, AllergyIntoleranceCategory.NULL, code);
158        if ("food".equals(codeString))
159          return new Enumeration<AllergyIntoleranceCategory>(this, AllergyIntoleranceCategory.FOOD, code);
160        if ("medication".equals(codeString))
161          return new Enumeration<AllergyIntoleranceCategory>(this, AllergyIntoleranceCategory.MEDICATION, code);
162        if ("environment".equals(codeString))
163          return new Enumeration<AllergyIntoleranceCategory>(this, AllergyIntoleranceCategory.ENVIRONMENT, code);
164        if ("biologic".equals(codeString))
165          return new Enumeration<AllergyIntoleranceCategory>(this, AllergyIntoleranceCategory.BIOLOGIC, code);
166        throw new FHIRException("Unknown AllergyIntoleranceCategory code '"+codeString+"'");
167        }
168    public String toCode(AllergyIntoleranceCategory code) {
169      if (code == AllergyIntoleranceCategory.FOOD)
170        return "food";
171      if (code == AllergyIntoleranceCategory.MEDICATION)
172        return "medication";
173      if (code == AllergyIntoleranceCategory.ENVIRONMENT)
174        return "environment";
175      if (code == AllergyIntoleranceCategory.BIOLOGIC)
176        return "biologic";
177      return "?";
178      }
179    public String toSystem(AllergyIntoleranceCategory code) {
180      return code.getSystem();
181      }
182    }
183
184    public enum AllergyIntoleranceCriticality {
185        /**
186         * Worst case result of a future exposure is not assessed to be life-threatening or having high potential for organ system failure.
187         */
188        LOW, 
189        /**
190         * Worst case result of a future exposure is assessed to be life-threatening or having high potential for organ system failure.
191         */
192        HIGH, 
193        /**
194         * Unable to assess the worst case result of a future exposure.
195         */
196        UNABLETOASSESS, 
197        /**
198         * added to help the parsers with the generic types
199         */
200        NULL;
201        public static AllergyIntoleranceCriticality fromCode(String codeString) throws FHIRException {
202            if (codeString == null || "".equals(codeString))
203                return null;
204        if ("low".equals(codeString))
205          return LOW;
206        if ("high".equals(codeString))
207          return HIGH;
208        if ("unable-to-assess".equals(codeString))
209          return UNABLETOASSESS;
210        if (Configuration.isAcceptInvalidEnums())
211          return null;
212        else
213          throw new FHIRException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'");
214        }
215        public String toCode() {
216          switch (this) {
217            case LOW: return "low";
218            case HIGH: return "high";
219            case UNABLETOASSESS: return "unable-to-assess";
220            case NULL: return null;
221            default: return "?";
222          }
223        }
224        public String getSystem() {
225          switch (this) {
226            case LOW: return "http://hl7.org/fhir/allergy-intolerance-criticality";
227            case HIGH: return "http://hl7.org/fhir/allergy-intolerance-criticality";
228            case UNABLETOASSESS: return "http://hl7.org/fhir/allergy-intolerance-criticality";
229            case NULL: return null;
230            default: return "?";
231          }
232        }
233        public String getDefinition() {
234          switch (this) {
235            case LOW: return "Worst case result of a future exposure is not assessed to be life-threatening or having high potential for organ system failure.";
236            case HIGH: return "Worst case result of a future exposure is assessed to be life-threatening or having high potential for organ system failure.";
237            case UNABLETOASSESS: return "Unable to assess the worst case result of a future exposure.";
238            case NULL: return null;
239            default: return "?";
240          }
241        }
242        public String getDisplay() {
243          switch (this) {
244            case LOW: return "Low Risk";
245            case HIGH: return "High Risk";
246            case UNABLETOASSESS: return "Unable to Assess Risk";
247            case NULL: return null;
248            default: return "?";
249          }
250        }
251    }
252
253  public static class AllergyIntoleranceCriticalityEnumFactory implements EnumFactory<AllergyIntoleranceCriticality> {
254    public AllergyIntoleranceCriticality fromCode(String codeString) throws IllegalArgumentException {
255      if (codeString == null || "".equals(codeString))
256            if (codeString == null || "".equals(codeString))
257                return null;
258        if ("low".equals(codeString))
259          return AllergyIntoleranceCriticality.LOW;
260        if ("high".equals(codeString))
261          return AllergyIntoleranceCriticality.HIGH;
262        if ("unable-to-assess".equals(codeString))
263          return AllergyIntoleranceCriticality.UNABLETOASSESS;
264        throw new IllegalArgumentException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'");
265        }
266        public Enumeration<AllergyIntoleranceCriticality> fromType(PrimitiveType<?> code) throws FHIRException {
267          if (code == null)
268            return null;
269          if (code.isEmpty())
270            return new Enumeration<AllergyIntoleranceCriticality>(this, AllergyIntoleranceCriticality.NULL, code);
271          String codeString = ((PrimitiveType) code).asStringValue();
272          if (codeString == null || "".equals(codeString))
273            return new Enumeration<AllergyIntoleranceCriticality>(this, AllergyIntoleranceCriticality.NULL, code);
274        if ("low".equals(codeString))
275          return new Enumeration<AllergyIntoleranceCriticality>(this, AllergyIntoleranceCriticality.LOW, code);
276        if ("high".equals(codeString))
277          return new Enumeration<AllergyIntoleranceCriticality>(this, AllergyIntoleranceCriticality.HIGH, code);
278        if ("unable-to-assess".equals(codeString))
279          return new Enumeration<AllergyIntoleranceCriticality>(this, AllergyIntoleranceCriticality.UNABLETOASSESS, code);
280        throw new FHIRException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'");
281        }
282    public String toCode(AllergyIntoleranceCriticality code) {
283      if (code == AllergyIntoleranceCriticality.LOW)
284        return "low";
285      if (code == AllergyIntoleranceCriticality.HIGH)
286        return "high";
287      if (code == AllergyIntoleranceCriticality.UNABLETOASSESS)
288        return "unable-to-assess";
289      return "?";
290      }
291    public String toSystem(AllergyIntoleranceCriticality code) {
292      return code.getSystem();
293      }
294    }
295
296    public enum AllergyIntoleranceSeverity {
297        /**
298         * Causes mild physiological effects.
299         */
300        MILD, 
301        /**
302         * Causes moderate physiological effects.
303         */
304        MODERATE, 
305        /**
306         * Causes severe physiological effects.
307         */
308        SEVERE, 
309        /**
310         * added to help the parsers with the generic types
311         */
312        NULL;
313        public static AllergyIntoleranceSeverity fromCode(String codeString) throws FHIRException {
314            if (codeString == null || "".equals(codeString))
315                return null;
316        if ("mild".equals(codeString))
317          return MILD;
318        if ("moderate".equals(codeString))
319          return MODERATE;
320        if ("severe".equals(codeString))
321          return SEVERE;
322        if (Configuration.isAcceptInvalidEnums())
323          return null;
324        else
325          throw new FHIRException("Unknown AllergyIntoleranceSeverity code '"+codeString+"'");
326        }
327        public String toCode() {
328          switch (this) {
329            case MILD: return "mild";
330            case MODERATE: return "moderate";
331            case SEVERE: return "severe";
332            case NULL: return null;
333            default: return "?";
334          }
335        }
336        public String getSystem() {
337          switch (this) {
338            case MILD: return "http://hl7.org/fhir/reaction-event-severity";
339            case MODERATE: return "http://hl7.org/fhir/reaction-event-severity";
340            case SEVERE: return "http://hl7.org/fhir/reaction-event-severity";
341            case NULL: return null;
342            default: return "?";
343          }
344        }
345        public String getDefinition() {
346          switch (this) {
347            case MILD: return "Causes mild physiological effects.";
348            case MODERATE: return "Causes moderate physiological effects.";
349            case SEVERE: return "Causes severe physiological effects.";
350            case NULL: return null;
351            default: return "?";
352          }
353        }
354        public String getDisplay() {
355          switch (this) {
356            case MILD: return "Mild";
357            case MODERATE: return "Moderate";
358            case SEVERE: return "Severe";
359            case NULL: return null;
360            default: return "?";
361          }
362        }
363    }
364
365  public static class AllergyIntoleranceSeverityEnumFactory implements EnumFactory<AllergyIntoleranceSeverity> {
366    public AllergyIntoleranceSeverity fromCode(String codeString) throws IllegalArgumentException {
367      if (codeString == null || "".equals(codeString))
368            if (codeString == null || "".equals(codeString))
369                return null;
370        if ("mild".equals(codeString))
371          return AllergyIntoleranceSeverity.MILD;
372        if ("moderate".equals(codeString))
373          return AllergyIntoleranceSeverity.MODERATE;
374        if ("severe".equals(codeString))
375          return AllergyIntoleranceSeverity.SEVERE;
376        throw new IllegalArgumentException("Unknown AllergyIntoleranceSeverity code '"+codeString+"'");
377        }
378        public Enumeration<AllergyIntoleranceSeverity> fromType(PrimitiveType<?> code) throws FHIRException {
379          if (code == null)
380            return null;
381          if (code.isEmpty())
382            return new Enumeration<AllergyIntoleranceSeverity>(this, AllergyIntoleranceSeverity.NULL, code);
383          String codeString = ((PrimitiveType) code).asStringValue();
384          if (codeString == null || "".equals(codeString))
385            return new Enumeration<AllergyIntoleranceSeverity>(this, AllergyIntoleranceSeverity.NULL, code);
386        if ("mild".equals(codeString))
387          return new Enumeration<AllergyIntoleranceSeverity>(this, AllergyIntoleranceSeverity.MILD, code);
388        if ("moderate".equals(codeString))
389          return new Enumeration<AllergyIntoleranceSeverity>(this, AllergyIntoleranceSeverity.MODERATE, code);
390        if ("severe".equals(codeString))
391          return new Enumeration<AllergyIntoleranceSeverity>(this, AllergyIntoleranceSeverity.SEVERE, code);
392        throw new FHIRException("Unknown AllergyIntoleranceSeverity code '"+codeString+"'");
393        }
394    public String toCode(AllergyIntoleranceSeverity code) {
395      if (code == AllergyIntoleranceSeverity.MILD)
396        return "mild";
397      if (code == AllergyIntoleranceSeverity.MODERATE)
398        return "moderate";
399      if (code == AllergyIntoleranceSeverity.SEVERE)
400        return "severe";
401      return "?";
402      }
403    public String toSystem(AllergyIntoleranceSeverity code) {
404      return code.getSystem();
405      }
406    }
407
408    @Block()
409    public static class AllergyIntoleranceParticipantComponent extends BackboneElement implements IBaseBackboneElement {
410        /**
411         * Distinguishes the type of involvement of the actor in the activities related to the allergy or intolerance.
412         */
413        @Child(name = "function", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
414        @Description(shortDefinition="Type of involvement", formalDefinition="Distinguishes the type of involvement of the actor in the activities related to the allergy or intolerance." )
415        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/participation-role-type")
416        protected CodeableConcept function;
417
418        /**
419         * Indicates who or what participated in the activities related to the allergy or intolerance.
420         */
421        @Child(name = "actor", type = {Practitioner.class, PractitionerRole.class, Patient.class, RelatedPerson.class, Device.class, Organization.class, CareTeam.class}, order=2, min=1, max=1, modifier=false, summary=true)
422        @Description(shortDefinition="Who or what participated in the activities related to the allergy or intolerance", formalDefinition="Indicates who or what participated in the activities related to the allergy or intolerance." )
423        protected Reference actor;
424
425        private static final long serialVersionUID = -576943815L;
426
427    /**
428     * Constructor
429     */
430      public AllergyIntoleranceParticipantComponent() {
431        super();
432      }
433
434    /**
435     * Constructor
436     */
437      public AllergyIntoleranceParticipantComponent(Reference actor) {
438        super();
439        this.setActor(actor);
440      }
441
442        /**
443         * @return {@link #function} (Distinguishes the type of involvement of the actor in the activities related to the allergy or intolerance.)
444         */
445        public CodeableConcept getFunction() { 
446          if (this.function == null)
447            if (Configuration.errorOnAutoCreate())
448              throw new Error("Attempt to auto-create AllergyIntoleranceParticipantComponent.function");
449            else if (Configuration.doAutoCreate())
450              this.function = new CodeableConcept(); // cc
451          return this.function;
452        }
453
454        public boolean hasFunction() { 
455          return this.function != null && !this.function.isEmpty();
456        }
457
458        /**
459         * @param value {@link #function} (Distinguishes the type of involvement of the actor in the activities related to the allergy or intolerance.)
460         */
461        public AllergyIntoleranceParticipantComponent setFunction(CodeableConcept value) { 
462          this.function = value;
463          return this;
464        }
465
466        /**
467         * @return {@link #actor} (Indicates who or what participated in the activities related to the allergy or intolerance.)
468         */
469        public Reference getActor() { 
470          if (this.actor == null)
471            if (Configuration.errorOnAutoCreate())
472              throw new Error("Attempt to auto-create AllergyIntoleranceParticipantComponent.actor");
473            else if (Configuration.doAutoCreate())
474              this.actor = new Reference(); // cc
475          return this.actor;
476        }
477
478        public boolean hasActor() { 
479          return this.actor != null && !this.actor.isEmpty();
480        }
481
482        /**
483         * @param value {@link #actor} (Indicates who or what participated in the activities related to the allergy or intolerance.)
484         */
485        public AllergyIntoleranceParticipantComponent setActor(Reference value) { 
486          this.actor = value;
487          return this;
488        }
489
490        protected void listChildren(List<Property> children) {
491          super.listChildren(children);
492          children.add(new Property("function", "CodeableConcept", "Distinguishes the type of involvement of the actor in the activities related to the allergy or intolerance.", 0, 1, function));
493          children.add(new Property("actor", "Reference(Practitioner|PractitionerRole|Patient|RelatedPerson|Device|Organization|CareTeam)", "Indicates who or what participated in the activities related to the allergy or intolerance.", 0, 1, actor));
494        }
495
496        @Override
497        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
498          switch (_hash) {
499          case 1380938712: /*function*/  return new Property("function", "CodeableConcept", "Distinguishes the type of involvement of the actor in the activities related to the allergy or intolerance.", 0, 1, function);
500          case 92645877: /*actor*/  return new Property("actor", "Reference(Practitioner|PractitionerRole|Patient|RelatedPerson|Device|Organization|CareTeam)", "Indicates who or what participated in the activities related to the allergy or intolerance.", 0, 1, actor);
501          default: return super.getNamedProperty(_hash, _name, _checkValid);
502          }
503
504        }
505
506      @Override
507      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
508        switch (hash) {
509        case 1380938712: /*function*/ return this.function == null ? new Base[0] : new Base[] {this.function}; // CodeableConcept
510        case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference
511        default: return super.getProperty(hash, name, checkValid);
512        }
513
514      }
515
516      @Override
517      public Base setProperty(int hash, String name, Base value) throws FHIRException {
518        switch (hash) {
519        case 1380938712: // function
520          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
521          return value;
522        case 92645877: // actor
523          this.actor = TypeConvertor.castToReference(value); // Reference
524          return value;
525        default: return super.setProperty(hash, name, value);
526        }
527
528      }
529
530      @Override
531      public Base setProperty(String name, Base value) throws FHIRException {
532        if (name.equals("function")) {
533          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
534        } else if (name.equals("actor")) {
535          this.actor = TypeConvertor.castToReference(value); // Reference
536        } else
537          return super.setProperty(name, value);
538        return value;
539      }
540
541      @Override
542      public Base makeProperty(int hash, String name) throws FHIRException {
543        switch (hash) {
544        case 1380938712:  return getFunction();
545        case 92645877:  return getActor();
546        default: return super.makeProperty(hash, name);
547        }
548
549      }
550
551      @Override
552      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
553        switch (hash) {
554        case 1380938712: /*function*/ return new String[] {"CodeableConcept"};
555        case 92645877: /*actor*/ return new String[] {"Reference"};
556        default: return super.getTypesForProperty(hash, name);
557        }
558
559      }
560
561      @Override
562      public Base addChild(String name) throws FHIRException {
563        if (name.equals("function")) {
564          this.function = new CodeableConcept();
565          return this.function;
566        }
567        else if (name.equals("actor")) {
568          this.actor = new Reference();
569          return this.actor;
570        }
571        else
572          return super.addChild(name);
573      }
574
575      public AllergyIntoleranceParticipantComponent copy() {
576        AllergyIntoleranceParticipantComponent dst = new AllergyIntoleranceParticipantComponent();
577        copyValues(dst);
578        return dst;
579      }
580
581      public void copyValues(AllergyIntoleranceParticipantComponent dst) {
582        super.copyValues(dst);
583        dst.function = function == null ? null : function.copy();
584        dst.actor = actor == null ? null : actor.copy();
585      }
586
587      @Override
588      public boolean equalsDeep(Base other_) {
589        if (!super.equalsDeep(other_))
590          return false;
591        if (!(other_ instanceof AllergyIntoleranceParticipantComponent))
592          return false;
593        AllergyIntoleranceParticipantComponent o = (AllergyIntoleranceParticipantComponent) other_;
594        return compareDeep(function, o.function, true) && compareDeep(actor, o.actor, true);
595      }
596
597      @Override
598      public boolean equalsShallow(Base other_) {
599        if (!super.equalsShallow(other_))
600          return false;
601        if (!(other_ instanceof AllergyIntoleranceParticipantComponent))
602          return false;
603        AllergyIntoleranceParticipantComponent o = (AllergyIntoleranceParticipantComponent) other_;
604        return true;
605      }
606
607      public boolean isEmpty() {
608        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(function, actor);
609      }
610
611  public String fhirType() {
612    return "AllergyIntolerance.participant";
613
614  }
615
616  }
617
618    @Block()
619    public static class AllergyIntoleranceReactionComponent extends BackboneElement implements IBaseBackboneElement {
620        /**
621         * Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.
622         */
623        @Child(name = "substance", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
624        @Description(shortDefinition="Specific substance or pharmaceutical product considered to be responsible for event", formalDefinition="Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance." )
625        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/substance-code")
626        protected CodeableConcept substance;
627
628        /**
629         * Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.
630         */
631        @Child(name = "manifestation", type = {CodeableReference.class}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
632        @Description(shortDefinition="Clinical symptoms/signs associated with the Event", formalDefinition="Clinical symptoms and/or signs that are observed or associated with the adverse reaction event." )
633        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
634        protected List<CodeableReference> manifestation;
635
636        /**
637         * Text description about the reaction as a whole, including details of the manifestation if required.
638         */
639        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
640        @Description(shortDefinition="Description of the event as a whole", formalDefinition="Text description about the reaction as a whole, including details of the manifestation if required." )
641        protected StringType description;
642
643        /**
644         * Record of the date and/or time of the onset of the Reaction.
645         */
646        @Child(name = "onset", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=false)
647        @Description(shortDefinition="Date(/time) when manifestations showed", formalDefinition="Record of the date and/or time of the onset of the Reaction." )
648        protected DateTimeType onset;
649
650        /**
651         * Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.
652         */
653        @Child(name = "severity", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false)
654        @Description(shortDefinition="mild | moderate | severe (of event as a whole)", formalDefinition="Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations." )
655        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/reaction-event-severity")
656        protected Enumeration<AllergyIntoleranceSeverity> severity;
657
658        /**
659         * Identification of the route by which the subject was exposed to the substance.
660         */
661        @Child(name = "exposureRoute", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false)
662        @Description(shortDefinition="How the subject was exposed to the substance", formalDefinition="Identification of the route by which the subject was exposed to the substance." )
663        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/route-codes")
664        protected CodeableConcept exposureRoute;
665
666        /**
667         * Additional text about the adverse reaction event not captured in other fields.
668         */
669        @Child(name = "note", type = {Annotation.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
670        @Description(shortDefinition="Text about event not captured in other fields", formalDefinition="Additional text about the adverse reaction event not captured in other fields." )
671        protected List<Annotation> note;
672
673        private static final long serialVersionUID = 1007789961L;
674
675    /**
676     * Constructor
677     */
678      public AllergyIntoleranceReactionComponent() {
679        super();
680      }
681
682    /**
683     * Constructor
684     */
685      public AllergyIntoleranceReactionComponent(CodeableReference manifestation) {
686        super();
687        this.addManifestation(manifestation);
688      }
689
690        /**
691         * @return {@link #substance} (Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.)
692         */
693        public CodeableConcept getSubstance() { 
694          if (this.substance == null)
695            if (Configuration.errorOnAutoCreate())
696              throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.substance");
697            else if (Configuration.doAutoCreate())
698              this.substance = new CodeableConcept(); // cc
699          return this.substance;
700        }
701
702        public boolean hasSubstance() { 
703          return this.substance != null && !this.substance.isEmpty();
704        }
705
706        /**
707         * @param value {@link #substance} (Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.)
708         */
709        public AllergyIntoleranceReactionComponent setSubstance(CodeableConcept value) { 
710          this.substance = value;
711          return this;
712        }
713
714        /**
715         * @return {@link #manifestation} (Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.)
716         */
717        public List<CodeableReference> getManifestation() { 
718          if (this.manifestation == null)
719            this.manifestation = new ArrayList<CodeableReference>();
720          return this.manifestation;
721        }
722
723        /**
724         * @return Returns a reference to <code>this</code> for easy method chaining
725         */
726        public AllergyIntoleranceReactionComponent setManifestation(List<CodeableReference> theManifestation) { 
727          this.manifestation = theManifestation;
728          return this;
729        }
730
731        public boolean hasManifestation() { 
732          if (this.manifestation == null)
733            return false;
734          for (CodeableReference item : this.manifestation)
735            if (!item.isEmpty())
736              return true;
737          return false;
738        }
739
740        public CodeableReference addManifestation() { //3
741          CodeableReference t = new CodeableReference();
742          if (this.manifestation == null)
743            this.manifestation = new ArrayList<CodeableReference>();
744          this.manifestation.add(t);
745          return t;
746        }
747
748        public AllergyIntoleranceReactionComponent addManifestation(CodeableReference t) { //3
749          if (t == null)
750            return this;
751          if (this.manifestation == null)
752            this.manifestation = new ArrayList<CodeableReference>();
753          this.manifestation.add(t);
754          return this;
755        }
756
757        /**
758         * @return The first repetition of repeating field {@link #manifestation}, creating it if it does not already exist {3}
759         */
760        public CodeableReference getManifestationFirstRep() { 
761          if (getManifestation().isEmpty()) {
762            addManifestation();
763          }
764          return getManifestation().get(0);
765        }
766
767        /**
768         * @return {@link #description} (Text description about the reaction as a whole, including details of the manifestation if required.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
769         */
770        public StringType getDescriptionElement() { 
771          if (this.description == null)
772            if (Configuration.errorOnAutoCreate())
773              throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.description");
774            else if (Configuration.doAutoCreate())
775              this.description = new StringType(); // bb
776          return this.description;
777        }
778
779        public boolean hasDescriptionElement() { 
780          return this.description != null && !this.description.isEmpty();
781        }
782
783        public boolean hasDescription() { 
784          return this.description != null && !this.description.isEmpty();
785        }
786
787        /**
788         * @param value {@link #description} (Text description about the reaction as a whole, including details of the manifestation if required.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
789         */
790        public AllergyIntoleranceReactionComponent setDescriptionElement(StringType value) { 
791          this.description = value;
792          return this;
793        }
794
795        /**
796         * @return Text description about the reaction as a whole, including details of the manifestation if required.
797         */
798        public String getDescription() { 
799          return this.description == null ? null : this.description.getValue();
800        }
801
802        /**
803         * @param value Text description about the reaction as a whole, including details of the manifestation if required.
804         */
805        public AllergyIntoleranceReactionComponent setDescription(String value) { 
806          if (Utilities.noString(value))
807            this.description = null;
808          else {
809            if (this.description == null)
810              this.description = new StringType();
811            this.description.setValue(value);
812          }
813          return this;
814        }
815
816        /**
817         * @return {@link #onset} (Record of the date and/or time of the onset of the Reaction.). This is the underlying object with id, value and extensions. The accessor "getOnset" gives direct access to the value
818         */
819        public DateTimeType getOnsetElement() { 
820          if (this.onset == null)
821            if (Configuration.errorOnAutoCreate())
822              throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.onset");
823            else if (Configuration.doAutoCreate())
824              this.onset = new DateTimeType(); // bb
825          return this.onset;
826        }
827
828        public boolean hasOnsetElement() { 
829          return this.onset != null && !this.onset.isEmpty();
830        }
831
832        public boolean hasOnset() { 
833          return this.onset != null && !this.onset.isEmpty();
834        }
835
836        /**
837         * @param value {@link #onset} (Record of the date and/or time of the onset of the Reaction.). This is the underlying object with id, value and extensions. The accessor "getOnset" gives direct access to the value
838         */
839        public AllergyIntoleranceReactionComponent setOnsetElement(DateTimeType value) { 
840          this.onset = value;
841          return this;
842        }
843
844        /**
845         * @return Record of the date and/or time of the onset of the Reaction.
846         */
847        public Date getOnset() { 
848          return this.onset == null ? null : this.onset.getValue();
849        }
850
851        /**
852         * @param value Record of the date and/or time of the onset of the Reaction.
853         */
854        public AllergyIntoleranceReactionComponent setOnset(Date value) { 
855          if (value == null)
856            this.onset = null;
857          else {
858            if (this.onset == null)
859              this.onset = new DateTimeType();
860            this.onset.setValue(value);
861          }
862          return this;
863        }
864
865        /**
866         * @return {@link #severity} (Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value
867         */
868        public Enumeration<AllergyIntoleranceSeverity> getSeverityElement() { 
869          if (this.severity == null)
870            if (Configuration.errorOnAutoCreate())
871              throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.severity");
872            else if (Configuration.doAutoCreate())
873              this.severity = new Enumeration<AllergyIntoleranceSeverity>(new AllergyIntoleranceSeverityEnumFactory()); // bb
874          return this.severity;
875        }
876
877        public boolean hasSeverityElement() { 
878          return this.severity != null && !this.severity.isEmpty();
879        }
880
881        public boolean hasSeverity() { 
882          return this.severity != null && !this.severity.isEmpty();
883        }
884
885        /**
886         * @param value {@link #severity} (Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.). This is the underlying object with id, value and extensions. The accessor "getSeverity" gives direct access to the value
887         */
888        public AllergyIntoleranceReactionComponent setSeverityElement(Enumeration<AllergyIntoleranceSeverity> value) { 
889          this.severity = value;
890          return this;
891        }
892
893        /**
894         * @return Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.
895         */
896        public AllergyIntoleranceSeverity getSeverity() { 
897          return this.severity == null ? null : this.severity.getValue();
898        }
899
900        /**
901         * @param value Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.
902         */
903        public AllergyIntoleranceReactionComponent setSeverity(AllergyIntoleranceSeverity value) { 
904          if (value == null)
905            this.severity = null;
906          else {
907            if (this.severity == null)
908              this.severity = new Enumeration<AllergyIntoleranceSeverity>(new AllergyIntoleranceSeverityEnumFactory());
909            this.severity.setValue(value);
910          }
911          return this;
912        }
913
914        /**
915         * @return {@link #exposureRoute} (Identification of the route by which the subject was exposed to the substance.)
916         */
917        public CodeableConcept getExposureRoute() { 
918          if (this.exposureRoute == null)
919            if (Configuration.errorOnAutoCreate())
920              throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.exposureRoute");
921            else if (Configuration.doAutoCreate())
922              this.exposureRoute = new CodeableConcept(); // cc
923          return this.exposureRoute;
924        }
925
926        public boolean hasExposureRoute() { 
927          return this.exposureRoute != null && !this.exposureRoute.isEmpty();
928        }
929
930        /**
931         * @param value {@link #exposureRoute} (Identification of the route by which the subject was exposed to the substance.)
932         */
933        public AllergyIntoleranceReactionComponent setExposureRoute(CodeableConcept value) { 
934          this.exposureRoute = value;
935          return this;
936        }
937
938        /**
939         * @return {@link #note} (Additional text about the adverse reaction event not captured in other fields.)
940         */
941        public List<Annotation> getNote() { 
942          if (this.note == null)
943            this.note = new ArrayList<Annotation>();
944          return this.note;
945        }
946
947        /**
948         * @return Returns a reference to <code>this</code> for easy method chaining
949         */
950        public AllergyIntoleranceReactionComponent setNote(List<Annotation> theNote) { 
951          this.note = theNote;
952          return this;
953        }
954
955        public boolean hasNote() { 
956          if (this.note == null)
957            return false;
958          for (Annotation item : this.note)
959            if (!item.isEmpty())
960              return true;
961          return false;
962        }
963
964        public Annotation addNote() { //3
965          Annotation t = new Annotation();
966          if (this.note == null)
967            this.note = new ArrayList<Annotation>();
968          this.note.add(t);
969          return t;
970        }
971
972        public AllergyIntoleranceReactionComponent addNote(Annotation t) { //3
973          if (t == null)
974            return this;
975          if (this.note == null)
976            this.note = new ArrayList<Annotation>();
977          this.note.add(t);
978          return this;
979        }
980
981        /**
982         * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
983         */
984        public Annotation getNoteFirstRep() { 
985          if (getNote().isEmpty()) {
986            addNote();
987          }
988          return getNote().get(0);
989        }
990
991        protected void listChildren(List<Property> children) {
992          super.listChildren(children);
993          children.add(new Property("substance", "CodeableConcept", "Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.", 0, 1, substance));
994          children.add(new Property("manifestation", "CodeableReference(Observation)", "Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.", 0, java.lang.Integer.MAX_VALUE, manifestation));
995          children.add(new Property("description", "string", "Text description about the reaction as a whole, including details of the manifestation if required.", 0, 1, description));
996          children.add(new Property("onset", "dateTime", "Record of the date and/or time of the onset of the Reaction.", 0, 1, onset));
997          children.add(new Property("severity", "code", "Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.", 0, 1, severity));
998          children.add(new Property("exposureRoute", "CodeableConcept", "Identification of the route by which the subject was exposed to the substance.", 0, 1, exposureRoute));
999          children.add(new Property("note", "Annotation", "Additional text about the adverse reaction event not captured in other fields.", 0, java.lang.Integer.MAX_VALUE, note));
1000        }
1001
1002        @Override
1003        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1004          switch (_hash) {
1005          case 530040176: /*substance*/  return new Property("substance", "CodeableConcept", "Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.", 0, 1, substance);
1006          case 1115984422: /*manifestation*/  return new Property("manifestation", "CodeableReference(Observation)", "Clinical symptoms and/or signs that are observed or associated with the adverse reaction event.", 0, java.lang.Integer.MAX_VALUE, manifestation);
1007          case -1724546052: /*description*/  return new Property("description", "string", "Text description about the reaction as a whole, including details of the manifestation if required.", 0, 1, description);
1008          case 105901603: /*onset*/  return new Property("onset", "dateTime", "Record of the date and/or time of the onset of the Reaction.", 0, 1, onset);
1009          case 1478300413: /*severity*/  return new Property("severity", "code", "Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations.", 0, 1, severity);
1010          case 421286274: /*exposureRoute*/  return new Property("exposureRoute", "CodeableConcept", "Identification of the route by which the subject was exposed to the substance.", 0, 1, exposureRoute);
1011          case 3387378: /*note*/  return new Property("note", "Annotation", "Additional text about the adverse reaction event not captured in other fields.", 0, java.lang.Integer.MAX_VALUE, note);
1012          default: return super.getNamedProperty(_hash, _name, _checkValid);
1013          }
1014
1015        }
1016
1017      @Override
1018      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1019        switch (hash) {
1020        case 530040176: /*substance*/ return this.substance == null ? new Base[0] : new Base[] {this.substance}; // CodeableConcept
1021        case 1115984422: /*manifestation*/ return this.manifestation == null ? new Base[0] : this.manifestation.toArray(new Base[this.manifestation.size()]); // CodeableReference
1022        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1023        case 105901603: /*onset*/ return this.onset == null ? new Base[0] : new Base[] {this.onset}; // DateTimeType
1024        case 1478300413: /*severity*/ return this.severity == null ? new Base[0] : new Base[] {this.severity}; // Enumeration<AllergyIntoleranceSeverity>
1025        case 421286274: /*exposureRoute*/ return this.exposureRoute == null ? new Base[0] : new Base[] {this.exposureRoute}; // CodeableConcept
1026        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1027        default: return super.getProperty(hash, name, checkValid);
1028        }
1029
1030      }
1031
1032      @Override
1033      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1034        switch (hash) {
1035        case 530040176: // substance
1036          this.substance = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1037          return value;
1038        case 1115984422: // manifestation
1039          this.getManifestation().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
1040          return value;
1041        case -1724546052: // description
1042          this.description = TypeConvertor.castToString(value); // StringType
1043          return value;
1044        case 105901603: // onset
1045          this.onset = TypeConvertor.castToDateTime(value); // DateTimeType
1046          return value;
1047        case 1478300413: // severity
1048          value = new AllergyIntoleranceSeverityEnumFactory().fromType(TypeConvertor.castToCode(value));
1049          this.severity = (Enumeration) value; // Enumeration<AllergyIntoleranceSeverity>
1050          return value;
1051        case 421286274: // exposureRoute
1052          this.exposureRoute = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1053          return value;
1054        case 3387378: // note
1055          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1056          return value;
1057        default: return super.setProperty(hash, name, value);
1058        }
1059
1060      }
1061
1062      @Override
1063      public Base setProperty(String name, Base value) throws FHIRException {
1064        if (name.equals("substance")) {
1065          this.substance = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1066        } else if (name.equals("manifestation")) {
1067          this.getManifestation().add(TypeConvertor.castToCodeableReference(value));
1068        } else if (name.equals("description")) {
1069          this.description = TypeConvertor.castToString(value); // StringType
1070        } else if (name.equals("onset")) {
1071          this.onset = TypeConvertor.castToDateTime(value); // DateTimeType
1072        } else if (name.equals("severity")) {
1073          value = new AllergyIntoleranceSeverityEnumFactory().fromType(TypeConvertor.castToCode(value));
1074          this.severity = (Enumeration) value; // Enumeration<AllergyIntoleranceSeverity>
1075        } else if (name.equals("exposureRoute")) {
1076          this.exposureRoute = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1077        } else if (name.equals("note")) {
1078          this.getNote().add(TypeConvertor.castToAnnotation(value));
1079        } else
1080          return super.setProperty(name, value);
1081        return value;
1082      }
1083
1084      @Override
1085      public Base makeProperty(int hash, String name) throws FHIRException {
1086        switch (hash) {
1087        case 530040176:  return getSubstance();
1088        case 1115984422:  return addManifestation(); 
1089        case -1724546052:  return getDescriptionElement();
1090        case 105901603:  return getOnsetElement();
1091        case 1478300413:  return getSeverityElement();
1092        case 421286274:  return getExposureRoute();
1093        case 3387378:  return addNote(); 
1094        default: return super.makeProperty(hash, name);
1095        }
1096
1097      }
1098
1099      @Override
1100      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1101        switch (hash) {
1102        case 530040176: /*substance*/ return new String[] {"CodeableConcept"};
1103        case 1115984422: /*manifestation*/ return new String[] {"CodeableReference"};
1104        case -1724546052: /*description*/ return new String[] {"string"};
1105        case 105901603: /*onset*/ return new String[] {"dateTime"};
1106        case 1478300413: /*severity*/ return new String[] {"code"};
1107        case 421286274: /*exposureRoute*/ return new String[] {"CodeableConcept"};
1108        case 3387378: /*note*/ return new String[] {"Annotation"};
1109        default: return super.getTypesForProperty(hash, name);
1110        }
1111
1112      }
1113
1114      @Override
1115      public Base addChild(String name) throws FHIRException {
1116        if (name.equals("substance")) {
1117          this.substance = new CodeableConcept();
1118          return this.substance;
1119        }
1120        else if (name.equals("manifestation")) {
1121          return addManifestation();
1122        }
1123        else if (name.equals("description")) {
1124          throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.reaction.description");
1125        }
1126        else if (name.equals("onset")) {
1127          throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.reaction.onset");
1128        }
1129        else if (name.equals("severity")) {
1130          throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.reaction.severity");
1131        }
1132        else if (name.equals("exposureRoute")) {
1133          this.exposureRoute = new CodeableConcept();
1134          return this.exposureRoute;
1135        }
1136        else if (name.equals("note")) {
1137          return addNote();
1138        }
1139        else
1140          return super.addChild(name);
1141      }
1142
1143      public AllergyIntoleranceReactionComponent copy() {
1144        AllergyIntoleranceReactionComponent dst = new AllergyIntoleranceReactionComponent();
1145        copyValues(dst);
1146        return dst;
1147      }
1148
1149      public void copyValues(AllergyIntoleranceReactionComponent dst) {
1150        super.copyValues(dst);
1151        dst.substance = substance == null ? null : substance.copy();
1152        if (manifestation != null) {
1153          dst.manifestation = new ArrayList<CodeableReference>();
1154          for (CodeableReference i : manifestation)
1155            dst.manifestation.add(i.copy());
1156        };
1157        dst.description = description == null ? null : description.copy();
1158        dst.onset = onset == null ? null : onset.copy();
1159        dst.severity = severity == null ? null : severity.copy();
1160        dst.exposureRoute = exposureRoute == null ? null : exposureRoute.copy();
1161        if (note != null) {
1162          dst.note = new ArrayList<Annotation>();
1163          for (Annotation i : note)
1164            dst.note.add(i.copy());
1165        };
1166      }
1167
1168      @Override
1169      public boolean equalsDeep(Base other_) {
1170        if (!super.equalsDeep(other_))
1171          return false;
1172        if (!(other_ instanceof AllergyIntoleranceReactionComponent))
1173          return false;
1174        AllergyIntoleranceReactionComponent o = (AllergyIntoleranceReactionComponent) other_;
1175        return compareDeep(substance, o.substance, true) && compareDeep(manifestation, o.manifestation, true)
1176           && compareDeep(description, o.description, true) && compareDeep(onset, o.onset, true) && compareDeep(severity, o.severity, true)
1177           && compareDeep(exposureRoute, o.exposureRoute, true) && compareDeep(note, o.note, true);
1178      }
1179
1180      @Override
1181      public boolean equalsShallow(Base other_) {
1182        if (!super.equalsShallow(other_))
1183          return false;
1184        if (!(other_ instanceof AllergyIntoleranceReactionComponent))
1185          return false;
1186        AllergyIntoleranceReactionComponent o = (AllergyIntoleranceReactionComponent) other_;
1187        return compareValues(description, o.description, true) && compareValues(onset, o.onset, true) && compareValues(severity, o.severity, true)
1188          ;
1189      }
1190
1191      public boolean isEmpty() {
1192        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(substance, manifestation, description
1193          , onset, severity, exposureRoute, note);
1194      }
1195
1196  public String fhirType() {
1197    return "AllergyIntolerance.reaction";
1198
1199  }
1200
1201  }
1202
1203    /**
1204     * Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.
1205     */
1206    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1207    @Description(shortDefinition="External ids for this item", formalDefinition="Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server." )
1208    protected List<Identifier> identifier;
1209
1210    /**
1211     * The clinical status of the allergy or intolerance.
1212     */
1213    @Child(name = "clinicalStatus", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=true, summary=true)
1214    @Description(shortDefinition="active | inactive | resolved", formalDefinition="The clinical status of the allergy or intolerance." )
1215    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/allergyintolerance-clinical")
1216    protected CodeableConcept clinicalStatus;
1217
1218    /**
1219     * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).  The verification status pertains to the allergy or intolerance, itself, not to any specific AllergyIntolerance attribute.
1220     */
1221    @Child(name = "verificationStatus", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=true, summary=true)
1222    @Description(shortDefinition="unconfirmed | presumed | confirmed | refuted | entered-in-error", formalDefinition="Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).  The verification status pertains to the allergy or intolerance, itself, not to any specific AllergyIntolerance attribute." )
1223    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/allergyintolerance-verification")
1224    protected CodeableConcept verificationStatus;
1225
1226    /**
1227     * Identification of the underlying physiological mechanism for the reaction risk.
1228     */
1229    @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true)
1230    @Description(shortDefinition="allergy | intolerance - Underlying mechanism (if known)", formalDefinition="Identification of the underlying physiological mechanism for the reaction risk." )
1231    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/allergy-intolerance-type")
1232    protected CodeableConcept type;
1233
1234    /**
1235     * Category of the identified substance.
1236     */
1237    @Child(name = "category", type = {CodeType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1238    @Description(shortDefinition="food | medication | environment | biologic", formalDefinition="Category of the identified substance." )
1239    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/allergy-intolerance-category")
1240    protected List<Enumeration<AllergyIntoleranceCategory>> category;
1241
1242    /**
1243     * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.
1244     */
1245    @Child(name = "criticality", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=true)
1246    @Description(shortDefinition="low | high | unable-to-assess", formalDefinition="Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance." )
1247    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality")
1248    protected Enumeration<AllergyIntoleranceCriticality> criticality;
1249
1250    /**
1251     * Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., "Latex"), an allergy or intolerance condition (e.g., "Latex allergy"), or a negated/excluded code for a specific substance or class (e.g., "No latex allergy") or a general or categorical negated statement (e.g.,  "No known allergy", "No known drug allergies").  Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.
1252     */
1253    @Child(name = "code", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=true)
1254    @Description(shortDefinition="Code that identifies the allergy or intolerance", formalDefinition="Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., \"Latex\"), an allergy or intolerance condition (e.g., \"Latex allergy\"), or a negated/excluded code for a specific substance or class (e.g., \"No latex allergy\") or a general or categorical negated statement (e.g.,  \"No known allergy\", \"No known drug allergies\").  Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance." )
1255    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/allergyintolerance-code")
1256    protected CodeableConcept code;
1257
1258    /**
1259     * The patient who has the allergy or intolerance.
1260     */
1261    @Child(name = "patient", type = {Patient.class}, order=7, min=1, max=1, modifier=false, summary=true)
1262    @Description(shortDefinition="Who the allergy or intolerance is for", formalDefinition="The patient who has the allergy or intolerance." )
1263    protected Reference patient;
1264
1265    /**
1266     * The encounter when the allergy or intolerance was asserted.
1267     */
1268    @Child(name = "encounter", type = {Encounter.class}, order=8, min=0, max=1, modifier=false, summary=false)
1269    @Description(shortDefinition="Encounter when the allergy or intolerance was asserted", formalDefinition="The encounter when the allergy or intolerance was asserted." )
1270    protected Reference encounter;
1271
1272    /**
1273     * Estimated or actual date,  date-time, or age when allergy or intolerance was identified.
1274     */
1275    @Child(name = "onset", type = {DateTimeType.class, Age.class, Period.class, Range.class, StringType.class}, order=9, min=0, max=1, modifier=false, summary=false)
1276    @Description(shortDefinition="When allergy or intolerance was identified", formalDefinition="Estimated or actual date,  date-time, or age when allergy or intolerance was identified." )
1277    protected DataType onset;
1278
1279    /**
1280     * The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.
1281     */
1282    @Child(name = "recordedDate", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=false)
1283    @Description(shortDefinition="Date allergy or intolerance was first recorded", formalDefinition="The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date." )
1284    protected DateTimeType recordedDate;
1285
1286    /**
1287     * Indicates who or what participated in the activities related to the allergy or intolerance and how they were involved.
1288     */
1289    @Child(name = "participant", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1290    @Description(shortDefinition="Who or what participated in the activities related to the allergy or intolerance and how they were involved", formalDefinition="Indicates who or what participated in the activities related to the allergy or intolerance and how they were involved." )
1291    protected List<AllergyIntoleranceParticipantComponent> participant;
1292
1293    /**
1294     * Represents the date and/or time of the last known occurrence of a reaction event.
1295     */
1296    @Child(name = "lastOccurrence", type = {DateTimeType.class}, order=12, min=0, max=1, modifier=false, summary=false)
1297    @Description(shortDefinition="Date(/time) of last known occurrence of a reaction", formalDefinition="Represents the date and/or time of the last known occurrence of a reaction event." )
1298    protected DateTimeType lastOccurrence;
1299
1300    /**
1301     * Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.
1302     */
1303    @Child(name = "note", type = {Annotation.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1304    @Description(shortDefinition="Additional text not captured in other fields", formalDefinition="Additional narrative about the propensity for the Adverse Reaction, not captured in other fields." )
1305    protected List<Annotation> note;
1306
1307    /**
1308     * Details about each adverse reaction event linked to exposure to the identified substance.
1309     */
1310    @Child(name = "reaction", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1311    @Description(shortDefinition="Adverse Reaction Events linked to exposure to substance", formalDefinition="Details about each adverse reaction event linked to exposure to the identified substance." )
1312    protected List<AllergyIntoleranceReactionComponent> reaction;
1313
1314    private static final long serialVersionUID = -1955746770L;
1315
1316  /**
1317   * Constructor
1318   */
1319    public AllergyIntolerance() {
1320      super();
1321    }
1322
1323  /**
1324   * Constructor
1325   */
1326    public AllergyIntolerance(Reference patient) {
1327      super();
1328      this.setPatient(patient);
1329    }
1330
1331    /**
1332     * @return {@link #identifier} (Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.)
1333     */
1334    public List<Identifier> getIdentifier() { 
1335      if (this.identifier == null)
1336        this.identifier = new ArrayList<Identifier>();
1337      return this.identifier;
1338    }
1339
1340    /**
1341     * @return Returns a reference to <code>this</code> for easy method chaining
1342     */
1343    public AllergyIntolerance setIdentifier(List<Identifier> theIdentifier) { 
1344      this.identifier = theIdentifier;
1345      return this;
1346    }
1347
1348    public boolean hasIdentifier() { 
1349      if (this.identifier == null)
1350        return false;
1351      for (Identifier item : this.identifier)
1352        if (!item.isEmpty())
1353          return true;
1354      return false;
1355    }
1356
1357    public Identifier addIdentifier() { //3
1358      Identifier t = new Identifier();
1359      if (this.identifier == null)
1360        this.identifier = new ArrayList<Identifier>();
1361      this.identifier.add(t);
1362      return t;
1363    }
1364
1365    public AllergyIntolerance addIdentifier(Identifier t) { //3
1366      if (t == null)
1367        return this;
1368      if (this.identifier == null)
1369        this.identifier = new ArrayList<Identifier>();
1370      this.identifier.add(t);
1371      return this;
1372    }
1373
1374    /**
1375     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1376     */
1377    public Identifier getIdentifierFirstRep() { 
1378      if (getIdentifier().isEmpty()) {
1379        addIdentifier();
1380      }
1381      return getIdentifier().get(0);
1382    }
1383
1384    /**
1385     * @return {@link #clinicalStatus} (The clinical status of the allergy or intolerance.)
1386     */
1387    public CodeableConcept getClinicalStatus() { 
1388      if (this.clinicalStatus == null)
1389        if (Configuration.errorOnAutoCreate())
1390          throw new Error("Attempt to auto-create AllergyIntolerance.clinicalStatus");
1391        else if (Configuration.doAutoCreate())
1392          this.clinicalStatus = new CodeableConcept(); // cc
1393      return this.clinicalStatus;
1394    }
1395
1396    public boolean hasClinicalStatus() { 
1397      return this.clinicalStatus != null && !this.clinicalStatus.isEmpty();
1398    }
1399
1400    /**
1401     * @param value {@link #clinicalStatus} (The clinical status of the allergy or intolerance.)
1402     */
1403    public AllergyIntolerance setClinicalStatus(CodeableConcept value) { 
1404      this.clinicalStatus = value;
1405      return this;
1406    }
1407
1408    /**
1409     * @return {@link #verificationStatus} (Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).  The verification status pertains to the allergy or intolerance, itself, not to any specific AllergyIntolerance attribute.)
1410     */
1411    public CodeableConcept getVerificationStatus() { 
1412      if (this.verificationStatus == null)
1413        if (Configuration.errorOnAutoCreate())
1414          throw new Error("Attempt to auto-create AllergyIntolerance.verificationStatus");
1415        else if (Configuration.doAutoCreate())
1416          this.verificationStatus = new CodeableConcept(); // cc
1417      return this.verificationStatus;
1418    }
1419
1420    public boolean hasVerificationStatus() { 
1421      return this.verificationStatus != null && !this.verificationStatus.isEmpty();
1422    }
1423
1424    /**
1425     * @param value {@link #verificationStatus} (Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).  The verification status pertains to the allergy or intolerance, itself, not to any specific AllergyIntolerance attribute.)
1426     */
1427    public AllergyIntolerance setVerificationStatus(CodeableConcept value) { 
1428      this.verificationStatus = value;
1429      return this;
1430    }
1431
1432    /**
1433     * @return {@link #type} (Identification of the underlying physiological mechanism for the reaction risk.)
1434     */
1435    public CodeableConcept getType() { 
1436      if (this.type == null)
1437        if (Configuration.errorOnAutoCreate())
1438          throw new Error("Attempt to auto-create AllergyIntolerance.type");
1439        else if (Configuration.doAutoCreate())
1440          this.type = new CodeableConcept(); // cc
1441      return this.type;
1442    }
1443
1444    public boolean hasType() { 
1445      return this.type != null && !this.type.isEmpty();
1446    }
1447
1448    /**
1449     * @param value {@link #type} (Identification of the underlying physiological mechanism for the reaction risk.)
1450     */
1451    public AllergyIntolerance setType(CodeableConcept value) { 
1452      this.type = value;
1453      return this;
1454    }
1455
1456    /**
1457     * @return {@link #category} (Category of the identified substance.)
1458     */
1459    public List<Enumeration<AllergyIntoleranceCategory>> getCategory() { 
1460      if (this.category == null)
1461        this.category = new ArrayList<Enumeration<AllergyIntoleranceCategory>>();
1462      return this.category;
1463    }
1464
1465    /**
1466     * @return Returns a reference to <code>this</code> for easy method chaining
1467     */
1468    public AllergyIntolerance setCategory(List<Enumeration<AllergyIntoleranceCategory>> theCategory) { 
1469      this.category = theCategory;
1470      return this;
1471    }
1472
1473    public boolean hasCategory() { 
1474      if (this.category == null)
1475        return false;
1476      for (Enumeration<AllergyIntoleranceCategory> item : this.category)
1477        if (!item.isEmpty())
1478          return true;
1479      return false;
1480    }
1481
1482    /**
1483     * @return {@link #category} (Category of the identified substance.)
1484     */
1485    public Enumeration<AllergyIntoleranceCategory> addCategoryElement() {//2 
1486      Enumeration<AllergyIntoleranceCategory> t = new Enumeration<AllergyIntoleranceCategory>(new AllergyIntoleranceCategoryEnumFactory());
1487      if (this.category == null)
1488        this.category = new ArrayList<Enumeration<AllergyIntoleranceCategory>>();
1489      this.category.add(t);
1490      return t;
1491    }
1492
1493    /**
1494     * @param value {@link #category} (Category of the identified substance.)
1495     */
1496    public AllergyIntolerance addCategory(AllergyIntoleranceCategory value) { //1
1497      Enumeration<AllergyIntoleranceCategory> t = new Enumeration<AllergyIntoleranceCategory>(new AllergyIntoleranceCategoryEnumFactory());
1498      t.setValue(value);
1499      if (this.category == null)
1500        this.category = new ArrayList<Enumeration<AllergyIntoleranceCategory>>();
1501      this.category.add(t);
1502      return this;
1503    }
1504
1505    /**
1506     * @param value {@link #category} (Category of the identified substance.)
1507     */
1508    public boolean hasCategory(AllergyIntoleranceCategory value) { 
1509      if (this.category == null)
1510        return false;
1511      for (Enumeration<AllergyIntoleranceCategory> v : this.category)
1512        if (v.getValue().equals(value)) // code
1513          return true;
1514      return false;
1515    }
1516
1517    /**
1518     * @return {@link #criticality} (Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.). This is the underlying object with id, value and extensions. The accessor "getCriticality" gives direct access to the value
1519     */
1520    public Enumeration<AllergyIntoleranceCriticality> getCriticalityElement() { 
1521      if (this.criticality == null)
1522        if (Configuration.errorOnAutoCreate())
1523          throw new Error("Attempt to auto-create AllergyIntolerance.criticality");
1524        else if (Configuration.doAutoCreate())
1525          this.criticality = new Enumeration<AllergyIntoleranceCriticality>(new AllergyIntoleranceCriticalityEnumFactory()); // bb
1526      return this.criticality;
1527    }
1528
1529    public boolean hasCriticalityElement() { 
1530      return this.criticality != null && !this.criticality.isEmpty();
1531    }
1532
1533    public boolean hasCriticality() { 
1534      return this.criticality != null && !this.criticality.isEmpty();
1535    }
1536
1537    /**
1538     * @param value {@link #criticality} (Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.). This is the underlying object with id, value and extensions. The accessor "getCriticality" gives direct access to the value
1539     */
1540    public AllergyIntolerance setCriticalityElement(Enumeration<AllergyIntoleranceCriticality> value) { 
1541      this.criticality = value;
1542      return this;
1543    }
1544
1545    /**
1546     * @return Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.
1547     */
1548    public AllergyIntoleranceCriticality getCriticality() { 
1549      return this.criticality == null ? null : this.criticality.getValue();
1550    }
1551
1552    /**
1553     * @param value Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.
1554     */
1555    public AllergyIntolerance setCriticality(AllergyIntoleranceCriticality value) { 
1556      if (value == null)
1557        this.criticality = null;
1558      else {
1559        if (this.criticality == null)
1560          this.criticality = new Enumeration<AllergyIntoleranceCriticality>(new AllergyIntoleranceCriticalityEnumFactory());
1561        this.criticality.setValue(value);
1562      }
1563      return this;
1564    }
1565
1566    /**
1567     * @return {@link #code} (Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., "Latex"), an allergy or intolerance condition (e.g., "Latex allergy"), or a negated/excluded code for a specific substance or class (e.g., "No latex allergy") or a general or categorical negated statement (e.g.,  "No known allergy", "No known drug allergies").  Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.)
1568     */
1569    public CodeableConcept getCode() { 
1570      if (this.code == null)
1571        if (Configuration.errorOnAutoCreate())
1572          throw new Error("Attempt to auto-create AllergyIntolerance.code");
1573        else if (Configuration.doAutoCreate())
1574          this.code = new CodeableConcept(); // cc
1575      return this.code;
1576    }
1577
1578    public boolean hasCode() { 
1579      return this.code != null && !this.code.isEmpty();
1580    }
1581
1582    /**
1583     * @param value {@link #code} (Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., "Latex"), an allergy or intolerance condition (e.g., "Latex allergy"), or a negated/excluded code for a specific substance or class (e.g., "No latex allergy") or a general or categorical negated statement (e.g.,  "No known allergy", "No known drug allergies").  Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.)
1584     */
1585    public AllergyIntolerance setCode(CodeableConcept value) { 
1586      this.code = value;
1587      return this;
1588    }
1589
1590    /**
1591     * @return {@link #patient} (The patient who has the allergy or intolerance.)
1592     */
1593    public Reference getPatient() { 
1594      if (this.patient == null)
1595        if (Configuration.errorOnAutoCreate())
1596          throw new Error("Attempt to auto-create AllergyIntolerance.patient");
1597        else if (Configuration.doAutoCreate())
1598          this.patient = new Reference(); // cc
1599      return this.patient;
1600    }
1601
1602    public boolean hasPatient() { 
1603      return this.patient != null && !this.patient.isEmpty();
1604    }
1605
1606    /**
1607     * @param value {@link #patient} (The patient who has the allergy or intolerance.)
1608     */
1609    public AllergyIntolerance setPatient(Reference value) { 
1610      this.patient = value;
1611      return this;
1612    }
1613
1614    /**
1615     * @return {@link #encounter} (The encounter when the allergy or intolerance was asserted.)
1616     */
1617    public Reference getEncounter() { 
1618      if (this.encounter == null)
1619        if (Configuration.errorOnAutoCreate())
1620          throw new Error("Attempt to auto-create AllergyIntolerance.encounter");
1621        else if (Configuration.doAutoCreate())
1622          this.encounter = new Reference(); // cc
1623      return this.encounter;
1624    }
1625
1626    public boolean hasEncounter() { 
1627      return this.encounter != null && !this.encounter.isEmpty();
1628    }
1629
1630    /**
1631     * @param value {@link #encounter} (The encounter when the allergy or intolerance was asserted.)
1632     */
1633    public AllergyIntolerance setEncounter(Reference value) { 
1634      this.encounter = value;
1635      return this;
1636    }
1637
1638    /**
1639     * @return {@link #onset} (Estimated or actual date,  date-time, or age when allergy or intolerance was identified.)
1640     */
1641    public DataType getOnset() { 
1642      return this.onset;
1643    }
1644
1645    /**
1646     * @return {@link #onset} (Estimated or actual date,  date-time, or age when allergy or intolerance was identified.)
1647     */
1648    public DateTimeType getOnsetDateTimeType() throws FHIRException { 
1649      if (this.onset == null)
1650        this.onset = new DateTimeType();
1651      if (!(this.onset instanceof DateTimeType))
1652        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.onset.getClass().getName()+" was encountered");
1653      return (DateTimeType) this.onset;
1654    }
1655
1656    public boolean hasOnsetDateTimeType() { 
1657      return this != null && this.onset instanceof DateTimeType;
1658    }
1659
1660    /**
1661     * @return {@link #onset} (Estimated or actual date,  date-time, or age when allergy or intolerance was identified.)
1662     */
1663    public Age getOnsetAge() throws FHIRException { 
1664      if (this.onset == null)
1665        this.onset = new Age();
1666      if (!(this.onset instanceof Age))
1667        throw new FHIRException("Type mismatch: the type Age was expected, but "+this.onset.getClass().getName()+" was encountered");
1668      return (Age) this.onset;
1669    }
1670
1671    public boolean hasOnsetAge() { 
1672      return this != null && this.onset instanceof Age;
1673    }
1674
1675    /**
1676     * @return {@link #onset} (Estimated or actual date,  date-time, or age when allergy or intolerance was identified.)
1677     */
1678    public Period getOnsetPeriod() throws FHIRException { 
1679      if (this.onset == null)
1680        this.onset = new Period();
1681      if (!(this.onset instanceof Period))
1682        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.onset.getClass().getName()+" was encountered");
1683      return (Period) this.onset;
1684    }
1685
1686    public boolean hasOnsetPeriod() { 
1687      return this != null && this.onset instanceof Period;
1688    }
1689
1690    /**
1691     * @return {@link #onset} (Estimated or actual date,  date-time, or age when allergy or intolerance was identified.)
1692     */
1693    public Range getOnsetRange() throws FHIRException { 
1694      if (this.onset == null)
1695        this.onset = new Range();
1696      if (!(this.onset instanceof Range))
1697        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.onset.getClass().getName()+" was encountered");
1698      return (Range) this.onset;
1699    }
1700
1701    public boolean hasOnsetRange() { 
1702      return this != null && this.onset instanceof Range;
1703    }
1704
1705    /**
1706     * @return {@link #onset} (Estimated or actual date,  date-time, or age when allergy or intolerance was identified.)
1707     */
1708    public StringType getOnsetStringType() throws FHIRException { 
1709      if (this.onset == null)
1710        this.onset = new StringType();
1711      if (!(this.onset instanceof StringType))
1712        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.onset.getClass().getName()+" was encountered");
1713      return (StringType) this.onset;
1714    }
1715
1716    public boolean hasOnsetStringType() { 
1717      return this != null && this.onset instanceof StringType;
1718    }
1719
1720    public boolean hasOnset() { 
1721      return this.onset != null && !this.onset.isEmpty();
1722    }
1723
1724    /**
1725     * @param value {@link #onset} (Estimated or actual date,  date-time, or age when allergy or intolerance was identified.)
1726     */
1727    public AllergyIntolerance setOnset(DataType value) { 
1728      if (value != null && !(value instanceof DateTimeType || value instanceof Age || value instanceof Period || value instanceof Range || value instanceof StringType))
1729        throw new FHIRException("Not the right type for AllergyIntolerance.onset[x]: "+value.fhirType());
1730      this.onset = value;
1731      return this;
1732    }
1733
1734    /**
1735     * @return {@link #recordedDate} (The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.). This is the underlying object with id, value and extensions. The accessor "getRecordedDate" gives direct access to the value
1736     */
1737    public DateTimeType getRecordedDateElement() { 
1738      if (this.recordedDate == null)
1739        if (Configuration.errorOnAutoCreate())
1740          throw new Error("Attempt to auto-create AllergyIntolerance.recordedDate");
1741        else if (Configuration.doAutoCreate())
1742          this.recordedDate = new DateTimeType(); // bb
1743      return this.recordedDate;
1744    }
1745
1746    public boolean hasRecordedDateElement() { 
1747      return this.recordedDate != null && !this.recordedDate.isEmpty();
1748    }
1749
1750    public boolean hasRecordedDate() { 
1751      return this.recordedDate != null && !this.recordedDate.isEmpty();
1752    }
1753
1754    /**
1755     * @param value {@link #recordedDate} (The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.). This is the underlying object with id, value and extensions. The accessor "getRecordedDate" gives direct access to the value
1756     */
1757    public AllergyIntolerance setRecordedDateElement(DateTimeType value) { 
1758      this.recordedDate = value;
1759      return this;
1760    }
1761
1762    /**
1763     * @return The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.
1764     */
1765    public Date getRecordedDate() { 
1766      return this.recordedDate == null ? null : this.recordedDate.getValue();
1767    }
1768
1769    /**
1770     * @param value The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.
1771     */
1772    public AllergyIntolerance setRecordedDate(Date value) { 
1773      if (value == null)
1774        this.recordedDate = null;
1775      else {
1776        if (this.recordedDate == null)
1777          this.recordedDate = new DateTimeType();
1778        this.recordedDate.setValue(value);
1779      }
1780      return this;
1781    }
1782
1783    /**
1784     * @return {@link #participant} (Indicates who or what participated in the activities related to the allergy or intolerance and how they were involved.)
1785     */
1786    public List<AllergyIntoleranceParticipantComponent> getParticipant() { 
1787      if (this.participant == null)
1788        this.participant = new ArrayList<AllergyIntoleranceParticipantComponent>();
1789      return this.participant;
1790    }
1791
1792    /**
1793     * @return Returns a reference to <code>this</code> for easy method chaining
1794     */
1795    public AllergyIntolerance setParticipant(List<AllergyIntoleranceParticipantComponent> theParticipant) { 
1796      this.participant = theParticipant;
1797      return this;
1798    }
1799
1800    public boolean hasParticipant() { 
1801      if (this.participant == null)
1802        return false;
1803      for (AllergyIntoleranceParticipantComponent item : this.participant)
1804        if (!item.isEmpty())
1805          return true;
1806      return false;
1807    }
1808
1809    public AllergyIntoleranceParticipantComponent addParticipant() { //3
1810      AllergyIntoleranceParticipantComponent t = new AllergyIntoleranceParticipantComponent();
1811      if (this.participant == null)
1812        this.participant = new ArrayList<AllergyIntoleranceParticipantComponent>();
1813      this.participant.add(t);
1814      return t;
1815    }
1816
1817    public AllergyIntolerance addParticipant(AllergyIntoleranceParticipantComponent t) { //3
1818      if (t == null)
1819        return this;
1820      if (this.participant == null)
1821        this.participant = new ArrayList<AllergyIntoleranceParticipantComponent>();
1822      this.participant.add(t);
1823      return this;
1824    }
1825
1826    /**
1827     * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist {3}
1828     */
1829    public AllergyIntoleranceParticipantComponent getParticipantFirstRep() { 
1830      if (getParticipant().isEmpty()) {
1831        addParticipant();
1832      }
1833      return getParticipant().get(0);
1834    }
1835
1836    /**
1837     * @return {@link #lastOccurrence} (Represents the date and/or time of the last known occurrence of a reaction event.). This is the underlying object with id, value and extensions. The accessor "getLastOccurrence" gives direct access to the value
1838     */
1839    public DateTimeType getLastOccurrenceElement() { 
1840      if (this.lastOccurrence == null)
1841        if (Configuration.errorOnAutoCreate())
1842          throw new Error("Attempt to auto-create AllergyIntolerance.lastOccurrence");
1843        else if (Configuration.doAutoCreate())
1844          this.lastOccurrence = new DateTimeType(); // bb
1845      return this.lastOccurrence;
1846    }
1847
1848    public boolean hasLastOccurrenceElement() { 
1849      return this.lastOccurrence != null && !this.lastOccurrence.isEmpty();
1850    }
1851
1852    public boolean hasLastOccurrence() { 
1853      return this.lastOccurrence != null && !this.lastOccurrence.isEmpty();
1854    }
1855
1856    /**
1857     * @param value {@link #lastOccurrence} (Represents the date and/or time of the last known occurrence of a reaction event.). This is the underlying object with id, value and extensions. The accessor "getLastOccurrence" gives direct access to the value
1858     */
1859    public AllergyIntolerance setLastOccurrenceElement(DateTimeType value) { 
1860      this.lastOccurrence = value;
1861      return this;
1862    }
1863
1864    /**
1865     * @return Represents the date and/or time of the last known occurrence of a reaction event.
1866     */
1867    public Date getLastOccurrence() { 
1868      return this.lastOccurrence == null ? null : this.lastOccurrence.getValue();
1869    }
1870
1871    /**
1872     * @param value Represents the date and/or time of the last known occurrence of a reaction event.
1873     */
1874    public AllergyIntolerance setLastOccurrence(Date value) { 
1875      if (value == null)
1876        this.lastOccurrence = null;
1877      else {
1878        if (this.lastOccurrence == null)
1879          this.lastOccurrence = new DateTimeType();
1880        this.lastOccurrence.setValue(value);
1881      }
1882      return this;
1883    }
1884
1885    /**
1886     * @return {@link #note} (Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.)
1887     */
1888    public List<Annotation> getNote() { 
1889      if (this.note == null)
1890        this.note = new ArrayList<Annotation>();
1891      return this.note;
1892    }
1893
1894    /**
1895     * @return Returns a reference to <code>this</code> for easy method chaining
1896     */
1897    public AllergyIntolerance setNote(List<Annotation> theNote) { 
1898      this.note = theNote;
1899      return this;
1900    }
1901
1902    public boolean hasNote() { 
1903      if (this.note == null)
1904        return false;
1905      for (Annotation item : this.note)
1906        if (!item.isEmpty())
1907          return true;
1908      return false;
1909    }
1910
1911    public Annotation addNote() { //3
1912      Annotation t = new Annotation();
1913      if (this.note == null)
1914        this.note = new ArrayList<Annotation>();
1915      this.note.add(t);
1916      return t;
1917    }
1918
1919    public AllergyIntolerance addNote(Annotation t) { //3
1920      if (t == null)
1921        return this;
1922      if (this.note == null)
1923        this.note = new ArrayList<Annotation>();
1924      this.note.add(t);
1925      return this;
1926    }
1927
1928    /**
1929     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1930     */
1931    public Annotation getNoteFirstRep() { 
1932      if (getNote().isEmpty()) {
1933        addNote();
1934      }
1935      return getNote().get(0);
1936    }
1937
1938    /**
1939     * @return {@link #reaction} (Details about each adverse reaction event linked to exposure to the identified substance.)
1940     */
1941    public List<AllergyIntoleranceReactionComponent> getReaction() { 
1942      if (this.reaction == null)
1943        this.reaction = new ArrayList<AllergyIntoleranceReactionComponent>();
1944      return this.reaction;
1945    }
1946
1947    /**
1948     * @return Returns a reference to <code>this</code> for easy method chaining
1949     */
1950    public AllergyIntolerance setReaction(List<AllergyIntoleranceReactionComponent> theReaction) { 
1951      this.reaction = theReaction;
1952      return this;
1953    }
1954
1955    public boolean hasReaction() { 
1956      if (this.reaction == null)
1957        return false;
1958      for (AllergyIntoleranceReactionComponent item : this.reaction)
1959        if (!item.isEmpty())
1960          return true;
1961      return false;
1962    }
1963
1964    public AllergyIntoleranceReactionComponent addReaction() { //3
1965      AllergyIntoleranceReactionComponent t = new AllergyIntoleranceReactionComponent();
1966      if (this.reaction == null)
1967        this.reaction = new ArrayList<AllergyIntoleranceReactionComponent>();
1968      this.reaction.add(t);
1969      return t;
1970    }
1971
1972    public AllergyIntolerance addReaction(AllergyIntoleranceReactionComponent t) { //3
1973      if (t == null)
1974        return this;
1975      if (this.reaction == null)
1976        this.reaction = new ArrayList<AllergyIntoleranceReactionComponent>();
1977      this.reaction.add(t);
1978      return this;
1979    }
1980
1981    /**
1982     * @return The first repetition of repeating field {@link #reaction}, creating it if it does not already exist {3}
1983     */
1984    public AllergyIntoleranceReactionComponent getReactionFirstRep() { 
1985      if (getReaction().isEmpty()) {
1986        addReaction();
1987      }
1988      return getReaction().get(0);
1989    }
1990
1991      protected void listChildren(List<Property> children) {
1992        super.listChildren(children);
1993        children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier));
1994        children.add(new Property("clinicalStatus", "CodeableConcept", "The clinical status of the allergy or intolerance.", 0, 1, clinicalStatus));
1995        children.add(new Property("verificationStatus", "CodeableConcept", "Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).  The verification status pertains to the allergy or intolerance, itself, not to any specific AllergyIntolerance attribute.", 0, 1, verificationStatus));
1996        children.add(new Property("type", "CodeableConcept", "Identification of the underlying physiological mechanism for the reaction risk.", 0, 1, type));
1997        children.add(new Property("category", "code", "Category of the identified substance.", 0, java.lang.Integer.MAX_VALUE, category));
1998        children.add(new Property("criticality", "code", "Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.", 0, 1, criticality));
1999        children.add(new Property("code", "CodeableConcept", "Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., \"Latex\"), an allergy or intolerance condition (e.g., \"Latex allergy\"), or a negated/excluded code for a specific substance or class (e.g., \"No latex allergy\") or a general or categorical negated statement (e.g.,  \"No known allergy\", \"No known drug allergies\").  Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.", 0, 1, code));
2000        children.add(new Property("patient", "Reference(Patient)", "The patient who has the allergy or intolerance.", 0, 1, patient));
2001        children.add(new Property("encounter", "Reference(Encounter)", "The encounter when the allergy or intolerance was asserted.", 0, 1, encounter));
2002        children.add(new Property("onset[x]", "dateTime|Age|Period|Range|string", "Estimated or actual date,  date-time, or age when allergy or intolerance was identified.", 0, 1, onset));
2003        children.add(new Property("recordedDate", "dateTime", "The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.", 0, 1, recordedDate));
2004        children.add(new Property("participant", "", "Indicates who or what participated in the activities related to the allergy or intolerance and how they were involved.", 0, java.lang.Integer.MAX_VALUE, participant));
2005        children.add(new Property("lastOccurrence", "dateTime", "Represents the date and/or time of the last known occurrence of a reaction event.", 0, 1, lastOccurrence));
2006        children.add(new Property("note", "Annotation", "Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.", 0, java.lang.Integer.MAX_VALUE, note));
2007        children.add(new Property("reaction", "", "Details about each adverse reaction event linked to exposure to the identified substance.", 0, java.lang.Integer.MAX_VALUE, reaction));
2008      }
2009
2010      @Override
2011      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2012        switch (_hash) {
2013        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier);
2014        case -462853915: /*clinicalStatus*/  return new Property("clinicalStatus", "CodeableConcept", "The clinical status of the allergy or intolerance.", 0, 1, clinicalStatus);
2015        case -842509843: /*verificationStatus*/  return new Property("verificationStatus", "CodeableConcept", "Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).  The verification status pertains to the allergy or intolerance, itself, not to any specific AllergyIntolerance attribute.", 0, 1, verificationStatus);
2016        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Identification of the underlying physiological mechanism for the reaction risk.", 0, 1, type);
2017        case 50511102: /*category*/  return new Property("category", "code", "Category of the identified substance.", 0, java.lang.Integer.MAX_VALUE, category);
2018        case -1608054609: /*criticality*/  return new Property("criticality", "code", "Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.", 0, 1, criticality);
2019        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).  This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., \"Latex\"), an allergy or intolerance condition (e.g., \"Latex allergy\"), or a negated/excluded code for a specific substance or class (e.g., \"No latex allergy\") or a general or categorical negated statement (e.g.,  \"No known allergy\", \"No known drug allergies\").  Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.  If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.", 0, 1, code);
2020        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "The patient who has the allergy or intolerance.", 0, 1, patient);
2021        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The encounter when the allergy or intolerance was asserted.", 0, 1, encounter);
2022        case -1886216323: /*onset[x]*/  return new Property("onset[x]", "dateTime|Age|Period|Range|string", "Estimated or actual date,  date-time, or age when allergy or intolerance was identified.", 0, 1, onset);
2023        case 105901603: /*onset*/  return new Property("onset[x]", "dateTime|Age|Period|Range|string", "Estimated or actual date,  date-time, or age when allergy or intolerance was identified.", 0, 1, onset);
2024        case -1701663010: /*onsetDateTime*/  return new Property("onset[x]", "dateTime", "Estimated or actual date,  date-time, or age when allergy or intolerance was identified.", 0, 1, onset);
2025        case -1886241828: /*onsetAge*/  return new Property("onset[x]", "Age", "Estimated or actual date,  date-time, or age when allergy or intolerance was identified.", 0, 1, onset);
2026        case -1545082428: /*onsetPeriod*/  return new Property("onset[x]", "Period", "Estimated or actual date,  date-time, or age when allergy or intolerance was identified.", 0, 1, onset);
2027        case -186664742: /*onsetRange*/  return new Property("onset[x]", "Range", "Estimated or actual date,  date-time, or age when allergy or intolerance was identified.", 0, 1, onset);
2028        case -1445342188: /*onsetString*/  return new Property("onset[x]", "string", "Estimated or actual date,  date-time, or age when allergy or intolerance was identified.", 0, 1, onset);
2029        case -1952893826: /*recordedDate*/  return new Property("recordedDate", "dateTime", "The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.", 0, 1, recordedDate);
2030        case 767422259: /*participant*/  return new Property("participant", "", "Indicates who or what participated in the activities related to the allergy or intolerance and how they were involved.", 0, java.lang.Integer.MAX_VALUE, participant);
2031        case 1896977671: /*lastOccurrence*/  return new Property("lastOccurrence", "dateTime", "Represents the date and/or time of the last known occurrence of a reaction event.", 0, 1, lastOccurrence);
2032        case 3387378: /*note*/  return new Property("note", "Annotation", "Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.", 0, java.lang.Integer.MAX_VALUE, note);
2033        case -867509719: /*reaction*/  return new Property("reaction", "", "Details about each adverse reaction event linked to exposure to the identified substance.", 0, java.lang.Integer.MAX_VALUE, reaction);
2034        default: return super.getNamedProperty(_hash, _name, _checkValid);
2035        }
2036
2037      }
2038
2039      @Override
2040      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2041        switch (hash) {
2042        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2043        case -462853915: /*clinicalStatus*/ return this.clinicalStatus == null ? new Base[0] : new Base[] {this.clinicalStatus}; // CodeableConcept
2044        case -842509843: /*verificationStatus*/ return this.verificationStatus == null ? new Base[0] : new Base[] {this.verificationStatus}; // CodeableConcept
2045        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
2046        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // Enumeration<AllergyIntoleranceCategory>
2047        case -1608054609: /*criticality*/ return this.criticality == null ? new Base[0] : new Base[] {this.criticality}; // Enumeration<AllergyIntoleranceCriticality>
2048        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
2049        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
2050        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
2051        case 105901603: /*onset*/ return this.onset == null ? new Base[0] : new Base[] {this.onset}; // DataType
2052        case -1952893826: /*recordedDate*/ return this.recordedDate == null ? new Base[0] : new Base[] {this.recordedDate}; // DateTimeType
2053        case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // AllergyIntoleranceParticipantComponent
2054        case 1896977671: /*lastOccurrence*/ return this.lastOccurrence == null ? new Base[0] : new Base[] {this.lastOccurrence}; // DateTimeType
2055        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
2056        case -867509719: /*reaction*/ return this.reaction == null ? new Base[0] : this.reaction.toArray(new Base[this.reaction.size()]); // AllergyIntoleranceReactionComponent
2057        default: return super.getProperty(hash, name, checkValid);
2058        }
2059
2060      }
2061
2062      @Override
2063      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2064        switch (hash) {
2065        case -1618432855: // identifier
2066          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
2067          return value;
2068        case -462853915: // clinicalStatus
2069          this.clinicalStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2070          return value;
2071        case -842509843: // verificationStatus
2072          this.verificationStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2073          return value;
2074        case 3575610: // type
2075          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2076          return value;
2077        case 50511102: // category
2078          value = new AllergyIntoleranceCategoryEnumFactory().fromType(TypeConvertor.castToCode(value));
2079          this.getCategory().add((Enumeration) value); // Enumeration<AllergyIntoleranceCategory>
2080          return value;
2081        case -1608054609: // criticality
2082          value = new AllergyIntoleranceCriticalityEnumFactory().fromType(TypeConvertor.castToCode(value));
2083          this.criticality = (Enumeration) value; // Enumeration<AllergyIntoleranceCriticality>
2084          return value;
2085        case 3059181: // code
2086          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2087          return value;
2088        case -791418107: // patient
2089          this.patient = TypeConvertor.castToReference(value); // Reference
2090          return value;
2091        case 1524132147: // encounter
2092          this.encounter = TypeConvertor.castToReference(value); // Reference
2093          return value;
2094        case 105901603: // onset
2095          this.onset = TypeConvertor.castToType(value); // DataType
2096          return value;
2097        case -1952893826: // recordedDate
2098          this.recordedDate = TypeConvertor.castToDateTime(value); // DateTimeType
2099          return value;
2100        case 767422259: // participant
2101          this.getParticipant().add((AllergyIntoleranceParticipantComponent) value); // AllergyIntoleranceParticipantComponent
2102          return value;
2103        case 1896977671: // lastOccurrence
2104          this.lastOccurrence = TypeConvertor.castToDateTime(value); // DateTimeType
2105          return value;
2106        case 3387378: // note
2107          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
2108          return value;
2109        case -867509719: // reaction
2110          this.getReaction().add((AllergyIntoleranceReactionComponent) value); // AllergyIntoleranceReactionComponent
2111          return value;
2112        default: return super.setProperty(hash, name, value);
2113        }
2114
2115      }
2116
2117      @Override
2118      public Base setProperty(String name, Base value) throws FHIRException {
2119        if (name.equals("identifier")) {
2120          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2121        } else if (name.equals("clinicalStatus")) {
2122          this.clinicalStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2123        } else if (name.equals("verificationStatus")) {
2124          this.verificationStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2125        } else if (name.equals("type")) {
2126          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2127        } else if (name.equals("category")) {
2128          value = new AllergyIntoleranceCategoryEnumFactory().fromType(TypeConvertor.castToCode(value));
2129          this.getCategory().add((Enumeration) value);
2130        } else if (name.equals("criticality")) {
2131          value = new AllergyIntoleranceCriticalityEnumFactory().fromType(TypeConvertor.castToCode(value));
2132          this.criticality = (Enumeration) value; // Enumeration<AllergyIntoleranceCriticality>
2133        } else if (name.equals("code")) {
2134          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2135        } else if (name.equals("patient")) {
2136          this.patient = TypeConvertor.castToReference(value); // Reference
2137        } else if (name.equals("encounter")) {
2138          this.encounter = TypeConvertor.castToReference(value); // Reference
2139        } else if (name.equals("onset[x]")) {
2140          this.onset = TypeConvertor.castToType(value); // DataType
2141        } else if (name.equals("recordedDate")) {
2142          this.recordedDate = TypeConvertor.castToDateTime(value); // DateTimeType
2143        } else if (name.equals("participant")) {
2144          this.getParticipant().add((AllergyIntoleranceParticipantComponent) value);
2145        } else if (name.equals("lastOccurrence")) {
2146          this.lastOccurrence = TypeConvertor.castToDateTime(value); // DateTimeType
2147        } else if (name.equals("note")) {
2148          this.getNote().add(TypeConvertor.castToAnnotation(value));
2149        } else if (name.equals("reaction")) {
2150          this.getReaction().add((AllergyIntoleranceReactionComponent) value);
2151        } else
2152          return super.setProperty(name, value);
2153        return value;
2154      }
2155
2156      @Override
2157      public Base makeProperty(int hash, String name) throws FHIRException {
2158        switch (hash) {
2159        case -1618432855:  return addIdentifier(); 
2160        case -462853915:  return getClinicalStatus();
2161        case -842509843:  return getVerificationStatus();
2162        case 3575610:  return getType();
2163        case 50511102:  return addCategoryElement();
2164        case -1608054609:  return getCriticalityElement();
2165        case 3059181:  return getCode();
2166        case -791418107:  return getPatient();
2167        case 1524132147:  return getEncounter();
2168        case -1886216323:  return getOnset();
2169        case 105901603:  return getOnset();
2170        case -1952893826:  return getRecordedDateElement();
2171        case 767422259:  return addParticipant(); 
2172        case 1896977671:  return getLastOccurrenceElement();
2173        case 3387378:  return addNote(); 
2174        case -867509719:  return addReaction(); 
2175        default: return super.makeProperty(hash, name);
2176        }
2177
2178      }
2179
2180      @Override
2181      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2182        switch (hash) {
2183        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2184        case -462853915: /*clinicalStatus*/ return new String[] {"CodeableConcept"};
2185        case -842509843: /*verificationStatus*/ return new String[] {"CodeableConcept"};
2186        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
2187        case 50511102: /*category*/ return new String[] {"code"};
2188        case -1608054609: /*criticality*/ return new String[] {"code"};
2189        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
2190        case -791418107: /*patient*/ return new String[] {"Reference"};
2191        case 1524132147: /*encounter*/ return new String[] {"Reference"};
2192        case 105901603: /*onset*/ return new String[] {"dateTime", "Age", "Period", "Range", "string"};
2193        case -1952893826: /*recordedDate*/ return new String[] {"dateTime"};
2194        case 767422259: /*participant*/ return new String[] {};
2195        case 1896977671: /*lastOccurrence*/ return new String[] {"dateTime"};
2196        case 3387378: /*note*/ return new String[] {"Annotation"};
2197        case -867509719: /*reaction*/ return new String[] {};
2198        default: return super.getTypesForProperty(hash, name);
2199        }
2200
2201      }
2202
2203      @Override
2204      public Base addChild(String name) throws FHIRException {
2205        if (name.equals("identifier")) {
2206          return addIdentifier();
2207        }
2208        else if (name.equals("clinicalStatus")) {
2209          this.clinicalStatus = new CodeableConcept();
2210          return this.clinicalStatus;
2211        }
2212        else if (name.equals("verificationStatus")) {
2213          this.verificationStatus = new CodeableConcept();
2214          return this.verificationStatus;
2215        }
2216        else if (name.equals("type")) {
2217          this.type = new CodeableConcept();
2218          return this.type;
2219        }
2220        else if (name.equals("category")) {
2221          throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.category");
2222        }
2223        else if (name.equals("criticality")) {
2224          throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.criticality");
2225        }
2226        else if (name.equals("code")) {
2227          this.code = new CodeableConcept();
2228          return this.code;
2229        }
2230        else if (name.equals("patient")) {
2231          this.patient = new Reference();
2232          return this.patient;
2233        }
2234        else if (name.equals("encounter")) {
2235          this.encounter = new Reference();
2236          return this.encounter;
2237        }
2238        else if (name.equals("onsetDateTime")) {
2239          this.onset = new DateTimeType();
2240          return this.onset;
2241        }
2242        else if (name.equals("onsetAge")) {
2243          this.onset = new Age();
2244          return this.onset;
2245        }
2246        else if (name.equals("onsetPeriod")) {
2247          this.onset = new Period();
2248          return this.onset;
2249        }
2250        else if (name.equals("onsetRange")) {
2251          this.onset = new Range();
2252          return this.onset;
2253        }
2254        else if (name.equals("onsetString")) {
2255          this.onset = new StringType();
2256          return this.onset;
2257        }
2258        else if (name.equals("recordedDate")) {
2259          throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.recordedDate");
2260        }
2261        else if (name.equals("participant")) {
2262          return addParticipant();
2263        }
2264        else if (name.equals("lastOccurrence")) {
2265          throw new FHIRException("Cannot call addChild on a singleton property AllergyIntolerance.lastOccurrence");
2266        }
2267        else if (name.equals("note")) {
2268          return addNote();
2269        }
2270        else if (name.equals("reaction")) {
2271          return addReaction();
2272        }
2273        else
2274          return super.addChild(name);
2275      }
2276
2277  public String fhirType() {
2278    return "AllergyIntolerance";
2279
2280  }
2281
2282      public AllergyIntolerance copy() {
2283        AllergyIntolerance dst = new AllergyIntolerance();
2284        copyValues(dst);
2285        return dst;
2286      }
2287
2288      public void copyValues(AllergyIntolerance dst) {
2289        super.copyValues(dst);
2290        if (identifier != null) {
2291          dst.identifier = new ArrayList<Identifier>();
2292          for (Identifier i : identifier)
2293            dst.identifier.add(i.copy());
2294        };
2295        dst.clinicalStatus = clinicalStatus == null ? null : clinicalStatus.copy();
2296        dst.verificationStatus = verificationStatus == null ? null : verificationStatus.copy();
2297        dst.type = type == null ? null : type.copy();
2298        if (category != null) {
2299          dst.category = new ArrayList<Enumeration<AllergyIntoleranceCategory>>();
2300          for (Enumeration<AllergyIntoleranceCategory> i : category)
2301            dst.category.add(i.copy());
2302        };
2303        dst.criticality = criticality == null ? null : criticality.copy();
2304        dst.code = code == null ? null : code.copy();
2305        dst.patient = patient == null ? null : patient.copy();
2306        dst.encounter = encounter == null ? null : encounter.copy();
2307        dst.onset = onset == null ? null : onset.copy();
2308        dst.recordedDate = recordedDate == null ? null : recordedDate.copy();
2309        if (participant != null) {
2310          dst.participant = new ArrayList<AllergyIntoleranceParticipantComponent>();
2311          for (AllergyIntoleranceParticipantComponent i : participant)
2312            dst.participant.add(i.copy());
2313        };
2314        dst.lastOccurrence = lastOccurrence == null ? null : lastOccurrence.copy();
2315        if (note != null) {
2316          dst.note = new ArrayList<Annotation>();
2317          for (Annotation i : note)
2318            dst.note.add(i.copy());
2319        };
2320        if (reaction != null) {
2321          dst.reaction = new ArrayList<AllergyIntoleranceReactionComponent>();
2322          for (AllergyIntoleranceReactionComponent i : reaction)
2323            dst.reaction.add(i.copy());
2324        };
2325      }
2326
2327      protected AllergyIntolerance typedCopy() {
2328        return copy();
2329      }
2330
2331      @Override
2332      public boolean equalsDeep(Base other_) {
2333        if (!super.equalsDeep(other_))
2334          return false;
2335        if (!(other_ instanceof AllergyIntolerance))
2336          return false;
2337        AllergyIntolerance o = (AllergyIntolerance) other_;
2338        return compareDeep(identifier, o.identifier, true) && compareDeep(clinicalStatus, o.clinicalStatus, true)
2339           && compareDeep(verificationStatus, o.verificationStatus, true) && compareDeep(type, o.type, true)
2340           && compareDeep(category, o.category, true) && compareDeep(criticality, o.criticality, true) && compareDeep(code, o.code, true)
2341           && compareDeep(patient, o.patient, true) && compareDeep(encounter, o.encounter, true) && compareDeep(onset, o.onset, true)
2342           && compareDeep(recordedDate, o.recordedDate, true) && compareDeep(participant, o.participant, true)
2343           && compareDeep(lastOccurrence, o.lastOccurrence, true) && compareDeep(note, o.note, true) && compareDeep(reaction, o.reaction, true)
2344          ;
2345      }
2346
2347      @Override
2348      public boolean equalsShallow(Base other_) {
2349        if (!super.equalsShallow(other_))
2350          return false;
2351        if (!(other_ instanceof AllergyIntolerance))
2352          return false;
2353        AllergyIntolerance o = (AllergyIntolerance) other_;
2354        return compareValues(category, o.category, true) && compareValues(criticality, o.criticality, true)
2355           && compareValues(recordedDate, o.recordedDate, true) && compareValues(lastOccurrence, o.lastOccurrence, true)
2356          ;
2357      }
2358
2359      public boolean isEmpty() {
2360        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, clinicalStatus
2361          , verificationStatus, type, category, criticality, code, patient, encounter, onset
2362          , recordedDate, participant, lastOccurrence, note, reaction);
2363      }
2364
2365  @Override
2366  public ResourceType getResourceType() {
2367    return ResourceType.AllergyIntolerance;
2368   }
2369
2370 /**
2371   * Search parameter: <b>category</b>
2372   * <p>
2373   * Description: <b>food | medication | environment | biologic</b><br>
2374   * Type: <b>token</b><br>
2375   * Path: <b>AllergyIntolerance.category</b><br>
2376   * </p>
2377   */
2378  @SearchParamDefinition(name="category", path="AllergyIntolerance.category", description="food | medication | environment | biologic", type="token" )
2379  public static final String SP_CATEGORY = "category";
2380 /**
2381   * <b>Fluent Client</b> search parameter constant for <b>category</b>
2382   * <p>
2383   * Description: <b>food | medication | environment | biologic</b><br>
2384   * Type: <b>token</b><br>
2385   * Path: <b>AllergyIntolerance.category</b><br>
2386   * </p>
2387   */
2388  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
2389
2390 /**
2391   * Search parameter: <b>clinical-status</b>
2392   * <p>
2393   * Description: <b>active | inactive | resolved</b><br>
2394   * Type: <b>token</b><br>
2395   * Path: <b>AllergyIntolerance.clinicalStatus</b><br>
2396   * </p>
2397   */
2398  @SearchParamDefinition(name="clinical-status", path="AllergyIntolerance.clinicalStatus", description="active | inactive | resolved", type="token" )
2399  public static final String SP_CLINICAL_STATUS = "clinical-status";
2400 /**
2401   * <b>Fluent Client</b> search parameter constant for <b>clinical-status</b>
2402   * <p>
2403   * Description: <b>active | inactive | resolved</b><br>
2404   * Type: <b>token</b><br>
2405   * Path: <b>AllergyIntolerance.clinicalStatus</b><br>
2406   * </p>
2407   */
2408  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CLINICAL_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CLINICAL_STATUS);
2409
2410 /**
2411   * Search parameter: <b>criticality</b>
2412   * <p>
2413   * Description: <b>low | high | unable-to-assess</b><br>
2414   * Type: <b>token</b><br>
2415   * Path: <b>AllergyIntolerance.criticality</b><br>
2416   * </p>
2417   */
2418  @SearchParamDefinition(name="criticality", path="AllergyIntolerance.criticality", description="low | high | unable-to-assess", type="token" )
2419  public static final String SP_CRITICALITY = "criticality";
2420 /**
2421   * <b>Fluent Client</b> search parameter constant for <b>criticality</b>
2422   * <p>
2423   * Description: <b>low | high | unable-to-assess</b><br>
2424   * Type: <b>token</b><br>
2425   * Path: <b>AllergyIntolerance.criticality</b><br>
2426   * </p>
2427   */
2428  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CRITICALITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CRITICALITY);
2429
2430 /**
2431   * Search parameter: <b>last-date</b>
2432   * <p>
2433   * Description: <b>Date(/time) of last known occurrence of a reaction</b><br>
2434   * Type: <b>date</b><br>
2435   * Path: <b>AllergyIntolerance.lastOccurrence</b><br>
2436   * </p>
2437   */
2438  @SearchParamDefinition(name="last-date", path="AllergyIntolerance.lastOccurrence", description="Date(/time) of last known occurrence of a reaction", type="date" )
2439  public static final String SP_LAST_DATE = "last-date";
2440 /**
2441   * <b>Fluent Client</b> search parameter constant for <b>last-date</b>
2442   * <p>
2443   * Description: <b>Date(/time) of last known occurrence of a reaction</b><br>
2444   * Type: <b>date</b><br>
2445   * Path: <b>AllergyIntolerance.lastOccurrence</b><br>
2446   * </p>
2447   */
2448  public static final ca.uhn.fhir.rest.gclient.DateClientParam LAST_DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_LAST_DATE);
2449
2450 /**
2451   * Search parameter: <b>manifestation-code</b>
2452   * <p>
2453   * Description: <b>Clinical symptoms/signs associated with the Event</b><br>
2454   * Type: <b>token</b><br>
2455   * Path: <b>AllergyIntolerance.reaction.manifestation.concept</b><br>
2456   * </p>
2457   */
2458  @SearchParamDefinition(name="manifestation-code", path="AllergyIntolerance.reaction.manifestation.concept", description="Clinical symptoms/signs associated with the Event", type="token" )
2459  public static final String SP_MANIFESTATION_CODE = "manifestation-code";
2460 /**
2461   * <b>Fluent Client</b> search parameter constant for <b>manifestation-code</b>
2462   * <p>
2463   * Description: <b>Clinical symptoms/signs associated with the Event</b><br>
2464   * Type: <b>token</b><br>
2465   * Path: <b>AllergyIntolerance.reaction.manifestation.concept</b><br>
2466   * </p>
2467   */
2468  public static final ca.uhn.fhir.rest.gclient.TokenClientParam MANIFESTATION_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_MANIFESTATION_CODE);
2469
2470 /**
2471   * Search parameter: <b>manifestation-reference</b>
2472   * <p>
2473   * Description: <b>Clinical symptoms/signs associated with the Event</b><br>
2474   * Type: <b>reference</b><br>
2475   * Path: <b>AllergyIntolerance.reaction.manifestation.reference</b><br>
2476   * </p>
2477   */
2478  @SearchParamDefinition(name="manifestation-reference", path="AllergyIntolerance.reaction.manifestation.reference", description="Clinical symptoms/signs associated with the Event", type="reference", target={Observation.class } )
2479  public static final String SP_MANIFESTATION_REFERENCE = "manifestation-reference";
2480 /**
2481   * <b>Fluent Client</b> search parameter constant for <b>manifestation-reference</b>
2482   * <p>
2483   * Description: <b>Clinical symptoms/signs associated with the Event</b><br>
2484   * Type: <b>reference</b><br>
2485   * Path: <b>AllergyIntolerance.reaction.manifestation.reference</b><br>
2486   * </p>
2487   */
2488  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MANIFESTATION_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MANIFESTATION_REFERENCE);
2489
2490/**
2491   * Constant for fluent queries to be used to add include statements. Specifies
2492   * the path value of "<b>AllergyIntolerance:manifestation-reference</b>".
2493   */
2494  public static final ca.uhn.fhir.model.api.Include INCLUDE_MANIFESTATION_REFERENCE = new ca.uhn.fhir.model.api.Include("AllergyIntolerance:manifestation-reference").toLocked();
2495
2496 /**
2497   * Search parameter: <b>participant</b>
2498   * <p>
2499   * Description: <b>Who or what participated in the activities related to the allergy or intolerance</b><br>
2500   * Type: <b>reference</b><br>
2501   * Path: <b>AllergyIntolerance.participant.actor</b><br>
2502   * </p>
2503   */
2504  @SearchParamDefinition(name="participant", path="AllergyIntolerance.participant.actor", description="Who or what participated in the activities related to the allergy or intolerance", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={CareTeam.class, Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2505  public static final String SP_PARTICIPANT = "participant";
2506 /**
2507   * <b>Fluent Client</b> search parameter constant for <b>participant</b>
2508   * <p>
2509   * Description: <b>Who or what participated in the activities related to the allergy or intolerance</b><br>
2510   * Type: <b>reference</b><br>
2511   * Path: <b>AllergyIntolerance.participant.actor</b><br>
2512   * </p>
2513   */
2514  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTICIPANT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTICIPANT);
2515
2516/**
2517   * Constant for fluent queries to be used to add include statements. Specifies
2518   * the path value of "<b>AllergyIntolerance:participant</b>".
2519   */
2520  public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTICIPANT = new ca.uhn.fhir.model.api.Include("AllergyIntolerance:participant").toLocked();
2521
2522 /**
2523   * Search parameter: <b>route</b>
2524   * <p>
2525   * Description: <b>How the subject was exposed to the substance</b><br>
2526   * Type: <b>token</b><br>
2527   * Path: <b>AllergyIntolerance.reaction.exposureRoute</b><br>
2528   * </p>
2529   */
2530  @SearchParamDefinition(name="route", path="AllergyIntolerance.reaction.exposureRoute", description="How the subject was exposed to the substance", type="token" )
2531  public static final String SP_ROUTE = "route";
2532 /**
2533   * <b>Fluent Client</b> search parameter constant for <b>route</b>
2534   * <p>
2535   * Description: <b>How the subject was exposed to the substance</b><br>
2536   * Type: <b>token</b><br>
2537   * Path: <b>AllergyIntolerance.reaction.exposureRoute</b><br>
2538   * </p>
2539   */
2540  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ROUTE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ROUTE);
2541
2542 /**
2543   * Search parameter: <b>severity</b>
2544   * <p>
2545   * Description: <b>mild | moderate | severe (of event as a whole)</b><br>
2546   * Type: <b>token</b><br>
2547   * Path: <b>AllergyIntolerance.reaction.severity</b><br>
2548   * </p>
2549   */
2550  @SearchParamDefinition(name="severity", path="AllergyIntolerance.reaction.severity", description="mild | moderate | severe (of event as a whole)", type="token" )
2551  public static final String SP_SEVERITY = "severity";
2552 /**
2553   * <b>Fluent Client</b> search parameter constant for <b>severity</b>
2554   * <p>
2555   * Description: <b>mild | moderate | severe (of event as a whole)</b><br>
2556   * Type: <b>token</b><br>
2557   * Path: <b>AllergyIntolerance.reaction.severity</b><br>
2558   * </p>
2559   */
2560  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SEVERITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SEVERITY);
2561
2562 /**
2563   * Search parameter: <b>verification-status</b>
2564   * <p>
2565   * Description: <b>unconfirmed | presumed | confirmed | refuted | entered-in-error</b><br>
2566   * Type: <b>token</b><br>
2567   * Path: <b>AllergyIntolerance.verificationStatus</b><br>
2568   * </p>
2569   */
2570  @SearchParamDefinition(name="verification-status", path="AllergyIntolerance.verificationStatus", description="unconfirmed | presumed | confirmed | refuted | entered-in-error", type="token" )
2571  public static final String SP_VERIFICATION_STATUS = "verification-status";
2572 /**
2573   * <b>Fluent Client</b> search parameter constant for <b>verification-status</b>
2574   * <p>
2575   * Description: <b>unconfirmed | presumed | confirmed | refuted | entered-in-error</b><br>
2576   * Type: <b>token</b><br>
2577   * Path: <b>AllergyIntolerance.verificationStatus</b><br>
2578   * </p>
2579   */
2580  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERIFICATION_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERIFICATION_STATUS);
2581
2582 /**
2583   * Search parameter: <b>code</b>
2584   * <p>
2585   * Description: <b>Multiple Resources: 
2586
2587* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted
2588* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
2589* [AuditEvent](auditevent.html): More specific code for the event
2590* [Basic](basic.html): Kind of Resource
2591* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code
2592* [Condition](condition.html): Code for the condition
2593* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.
2594* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
2595* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result
2596* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
2597* [ImagingSelection](imagingselection.html): The imaging selection status
2598* [List](list.html): What the purpose of this list is
2599* [Medication](medication.html): Returns medications for a specific code
2600* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
2601* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
2602* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
2603* [MedicationStatement](medicationstatement.html): Return statements of this medication code
2604* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake
2605* [Observation](observation.html): The code of the observation type
2606* [Procedure](procedure.html): A code to identify a  procedure
2607* [RequestOrchestration](requestorchestration.html): The code of the request orchestration
2608* [Task](task.html): Search by task code
2609</b><br>
2610   * Type: <b>token</b><br>
2611   * Path: <b>AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code</b><br>
2612   * </p>
2613   */
2614  @SearchParamDefinition(name="code", path="AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted\r\n* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance\r\n* [AuditEvent](auditevent.html): More specific code for the event\r\n* [Basic](basic.html): Kind of Resource\r\n* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code\r\n* [Condition](condition.html): Code for the condition\r\n* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.\r\n* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered\r\n* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code\r\n* [ImagingSelection](imagingselection.html): The imaging selection status\r\n* [List](list.html): What the purpose of this list is\r\n* [Medication](medication.html): Returns medications for a specific code\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication code\r\n* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake\r\n* [Observation](observation.html): The code of the observation type\r\n* [Procedure](procedure.html): A code to identify a  procedure\r\n* [RequestOrchestration](requestorchestration.html): The code of the request orchestration\r\n* [Task](task.html): Search by task code\r\n", type="token" )
2615  public static final String SP_CODE = "code";
2616 /**
2617   * <b>Fluent Client</b> search parameter constant for <b>code</b>
2618   * <p>
2619   * Description: <b>Multiple Resources: 
2620
2621* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted
2622* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
2623* [AuditEvent](auditevent.html): More specific code for the event
2624* [Basic](basic.html): Kind of Resource
2625* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code
2626* [Condition](condition.html): Code for the condition
2627* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.
2628* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
2629* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result
2630* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
2631* [ImagingSelection](imagingselection.html): The imaging selection status
2632* [List](list.html): What the purpose of this list is
2633* [Medication](medication.html): Returns medications for a specific code
2634* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
2635* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
2636* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
2637* [MedicationStatement](medicationstatement.html): Return statements of this medication code
2638* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake
2639* [Observation](observation.html): The code of the observation type
2640* [Procedure](procedure.html): A code to identify a  procedure
2641* [RequestOrchestration](requestorchestration.html): The code of the request orchestration
2642* [Task](task.html): Search by task code
2643</b><br>
2644   * Type: <b>token</b><br>
2645   * Path: <b>AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code</b><br>
2646   * </p>
2647   */
2648  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
2649
2650 /**
2651   * Search parameter: <b>date</b>
2652   * <p>
2653   * Description: <b>Multiple Resources: 
2654
2655* [AdverseEvent](adverseevent.html): When the event occurred
2656* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
2657* [Appointment](appointment.html): Appointment date/time.
2658* [AuditEvent](auditevent.html): Time when the event was recorded
2659* [CarePlan](careplan.html): Time period plan covers
2660* [CareTeam](careteam.html): A date within the coverage time period.
2661* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
2662* [Composition](composition.html): Composition editing time
2663* [Consent](consent.html): When consent was agreed to
2664* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
2665* [DocumentReference](documentreference.html): When this document reference was created
2666* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
2667* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
2668* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
2669* [Flag](flag.html): Time period when flag is active
2670* [Immunization](immunization.html): Vaccination  (non)-Administration Date
2671* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
2672* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
2673* [Invoice](invoice.html): Invoice date / posting date
2674* [List](list.html): When the list was prepared
2675* [MeasureReport](measurereport.html): The date of the measure report
2676* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
2677* [Observation](observation.html): Clinically relevant time/time-period for observation
2678* [Procedure](procedure.html): When the procedure occurred or is occurring
2679* [ResearchSubject](researchsubject.html): Start and end of participation
2680* [RiskAssessment](riskassessment.html): When was assessment made?
2681* [SupplyRequest](supplyrequest.html): When the request was made
2682</b><br>
2683   * Type: <b>date</b><br>
2684   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
2685   * </p>
2686   */
2687  @SearchParamDefinition(name="date", path="AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): When the event occurred\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [Appointment](appointment.html): Appointment date/time.\r\n* [AuditEvent](auditevent.html): Time when the event was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [DocumentReference](documentreference.html): When this document reference was created\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination  (non)-Administration Date\r\n* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created\r\n* [Invoice](invoice.html): Invoice date / posting date\r\n* [List](list.html): When the list was prepared\r\n* [MeasureReport](measurereport.html): The date of the measure report\r\n* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication\r\n* [Observation](observation.html): Clinically relevant time/time-period for observation\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [ResearchSubject](researchsubject.html): Start and end of participation\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" )
2688  public static final String SP_DATE = "date";
2689 /**
2690   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2691   * <p>
2692   * Description: <b>Multiple Resources: 
2693
2694* [AdverseEvent](adverseevent.html): When the event occurred
2695* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
2696* [Appointment](appointment.html): Appointment date/time.
2697* [AuditEvent](auditevent.html): Time when the event was recorded
2698* [CarePlan](careplan.html): Time period plan covers
2699* [CareTeam](careteam.html): A date within the coverage time period.
2700* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
2701* [Composition](composition.html): Composition editing time
2702* [Consent](consent.html): When consent was agreed to
2703* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
2704* [DocumentReference](documentreference.html): When this document reference was created
2705* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
2706* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
2707* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
2708* [Flag](flag.html): Time period when flag is active
2709* [Immunization](immunization.html): Vaccination  (non)-Administration Date
2710* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
2711* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
2712* [Invoice](invoice.html): Invoice date / posting date
2713* [List](list.html): When the list was prepared
2714* [MeasureReport](measurereport.html): The date of the measure report
2715* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
2716* [Observation](observation.html): Clinically relevant time/time-period for observation
2717* [Procedure](procedure.html): When the procedure occurred or is occurring
2718* [ResearchSubject](researchsubject.html): Start and end of participation
2719* [RiskAssessment](riskassessment.html): When was assessment made?
2720* [SupplyRequest](supplyrequest.html): When the request was made
2721</b><br>
2722   * Type: <b>date</b><br>
2723   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
2724   * </p>
2725   */
2726  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2727
2728 /**
2729   * Search parameter: <b>identifier</b>
2730   * <p>
2731   * Description: <b>Multiple Resources: 
2732
2733* [Account](account.html): Account number
2734* [AdverseEvent](adverseevent.html): Business identifier for the event
2735* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2736* [Appointment](appointment.html): An Identifier of the Appointment
2737* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2738* [Basic](basic.html): Business identifier
2739* [BodyStructure](bodystructure.html): Bodystructure identifier
2740* [CarePlan](careplan.html): External Ids for this plan
2741* [CareTeam](careteam.html): External Ids for this team
2742* [ChargeItem](chargeitem.html): Business Identifier for item
2743* [Claim](claim.html): The primary identifier of the financial resource
2744* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2745* [ClinicalImpression](clinicalimpression.html): Business identifier
2746* [Communication](communication.html): Unique identifier
2747* [CommunicationRequest](communicationrequest.html): Unique identifier
2748* [Composition](composition.html): Version-independent identifier for the Composition
2749* [Condition](condition.html): A unique identifier of the condition record
2750* [Consent](consent.html): Identifier for this record (external references)
2751* [Contract](contract.html): The identity of the contract
2752* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2753* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2754* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2755* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2756* [DeviceRequest](devicerequest.html): Business identifier for request/order
2757* [DeviceUsage](deviceusage.html): Search by identifier
2758* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2759* [DocumentReference](documentreference.html): Identifier of the attachment binary
2760* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2761* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2762* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2763* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2764* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2765* [Flag](flag.html): Business identifier
2766* [Goal](goal.html): External Ids for this goal
2767* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2768* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2769* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2770* [Immunization](immunization.html): Business identifier
2771* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2772* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2773* [Invoice](invoice.html): Business Identifier for item
2774* [List](list.html): Business identifier
2775* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2776* [Medication](medication.html): Returns medications with this external identifier
2777* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2778* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2779* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2780* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2781* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2782* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2783* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2784* [Observation](observation.html): The unique id for a particular observation
2785* [Person](person.html): A person Identifier
2786* [Procedure](procedure.html): A unique identifier for a procedure
2787* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2788* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2789* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2790* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2791* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2792* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2793* [Specimen](specimen.html): The unique identifier associated with the specimen
2794* [SupplyDelivery](supplydelivery.html): External identifier
2795* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2796* [Task](task.html): Search for a task instance by its business identifier
2797* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2798</b><br>
2799   * Type: <b>token</b><br>
2800   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
2801   * </p>
2802   */
2803  @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
2804  public static final String SP_IDENTIFIER = "identifier";
2805 /**
2806   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2807   * <p>
2808   * Description: <b>Multiple Resources: 
2809
2810* [Account](account.html): Account number
2811* [AdverseEvent](adverseevent.html): Business identifier for the event
2812* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2813* [Appointment](appointment.html): An Identifier of the Appointment
2814* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2815* [Basic](basic.html): Business identifier
2816* [BodyStructure](bodystructure.html): Bodystructure identifier
2817* [CarePlan](careplan.html): External Ids for this plan
2818* [CareTeam](careteam.html): External Ids for this team
2819* [ChargeItem](chargeitem.html): Business Identifier for item
2820* [Claim](claim.html): The primary identifier of the financial resource
2821* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2822* [ClinicalImpression](clinicalimpression.html): Business identifier
2823* [Communication](communication.html): Unique identifier
2824* [CommunicationRequest](communicationrequest.html): Unique identifier
2825* [Composition](composition.html): Version-independent identifier for the Composition
2826* [Condition](condition.html): A unique identifier of the condition record
2827* [Consent](consent.html): Identifier for this record (external references)
2828* [Contract](contract.html): The identity of the contract
2829* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2830* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2831* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2832* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2833* [DeviceRequest](devicerequest.html): Business identifier for request/order
2834* [DeviceUsage](deviceusage.html): Search by identifier
2835* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2836* [DocumentReference](documentreference.html): Identifier of the attachment binary
2837* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2838* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2839* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2840* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2841* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2842* [Flag](flag.html): Business identifier
2843* [Goal](goal.html): External Ids for this goal
2844* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2845* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2846* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2847* [Immunization](immunization.html): Business identifier
2848* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2849* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2850* [Invoice](invoice.html): Business Identifier for item
2851* [List](list.html): Business identifier
2852* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2853* [Medication](medication.html): Returns medications with this external identifier
2854* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2855* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2856* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2857* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2858* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2859* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2860* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2861* [Observation](observation.html): The unique id for a particular observation
2862* [Person](person.html): A person Identifier
2863* [Procedure](procedure.html): A unique identifier for a procedure
2864* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2865* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2866* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2867* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2868* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2869* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2870* [Specimen](specimen.html): The unique identifier associated with the specimen
2871* [SupplyDelivery](supplydelivery.html): External identifier
2872* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2873* [Task](task.html): Search for a task instance by its business identifier
2874* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2875</b><br>
2876   * Type: <b>token</b><br>
2877   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
2878   * </p>
2879   */
2880  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2881
2882 /**
2883   * Search parameter: <b>patient</b>
2884   * <p>
2885   * Description: <b>Multiple Resources: 
2886
2887* [Account](account.html): The entity that caused the expenses
2888* [AdverseEvent](adverseevent.html): Subject impacted by event
2889* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2890* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2891* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2892* [AuditEvent](auditevent.html): Where the activity involved patient data
2893* [Basic](basic.html): Identifies the focus of this resource
2894* [BodyStructure](bodystructure.html): Who this is about
2895* [CarePlan](careplan.html): Who the care plan is for
2896* [CareTeam](careteam.html): Who care team is for
2897* [ChargeItem](chargeitem.html): Individual service was done for/to
2898* [Claim](claim.html): Patient receiving the products or services
2899* [ClaimResponse](claimresponse.html): The subject of care
2900* [ClinicalImpression](clinicalimpression.html): Patient assessed
2901* [Communication](communication.html): Focus of message
2902* [CommunicationRequest](communicationrequest.html): Focus of message
2903* [Composition](composition.html): Who and/or what the composition is about
2904* [Condition](condition.html): Who has the condition?
2905* [Consent](consent.html): Who the consent applies to
2906* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2907* [Coverage](coverage.html): Retrieve coverages for a patient
2908* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2909* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2910* [DetectedIssue](detectedissue.html): Associated patient
2911* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2912* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2913* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2914* [DocumentReference](documentreference.html): Who/what is the subject of the document
2915* [Encounter](encounter.html): The patient present at the encounter
2916* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2917* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2918* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2919* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2920* [Flag](flag.html): The identity of a subject to list flags for
2921* [Goal](goal.html): Who this goal is intended for
2922* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2923* [ImagingSelection](imagingselection.html): Who the study is about
2924* [ImagingStudy](imagingstudy.html): Who the study is about
2925* [Immunization](immunization.html): The patient for the vaccination record
2926* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2927* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2928* [Invoice](invoice.html): Recipient(s) of goods and services
2929* [List](list.html): If all resources have the same subject
2930* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2931* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2932* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2933* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2934* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2935* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2936* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2937* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2938* [Observation](observation.html): The subject that the observation is about (if patient)
2939* [Person](person.html): The Person links to this Patient
2940* [Procedure](procedure.html): Search by subject - a patient
2941* [Provenance](provenance.html): Where the activity involved patient data
2942* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2943* [RelatedPerson](relatedperson.html): The patient this related person is related to
2944* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2945* [ResearchSubject](researchsubject.html): Who or what is part of study
2946* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2947* [ServiceRequest](servicerequest.html): Search by subject - a patient
2948* [Specimen](specimen.html): The patient the specimen comes from
2949* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2950* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2951* [Task](task.html): Search by patient
2952* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2953</b><br>
2954   * Type: <b>reference</b><br>
2955   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
2956   * </p>
2957   */
2958  @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } )
2959  public static final String SP_PATIENT = "patient";
2960 /**
2961   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2962   * <p>
2963   * Description: <b>Multiple Resources: 
2964
2965* [Account](account.html): The entity that caused the expenses
2966* [AdverseEvent](adverseevent.html): Subject impacted by event
2967* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2968* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2969* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2970* [AuditEvent](auditevent.html): Where the activity involved patient data
2971* [Basic](basic.html): Identifies the focus of this resource
2972* [BodyStructure](bodystructure.html): Who this is about
2973* [CarePlan](careplan.html): Who the care plan is for
2974* [CareTeam](careteam.html): Who care team is for
2975* [ChargeItem](chargeitem.html): Individual service was done for/to
2976* [Claim](claim.html): Patient receiving the products or services
2977* [ClaimResponse](claimresponse.html): The subject of care
2978* [ClinicalImpression](clinicalimpression.html): Patient assessed
2979* [Communication](communication.html): Focus of message
2980* [CommunicationRequest](communicationrequest.html): Focus of message
2981* [Composition](composition.html): Who and/or what the composition is about
2982* [Condition](condition.html): Who has the condition?
2983* [Consent](consent.html): Who the consent applies to
2984* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2985* [Coverage](coverage.html): Retrieve coverages for a patient
2986* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2987* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2988* [DetectedIssue](detectedissue.html): Associated patient
2989* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2990* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2991* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2992* [DocumentReference](documentreference.html): Who/what is the subject of the document
2993* [Encounter](encounter.html): The patient present at the encounter
2994* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2995* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2996* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2997* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2998* [Flag](flag.html): The identity of a subject to list flags for
2999* [Goal](goal.html): Who this goal is intended for
3000* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
3001* [ImagingSelection](imagingselection.html): Who the study is about
3002* [ImagingStudy](imagingstudy.html): Who the study is about
3003* [Immunization](immunization.html): The patient for the vaccination record
3004* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
3005* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
3006* [Invoice](invoice.html): Recipient(s) of goods and services
3007* [List](list.html): If all resources have the same subject
3008* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
3009* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3010* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3011* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3012* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
3013* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
3014* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
3015* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
3016* [Observation](observation.html): The subject that the observation is about (if patient)
3017* [Person](person.html): The Person links to this Patient
3018* [Procedure](procedure.html): Search by subject - a patient
3019* [Provenance](provenance.html): Where the activity involved patient data
3020* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
3021* [RelatedPerson](relatedperson.html): The patient this related person is related to
3022* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
3023* [ResearchSubject](researchsubject.html): Who or what is part of study
3024* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3025* [ServiceRequest](servicerequest.html): Search by subject - a patient
3026* [Specimen](specimen.html): The patient the specimen comes from
3027* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3028* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
3029* [Task](task.html): Search by patient
3030* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3031</b><br>
3032   * Type: <b>reference</b><br>
3033   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
3034   * </p>
3035   */
3036  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
3037
3038/**
3039   * Constant for fluent queries to be used to add include statements. Specifies
3040   * the path value of "<b>AllergyIntolerance:patient</b>".
3041   */
3042  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("AllergyIntolerance:patient").toLocked();
3043
3044 /**
3045   * Search parameter: <b>type</b>
3046   * <p>
3047   * Description: <b>Multiple Resources: 
3048
3049* [Account](account.html): E.g. patient, expense, depreciation
3050* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)
3051* [Composition](composition.html): Kind of composition (LOINC if possible)
3052* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)
3053* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)
3054* [Encounter](encounter.html): Specific type of encounter
3055* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management
3056* [Invoice](invoice.html): Type of Invoice
3057* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type
3058* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence
3059* [Specimen](specimen.html): The specimen type
3060</b><br>
3061   * Type: <b>token</b><br>
3062   * Path: <b>Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type</b><br>
3063   * </p>
3064   */
3065  @SearchParamDefinition(name="type", path="Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type", description="Multiple Resources: \r\n\r\n* [Account](account.html): E.g. patient, expense, depreciation\r\n* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)\r\n* [Composition](composition.html): Kind of composition (LOINC if possible)\r\n* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)\r\n* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)\r\n* [Encounter](encounter.html): Specific type of encounter\r\n* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management\r\n* [Invoice](invoice.html): Type of Invoice\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type\r\n* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence\r\n* [Specimen](specimen.html): The specimen type\r\n", type="token" )
3066  public static final String SP_TYPE = "type";
3067 /**
3068   * <b>Fluent Client</b> search parameter constant for <b>type</b>
3069   * <p>
3070   * Description: <b>Multiple Resources: 
3071
3072* [Account](account.html): E.g. patient, expense, depreciation
3073* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)
3074* [Composition](composition.html): Kind of composition (LOINC if possible)
3075* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)
3076* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)
3077* [Encounter](encounter.html): Specific type of encounter
3078* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management
3079* [Invoice](invoice.html): Type of Invoice
3080* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type
3081* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence
3082* [Specimen](specimen.html): The specimen type
3083</b><br>
3084   * Type: <b>token</b><br>
3085   * Path: <b>Account.type | AllergyIntolerance.type | Composition.type | Coverage.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type | Invoice.type | MedicationDispense.type | MolecularSequence.type | Specimen.type</b><br>
3086   * </p>
3087   */
3088  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
3089
3090
3091}
3092