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 * Significant health conditions for a person related to the patient relevant in the context of care for the patient.
052 */
053@ResourceDef(name="FamilyMemberHistory", profile="http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory")
054public class FamilyMemberHistory extends DomainResource {
055
056    public enum FamilyHistoryStatus {
057        /**
058         * Some health information is known and captured, but not complete - see notes for details.
059         */
060        PARTIAL, 
061        /**
062         * All available related health information is captured as of the date (and possibly time) when the family member history was taken.
063         */
064        COMPLETED, 
065        /**
066         * This instance should not have been part of this patient's medical record.
067         */
068        ENTEREDINERROR, 
069        /**
070         * Health information for this family member is unavailable/unknown.
071         */
072        HEALTHUNKNOWN, 
073        /**
074         * added to help the parsers with the generic types
075         */
076        NULL;
077        public static FamilyHistoryStatus fromCode(String codeString) throws FHIRException {
078            if (codeString == null || "".equals(codeString))
079                return null;
080        if ("partial".equals(codeString))
081          return PARTIAL;
082        if ("completed".equals(codeString))
083          return COMPLETED;
084        if ("entered-in-error".equals(codeString))
085          return ENTEREDINERROR;
086        if ("health-unknown".equals(codeString))
087          return HEALTHUNKNOWN;
088        if (Configuration.isAcceptInvalidEnums())
089          return null;
090        else
091          throw new FHIRException("Unknown FamilyHistoryStatus code '"+codeString+"'");
092        }
093        public String toCode() {
094          switch (this) {
095            case PARTIAL: return "partial";
096            case COMPLETED: return "completed";
097            case ENTEREDINERROR: return "entered-in-error";
098            case HEALTHUNKNOWN: return "health-unknown";
099            case NULL: return null;
100            default: return "?";
101          }
102        }
103        public String getSystem() {
104          switch (this) {
105            case PARTIAL: return "http://hl7.org/fhir/history-status";
106            case COMPLETED: return "http://hl7.org/fhir/history-status";
107            case ENTEREDINERROR: return "http://hl7.org/fhir/history-status";
108            case HEALTHUNKNOWN: return "http://hl7.org/fhir/history-status";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113        public String getDefinition() {
114          switch (this) {
115            case PARTIAL: return "Some health information is known and captured, but not complete - see notes for details.";
116            case COMPLETED: return "All available related health information is captured as of the date (and possibly time) when the family member history was taken.";
117            case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record.";
118            case HEALTHUNKNOWN: return "Health information for this family member is unavailable/unknown.";
119            case NULL: return null;
120            default: return "?";
121          }
122        }
123        public String getDisplay() {
124          switch (this) {
125            case PARTIAL: return "Partial";
126            case COMPLETED: return "Completed";
127            case ENTEREDINERROR: return "Entered in Error";
128            case HEALTHUNKNOWN: return "Health Unknown";
129            case NULL: return null;
130            default: return "?";
131          }
132        }
133    }
134
135  public static class FamilyHistoryStatusEnumFactory implements EnumFactory<FamilyHistoryStatus> {
136    public FamilyHistoryStatus fromCode(String codeString) throws IllegalArgumentException {
137      if (codeString == null || "".equals(codeString))
138            if (codeString == null || "".equals(codeString))
139                return null;
140        if ("partial".equals(codeString))
141          return FamilyHistoryStatus.PARTIAL;
142        if ("completed".equals(codeString))
143          return FamilyHistoryStatus.COMPLETED;
144        if ("entered-in-error".equals(codeString))
145          return FamilyHistoryStatus.ENTEREDINERROR;
146        if ("health-unknown".equals(codeString))
147          return FamilyHistoryStatus.HEALTHUNKNOWN;
148        throw new IllegalArgumentException("Unknown FamilyHistoryStatus code '"+codeString+"'");
149        }
150        public Enumeration<FamilyHistoryStatus> fromType(PrimitiveType<?> code) throws FHIRException {
151          if (code == null)
152            return null;
153          if (code.isEmpty())
154            return new Enumeration<FamilyHistoryStatus>(this, FamilyHistoryStatus.NULL, code);
155          String codeString = ((PrimitiveType) code).asStringValue();
156          if (codeString == null || "".equals(codeString))
157            return new Enumeration<FamilyHistoryStatus>(this, FamilyHistoryStatus.NULL, code);
158        if ("partial".equals(codeString))
159          return new Enumeration<FamilyHistoryStatus>(this, FamilyHistoryStatus.PARTIAL, code);
160        if ("completed".equals(codeString))
161          return new Enumeration<FamilyHistoryStatus>(this, FamilyHistoryStatus.COMPLETED, code);
162        if ("entered-in-error".equals(codeString))
163          return new Enumeration<FamilyHistoryStatus>(this, FamilyHistoryStatus.ENTEREDINERROR, code);
164        if ("health-unknown".equals(codeString))
165          return new Enumeration<FamilyHistoryStatus>(this, FamilyHistoryStatus.HEALTHUNKNOWN, code);
166        throw new FHIRException("Unknown FamilyHistoryStatus code '"+codeString+"'");
167        }
168    public String toCode(FamilyHistoryStatus code) {
169      if (code == FamilyHistoryStatus.PARTIAL)
170        return "partial";
171      if (code == FamilyHistoryStatus.COMPLETED)
172        return "completed";
173      if (code == FamilyHistoryStatus.ENTEREDINERROR)
174        return "entered-in-error";
175      if (code == FamilyHistoryStatus.HEALTHUNKNOWN)
176        return "health-unknown";
177      return "?";
178      }
179    public String toSystem(FamilyHistoryStatus code) {
180      return code.getSystem();
181      }
182    }
183
184    @Block()
185    public static class FamilyMemberHistoryParticipantComponent extends BackboneElement implements IBaseBackboneElement {
186        /**
187         * Distinguishes the type of involvement of the actor in the activities related to the family member history.
188         */
189        @Child(name = "function", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
190        @Description(shortDefinition="Type of involvement", formalDefinition="Distinguishes the type of involvement of the actor in the activities related to the family member history." )
191        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/participation-role-type")
192        protected CodeableConcept function;
193
194        /**
195         * Indicates who or what participated in the activities related to the family member history.
196         */
197        @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)
198        @Description(shortDefinition="Who or what participated in the activities related to the family member history", formalDefinition="Indicates who or what participated in the activities related to the family member history." )
199        protected Reference actor;
200
201        private static final long serialVersionUID = -576943815L;
202
203    /**
204     * Constructor
205     */
206      public FamilyMemberHistoryParticipantComponent() {
207        super();
208      }
209
210    /**
211     * Constructor
212     */
213      public FamilyMemberHistoryParticipantComponent(Reference actor) {
214        super();
215        this.setActor(actor);
216      }
217
218        /**
219         * @return {@link #function} (Distinguishes the type of involvement of the actor in the activities related to the family member history.)
220         */
221        public CodeableConcept getFunction() { 
222          if (this.function == null)
223            if (Configuration.errorOnAutoCreate())
224              throw new Error("Attempt to auto-create FamilyMemberHistoryParticipantComponent.function");
225            else if (Configuration.doAutoCreate())
226              this.function = new CodeableConcept(); // cc
227          return this.function;
228        }
229
230        public boolean hasFunction() { 
231          return this.function != null && !this.function.isEmpty();
232        }
233
234        /**
235         * @param value {@link #function} (Distinguishes the type of involvement of the actor in the activities related to the family member history.)
236         */
237        public FamilyMemberHistoryParticipantComponent setFunction(CodeableConcept value) { 
238          this.function = value;
239          return this;
240        }
241
242        /**
243         * @return {@link #actor} (Indicates who or what participated in the activities related to the family member history.)
244         */
245        public Reference getActor() { 
246          if (this.actor == null)
247            if (Configuration.errorOnAutoCreate())
248              throw new Error("Attempt to auto-create FamilyMemberHistoryParticipantComponent.actor");
249            else if (Configuration.doAutoCreate())
250              this.actor = new Reference(); // cc
251          return this.actor;
252        }
253
254        public boolean hasActor() { 
255          return this.actor != null && !this.actor.isEmpty();
256        }
257
258        /**
259         * @param value {@link #actor} (Indicates who or what participated in the activities related to the family member history.)
260         */
261        public FamilyMemberHistoryParticipantComponent setActor(Reference value) { 
262          this.actor = value;
263          return this;
264        }
265
266        protected void listChildren(List<Property> children) {
267          super.listChildren(children);
268          children.add(new Property("function", "CodeableConcept", "Distinguishes the type of involvement of the actor in the activities related to the family member history.", 0, 1, function));
269          children.add(new Property("actor", "Reference(Practitioner|PractitionerRole|Patient|RelatedPerson|Device|Organization|CareTeam)", "Indicates who or what participated in the activities related to the family member history.", 0, 1, actor));
270        }
271
272        @Override
273        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
274          switch (_hash) {
275          case 1380938712: /*function*/  return new Property("function", "CodeableConcept", "Distinguishes the type of involvement of the actor in the activities related to the family member history.", 0, 1, function);
276          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 family member history.", 0, 1, actor);
277          default: return super.getNamedProperty(_hash, _name, _checkValid);
278          }
279
280        }
281
282      @Override
283      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
284        switch (hash) {
285        case 1380938712: /*function*/ return this.function == null ? new Base[0] : new Base[] {this.function}; // CodeableConcept
286        case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference
287        default: return super.getProperty(hash, name, checkValid);
288        }
289
290      }
291
292      @Override
293      public Base setProperty(int hash, String name, Base value) throws FHIRException {
294        switch (hash) {
295        case 1380938712: // function
296          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
297          return value;
298        case 92645877: // actor
299          this.actor = TypeConvertor.castToReference(value); // Reference
300          return value;
301        default: return super.setProperty(hash, name, value);
302        }
303
304      }
305
306      @Override
307      public Base setProperty(String name, Base value) throws FHIRException {
308        if (name.equals("function")) {
309          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
310        } else if (name.equals("actor")) {
311          this.actor = TypeConvertor.castToReference(value); // Reference
312        } else
313          return super.setProperty(name, value);
314        return value;
315      }
316
317  @Override
318  public void removeChild(String name, Base value) throws FHIRException {
319        if (name.equals("function")) {
320          this.function = null;
321        } else if (name.equals("actor")) {
322          this.actor = null;
323        } else
324          super.removeChild(name, value);
325        
326      }
327
328      @Override
329      public Base makeProperty(int hash, String name) throws FHIRException {
330        switch (hash) {
331        case 1380938712:  return getFunction();
332        case 92645877:  return getActor();
333        default: return super.makeProperty(hash, name);
334        }
335
336      }
337
338      @Override
339      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
340        switch (hash) {
341        case 1380938712: /*function*/ return new String[] {"CodeableConcept"};
342        case 92645877: /*actor*/ return new String[] {"Reference"};
343        default: return super.getTypesForProperty(hash, name);
344        }
345
346      }
347
348      @Override
349      public Base addChild(String name) throws FHIRException {
350        if (name.equals("function")) {
351          this.function = new CodeableConcept();
352          return this.function;
353        }
354        else if (name.equals("actor")) {
355          this.actor = new Reference();
356          return this.actor;
357        }
358        else
359          return super.addChild(name);
360      }
361
362      public FamilyMemberHistoryParticipantComponent copy() {
363        FamilyMemberHistoryParticipantComponent dst = new FamilyMemberHistoryParticipantComponent();
364        copyValues(dst);
365        return dst;
366      }
367
368      public void copyValues(FamilyMemberHistoryParticipantComponent dst) {
369        super.copyValues(dst);
370        dst.function = function == null ? null : function.copy();
371        dst.actor = actor == null ? null : actor.copy();
372      }
373
374      @Override
375      public boolean equalsDeep(Base other_) {
376        if (!super.equalsDeep(other_))
377          return false;
378        if (!(other_ instanceof FamilyMemberHistoryParticipantComponent))
379          return false;
380        FamilyMemberHistoryParticipantComponent o = (FamilyMemberHistoryParticipantComponent) other_;
381        return compareDeep(function, o.function, true) && compareDeep(actor, o.actor, true);
382      }
383
384      @Override
385      public boolean equalsShallow(Base other_) {
386        if (!super.equalsShallow(other_))
387          return false;
388        if (!(other_ instanceof FamilyMemberHistoryParticipantComponent))
389          return false;
390        FamilyMemberHistoryParticipantComponent o = (FamilyMemberHistoryParticipantComponent) other_;
391        return true;
392      }
393
394      public boolean isEmpty() {
395        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(function, actor);
396      }
397
398  public String fhirType() {
399    return "FamilyMemberHistory.participant";
400
401  }
402
403  }
404
405    @Block()
406    public static class FamilyMemberHistoryConditionComponent extends BackboneElement implements IBaseBackboneElement {
407        /**
408         * The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.
409         */
410        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
411        @Description(shortDefinition="Condition suffered by relation", formalDefinition="The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system." )
412        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code")
413        protected CodeableConcept code;
414
415        /**
416         * Indicates what happened following the condition.  If the condition resulted in death, deceased date is captured on the relation.
417         */
418        @Child(name = "outcome", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
419        @Description(shortDefinition="deceased | permanent disability | etc", formalDefinition="Indicates what happened following the condition.  If the condition resulted in death, deceased date is captured on the relation." )
420        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-outcome")
421        protected CodeableConcept outcome;
422
423        /**
424         * This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.
425         */
426        @Child(name = "contributedToDeath", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false)
427        @Description(shortDefinition="Whether the condition contributed to the cause of death", formalDefinition="This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown." )
428        protected BooleanType contributedToDeath;
429
430        /**
431         * Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.
432         */
433        @Child(name = "onset", type = {Age.class, Range.class, Period.class, StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
434        @Description(shortDefinition="When condition first manifested", formalDefinition="Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence." )
435        protected DataType onset;
436
437        /**
438         * An area where general notes can be placed about this specific condition.
439         */
440        @Child(name = "note", type = {Annotation.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
441        @Description(shortDefinition="Extra information about condition", formalDefinition="An area where general notes can be placed about this specific condition." )
442        protected List<Annotation> note;
443
444        private static final long serialVersionUID = -91335661L;
445
446    /**
447     * Constructor
448     */
449      public FamilyMemberHistoryConditionComponent() {
450        super();
451      }
452
453    /**
454     * Constructor
455     */
456      public FamilyMemberHistoryConditionComponent(CodeableConcept code) {
457        super();
458        this.setCode(code);
459      }
460
461        /**
462         * @return {@link #code} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.)
463         */
464        public CodeableConcept getCode() { 
465          if (this.code == null)
466            if (Configuration.errorOnAutoCreate())
467              throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.code");
468            else if (Configuration.doAutoCreate())
469              this.code = new CodeableConcept(); // cc
470          return this.code;
471        }
472
473        public boolean hasCode() { 
474          return this.code != null && !this.code.isEmpty();
475        }
476
477        /**
478         * @param value {@link #code} (The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.)
479         */
480        public FamilyMemberHistoryConditionComponent setCode(CodeableConcept value) { 
481          this.code = value;
482          return this;
483        }
484
485        /**
486         * @return {@link #outcome} (Indicates what happened following the condition.  If the condition resulted in death, deceased date is captured on the relation.)
487         */
488        public CodeableConcept getOutcome() { 
489          if (this.outcome == null)
490            if (Configuration.errorOnAutoCreate())
491              throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.outcome");
492            else if (Configuration.doAutoCreate())
493              this.outcome = new CodeableConcept(); // cc
494          return this.outcome;
495        }
496
497        public boolean hasOutcome() { 
498          return this.outcome != null && !this.outcome.isEmpty();
499        }
500
501        /**
502         * @param value {@link #outcome} (Indicates what happened following the condition.  If the condition resulted in death, deceased date is captured on the relation.)
503         */
504        public FamilyMemberHistoryConditionComponent setOutcome(CodeableConcept value) { 
505          this.outcome = value;
506          return this;
507        }
508
509        /**
510         * @return {@link #contributedToDeath} (This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.). This is the underlying object with id, value and extensions. The accessor "getContributedToDeath" gives direct access to the value
511         */
512        public BooleanType getContributedToDeathElement() { 
513          if (this.contributedToDeath == null)
514            if (Configuration.errorOnAutoCreate())
515              throw new Error("Attempt to auto-create FamilyMemberHistoryConditionComponent.contributedToDeath");
516            else if (Configuration.doAutoCreate())
517              this.contributedToDeath = new BooleanType(); // bb
518          return this.contributedToDeath;
519        }
520
521        public boolean hasContributedToDeathElement() { 
522          return this.contributedToDeath != null && !this.contributedToDeath.isEmpty();
523        }
524
525        public boolean hasContributedToDeath() { 
526          return this.contributedToDeath != null && !this.contributedToDeath.isEmpty();
527        }
528
529        /**
530         * @param value {@link #contributedToDeath} (This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.). This is the underlying object with id, value and extensions. The accessor "getContributedToDeath" gives direct access to the value
531         */
532        public FamilyMemberHistoryConditionComponent setContributedToDeathElement(BooleanType value) { 
533          this.contributedToDeath = value;
534          return this;
535        }
536
537        /**
538         * @return This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.
539         */
540        public boolean getContributedToDeath() { 
541          return this.contributedToDeath == null || this.contributedToDeath.isEmpty() ? false : this.contributedToDeath.getValue();
542        }
543
544        /**
545         * @param value This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.
546         */
547        public FamilyMemberHistoryConditionComponent setContributedToDeath(boolean value) { 
548            if (this.contributedToDeath == null)
549              this.contributedToDeath = new BooleanType();
550            this.contributedToDeath.setValue(value);
551          return this;
552        }
553
554        /**
555         * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.)
556         */
557        public DataType getOnset() { 
558          return this.onset;
559        }
560
561        /**
562         * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.)
563         */
564        public Age getOnsetAge() throws FHIRException { 
565          if (this.onset == null)
566            this.onset = new Age();
567          if (!(this.onset instanceof Age))
568            throw new FHIRException("Type mismatch: the type Age was expected, but "+this.onset.getClass().getName()+" was encountered");
569          return (Age) this.onset;
570        }
571
572        public boolean hasOnsetAge() { 
573          return this != null && this.onset instanceof Age;
574        }
575
576        /**
577         * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.)
578         */
579        public Range getOnsetRange() throws FHIRException { 
580          if (this.onset == null)
581            this.onset = new Range();
582          if (!(this.onset instanceof Range))
583            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.onset.getClass().getName()+" was encountered");
584          return (Range) this.onset;
585        }
586
587        public boolean hasOnsetRange() { 
588          return this != null && this.onset instanceof Range;
589        }
590
591        /**
592         * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.)
593         */
594        public Period getOnsetPeriod() throws FHIRException { 
595          if (this.onset == null)
596            this.onset = new Period();
597          if (!(this.onset instanceof Period))
598            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.onset.getClass().getName()+" was encountered");
599          return (Period) this.onset;
600        }
601
602        public boolean hasOnsetPeriod() { 
603          return this != null && this.onset instanceof Period;
604        }
605
606        /**
607         * @return {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.)
608         */
609        public StringType getOnsetStringType() throws FHIRException { 
610          if (this.onset == null)
611            this.onset = new StringType();
612          if (!(this.onset instanceof StringType))
613            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.onset.getClass().getName()+" was encountered");
614          return (StringType) this.onset;
615        }
616
617        public boolean hasOnsetStringType() { 
618          return this != null && this.onset instanceof StringType;
619        }
620
621        public boolean hasOnset() { 
622          return this.onset != null && !this.onset.isEmpty();
623        }
624
625        /**
626         * @param value {@link #onset} (Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.)
627         */
628        public FamilyMemberHistoryConditionComponent setOnset(DataType value) { 
629          if (value != null && !(value instanceof Age || value instanceof Range || value instanceof Period || value instanceof StringType))
630            throw new FHIRException("Not the right type for FamilyMemberHistory.condition.onset[x]: "+value.fhirType());
631          this.onset = value;
632          return this;
633        }
634
635        /**
636         * @return {@link #note} (An area where general notes can be placed about this specific condition.)
637         */
638        public List<Annotation> getNote() { 
639          if (this.note == null)
640            this.note = new ArrayList<Annotation>();
641          return this.note;
642        }
643
644        /**
645         * @return Returns a reference to <code>this</code> for easy method chaining
646         */
647        public FamilyMemberHistoryConditionComponent setNote(List<Annotation> theNote) { 
648          this.note = theNote;
649          return this;
650        }
651
652        public boolean hasNote() { 
653          if (this.note == null)
654            return false;
655          for (Annotation item : this.note)
656            if (!item.isEmpty())
657              return true;
658          return false;
659        }
660
661        public Annotation addNote() { //3
662          Annotation t = new Annotation();
663          if (this.note == null)
664            this.note = new ArrayList<Annotation>();
665          this.note.add(t);
666          return t;
667        }
668
669        public FamilyMemberHistoryConditionComponent addNote(Annotation t) { //3
670          if (t == null)
671            return this;
672          if (this.note == null)
673            this.note = new ArrayList<Annotation>();
674          this.note.add(t);
675          return this;
676        }
677
678        /**
679         * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
680         */
681        public Annotation getNoteFirstRep() { 
682          if (getNote().isEmpty()) {
683            addNote();
684          }
685          return getNote().get(0);
686        }
687
688        protected void listChildren(List<Property> children) {
689          super.listChildren(children);
690          children.add(new Property("code", "CodeableConcept", "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", 0, 1, code));
691          children.add(new Property("outcome", "CodeableConcept", "Indicates what happened following the condition.  If the condition resulted in death, deceased date is captured on the relation.", 0, 1, outcome));
692          children.add(new Property("contributedToDeath", "boolean", "This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.", 0, 1, contributedToDeath));
693          children.add(new Property("onset[x]", "Age|Range|Period|string", "Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset));
694          children.add(new Property("note", "Annotation", "An area where general notes can be placed about this specific condition.", 0, java.lang.Integer.MAX_VALUE, note));
695        }
696
697        @Override
698        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
699          switch (_hash) {
700          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "The actual condition specified. Could be a coded condition (like MI or Diabetes) or a less specific string like 'cancer' depending on how much is known about the condition and the capabilities of the creating system.", 0, 1, code);
701          case -1106507950: /*outcome*/  return new Property("outcome", "CodeableConcept", "Indicates what happened following the condition.  If the condition resulted in death, deceased date is captured on the relation.", 0, 1, outcome);
702          case -363644638: /*contributedToDeath*/  return new Property("contributedToDeath", "boolean", "This condition contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.", 0, 1, contributedToDeath);
703          case -1886216323: /*onset[x]*/  return new Property("onset[x]", "Age|Range|Period|string", "Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset);
704          case 105901603: /*onset*/  return new Property("onset[x]", "Age|Range|Period|string", "Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset);
705          case -1886241828: /*onsetAge*/  return new Property("onset[x]", "Age", "Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset);
706          case -186664742: /*onsetRange*/  return new Property("onset[x]", "Range", "Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset);
707          case -1545082428: /*onsetPeriod*/  return new Property("onset[x]", "Period", "Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset);
708          case -1445342188: /*onsetString*/  return new Property("onset[x]", "string", "Either the age of onset, range of approximate age or descriptive string can be recorded.  For conditions with multiple occurrences, this describes the first known occurrence.", 0, 1, onset);
709          case 3387378: /*note*/  return new Property("note", "Annotation", "An area where general notes can be placed about this specific condition.", 0, java.lang.Integer.MAX_VALUE, note);
710          default: return super.getNamedProperty(_hash, _name, _checkValid);
711          }
712
713        }
714
715      @Override
716      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
717        switch (hash) {
718        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
719        case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept
720        case -363644638: /*contributedToDeath*/ return this.contributedToDeath == null ? new Base[0] : new Base[] {this.contributedToDeath}; // BooleanType
721        case 105901603: /*onset*/ return this.onset == null ? new Base[0] : new Base[] {this.onset}; // DataType
722        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
723        default: return super.getProperty(hash, name, checkValid);
724        }
725
726      }
727
728      @Override
729      public Base setProperty(int hash, String name, Base value) throws FHIRException {
730        switch (hash) {
731        case 3059181: // code
732          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
733          return value;
734        case -1106507950: // outcome
735          this.outcome = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
736          return value;
737        case -363644638: // contributedToDeath
738          this.contributedToDeath = TypeConvertor.castToBoolean(value); // BooleanType
739          return value;
740        case 105901603: // onset
741          this.onset = TypeConvertor.castToType(value); // DataType
742          return value;
743        case 3387378: // note
744          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
745          return value;
746        default: return super.setProperty(hash, name, value);
747        }
748
749      }
750
751      @Override
752      public Base setProperty(String name, Base value) throws FHIRException {
753        if (name.equals("code")) {
754          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
755        } else if (name.equals("outcome")) {
756          this.outcome = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
757        } else if (name.equals("contributedToDeath")) {
758          this.contributedToDeath = TypeConvertor.castToBoolean(value); // BooleanType
759        } else if (name.equals("onset[x]")) {
760          this.onset = TypeConvertor.castToType(value); // DataType
761        } else if (name.equals("note")) {
762          this.getNote().add(TypeConvertor.castToAnnotation(value));
763        } else
764          return super.setProperty(name, value);
765        return value;
766      }
767
768  @Override
769  public void removeChild(String name, Base value) throws FHIRException {
770        if (name.equals("code")) {
771          this.code = null;
772        } else if (name.equals("outcome")) {
773          this.outcome = null;
774        } else if (name.equals("contributedToDeath")) {
775          this.contributedToDeath = null;
776        } else if (name.equals("onset[x]")) {
777          this.onset = null;
778        } else if (name.equals("note")) {
779          this.getNote().remove(value);
780        } else
781          super.removeChild(name, value);
782        
783      }
784
785      @Override
786      public Base makeProperty(int hash, String name) throws FHIRException {
787        switch (hash) {
788        case 3059181:  return getCode();
789        case -1106507950:  return getOutcome();
790        case -363644638:  return getContributedToDeathElement();
791        case -1886216323:  return getOnset();
792        case 105901603:  return getOnset();
793        case 3387378:  return addNote(); 
794        default: return super.makeProperty(hash, name);
795        }
796
797      }
798
799      @Override
800      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
801        switch (hash) {
802        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
803        case -1106507950: /*outcome*/ return new String[] {"CodeableConcept"};
804        case -363644638: /*contributedToDeath*/ return new String[] {"boolean"};
805        case 105901603: /*onset*/ return new String[] {"Age", "Range", "Period", "string"};
806        case 3387378: /*note*/ return new String[] {"Annotation"};
807        default: return super.getTypesForProperty(hash, name);
808        }
809
810      }
811
812      @Override
813      public Base addChild(String name) throws FHIRException {
814        if (name.equals("code")) {
815          this.code = new CodeableConcept();
816          return this.code;
817        }
818        else if (name.equals("outcome")) {
819          this.outcome = new CodeableConcept();
820          return this.outcome;
821        }
822        else if (name.equals("contributedToDeath")) {
823          throw new FHIRException("Cannot call addChild on a singleton property FamilyMemberHistory.condition.contributedToDeath");
824        }
825        else if (name.equals("onsetAge")) {
826          this.onset = new Age();
827          return this.onset;
828        }
829        else if (name.equals("onsetRange")) {
830          this.onset = new Range();
831          return this.onset;
832        }
833        else if (name.equals("onsetPeriod")) {
834          this.onset = new Period();
835          return this.onset;
836        }
837        else if (name.equals("onsetString")) {
838          this.onset = new StringType();
839          return this.onset;
840        }
841        else if (name.equals("note")) {
842          return addNote();
843        }
844        else
845          return super.addChild(name);
846      }
847
848      public FamilyMemberHistoryConditionComponent copy() {
849        FamilyMemberHistoryConditionComponent dst = new FamilyMemberHistoryConditionComponent();
850        copyValues(dst);
851        return dst;
852      }
853
854      public void copyValues(FamilyMemberHistoryConditionComponent dst) {
855        super.copyValues(dst);
856        dst.code = code == null ? null : code.copy();
857        dst.outcome = outcome == null ? null : outcome.copy();
858        dst.contributedToDeath = contributedToDeath == null ? null : contributedToDeath.copy();
859        dst.onset = onset == null ? null : onset.copy();
860        if (note != null) {
861          dst.note = new ArrayList<Annotation>();
862          for (Annotation i : note)
863            dst.note.add(i.copy());
864        };
865      }
866
867      @Override
868      public boolean equalsDeep(Base other_) {
869        if (!super.equalsDeep(other_))
870          return false;
871        if (!(other_ instanceof FamilyMemberHistoryConditionComponent))
872          return false;
873        FamilyMemberHistoryConditionComponent o = (FamilyMemberHistoryConditionComponent) other_;
874        return compareDeep(code, o.code, true) && compareDeep(outcome, o.outcome, true) && compareDeep(contributedToDeath, o.contributedToDeath, true)
875           && compareDeep(onset, o.onset, true) && compareDeep(note, o.note, true);
876      }
877
878      @Override
879      public boolean equalsShallow(Base other_) {
880        if (!super.equalsShallow(other_))
881          return false;
882        if (!(other_ instanceof FamilyMemberHistoryConditionComponent))
883          return false;
884        FamilyMemberHistoryConditionComponent o = (FamilyMemberHistoryConditionComponent) other_;
885        return compareValues(contributedToDeath, o.contributedToDeath, true);
886      }
887
888      public boolean isEmpty() {
889        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, outcome, contributedToDeath
890          , onset, note);
891      }
892
893  public String fhirType() {
894    return "FamilyMemberHistory.condition";
895
896  }
897
898  }
899
900    @Block()
901    public static class FamilyMemberHistoryProcedureComponent extends BackboneElement implements IBaseBackboneElement {
902        /**
903         * The actual procedure specified. Could be a coded procedure or a less specific string depending on how much is known about the procedure and the capabilities of the creating system.
904         */
905        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
906        @Description(shortDefinition="Procedures performed on the related person", formalDefinition="The actual procedure specified. Could be a coded procedure or a less specific string depending on how much is known about the procedure and the capabilities of the creating system." )
907        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/procedure-code")
908        protected CodeableConcept code;
909
910        /**
911         * Indicates what happened following the procedure. If the procedure resulted in death, deceased date is captured on the relation.
912         */
913        @Child(name = "outcome", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
914        @Description(shortDefinition="What happened following the procedure", formalDefinition="Indicates what happened following the procedure. If the procedure resulted in death, deceased date is captured on the relation." )
915        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
916        protected CodeableConcept outcome;
917
918        /**
919         * This procedure contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.
920         */
921        @Child(name = "contributedToDeath", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false)
922        @Description(shortDefinition="Whether the procedure contributed to the cause of death", formalDefinition="This procedure contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown." )
923        protected BooleanType contributedToDeath;
924
925        /**
926         * Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.
927         */
928        @Child(name = "performed", type = {Age.class, Range.class, Period.class, StringType.class, DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=false)
929        @Description(shortDefinition="When the procedure was performed", formalDefinition="Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured." )
930        protected DataType performed;
931
932        /**
933         * An area where general notes can be placed about this specific procedure.
934         */
935        @Child(name = "note", type = {Annotation.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
936        @Description(shortDefinition="Extra information about the procedure", formalDefinition="An area where general notes can be placed about this specific procedure." )
937        protected List<Annotation> note;
938
939        private static final long serialVersionUID = 281271062L;
940
941    /**
942     * Constructor
943     */
944      public FamilyMemberHistoryProcedureComponent() {
945        super();
946      }
947
948    /**
949     * Constructor
950     */
951      public FamilyMemberHistoryProcedureComponent(CodeableConcept code) {
952        super();
953        this.setCode(code);
954      }
955
956        /**
957         * @return {@link #code} (The actual procedure specified. Could be a coded procedure or a less specific string depending on how much is known about the procedure and the capabilities of the creating system.)
958         */
959        public CodeableConcept getCode() { 
960          if (this.code == null)
961            if (Configuration.errorOnAutoCreate())
962              throw new Error("Attempt to auto-create FamilyMemberHistoryProcedureComponent.code");
963            else if (Configuration.doAutoCreate())
964              this.code = new CodeableConcept(); // cc
965          return this.code;
966        }
967
968        public boolean hasCode() { 
969          return this.code != null && !this.code.isEmpty();
970        }
971
972        /**
973         * @param value {@link #code} (The actual procedure specified. Could be a coded procedure or a less specific string depending on how much is known about the procedure and the capabilities of the creating system.)
974         */
975        public FamilyMemberHistoryProcedureComponent setCode(CodeableConcept value) { 
976          this.code = value;
977          return this;
978        }
979
980        /**
981         * @return {@link #outcome} (Indicates what happened following the procedure. If the procedure resulted in death, deceased date is captured on the relation.)
982         */
983        public CodeableConcept getOutcome() { 
984          if (this.outcome == null)
985            if (Configuration.errorOnAutoCreate())
986              throw new Error("Attempt to auto-create FamilyMemberHistoryProcedureComponent.outcome");
987            else if (Configuration.doAutoCreate())
988              this.outcome = new CodeableConcept(); // cc
989          return this.outcome;
990        }
991
992        public boolean hasOutcome() { 
993          return this.outcome != null && !this.outcome.isEmpty();
994        }
995
996        /**
997         * @param value {@link #outcome} (Indicates what happened following the procedure. If the procedure resulted in death, deceased date is captured on the relation.)
998         */
999        public FamilyMemberHistoryProcedureComponent setOutcome(CodeableConcept value) { 
1000          this.outcome = value;
1001          return this;
1002        }
1003
1004        /**
1005         * @return {@link #contributedToDeath} (This procedure contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.). This is the underlying object with id, value and extensions. The accessor "getContributedToDeath" gives direct access to the value
1006         */
1007        public BooleanType getContributedToDeathElement() { 
1008          if (this.contributedToDeath == null)
1009            if (Configuration.errorOnAutoCreate())
1010              throw new Error("Attempt to auto-create FamilyMemberHistoryProcedureComponent.contributedToDeath");
1011            else if (Configuration.doAutoCreate())
1012              this.contributedToDeath = new BooleanType(); // bb
1013          return this.contributedToDeath;
1014        }
1015
1016        public boolean hasContributedToDeathElement() { 
1017          return this.contributedToDeath != null && !this.contributedToDeath.isEmpty();
1018        }
1019
1020        public boolean hasContributedToDeath() { 
1021          return this.contributedToDeath != null && !this.contributedToDeath.isEmpty();
1022        }
1023
1024        /**
1025         * @param value {@link #contributedToDeath} (This procedure contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.). This is the underlying object with id, value and extensions. The accessor "getContributedToDeath" gives direct access to the value
1026         */
1027        public FamilyMemberHistoryProcedureComponent setContributedToDeathElement(BooleanType value) { 
1028          this.contributedToDeath = value;
1029          return this;
1030        }
1031
1032        /**
1033         * @return This procedure contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.
1034         */
1035        public boolean getContributedToDeath() { 
1036          return this.contributedToDeath == null || this.contributedToDeath.isEmpty() ? false : this.contributedToDeath.getValue();
1037        }
1038
1039        /**
1040         * @param value This procedure contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.
1041         */
1042        public FamilyMemberHistoryProcedureComponent setContributedToDeath(boolean value) { 
1043            if (this.contributedToDeath == null)
1044              this.contributedToDeath = new BooleanType();
1045            this.contributedToDeath.setValue(value);
1046          return this;
1047        }
1048
1049        /**
1050         * @return {@link #performed} (Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.)
1051         */
1052        public DataType getPerformed() { 
1053          return this.performed;
1054        }
1055
1056        /**
1057         * @return {@link #performed} (Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.)
1058         */
1059        public Age getPerformedAge() throws FHIRException { 
1060          if (this.performed == null)
1061            this.performed = new Age();
1062          if (!(this.performed instanceof Age))
1063            throw new FHIRException("Type mismatch: the type Age was expected, but "+this.performed.getClass().getName()+" was encountered");
1064          return (Age) this.performed;
1065        }
1066
1067        public boolean hasPerformedAge() { 
1068          return this != null && this.performed instanceof Age;
1069        }
1070
1071        /**
1072         * @return {@link #performed} (Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.)
1073         */
1074        public Range getPerformedRange() throws FHIRException { 
1075          if (this.performed == null)
1076            this.performed = new Range();
1077          if (!(this.performed instanceof Range))
1078            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.performed.getClass().getName()+" was encountered");
1079          return (Range) this.performed;
1080        }
1081
1082        public boolean hasPerformedRange() { 
1083          return this != null && this.performed instanceof Range;
1084        }
1085
1086        /**
1087         * @return {@link #performed} (Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.)
1088         */
1089        public Period getPerformedPeriod() throws FHIRException { 
1090          if (this.performed == null)
1091            this.performed = new Period();
1092          if (!(this.performed instanceof Period))
1093            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.performed.getClass().getName()+" was encountered");
1094          return (Period) this.performed;
1095        }
1096
1097        public boolean hasPerformedPeriod() { 
1098          return this != null && this.performed instanceof Period;
1099        }
1100
1101        /**
1102         * @return {@link #performed} (Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.)
1103         */
1104        public StringType getPerformedStringType() throws FHIRException { 
1105          if (this.performed == null)
1106            this.performed = new StringType();
1107          if (!(this.performed instanceof StringType))
1108            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.performed.getClass().getName()+" was encountered");
1109          return (StringType) this.performed;
1110        }
1111
1112        public boolean hasPerformedStringType() { 
1113          return this != null && this.performed instanceof StringType;
1114        }
1115
1116        /**
1117         * @return {@link #performed} (Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.)
1118         */
1119        public DateTimeType getPerformedDateTimeType() throws FHIRException { 
1120          if (this.performed == null)
1121            this.performed = new DateTimeType();
1122          if (!(this.performed instanceof DateTimeType))
1123            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.performed.getClass().getName()+" was encountered");
1124          return (DateTimeType) this.performed;
1125        }
1126
1127        public boolean hasPerformedDateTimeType() { 
1128          return this != null && this.performed instanceof DateTimeType;
1129        }
1130
1131        public boolean hasPerformed() { 
1132          return this.performed != null && !this.performed.isEmpty();
1133        }
1134
1135        /**
1136         * @param value {@link #performed} (Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.)
1137         */
1138        public FamilyMemberHistoryProcedureComponent setPerformed(DataType value) { 
1139          if (value != null && !(value instanceof Age || value instanceof Range || value instanceof Period || value instanceof StringType || value instanceof DateTimeType))
1140            throw new FHIRException("Not the right type for FamilyMemberHistory.procedure.performed[x]: "+value.fhirType());
1141          this.performed = value;
1142          return this;
1143        }
1144
1145        /**
1146         * @return {@link #note} (An area where general notes can be placed about this specific procedure.)
1147         */
1148        public List<Annotation> getNote() { 
1149          if (this.note == null)
1150            this.note = new ArrayList<Annotation>();
1151          return this.note;
1152        }
1153
1154        /**
1155         * @return Returns a reference to <code>this</code> for easy method chaining
1156         */
1157        public FamilyMemberHistoryProcedureComponent setNote(List<Annotation> theNote) { 
1158          this.note = theNote;
1159          return this;
1160        }
1161
1162        public boolean hasNote() { 
1163          if (this.note == null)
1164            return false;
1165          for (Annotation item : this.note)
1166            if (!item.isEmpty())
1167              return true;
1168          return false;
1169        }
1170
1171        public Annotation addNote() { //3
1172          Annotation t = new Annotation();
1173          if (this.note == null)
1174            this.note = new ArrayList<Annotation>();
1175          this.note.add(t);
1176          return t;
1177        }
1178
1179        public FamilyMemberHistoryProcedureComponent addNote(Annotation t) { //3
1180          if (t == null)
1181            return this;
1182          if (this.note == null)
1183            this.note = new ArrayList<Annotation>();
1184          this.note.add(t);
1185          return this;
1186        }
1187
1188        /**
1189         * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1190         */
1191        public Annotation getNoteFirstRep() { 
1192          if (getNote().isEmpty()) {
1193            addNote();
1194          }
1195          return getNote().get(0);
1196        }
1197
1198        protected void listChildren(List<Property> children) {
1199          super.listChildren(children);
1200          children.add(new Property("code", "CodeableConcept", "The actual procedure specified. Could be a coded procedure or a less specific string depending on how much is known about the procedure and the capabilities of the creating system.", 0, 1, code));
1201          children.add(new Property("outcome", "CodeableConcept", "Indicates what happened following the procedure. If the procedure resulted in death, deceased date is captured on the relation.", 0, 1, outcome));
1202          children.add(new Property("contributedToDeath", "boolean", "This procedure contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.", 0, 1, contributedToDeath));
1203          children.add(new Property("performed[x]", "Age|Range|Period|string|dateTime", "Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", 0, 1, performed));
1204          children.add(new Property("note", "Annotation", "An area where general notes can be placed about this specific procedure.", 0, java.lang.Integer.MAX_VALUE, note));
1205        }
1206
1207        @Override
1208        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1209          switch (_hash) {
1210          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "The actual procedure specified. Could be a coded procedure or a less specific string depending on how much is known about the procedure and the capabilities of the creating system.", 0, 1, code);
1211          case -1106507950: /*outcome*/  return new Property("outcome", "CodeableConcept", "Indicates what happened following the procedure. If the procedure resulted in death, deceased date is captured on the relation.", 0, 1, outcome);
1212          case -363644638: /*contributedToDeath*/  return new Property("contributedToDeath", "boolean", "This procedure contributed to the cause of death of the related person. If contributedToDeath is not populated, then it is unknown.", 0, 1, contributedToDeath);
1213          case 1355984064: /*performed[x]*/  return new Property("performed[x]", "Age|Range|Period|string|dateTime", "Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", 0, 1, performed);
1214          case 481140672: /*performed*/  return new Property("performed[x]", "Age|Range|Period|string|dateTime", "Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", 0, 1, performed);
1215          case 1355958559: /*performedAge*/  return new Property("performed[x]", "Age", "Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", 0, 1, performed);
1216          case 1716617565: /*performedRange*/  return new Property("performed[x]", "Range", "Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", 0, 1, performed);
1217          case 1622094241: /*performedPeriod*/  return new Property("performed[x]", "Period", "Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", 0, 1, performed);
1218          case 1721834481: /*performedString*/  return new Property("performed[x]", "string", "Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", 0, 1, performed);
1219          case 1118270331: /*performedDateTime*/  return new Property("performed[x]", "dateTime", "Estimated or actual date, date-time, period, or age when the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.", 0, 1, performed);
1220          case 3387378: /*note*/  return new Property("note", "Annotation", "An area where general notes can be placed about this specific procedure.", 0, java.lang.Integer.MAX_VALUE, note);
1221          default: return super.getNamedProperty(_hash, _name, _checkValid);
1222          }
1223
1224        }
1225
1226      @Override
1227      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1228        switch (hash) {
1229        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1230        case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // CodeableConcept
1231        case -363644638: /*contributedToDeath*/ return this.contributedToDeath == null ? new Base[0] : new Base[] {this.contributedToDeath}; // BooleanType
1232        case 481140672: /*performed*/ return this.performed == null ? new Base[0] : new Base[] {this.performed}; // DataType
1233        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1234        default: return super.getProperty(hash, name, checkValid);
1235        }
1236
1237      }
1238
1239      @Override
1240      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1241        switch (hash) {
1242        case 3059181: // code
1243          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1244          return value;
1245        case -1106507950: // outcome
1246          this.outcome = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1247          return value;
1248        case -363644638: // contributedToDeath
1249          this.contributedToDeath = TypeConvertor.castToBoolean(value); // BooleanType
1250          return value;
1251        case 481140672: // performed
1252          this.performed = TypeConvertor.castToType(value); // DataType
1253          return value;
1254        case 3387378: // note
1255          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1256          return value;
1257        default: return super.setProperty(hash, name, value);
1258        }
1259
1260      }
1261
1262      @Override
1263      public Base setProperty(String name, Base value) throws FHIRException {
1264        if (name.equals("code")) {
1265          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1266        } else if (name.equals("outcome")) {
1267          this.outcome = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1268        } else if (name.equals("contributedToDeath")) {
1269          this.contributedToDeath = TypeConvertor.castToBoolean(value); // BooleanType
1270        } else if (name.equals("performed[x]")) {
1271          this.performed = TypeConvertor.castToType(value); // DataType
1272        } else if (name.equals("note")) {
1273          this.getNote().add(TypeConvertor.castToAnnotation(value));
1274        } else
1275          return super.setProperty(name, value);
1276        return value;
1277      }
1278
1279  @Override
1280  public void removeChild(String name, Base value) throws FHIRException {
1281        if (name.equals("code")) {
1282          this.code = null;
1283        } else if (name.equals("outcome")) {
1284          this.outcome = null;
1285        } else if (name.equals("contributedToDeath")) {
1286          this.contributedToDeath = null;
1287        } else if (name.equals("performed[x]")) {
1288          this.performed = null;
1289        } else if (name.equals("note")) {
1290          this.getNote().remove(value);
1291        } else
1292          super.removeChild(name, value);
1293        
1294      }
1295
1296      @Override
1297      public Base makeProperty(int hash, String name) throws FHIRException {
1298        switch (hash) {
1299        case 3059181:  return getCode();
1300        case -1106507950:  return getOutcome();
1301        case -363644638:  return getContributedToDeathElement();
1302        case 1355984064:  return getPerformed();
1303        case 481140672:  return getPerformed();
1304        case 3387378:  return addNote(); 
1305        default: return super.makeProperty(hash, name);
1306        }
1307
1308      }
1309
1310      @Override
1311      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1312        switch (hash) {
1313        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1314        case -1106507950: /*outcome*/ return new String[] {"CodeableConcept"};
1315        case -363644638: /*contributedToDeath*/ return new String[] {"boolean"};
1316        case 481140672: /*performed*/ return new String[] {"Age", "Range", "Period", "string", "dateTime"};
1317        case 3387378: /*note*/ return new String[] {"Annotation"};
1318        default: return super.getTypesForProperty(hash, name);
1319        }
1320
1321      }
1322
1323      @Override
1324      public Base addChild(String name) throws FHIRException {
1325        if (name.equals("code")) {
1326          this.code = new CodeableConcept();
1327          return this.code;
1328        }
1329        else if (name.equals("outcome")) {
1330          this.outcome = new CodeableConcept();
1331          return this.outcome;
1332        }
1333        else if (name.equals("contributedToDeath")) {
1334          throw new FHIRException("Cannot call addChild on a singleton property FamilyMemberHistory.procedure.contributedToDeath");
1335        }
1336        else if (name.equals("performedAge")) {
1337          this.performed = new Age();
1338          return this.performed;
1339        }
1340        else if (name.equals("performedRange")) {
1341          this.performed = new Range();
1342          return this.performed;
1343        }
1344        else if (name.equals("performedPeriod")) {
1345          this.performed = new Period();
1346          return this.performed;
1347        }
1348        else if (name.equals("performedString")) {
1349          this.performed = new StringType();
1350          return this.performed;
1351        }
1352        else if (name.equals("performedDateTime")) {
1353          this.performed = new DateTimeType();
1354          return this.performed;
1355        }
1356        else if (name.equals("note")) {
1357          return addNote();
1358        }
1359        else
1360          return super.addChild(name);
1361      }
1362
1363      public FamilyMemberHistoryProcedureComponent copy() {
1364        FamilyMemberHistoryProcedureComponent dst = new FamilyMemberHistoryProcedureComponent();
1365        copyValues(dst);
1366        return dst;
1367      }
1368
1369      public void copyValues(FamilyMemberHistoryProcedureComponent dst) {
1370        super.copyValues(dst);
1371        dst.code = code == null ? null : code.copy();
1372        dst.outcome = outcome == null ? null : outcome.copy();
1373        dst.contributedToDeath = contributedToDeath == null ? null : contributedToDeath.copy();
1374        dst.performed = performed == null ? null : performed.copy();
1375        if (note != null) {
1376          dst.note = new ArrayList<Annotation>();
1377          for (Annotation i : note)
1378            dst.note.add(i.copy());
1379        };
1380      }
1381
1382      @Override
1383      public boolean equalsDeep(Base other_) {
1384        if (!super.equalsDeep(other_))
1385          return false;
1386        if (!(other_ instanceof FamilyMemberHistoryProcedureComponent))
1387          return false;
1388        FamilyMemberHistoryProcedureComponent o = (FamilyMemberHistoryProcedureComponent) other_;
1389        return compareDeep(code, o.code, true) && compareDeep(outcome, o.outcome, true) && compareDeep(contributedToDeath, o.contributedToDeath, true)
1390           && compareDeep(performed, o.performed, true) && compareDeep(note, o.note, true);
1391      }
1392
1393      @Override
1394      public boolean equalsShallow(Base other_) {
1395        if (!super.equalsShallow(other_))
1396          return false;
1397        if (!(other_ instanceof FamilyMemberHistoryProcedureComponent))
1398          return false;
1399        FamilyMemberHistoryProcedureComponent o = (FamilyMemberHistoryProcedureComponent) other_;
1400        return compareValues(contributedToDeath, o.contributedToDeath, true);
1401      }
1402
1403      public boolean isEmpty() {
1404        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, outcome, contributedToDeath
1405          , performed, note);
1406      }
1407
1408  public String fhirType() {
1409    return "FamilyMemberHistory.procedure";
1410
1411  }
1412
1413  }
1414
1415    /**
1416     * Business identifiers assigned to this family member history by the performer or other systems which remain constant as the resource is updated and propagates from server to server.
1417     */
1418    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1419    @Description(shortDefinition="External Id(s) for this record", formalDefinition="Business identifiers assigned to this family member history by the performer or other systems which remain constant as the resource is updated and propagates from server to server." )
1420    protected List<Identifier> identifier;
1421
1422    /**
1423     * The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.
1424     */
1425    @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1426    @Description(shortDefinition="Instantiates FHIR protocol or definition", formalDefinition="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory." )
1427    protected List<CanonicalType> instantiatesCanonical;
1428
1429    /**
1430     * The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.
1431     */
1432    @Child(name = "instantiatesUri", type = {UriType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1433    @Description(shortDefinition="Instantiates external protocol or definition", formalDefinition="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory." )
1434    protected List<UriType> instantiatesUri;
1435
1436    /**
1437     * A code specifying the status of the record of the family history of a specific family member.
1438     */
1439    @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true)
1440    @Description(shortDefinition="partial | completed | entered-in-error | health-unknown", formalDefinition="A code specifying the status of the record of the family history of a specific family member." )
1441    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/history-status")
1442    protected Enumeration<FamilyHistoryStatus> status;
1443
1444    /**
1445     * Describes why the family member's history is not available.
1446     */
1447    @Child(name = "dataAbsentReason", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true)
1448    @Description(shortDefinition="subject-unknown | withheld | unable-to-obtain | deferred", formalDefinition="Describes why the family member's history is not available." )
1449    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/history-absent-reason")
1450    protected CodeableConcept dataAbsentReason;
1451
1452    /**
1453     * The person who this history concerns.
1454     */
1455    @Child(name = "patient", type = {Patient.class}, order=5, min=1, max=1, modifier=false, summary=true)
1456    @Description(shortDefinition="Patient history is about", formalDefinition="The person who this history concerns." )
1457    protected Reference patient;
1458
1459    /**
1460     * The date (and possibly time) when the family member history was recorded or last updated.
1461     */
1462    @Child(name = "date", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true)
1463    @Description(shortDefinition="When history was recorded or last updated", formalDefinition="The date (and possibly time) when the family member history was recorded or last updated." )
1464    protected DateTimeType date;
1465
1466    /**
1467     * Indicates who or what participated in the activities related to the family member history and how they were involved.
1468     */
1469    @Child(name = "participant", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1470    @Description(shortDefinition="Who or what participated in the activities related to the family member history and how they were involved", formalDefinition="Indicates who or what participated in the activities related to the family member history and how they were involved." )
1471    protected List<FamilyMemberHistoryParticipantComponent> participant;
1472
1473    /**
1474     * This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair".
1475     */
1476    @Child(name = "name", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true)
1477    @Description(shortDefinition="The family member described", formalDefinition="This will either be a name or a description; e.g. \"Aunt Susan\", \"my cousin with the red hair\"." )
1478    protected StringType name;
1479
1480    /**
1481     * The type of relationship this person has to the patient (father, mother, brother etc.).
1482     */
1483    @Child(name = "relationship", type = {CodeableConcept.class}, order=9, min=1, max=1, modifier=false, summary=true)
1484    @Description(shortDefinition="Relationship to the subject", formalDefinition="The type of relationship this person has to the patient (father, mother, brother etc.)." )
1485    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-FamilyMember")
1486    protected CodeableConcept relationship;
1487
1488    /**
1489     * The birth sex of the family member.
1490     */
1491    @Child(name = "sex", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true)
1492    @Description(shortDefinition="male | female | other | unknown", formalDefinition="The birth sex of the family member." )
1493    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/administrative-gender")
1494    protected CodeableConcept sex;
1495
1496    /**
1497     * The actual or approximate date of birth of the relative.
1498     */
1499    @Child(name = "born", type = {Period.class, DateType.class, StringType.class}, order=11, min=0, max=1, modifier=false, summary=false)
1500    @Description(shortDefinition="(approximate) date of birth", formalDefinition="The actual or approximate date of birth of the relative." )
1501    protected DataType born;
1502
1503    /**
1504     * The age of the relative at the time the family member history is recorded.
1505     */
1506    @Child(name = "age", type = {Age.class, Range.class, StringType.class}, order=12, min=0, max=1, modifier=false, summary=true)
1507    @Description(shortDefinition="(approximate) age", formalDefinition="The age of the relative at the time the family member history is recorded." )
1508    protected DataType age;
1509
1510    /**
1511     * If true, indicates that the age value specified is an estimated value.
1512     */
1513    @Child(name = "estimatedAge", type = {BooleanType.class}, order=13, min=0, max=1, modifier=false, summary=true)
1514    @Description(shortDefinition="Age is estimated?", formalDefinition="If true, indicates that the age value specified is an estimated value." )
1515    protected BooleanType estimatedAge;
1516
1517    /**
1518     * Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.
1519     */
1520    @Child(name = "deceased", type = {BooleanType.class, Age.class, Range.class, DateType.class, StringType.class}, order=14, min=0, max=1, modifier=false, summary=true)
1521    @Description(shortDefinition="Dead? How old/when?", formalDefinition="Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record." )
1522    protected DataType deceased;
1523
1524    /**
1525     * Describes why the family member history occurred in coded or textual form, or Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.
1526     */
1527    @Child(name = "reason", type = {CodeableReference.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1528    @Description(shortDefinition="Why was family member history performed?", formalDefinition="Describes why the family member history occurred in coded or textual form, or Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event." )
1529    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
1530    protected List<CodeableReference> reason;
1531
1532    /**
1533     * This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.
1534     */
1535    @Child(name = "note", type = {Annotation.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1536    @Description(shortDefinition="General note about related person", formalDefinition="This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible." )
1537    protected List<Annotation> note;
1538
1539    /**
1540     * The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
1541     */
1542    @Child(name = "condition", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1543    @Description(shortDefinition="Condition that the related person had", formalDefinition="The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition." )
1544    protected List<FamilyMemberHistoryConditionComponent> condition;
1545
1546    /**
1547     * The significant Procedures (or procedure) that the family member had. This is a repeating section to allow a system to represent more than one procedure per resource, though there is nothing stopping multiple resources - one per procedure.
1548     */
1549    @Child(name = "procedure", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1550    @Description(shortDefinition="Procedures that the related person had", formalDefinition="The significant Procedures (or procedure) that the family member had. This is a repeating section to allow a system to represent more than one procedure per resource, though there is nothing stopping multiple resources - one per procedure." )
1551    protected List<FamilyMemberHistoryProcedureComponent> procedure;
1552
1553    private static final long serialVersionUID = -1025621277L;
1554
1555  /**
1556   * Constructor
1557   */
1558    public FamilyMemberHistory() {
1559      super();
1560    }
1561
1562  /**
1563   * Constructor
1564   */
1565    public FamilyMemberHistory(FamilyHistoryStatus status, Reference patient, CodeableConcept relationship) {
1566      super();
1567      this.setStatus(status);
1568      this.setPatient(patient);
1569      this.setRelationship(relationship);
1570    }
1571
1572    /**
1573     * @return {@link #identifier} (Business identifiers assigned to this family member history by the performer or other systems which remain constant as the resource is updated and propagates from server to server.)
1574     */
1575    public List<Identifier> getIdentifier() { 
1576      if (this.identifier == null)
1577        this.identifier = new ArrayList<Identifier>();
1578      return this.identifier;
1579    }
1580
1581    /**
1582     * @return Returns a reference to <code>this</code> for easy method chaining
1583     */
1584    public FamilyMemberHistory setIdentifier(List<Identifier> theIdentifier) { 
1585      this.identifier = theIdentifier;
1586      return this;
1587    }
1588
1589    public boolean hasIdentifier() { 
1590      if (this.identifier == null)
1591        return false;
1592      for (Identifier item : this.identifier)
1593        if (!item.isEmpty())
1594          return true;
1595      return false;
1596    }
1597
1598    public Identifier addIdentifier() { //3
1599      Identifier t = new Identifier();
1600      if (this.identifier == null)
1601        this.identifier = new ArrayList<Identifier>();
1602      this.identifier.add(t);
1603      return t;
1604    }
1605
1606    public FamilyMemberHistory addIdentifier(Identifier t) { //3
1607      if (t == null)
1608        return this;
1609      if (this.identifier == null)
1610        this.identifier = new ArrayList<Identifier>();
1611      this.identifier.add(t);
1612      return this;
1613    }
1614
1615    /**
1616     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1617     */
1618    public Identifier getIdentifierFirstRep() { 
1619      if (getIdentifier().isEmpty()) {
1620        addIdentifier();
1621      }
1622      return getIdentifier().get(0);
1623    }
1624
1625    /**
1626     * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.)
1627     */
1628    public List<CanonicalType> getInstantiatesCanonical() { 
1629      if (this.instantiatesCanonical == null)
1630        this.instantiatesCanonical = new ArrayList<CanonicalType>();
1631      return this.instantiatesCanonical;
1632    }
1633
1634    /**
1635     * @return Returns a reference to <code>this</code> for easy method chaining
1636     */
1637    public FamilyMemberHistory setInstantiatesCanonical(List<CanonicalType> theInstantiatesCanonical) { 
1638      this.instantiatesCanonical = theInstantiatesCanonical;
1639      return this;
1640    }
1641
1642    public boolean hasInstantiatesCanonical() { 
1643      if (this.instantiatesCanonical == null)
1644        return false;
1645      for (CanonicalType item : this.instantiatesCanonical)
1646        if (!item.isEmpty())
1647          return true;
1648      return false;
1649    }
1650
1651    /**
1652     * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.)
1653     */
1654    public CanonicalType addInstantiatesCanonicalElement() {//2 
1655      CanonicalType t = new CanonicalType();
1656      if (this.instantiatesCanonical == null)
1657        this.instantiatesCanonical = new ArrayList<CanonicalType>();
1658      this.instantiatesCanonical.add(t);
1659      return t;
1660    }
1661
1662    /**
1663     * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.)
1664     */
1665    public FamilyMemberHistory addInstantiatesCanonical(String value) { //1
1666      CanonicalType t = new CanonicalType();
1667      t.setValue(value);
1668      if (this.instantiatesCanonical == null)
1669        this.instantiatesCanonical = new ArrayList<CanonicalType>();
1670      this.instantiatesCanonical.add(t);
1671      return this;
1672    }
1673
1674    /**
1675     * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.)
1676     */
1677    public boolean hasInstantiatesCanonical(String value) { 
1678      if (this.instantiatesCanonical == null)
1679        return false;
1680      for (CanonicalType v : this.instantiatesCanonical)
1681        if (v.getValue().equals(value)) // canonical
1682          return true;
1683      return false;
1684    }
1685
1686    /**
1687     * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.)
1688     */
1689    public List<UriType> getInstantiatesUri() { 
1690      if (this.instantiatesUri == null)
1691        this.instantiatesUri = new ArrayList<UriType>();
1692      return this.instantiatesUri;
1693    }
1694
1695    /**
1696     * @return Returns a reference to <code>this</code> for easy method chaining
1697     */
1698    public FamilyMemberHistory setInstantiatesUri(List<UriType> theInstantiatesUri) { 
1699      this.instantiatesUri = theInstantiatesUri;
1700      return this;
1701    }
1702
1703    public boolean hasInstantiatesUri() { 
1704      if (this.instantiatesUri == null)
1705        return false;
1706      for (UriType item : this.instantiatesUri)
1707        if (!item.isEmpty())
1708          return true;
1709      return false;
1710    }
1711
1712    /**
1713     * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.)
1714     */
1715    public UriType addInstantiatesUriElement() {//2 
1716      UriType t = new UriType();
1717      if (this.instantiatesUri == null)
1718        this.instantiatesUri = new ArrayList<UriType>();
1719      this.instantiatesUri.add(t);
1720      return t;
1721    }
1722
1723    /**
1724     * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.)
1725     */
1726    public FamilyMemberHistory addInstantiatesUri(String value) { //1
1727      UriType t = new UriType();
1728      t.setValue(value);
1729      if (this.instantiatesUri == null)
1730        this.instantiatesUri = new ArrayList<UriType>();
1731      this.instantiatesUri.add(t);
1732      return this;
1733    }
1734
1735    /**
1736     * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.)
1737     */
1738    public boolean hasInstantiatesUri(String value) { 
1739      if (this.instantiatesUri == null)
1740        return false;
1741      for (UriType v : this.instantiatesUri)
1742        if (v.getValue().equals(value)) // uri
1743          return true;
1744      return false;
1745    }
1746
1747    /**
1748     * @return {@link #status} (A code specifying the status of the record of the family history of a specific family member.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1749     */
1750    public Enumeration<FamilyHistoryStatus> getStatusElement() { 
1751      if (this.status == null)
1752        if (Configuration.errorOnAutoCreate())
1753          throw new Error("Attempt to auto-create FamilyMemberHistory.status");
1754        else if (Configuration.doAutoCreate())
1755          this.status = new Enumeration<FamilyHistoryStatus>(new FamilyHistoryStatusEnumFactory()); // bb
1756      return this.status;
1757    }
1758
1759    public boolean hasStatusElement() { 
1760      return this.status != null && !this.status.isEmpty();
1761    }
1762
1763    public boolean hasStatus() { 
1764      return this.status != null && !this.status.isEmpty();
1765    }
1766
1767    /**
1768     * @param value {@link #status} (A code specifying the status of the record of the family history of a specific family member.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1769     */
1770    public FamilyMemberHistory setStatusElement(Enumeration<FamilyHistoryStatus> value) { 
1771      this.status = value;
1772      return this;
1773    }
1774
1775    /**
1776     * @return A code specifying the status of the record of the family history of a specific family member.
1777     */
1778    public FamilyHistoryStatus getStatus() { 
1779      return this.status == null ? null : this.status.getValue();
1780    }
1781
1782    /**
1783     * @param value A code specifying the status of the record of the family history of a specific family member.
1784     */
1785    public FamilyMemberHistory setStatus(FamilyHistoryStatus value) { 
1786        if (this.status == null)
1787          this.status = new Enumeration<FamilyHistoryStatus>(new FamilyHistoryStatusEnumFactory());
1788        this.status.setValue(value);
1789      return this;
1790    }
1791
1792    /**
1793     * @return {@link #dataAbsentReason} (Describes why the family member's history is not available.)
1794     */
1795    public CodeableConcept getDataAbsentReason() { 
1796      if (this.dataAbsentReason == null)
1797        if (Configuration.errorOnAutoCreate())
1798          throw new Error("Attempt to auto-create FamilyMemberHistory.dataAbsentReason");
1799        else if (Configuration.doAutoCreate())
1800          this.dataAbsentReason = new CodeableConcept(); // cc
1801      return this.dataAbsentReason;
1802    }
1803
1804    public boolean hasDataAbsentReason() { 
1805      return this.dataAbsentReason != null && !this.dataAbsentReason.isEmpty();
1806    }
1807
1808    /**
1809     * @param value {@link #dataAbsentReason} (Describes why the family member's history is not available.)
1810     */
1811    public FamilyMemberHistory setDataAbsentReason(CodeableConcept value) { 
1812      this.dataAbsentReason = value;
1813      return this;
1814    }
1815
1816    /**
1817     * @return {@link #patient} (The person who this history concerns.)
1818     */
1819    public Reference getPatient() { 
1820      if (this.patient == null)
1821        if (Configuration.errorOnAutoCreate())
1822          throw new Error("Attempt to auto-create FamilyMemberHistory.patient");
1823        else if (Configuration.doAutoCreate())
1824          this.patient = new Reference(); // cc
1825      return this.patient;
1826    }
1827
1828    public boolean hasPatient() { 
1829      return this.patient != null && !this.patient.isEmpty();
1830    }
1831
1832    /**
1833     * @param value {@link #patient} (The person who this history concerns.)
1834     */
1835    public FamilyMemberHistory setPatient(Reference value) { 
1836      this.patient = value;
1837      return this;
1838    }
1839
1840    /**
1841     * @return {@link #date} (The date (and possibly time) when the family member history was recorded or last updated.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1842     */
1843    public DateTimeType getDateElement() { 
1844      if (this.date == null)
1845        if (Configuration.errorOnAutoCreate())
1846          throw new Error("Attempt to auto-create FamilyMemberHistory.date");
1847        else if (Configuration.doAutoCreate())
1848          this.date = new DateTimeType(); // bb
1849      return this.date;
1850    }
1851
1852    public boolean hasDateElement() { 
1853      return this.date != null && !this.date.isEmpty();
1854    }
1855
1856    public boolean hasDate() { 
1857      return this.date != null && !this.date.isEmpty();
1858    }
1859
1860    /**
1861     * @param value {@link #date} (The date (and possibly time) when the family member history was recorded or last updated.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1862     */
1863    public FamilyMemberHistory setDateElement(DateTimeType value) { 
1864      this.date = value;
1865      return this;
1866    }
1867
1868    /**
1869     * @return The date (and possibly time) when the family member history was recorded or last updated.
1870     */
1871    public Date getDate() { 
1872      return this.date == null ? null : this.date.getValue();
1873    }
1874
1875    /**
1876     * @param value The date (and possibly time) when the family member history was recorded or last updated.
1877     */
1878    public FamilyMemberHistory setDate(Date value) { 
1879      if (value == null)
1880        this.date = null;
1881      else {
1882        if (this.date == null)
1883          this.date = new DateTimeType();
1884        this.date.setValue(value);
1885      }
1886      return this;
1887    }
1888
1889    /**
1890     * @return {@link #participant} (Indicates who or what participated in the activities related to the family member history and how they were involved.)
1891     */
1892    public List<FamilyMemberHistoryParticipantComponent> getParticipant() { 
1893      if (this.participant == null)
1894        this.participant = new ArrayList<FamilyMemberHistoryParticipantComponent>();
1895      return this.participant;
1896    }
1897
1898    /**
1899     * @return Returns a reference to <code>this</code> for easy method chaining
1900     */
1901    public FamilyMemberHistory setParticipant(List<FamilyMemberHistoryParticipantComponent> theParticipant) { 
1902      this.participant = theParticipant;
1903      return this;
1904    }
1905
1906    public boolean hasParticipant() { 
1907      if (this.participant == null)
1908        return false;
1909      for (FamilyMemberHistoryParticipantComponent item : this.participant)
1910        if (!item.isEmpty())
1911          return true;
1912      return false;
1913    }
1914
1915    public FamilyMemberHistoryParticipantComponent addParticipant() { //3
1916      FamilyMemberHistoryParticipantComponent t = new FamilyMemberHistoryParticipantComponent();
1917      if (this.participant == null)
1918        this.participant = new ArrayList<FamilyMemberHistoryParticipantComponent>();
1919      this.participant.add(t);
1920      return t;
1921    }
1922
1923    public FamilyMemberHistory addParticipant(FamilyMemberHistoryParticipantComponent t) { //3
1924      if (t == null)
1925        return this;
1926      if (this.participant == null)
1927        this.participant = new ArrayList<FamilyMemberHistoryParticipantComponent>();
1928      this.participant.add(t);
1929      return this;
1930    }
1931
1932    /**
1933     * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist {3}
1934     */
1935    public FamilyMemberHistoryParticipantComponent getParticipantFirstRep() { 
1936      if (getParticipant().isEmpty()) {
1937        addParticipant();
1938      }
1939      return getParticipant().get(0);
1940    }
1941
1942    /**
1943     * @return {@link #name} (This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair".). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1944     */
1945    public StringType getNameElement() { 
1946      if (this.name == null)
1947        if (Configuration.errorOnAutoCreate())
1948          throw new Error("Attempt to auto-create FamilyMemberHistory.name");
1949        else if (Configuration.doAutoCreate())
1950          this.name = new StringType(); // bb
1951      return this.name;
1952    }
1953
1954    public boolean hasNameElement() { 
1955      return this.name != null && !this.name.isEmpty();
1956    }
1957
1958    public boolean hasName() { 
1959      return this.name != null && !this.name.isEmpty();
1960    }
1961
1962    /**
1963     * @param value {@link #name} (This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair".). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1964     */
1965    public FamilyMemberHistory setNameElement(StringType value) { 
1966      this.name = value;
1967      return this;
1968    }
1969
1970    /**
1971     * @return This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair".
1972     */
1973    public String getName() { 
1974      return this.name == null ? null : this.name.getValue();
1975    }
1976
1977    /**
1978     * @param value This will either be a name or a description; e.g. "Aunt Susan", "my cousin with the red hair".
1979     */
1980    public FamilyMemberHistory setName(String value) { 
1981      if (Utilities.noString(value))
1982        this.name = null;
1983      else {
1984        if (this.name == null)
1985          this.name = new StringType();
1986        this.name.setValue(value);
1987      }
1988      return this;
1989    }
1990
1991    /**
1992     * @return {@link #relationship} (The type of relationship this person has to the patient (father, mother, brother etc.).)
1993     */
1994    public CodeableConcept getRelationship() { 
1995      if (this.relationship == null)
1996        if (Configuration.errorOnAutoCreate())
1997          throw new Error("Attempt to auto-create FamilyMemberHistory.relationship");
1998        else if (Configuration.doAutoCreate())
1999          this.relationship = new CodeableConcept(); // cc
2000      return this.relationship;
2001    }
2002
2003    public boolean hasRelationship() { 
2004      return this.relationship != null && !this.relationship.isEmpty();
2005    }
2006
2007    /**
2008     * @param value {@link #relationship} (The type of relationship this person has to the patient (father, mother, brother etc.).)
2009     */
2010    public FamilyMemberHistory setRelationship(CodeableConcept value) { 
2011      this.relationship = value;
2012      return this;
2013    }
2014
2015    /**
2016     * @return {@link #sex} (The birth sex of the family member.)
2017     */
2018    public CodeableConcept getSex() { 
2019      if (this.sex == null)
2020        if (Configuration.errorOnAutoCreate())
2021          throw new Error("Attempt to auto-create FamilyMemberHistory.sex");
2022        else if (Configuration.doAutoCreate())
2023          this.sex = new CodeableConcept(); // cc
2024      return this.sex;
2025    }
2026
2027    public boolean hasSex() { 
2028      return this.sex != null && !this.sex.isEmpty();
2029    }
2030
2031    /**
2032     * @param value {@link #sex} (The birth sex of the family member.)
2033     */
2034    public FamilyMemberHistory setSex(CodeableConcept value) { 
2035      this.sex = value;
2036      return this;
2037    }
2038
2039    /**
2040     * @return {@link #born} (The actual or approximate date of birth of the relative.)
2041     */
2042    public DataType getBorn() { 
2043      return this.born;
2044    }
2045
2046    /**
2047     * @return {@link #born} (The actual or approximate date of birth of the relative.)
2048     */
2049    public Period getBornPeriod() throws FHIRException { 
2050      if (this.born == null)
2051        this.born = new Period();
2052      if (!(this.born instanceof Period))
2053        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.born.getClass().getName()+" was encountered");
2054      return (Period) this.born;
2055    }
2056
2057    public boolean hasBornPeriod() { 
2058      return this != null && this.born instanceof Period;
2059    }
2060
2061    /**
2062     * @return {@link #born} (The actual or approximate date of birth of the relative.)
2063     */
2064    public DateType getBornDateType() throws FHIRException { 
2065      if (this.born == null)
2066        this.born = new DateType();
2067      if (!(this.born instanceof DateType))
2068        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.born.getClass().getName()+" was encountered");
2069      return (DateType) this.born;
2070    }
2071
2072    public boolean hasBornDateType() { 
2073      return this != null && this.born instanceof DateType;
2074    }
2075
2076    /**
2077     * @return {@link #born} (The actual or approximate date of birth of the relative.)
2078     */
2079    public StringType getBornStringType() throws FHIRException { 
2080      if (this.born == null)
2081        this.born = new StringType();
2082      if (!(this.born instanceof StringType))
2083        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.born.getClass().getName()+" was encountered");
2084      return (StringType) this.born;
2085    }
2086
2087    public boolean hasBornStringType() { 
2088      return this != null && this.born instanceof StringType;
2089    }
2090
2091    public boolean hasBorn() { 
2092      return this.born != null && !this.born.isEmpty();
2093    }
2094
2095    /**
2096     * @param value {@link #born} (The actual or approximate date of birth of the relative.)
2097     */
2098    public FamilyMemberHistory setBorn(DataType value) { 
2099      if (value != null && !(value instanceof Period || value instanceof DateType || value instanceof StringType))
2100        throw new FHIRException("Not the right type for FamilyMemberHistory.born[x]: "+value.fhirType());
2101      this.born = value;
2102      return this;
2103    }
2104
2105    /**
2106     * @return {@link #age} (The age of the relative at the time the family member history is recorded.)
2107     */
2108    public DataType getAge() { 
2109      return this.age;
2110    }
2111
2112    /**
2113     * @return {@link #age} (The age of the relative at the time the family member history is recorded.)
2114     */
2115    public Age getAgeAge() throws FHIRException { 
2116      if (this.age == null)
2117        this.age = new Age();
2118      if (!(this.age instanceof Age))
2119        throw new FHIRException("Type mismatch: the type Age was expected, but "+this.age.getClass().getName()+" was encountered");
2120      return (Age) this.age;
2121    }
2122
2123    public boolean hasAgeAge() { 
2124      return this != null && this.age instanceof Age;
2125    }
2126
2127    /**
2128     * @return {@link #age} (The age of the relative at the time the family member history is recorded.)
2129     */
2130    public Range getAgeRange() throws FHIRException { 
2131      if (this.age == null)
2132        this.age = new Range();
2133      if (!(this.age instanceof Range))
2134        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.age.getClass().getName()+" was encountered");
2135      return (Range) this.age;
2136    }
2137
2138    public boolean hasAgeRange() { 
2139      return this != null && this.age instanceof Range;
2140    }
2141
2142    /**
2143     * @return {@link #age} (The age of the relative at the time the family member history is recorded.)
2144     */
2145    public StringType getAgeStringType() throws FHIRException { 
2146      if (this.age == null)
2147        this.age = new StringType();
2148      if (!(this.age instanceof StringType))
2149        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.age.getClass().getName()+" was encountered");
2150      return (StringType) this.age;
2151    }
2152
2153    public boolean hasAgeStringType() { 
2154      return this != null && this.age instanceof StringType;
2155    }
2156
2157    public boolean hasAge() { 
2158      return this.age != null && !this.age.isEmpty();
2159    }
2160
2161    /**
2162     * @param value {@link #age} (The age of the relative at the time the family member history is recorded.)
2163     */
2164    public FamilyMemberHistory setAge(DataType value) { 
2165      if (value != null && !(value instanceof Age || value instanceof Range || value instanceof StringType))
2166        throw new FHIRException("Not the right type for FamilyMemberHistory.age[x]: "+value.fhirType());
2167      this.age = value;
2168      return this;
2169    }
2170
2171    /**
2172     * @return {@link #estimatedAge} (If true, indicates that the age value specified is an estimated value.). This is the underlying object with id, value and extensions. The accessor "getEstimatedAge" gives direct access to the value
2173     */
2174    public BooleanType getEstimatedAgeElement() { 
2175      if (this.estimatedAge == null)
2176        if (Configuration.errorOnAutoCreate())
2177          throw new Error("Attempt to auto-create FamilyMemberHistory.estimatedAge");
2178        else if (Configuration.doAutoCreate())
2179          this.estimatedAge = new BooleanType(); // bb
2180      return this.estimatedAge;
2181    }
2182
2183    public boolean hasEstimatedAgeElement() { 
2184      return this.estimatedAge != null && !this.estimatedAge.isEmpty();
2185    }
2186
2187    public boolean hasEstimatedAge() { 
2188      return this.estimatedAge != null && !this.estimatedAge.isEmpty();
2189    }
2190
2191    /**
2192     * @param value {@link #estimatedAge} (If true, indicates that the age value specified is an estimated value.). This is the underlying object with id, value and extensions. The accessor "getEstimatedAge" gives direct access to the value
2193     */
2194    public FamilyMemberHistory setEstimatedAgeElement(BooleanType value) { 
2195      this.estimatedAge = value;
2196      return this;
2197    }
2198
2199    /**
2200     * @return If true, indicates that the age value specified is an estimated value.
2201     */
2202    public boolean getEstimatedAge() { 
2203      return this.estimatedAge == null || this.estimatedAge.isEmpty() ? false : this.estimatedAge.getValue();
2204    }
2205
2206    /**
2207     * @param value If true, indicates that the age value specified is an estimated value.
2208     */
2209    public FamilyMemberHistory setEstimatedAge(boolean value) { 
2210        if (this.estimatedAge == null)
2211          this.estimatedAge = new BooleanType();
2212        this.estimatedAge.setValue(value);
2213      return this;
2214    }
2215
2216    /**
2217     * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
2218     */
2219    public DataType getDeceased() { 
2220      return this.deceased;
2221    }
2222
2223    /**
2224     * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
2225     */
2226    public BooleanType getDeceasedBooleanType() throws FHIRException { 
2227      if (this.deceased == null)
2228        this.deceased = new BooleanType();
2229      if (!(this.deceased instanceof BooleanType))
2230        throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.deceased.getClass().getName()+" was encountered");
2231      return (BooleanType) this.deceased;
2232    }
2233
2234    public boolean hasDeceasedBooleanType() { 
2235      return this != null && this.deceased instanceof BooleanType;
2236    }
2237
2238    /**
2239     * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
2240     */
2241    public Age getDeceasedAge() throws FHIRException { 
2242      if (this.deceased == null)
2243        this.deceased = new Age();
2244      if (!(this.deceased instanceof Age))
2245        throw new FHIRException("Type mismatch: the type Age was expected, but "+this.deceased.getClass().getName()+" was encountered");
2246      return (Age) this.deceased;
2247    }
2248
2249    public boolean hasDeceasedAge() { 
2250      return this != null && this.deceased instanceof Age;
2251    }
2252
2253    /**
2254     * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
2255     */
2256    public Range getDeceasedRange() throws FHIRException { 
2257      if (this.deceased == null)
2258        this.deceased = new Range();
2259      if (!(this.deceased instanceof Range))
2260        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.deceased.getClass().getName()+" was encountered");
2261      return (Range) this.deceased;
2262    }
2263
2264    public boolean hasDeceasedRange() { 
2265      return this != null && this.deceased instanceof Range;
2266    }
2267
2268    /**
2269     * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
2270     */
2271    public DateType getDeceasedDateType() throws FHIRException { 
2272      if (this.deceased == null)
2273        this.deceased = new DateType();
2274      if (!(this.deceased instanceof DateType))
2275        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.deceased.getClass().getName()+" was encountered");
2276      return (DateType) this.deceased;
2277    }
2278
2279    public boolean hasDeceasedDateType() { 
2280      return this != null && this.deceased instanceof DateType;
2281    }
2282
2283    /**
2284     * @return {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
2285     */
2286    public StringType getDeceasedStringType() throws FHIRException { 
2287      if (this.deceased == null)
2288        this.deceased = new StringType();
2289      if (!(this.deceased instanceof StringType))
2290        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.deceased.getClass().getName()+" was encountered");
2291      return (StringType) this.deceased;
2292    }
2293
2294    public boolean hasDeceasedStringType() { 
2295      return this != null && this.deceased instanceof StringType;
2296    }
2297
2298    public boolean hasDeceased() { 
2299      return this.deceased != null && !this.deceased.isEmpty();
2300    }
2301
2302    /**
2303     * @param value {@link #deceased} (Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.)
2304     */
2305    public FamilyMemberHistory setDeceased(DataType value) { 
2306      if (value != null && !(value instanceof BooleanType || value instanceof Age || value instanceof Range || value instanceof DateType || value instanceof StringType))
2307        throw new FHIRException("Not the right type for FamilyMemberHistory.deceased[x]: "+value.fhirType());
2308      this.deceased = value;
2309      return this;
2310    }
2311
2312    /**
2313     * @return {@link #reason} (Describes why the family member history occurred in coded or textual form, or Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.)
2314     */
2315    public List<CodeableReference> getReason() { 
2316      if (this.reason == null)
2317        this.reason = new ArrayList<CodeableReference>();
2318      return this.reason;
2319    }
2320
2321    /**
2322     * @return Returns a reference to <code>this</code> for easy method chaining
2323     */
2324    public FamilyMemberHistory setReason(List<CodeableReference> theReason) { 
2325      this.reason = theReason;
2326      return this;
2327    }
2328
2329    public boolean hasReason() { 
2330      if (this.reason == null)
2331        return false;
2332      for (CodeableReference item : this.reason)
2333        if (!item.isEmpty())
2334          return true;
2335      return false;
2336    }
2337
2338    public CodeableReference addReason() { //3
2339      CodeableReference t = new CodeableReference();
2340      if (this.reason == null)
2341        this.reason = new ArrayList<CodeableReference>();
2342      this.reason.add(t);
2343      return t;
2344    }
2345
2346    public FamilyMemberHistory addReason(CodeableReference t) { //3
2347      if (t == null)
2348        return this;
2349      if (this.reason == null)
2350        this.reason = new ArrayList<CodeableReference>();
2351      this.reason.add(t);
2352      return this;
2353    }
2354
2355    /**
2356     * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3}
2357     */
2358    public CodeableReference getReasonFirstRep() { 
2359      if (getReason().isEmpty()) {
2360        addReason();
2361      }
2362      return getReason().get(0);
2363    }
2364
2365    /**
2366     * @return {@link #note} (This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.)
2367     */
2368    public List<Annotation> getNote() { 
2369      if (this.note == null)
2370        this.note = new ArrayList<Annotation>();
2371      return this.note;
2372    }
2373
2374    /**
2375     * @return Returns a reference to <code>this</code> for easy method chaining
2376     */
2377    public FamilyMemberHistory setNote(List<Annotation> theNote) { 
2378      this.note = theNote;
2379      return this;
2380    }
2381
2382    public boolean hasNote() { 
2383      if (this.note == null)
2384        return false;
2385      for (Annotation item : this.note)
2386        if (!item.isEmpty())
2387          return true;
2388      return false;
2389    }
2390
2391    public Annotation addNote() { //3
2392      Annotation t = new Annotation();
2393      if (this.note == null)
2394        this.note = new ArrayList<Annotation>();
2395      this.note.add(t);
2396      return t;
2397    }
2398
2399    public FamilyMemberHistory addNote(Annotation t) { //3
2400      if (t == null)
2401        return this;
2402      if (this.note == null)
2403        this.note = new ArrayList<Annotation>();
2404      this.note.add(t);
2405      return this;
2406    }
2407
2408    /**
2409     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
2410     */
2411    public Annotation getNoteFirstRep() { 
2412      if (getNote().isEmpty()) {
2413        addNote();
2414      }
2415      return getNote().get(0);
2416    }
2417
2418    /**
2419     * @return {@link #condition} (The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.)
2420     */
2421    public List<FamilyMemberHistoryConditionComponent> getCondition() { 
2422      if (this.condition == null)
2423        this.condition = new ArrayList<FamilyMemberHistoryConditionComponent>();
2424      return this.condition;
2425    }
2426
2427    /**
2428     * @return Returns a reference to <code>this</code> for easy method chaining
2429     */
2430    public FamilyMemberHistory setCondition(List<FamilyMemberHistoryConditionComponent> theCondition) { 
2431      this.condition = theCondition;
2432      return this;
2433    }
2434
2435    public boolean hasCondition() { 
2436      if (this.condition == null)
2437        return false;
2438      for (FamilyMemberHistoryConditionComponent item : this.condition)
2439        if (!item.isEmpty())
2440          return true;
2441      return false;
2442    }
2443
2444    public FamilyMemberHistoryConditionComponent addCondition() { //3
2445      FamilyMemberHistoryConditionComponent t = new FamilyMemberHistoryConditionComponent();
2446      if (this.condition == null)
2447        this.condition = new ArrayList<FamilyMemberHistoryConditionComponent>();
2448      this.condition.add(t);
2449      return t;
2450    }
2451
2452    public FamilyMemberHistory addCondition(FamilyMemberHistoryConditionComponent t) { //3
2453      if (t == null)
2454        return this;
2455      if (this.condition == null)
2456        this.condition = new ArrayList<FamilyMemberHistoryConditionComponent>();
2457      this.condition.add(t);
2458      return this;
2459    }
2460
2461    /**
2462     * @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist {3}
2463     */
2464    public FamilyMemberHistoryConditionComponent getConditionFirstRep() { 
2465      if (getCondition().isEmpty()) {
2466        addCondition();
2467      }
2468      return getCondition().get(0);
2469    }
2470
2471    /**
2472     * @return {@link #procedure} (The significant Procedures (or procedure) that the family member had. This is a repeating section to allow a system to represent more than one procedure per resource, though there is nothing stopping multiple resources - one per procedure.)
2473     */
2474    public List<FamilyMemberHistoryProcedureComponent> getProcedure() { 
2475      if (this.procedure == null)
2476        this.procedure = new ArrayList<FamilyMemberHistoryProcedureComponent>();
2477      return this.procedure;
2478    }
2479
2480    /**
2481     * @return Returns a reference to <code>this</code> for easy method chaining
2482     */
2483    public FamilyMemberHistory setProcedure(List<FamilyMemberHistoryProcedureComponent> theProcedure) { 
2484      this.procedure = theProcedure;
2485      return this;
2486    }
2487
2488    public boolean hasProcedure() { 
2489      if (this.procedure == null)
2490        return false;
2491      for (FamilyMemberHistoryProcedureComponent item : this.procedure)
2492        if (!item.isEmpty())
2493          return true;
2494      return false;
2495    }
2496
2497    public FamilyMemberHistoryProcedureComponent addProcedure() { //3
2498      FamilyMemberHistoryProcedureComponent t = new FamilyMemberHistoryProcedureComponent();
2499      if (this.procedure == null)
2500        this.procedure = new ArrayList<FamilyMemberHistoryProcedureComponent>();
2501      this.procedure.add(t);
2502      return t;
2503    }
2504
2505    public FamilyMemberHistory addProcedure(FamilyMemberHistoryProcedureComponent t) { //3
2506      if (t == null)
2507        return this;
2508      if (this.procedure == null)
2509        this.procedure = new ArrayList<FamilyMemberHistoryProcedureComponent>();
2510      this.procedure.add(t);
2511      return this;
2512    }
2513
2514    /**
2515     * @return The first repetition of repeating field {@link #procedure}, creating it if it does not already exist {3}
2516     */
2517    public FamilyMemberHistoryProcedureComponent getProcedureFirstRep() { 
2518      if (getProcedure().isEmpty()) {
2519        addProcedure();
2520      }
2521      return getProcedure().get(0);
2522    }
2523
2524      protected void listChildren(List<Property> children) {
2525        super.listChildren(children);
2526        children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this family member history 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));
2527        children.add(new Property("instantiatesCanonical", "canonical(PlanDefinition|Questionnaire|ActivityDefinition|Measure|OperationDefinition)", "The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical));
2528        children.add(new Property("instantiatesUri", "uri", "The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri));
2529        children.add(new Property("status", "code", "A code specifying the status of the record of the family history of a specific family member.", 0, 1, status));
2530        children.add(new Property("dataAbsentReason", "CodeableConcept", "Describes why the family member's history is not available.", 0, 1, dataAbsentReason));
2531        children.add(new Property("patient", "Reference(Patient)", "The person who this history concerns.", 0, 1, patient));
2532        children.add(new Property("date", "dateTime", "The date (and possibly time) when the family member history was recorded or last updated.", 0, 1, date));
2533        children.add(new Property("participant", "", "Indicates who or what participated in the activities related to the family member history and how they were involved.", 0, java.lang.Integer.MAX_VALUE, participant));
2534        children.add(new Property("name", "string", "This will either be a name or a description; e.g. \"Aunt Susan\", \"my cousin with the red hair\".", 0, 1, name));
2535        children.add(new Property("relationship", "CodeableConcept", "The type of relationship this person has to the patient (father, mother, brother etc.).", 0, 1, relationship));
2536        children.add(new Property("sex", "CodeableConcept", "The birth sex of the family member.", 0, 1, sex));
2537        children.add(new Property("born[x]", "Period|date|string", "The actual or approximate date of birth of the relative.", 0, 1, born));
2538        children.add(new Property("age[x]", "Age|Range|string", "The age of the relative at the time the family member history is recorded.", 0, 1, age));
2539        children.add(new Property("estimatedAge", "boolean", "If true, indicates that the age value specified is an estimated value.", 0, 1, estimatedAge));
2540        children.add(new Property("deceased[x]", "boolean|Age|Range|date|string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased));
2541        children.add(new Property("reason", "CodeableReference(Condition|Observation|AllergyIntolerance|QuestionnaireResponse|DiagnosticReport|DocumentReference)", "Describes why the family member history occurred in coded or textual form, or Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.", 0, java.lang.Integer.MAX_VALUE, reason));
2542        children.add(new Property("note", "Annotation", "This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.", 0, java.lang.Integer.MAX_VALUE, note));
2543        children.add(new Property("condition", "", "The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.", 0, java.lang.Integer.MAX_VALUE, condition));
2544        children.add(new Property("procedure", "", "The significant Procedures (or procedure) that the family member had. This is a repeating section to allow a system to represent more than one procedure per resource, though there is nothing stopping multiple resources - one per procedure.", 0, java.lang.Integer.MAX_VALUE, procedure));
2545      }
2546
2547      @Override
2548      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2549        switch (_hash) {
2550        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Business identifiers assigned to this family member history 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);
2551        case 8911915: /*instantiatesCanonical*/  return new Property("instantiatesCanonical", "canonical(PlanDefinition|Questionnaire|ActivityDefinition|Measure|OperationDefinition)", "The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical);
2552        case -1926393373: /*instantiatesUri*/  return new Property("instantiatesUri", "uri", "The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this FamilyMemberHistory.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri);
2553        case -892481550: /*status*/  return new Property("status", "code", "A code specifying the status of the record of the family history of a specific family member.", 0, 1, status);
2554        case 1034315687: /*dataAbsentReason*/  return new Property("dataAbsentReason", "CodeableConcept", "Describes why the family member's history is not available.", 0, 1, dataAbsentReason);
2555        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "The person who this history concerns.", 0, 1, patient);
2556        case 3076014: /*date*/  return new Property("date", "dateTime", "The date (and possibly time) when the family member history was recorded or last updated.", 0, 1, date);
2557        case 767422259: /*participant*/  return new Property("participant", "", "Indicates who or what participated in the activities related to the family member history and how they were involved.", 0, java.lang.Integer.MAX_VALUE, participant);
2558        case 3373707: /*name*/  return new Property("name", "string", "This will either be a name or a description; e.g. \"Aunt Susan\", \"my cousin with the red hair\".", 0, 1, name);
2559        case -261851592: /*relationship*/  return new Property("relationship", "CodeableConcept", "The type of relationship this person has to the patient (father, mother, brother etc.).", 0, 1, relationship);
2560        case 113766: /*sex*/  return new Property("sex", "CodeableConcept", "The birth sex of the family member.", 0, 1, sex);
2561        case 67532951: /*born[x]*/  return new Property("born[x]", "Period|date|string", "The actual or approximate date of birth of the relative.", 0, 1, born);
2562        case 3029833: /*born*/  return new Property("born[x]", "Period|date|string", "The actual or approximate date of birth of the relative.", 0, 1, born);
2563        case 1497711210: /*bornPeriod*/  return new Property("born[x]", "Period", "The actual or approximate date of birth of the relative.", 0, 1, born);
2564        case 2092814999: /*bornDate*/  return new Property("born[x]", "date", "The actual or approximate date of birth of the relative.", 0, 1, born);
2565        case 1597451450: /*bornString*/  return new Property("born[x]", "string", "The actual or approximate date of birth of the relative.", 0, 1, born);
2566        case -1419716831: /*age[x]*/  return new Property("age[x]", "Age|Range|string", "The age of the relative at the time the family member history is recorded.", 0, 1, age);
2567        case 96511: /*age*/  return new Property("age[x]", "Age|Range|string", "The age of the relative at the time the family member history is recorded.", 0, 1, age);
2568        case -1419742336: /*ageAge*/  return new Property("age[x]", "Age", "The age of the relative at the time the family member history is recorded.", 0, 1, age);
2569        case 1442748286: /*ageRange*/  return new Property("age[x]", "Range", "The age of the relative at the time the family member history is recorded.", 0, 1, age);
2570        case 1821821424: /*ageString*/  return new Property("age[x]", "string", "The age of the relative at the time the family member history is recorded.", 0, 1, age);
2571        case 2130167587: /*estimatedAge*/  return new Property("estimatedAge", "boolean", "If true, indicates that the age value specified is an estimated value.", 0, 1, estimatedAge);
2572        case -1311442804: /*deceased[x]*/  return new Property("deceased[x]", "boolean|Age|Range|date|string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased);
2573        case 561497972: /*deceased*/  return new Property("deceased[x]", "boolean|Age|Range|date|string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased);
2574        case 497463828: /*deceasedBoolean*/  return new Property("deceased[x]", "boolean", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased);
2575        case -1311468309: /*deceasedAge*/  return new Property("deceased[x]", "Age", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased);
2576        case -1880094167: /*deceasedRange*/  return new Property("deceased[x]", "Range", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased);
2577        case -2000727742: /*deceasedDate*/  return new Property("deceased[x]", "date", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased);
2578        case 1892920485: /*deceasedString*/  return new Property("deceased[x]", "string", "Deceased flag or the actual or approximate age of the relative at the time of death for the family member history record.", 0, 1, deceased);
2579        case -934964668: /*reason*/  return new Property("reason", "CodeableReference(Condition|Observation|AllergyIntolerance|QuestionnaireResponse|DiagnosticReport|DocumentReference)", "Describes why the family member history occurred in coded or textual form, or Indicates a Condition, Observation, AllergyIntolerance, or QuestionnaireResponse that justifies this family member history event.", 0, java.lang.Integer.MAX_VALUE, reason);
2580        case 3387378: /*note*/  return new Property("note", "Annotation", "This property allows a non condition-specific note to the made about the related person. Ideally, the note would be in the condition property, but this is not always possible.", 0, java.lang.Integer.MAX_VALUE, note);
2581        case -861311717: /*condition*/  return new Property("condition", "", "The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.", 0, java.lang.Integer.MAX_VALUE, condition);
2582        case -1095204141: /*procedure*/  return new Property("procedure", "", "The significant Procedures (or procedure) that the family member had. This is a repeating section to allow a system to represent more than one procedure per resource, though there is nothing stopping multiple resources - one per procedure.", 0, java.lang.Integer.MAX_VALUE, procedure);
2583        default: return super.getNamedProperty(_hash, _name, _checkValid);
2584        }
2585
2586      }
2587
2588      @Override
2589      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2590        switch (hash) {
2591        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2592        case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : this.instantiatesCanonical.toArray(new Base[this.instantiatesCanonical.size()]); // CanonicalType
2593        case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : this.instantiatesUri.toArray(new Base[this.instantiatesUri.size()]); // UriType
2594        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<FamilyHistoryStatus>
2595        case 1034315687: /*dataAbsentReason*/ return this.dataAbsentReason == null ? new Base[0] : new Base[] {this.dataAbsentReason}; // CodeableConcept
2596        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
2597        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
2598        case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // FamilyMemberHistoryParticipantComponent
2599        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
2600        case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // CodeableConcept
2601        case 113766: /*sex*/ return this.sex == null ? new Base[0] : new Base[] {this.sex}; // CodeableConcept
2602        case 3029833: /*born*/ return this.born == null ? new Base[0] : new Base[] {this.born}; // DataType
2603        case 96511: /*age*/ return this.age == null ? new Base[0] : new Base[] {this.age}; // DataType
2604        case 2130167587: /*estimatedAge*/ return this.estimatedAge == null ? new Base[0] : new Base[] {this.estimatedAge}; // BooleanType
2605        case 561497972: /*deceased*/ return this.deceased == null ? new Base[0] : new Base[] {this.deceased}; // DataType
2606        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference
2607        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
2608        case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // FamilyMemberHistoryConditionComponent
2609        case -1095204141: /*procedure*/ return this.procedure == null ? new Base[0] : this.procedure.toArray(new Base[this.procedure.size()]); // FamilyMemberHistoryProcedureComponent
2610        default: return super.getProperty(hash, name, checkValid);
2611        }
2612
2613      }
2614
2615      @Override
2616      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2617        switch (hash) {
2618        case -1618432855: // identifier
2619          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
2620          return value;
2621        case 8911915: // instantiatesCanonical
2622          this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value)); // CanonicalType
2623          return value;
2624        case -1926393373: // instantiatesUri
2625          this.getInstantiatesUri().add(TypeConvertor.castToUri(value)); // UriType
2626          return value;
2627        case -892481550: // status
2628          value = new FamilyHistoryStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2629          this.status = (Enumeration) value; // Enumeration<FamilyHistoryStatus>
2630          return value;
2631        case 1034315687: // dataAbsentReason
2632          this.dataAbsentReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2633          return value;
2634        case -791418107: // patient
2635          this.patient = TypeConvertor.castToReference(value); // Reference
2636          return value;
2637        case 3076014: // date
2638          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
2639          return value;
2640        case 767422259: // participant
2641          this.getParticipant().add((FamilyMemberHistoryParticipantComponent) value); // FamilyMemberHistoryParticipantComponent
2642          return value;
2643        case 3373707: // name
2644          this.name = TypeConvertor.castToString(value); // StringType
2645          return value;
2646        case -261851592: // relationship
2647          this.relationship = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2648          return value;
2649        case 113766: // sex
2650          this.sex = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2651          return value;
2652        case 3029833: // born
2653          this.born = TypeConvertor.castToType(value); // DataType
2654          return value;
2655        case 96511: // age
2656          this.age = TypeConvertor.castToType(value); // DataType
2657          return value;
2658        case 2130167587: // estimatedAge
2659          this.estimatedAge = TypeConvertor.castToBoolean(value); // BooleanType
2660          return value;
2661        case 561497972: // deceased
2662          this.deceased = TypeConvertor.castToType(value); // DataType
2663          return value;
2664        case -934964668: // reason
2665          this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
2666          return value;
2667        case 3387378: // note
2668          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
2669          return value;
2670        case -861311717: // condition
2671          this.getCondition().add((FamilyMemberHistoryConditionComponent) value); // FamilyMemberHistoryConditionComponent
2672          return value;
2673        case -1095204141: // procedure
2674          this.getProcedure().add((FamilyMemberHistoryProcedureComponent) value); // FamilyMemberHistoryProcedureComponent
2675          return value;
2676        default: return super.setProperty(hash, name, value);
2677        }
2678
2679      }
2680
2681      @Override
2682      public Base setProperty(String name, Base value) throws FHIRException {
2683        if (name.equals("identifier")) {
2684          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2685        } else if (name.equals("instantiatesCanonical")) {
2686          this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value));
2687        } else if (name.equals("instantiatesUri")) {
2688          this.getInstantiatesUri().add(TypeConvertor.castToUri(value));
2689        } else if (name.equals("status")) {
2690          value = new FamilyHistoryStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2691          this.status = (Enumeration) value; // Enumeration<FamilyHistoryStatus>
2692        } else if (name.equals("dataAbsentReason")) {
2693          this.dataAbsentReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2694        } else if (name.equals("patient")) {
2695          this.patient = TypeConvertor.castToReference(value); // Reference
2696        } else if (name.equals("date")) {
2697          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
2698        } else if (name.equals("participant")) {
2699          this.getParticipant().add((FamilyMemberHistoryParticipantComponent) value);
2700        } else if (name.equals("name")) {
2701          this.name = TypeConvertor.castToString(value); // StringType
2702        } else if (name.equals("relationship")) {
2703          this.relationship = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2704        } else if (name.equals("sex")) {
2705          this.sex = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2706        } else if (name.equals("born[x]")) {
2707          this.born = TypeConvertor.castToType(value); // DataType
2708        } else if (name.equals("age[x]")) {
2709          this.age = TypeConvertor.castToType(value); // DataType
2710        } else if (name.equals("estimatedAge")) {
2711          this.estimatedAge = TypeConvertor.castToBoolean(value); // BooleanType
2712        } else if (name.equals("deceased[x]")) {
2713          this.deceased = TypeConvertor.castToType(value); // DataType
2714        } else if (name.equals("reason")) {
2715          this.getReason().add(TypeConvertor.castToCodeableReference(value));
2716        } else if (name.equals("note")) {
2717          this.getNote().add(TypeConvertor.castToAnnotation(value));
2718        } else if (name.equals("condition")) {
2719          this.getCondition().add((FamilyMemberHistoryConditionComponent) value);
2720        } else if (name.equals("procedure")) {
2721          this.getProcedure().add((FamilyMemberHistoryProcedureComponent) value);
2722        } else
2723          return super.setProperty(name, value);
2724        return value;
2725      }
2726
2727  @Override
2728  public void removeChild(String name, Base value) throws FHIRException {
2729        if (name.equals("identifier")) {
2730          this.getIdentifier().remove(value);
2731        } else if (name.equals("instantiatesCanonical")) {
2732          this.getInstantiatesCanonical().remove(value);
2733        } else if (name.equals("instantiatesUri")) {
2734          this.getInstantiatesUri().remove(value);
2735        } else if (name.equals("status")) {
2736          value = new FamilyHistoryStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2737          this.status = (Enumeration) value; // Enumeration<FamilyHistoryStatus>
2738        } else if (name.equals("dataAbsentReason")) {
2739          this.dataAbsentReason = null;
2740        } else if (name.equals("patient")) {
2741          this.patient = null;
2742        } else if (name.equals("date")) {
2743          this.date = null;
2744        } else if (name.equals("participant")) {
2745          this.getParticipant().remove((FamilyMemberHistoryParticipantComponent) value);
2746        } else if (name.equals("name")) {
2747          this.name = null;
2748        } else if (name.equals("relationship")) {
2749          this.relationship = null;
2750        } else if (name.equals("sex")) {
2751          this.sex = null;
2752        } else if (name.equals("born[x]")) {
2753          this.born = null;
2754        } else if (name.equals("age[x]")) {
2755          this.age = null;
2756        } else if (name.equals("estimatedAge")) {
2757          this.estimatedAge = null;
2758        } else if (name.equals("deceased[x]")) {
2759          this.deceased = null;
2760        } else if (name.equals("reason")) {
2761          this.getReason().remove(value);
2762        } else if (name.equals("note")) {
2763          this.getNote().remove(value);
2764        } else if (name.equals("condition")) {
2765          this.getCondition().remove((FamilyMemberHistoryConditionComponent) value);
2766        } else if (name.equals("procedure")) {
2767          this.getProcedure().remove((FamilyMemberHistoryProcedureComponent) value);
2768        } else
2769          super.removeChild(name, value);
2770        
2771      }
2772
2773      @Override
2774      public Base makeProperty(int hash, String name) throws FHIRException {
2775        switch (hash) {
2776        case -1618432855:  return addIdentifier(); 
2777        case 8911915:  return addInstantiatesCanonicalElement();
2778        case -1926393373:  return addInstantiatesUriElement();
2779        case -892481550:  return getStatusElement();
2780        case 1034315687:  return getDataAbsentReason();
2781        case -791418107:  return getPatient();
2782        case 3076014:  return getDateElement();
2783        case 767422259:  return addParticipant(); 
2784        case 3373707:  return getNameElement();
2785        case -261851592:  return getRelationship();
2786        case 113766:  return getSex();
2787        case 67532951:  return getBorn();
2788        case 3029833:  return getBorn();
2789        case -1419716831:  return getAge();
2790        case 96511:  return getAge();
2791        case 2130167587:  return getEstimatedAgeElement();
2792        case -1311442804:  return getDeceased();
2793        case 561497972:  return getDeceased();
2794        case -934964668:  return addReason(); 
2795        case 3387378:  return addNote(); 
2796        case -861311717:  return addCondition(); 
2797        case -1095204141:  return addProcedure(); 
2798        default: return super.makeProperty(hash, name);
2799        }
2800
2801      }
2802
2803      @Override
2804      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2805        switch (hash) {
2806        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2807        case 8911915: /*instantiatesCanonical*/ return new String[] {"canonical"};
2808        case -1926393373: /*instantiatesUri*/ return new String[] {"uri"};
2809        case -892481550: /*status*/ return new String[] {"code"};
2810        case 1034315687: /*dataAbsentReason*/ return new String[] {"CodeableConcept"};
2811        case -791418107: /*patient*/ return new String[] {"Reference"};
2812        case 3076014: /*date*/ return new String[] {"dateTime"};
2813        case 767422259: /*participant*/ return new String[] {};
2814        case 3373707: /*name*/ return new String[] {"string"};
2815        case -261851592: /*relationship*/ return new String[] {"CodeableConcept"};
2816        case 113766: /*sex*/ return new String[] {"CodeableConcept"};
2817        case 3029833: /*born*/ return new String[] {"Period", "date", "string"};
2818        case 96511: /*age*/ return new String[] {"Age", "Range", "string"};
2819        case 2130167587: /*estimatedAge*/ return new String[] {"boolean"};
2820        case 561497972: /*deceased*/ return new String[] {"boolean", "Age", "Range", "date", "string"};
2821        case -934964668: /*reason*/ return new String[] {"CodeableReference"};
2822        case 3387378: /*note*/ return new String[] {"Annotation"};
2823        case -861311717: /*condition*/ return new String[] {};
2824        case -1095204141: /*procedure*/ return new String[] {};
2825        default: return super.getTypesForProperty(hash, name);
2826        }
2827
2828      }
2829
2830      @Override
2831      public Base addChild(String name) throws FHIRException {
2832        if (name.equals("identifier")) {
2833          return addIdentifier();
2834        }
2835        else if (name.equals("instantiatesCanonical")) {
2836          throw new FHIRException("Cannot call addChild on a singleton property FamilyMemberHistory.instantiatesCanonical");
2837        }
2838        else if (name.equals("instantiatesUri")) {
2839          throw new FHIRException("Cannot call addChild on a singleton property FamilyMemberHistory.instantiatesUri");
2840        }
2841        else if (name.equals("status")) {
2842          throw new FHIRException("Cannot call addChild on a singleton property FamilyMemberHistory.status");
2843        }
2844        else if (name.equals("dataAbsentReason")) {
2845          this.dataAbsentReason = new CodeableConcept();
2846          return this.dataAbsentReason;
2847        }
2848        else if (name.equals("patient")) {
2849          this.patient = new Reference();
2850          return this.patient;
2851        }
2852        else if (name.equals("date")) {
2853          throw new FHIRException("Cannot call addChild on a singleton property FamilyMemberHistory.date");
2854        }
2855        else if (name.equals("participant")) {
2856          return addParticipant();
2857        }
2858        else if (name.equals("name")) {
2859          throw new FHIRException("Cannot call addChild on a singleton property FamilyMemberHistory.name");
2860        }
2861        else if (name.equals("relationship")) {
2862          this.relationship = new CodeableConcept();
2863          return this.relationship;
2864        }
2865        else if (name.equals("sex")) {
2866          this.sex = new CodeableConcept();
2867          return this.sex;
2868        }
2869        else if (name.equals("bornPeriod")) {
2870          this.born = new Period();
2871          return this.born;
2872        }
2873        else if (name.equals("bornDate")) {
2874          this.born = new DateType();
2875          return this.born;
2876        }
2877        else if (name.equals("bornString")) {
2878          this.born = new StringType();
2879          return this.born;
2880        }
2881        else if (name.equals("ageAge")) {
2882          this.age = new Age();
2883          return this.age;
2884        }
2885        else if (name.equals("ageRange")) {
2886          this.age = new Range();
2887          return this.age;
2888        }
2889        else if (name.equals("ageString")) {
2890          this.age = new StringType();
2891          return this.age;
2892        }
2893        else if (name.equals("estimatedAge")) {
2894          throw new FHIRException("Cannot call addChild on a singleton property FamilyMemberHistory.estimatedAge");
2895        }
2896        else if (name.equals("deceasedBoolean")) {
2897          this.deceased = new BooleanType();
2898          return this.deceased;
2899        }
2900        else if (name.equals("deceasedAge")) {
2901          this.deceased = new Age();
2902          return this.deceased;
2903        }
2904        else if (name.equals("deceasedRange")) {
2905          this.deceased = new Range();
2906          return this.deceased;
2907        }
2908        else if (name.equals("deceasedDate")) {
2909          this.deceased = new DateType();
2910          return this.deceased;
2911        }
2912        else if (name.equals("deceasedString")) {
2913          this.deceased = new StringType();
2914          return this.deceased;
2915        }
2916        else if (name.equals("reason")) {
2917          return addReason();
2918        }
2919        else if (name.equals("note")) {
2920          return addNote();
2921        }
2922        else if (name.equals("condition")) {
2923          return addCondition();
2924        }
2925        else if (name.equals("procedure")) {
2926          return addProcedure();
2927        }
2928        else
2929          return super.addChild(name);
2930      }
2931
2932  public String fhirType() {
2933    return "FamilyMemberHistory";
2934
2935  }
2936
2937      public FamilyMemberHistory copy() {
2938        FamilyMemberHistory dst = new FamilyMemberHistory();
2939        copyValues(dst);
2940        return dst;
2941      }
2942
2943      public void copyValues(FamilyMemberHistory dst) {
2944        super.copyValues(dst);
2945        if (identifier != null) {
2946          dst.identifier = new ArrayList<Identifier>();
2947          for (Identifier i : identifier)
2948            dst.identifier.add(i.copy());
2949        };
2950        if (instantiatesCanonical != null) {
2951          dst.instantiatesCanonical = new ArrayList<CanonicalType>();
2952          for (CanonicalType i : instantiatesCanonical)
2953            dst.instantiatesCanonical.add(i.copy());
2954        };
2955        if (instantiatesUri != null) {
2956          dst.instantiatesUri = new ArrayList<UriType>();
2957          for (UriType i : instantiatesUri)
2958            dst.instantiatesUri.add(i.copy());
2959        };
2960        dst.status = status == null ? null : status.copy();
2961        dst.dataAbsentReason = dataAbsentReason == null ? null : dataAbsentReason.copy();
2962        dst.patient = patient == null ? null : patient.copy();
2963        dst.date = date == null ? null : date.copy();
2964        if (participant != null) {
2965          dst.participant = new ArrayList<FamilyMemberHistoryParticipantComponent>();
2966          for (FamilyMemberHistoryParticipantComponent i : participant)
2967            dst.participant.add(i.copy());
2968        };
2969        dst.name = name == null ? null : name.copy();
2970        dst.relationship = relationship == null ? null : relationship.copy();
2971        dst.sex = sex == null ? null : sex.copy();
2972        dst.born = born == null ? null : born.copy();
2973        dst.age = age == null ? null : age.copy();
2974        dst.estimatedAge = estimatedAge == null ? null : estimatedAge.copy();
2975        dst.deceased = deceased == null ? null : deceased.copy();
2976        if (reason != null) {
2977          dst.reason = new ArrayList<CodeableReference>();
2978          for (CodeableReference i : reason)
2979            dst.reason.add(i.copy());
2980        };
2981        if (note != null) {
2982          dst.note = new ArrayList<Annotation>();
2983          for (Annotation i : note)
2984            dst.note.add(i.copy());
2985        };
2986        if (condition != null) {
2987          dst.condition = new ArrayList<FamilyMemberHistoryConditionComponent>();
2988          for (FamilyMemberHistoryConditionComponent i : condition)
2989            dst.condition.add(i.copy());
2990        };
2991        if (procedure != null) {
2992          dst.procedure = new ArrayList<FamilyMemberHistoryProcedureComponent>();
2993          for (FamilyMemberHistoryProcedureComponent i : procedure)
2994            dst.procedure.add(i.copy());
2995        };
2996      }
2997
2998      protected FamilyMemberHistory typedCopy() {
2999        return copy();
3000      }
3001
3002      @Override
3003      public boolean equalsDeep(Base other_) {
3004        if (!super.equalsDeep(other_))
3005          return false;
3006        if (!(other_ instanceof FamilyMemberHistory))
3007          return false;
3008        FamilyMemberHistory o = (FamilyMemberHistory) other_;
3009        return compareDeep(identifier, o.identifier, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true)
3010           && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(status, o.status, true)
3011           && compareDeep(dataAbsentReason, o.dataAbsentReason, true) && compareDeep(patient, o.patient, true)
3012           && compareDeep(date, o.date, true) && compareDeep(participant, o.participant, true) && compareDeep(name, o.name, true)
3013           && compareDeep(relationship, o.relationship, true) && compareDeep(sex, o.sex, true) && compareDeep(born, o.born, true)
3014           && compareDeep(age, o.age, true) && compareDeep(estimatedAge, o.estimatedAge, true) && compareDeep(deceased, o.deceased, true)
3015           && compareDeep(reason, o.reason, true) && compareDeep(note, o.note, true) && compareDeep(condition, o.condition, true)
3016           && compareDeep(procedure, o.procedure, true);
3017      }
3018
3019      @Override
3020      public boolean equalsShallow(Base other_) {
3021        if (!super.equalsShallow(other_))
3022          return false;
3023        if (!(other_ instanceof FamilyMemberHistory))
3024          return false;
3025        FamilyMemberHistory o = (FamilyMemberHistory) other_;
3026        return compareValues(instantiatesCanonical, o.instantiatesCanonical, true) && compareValues(instantiatesUri, o.instantiatesUri, true)
3027           && compareValues(status, o.status, true) && compareValues(date, o.date, true) && compareValues(name, o.name, true)
3028           && compareValues(estimatedAge, o.estimatedAge, true);
3029      }
3030
3031      public boolean isEmpty() {
3032        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical
3033          , instantiatesUri, status, dataAbsentReason, patient, date, participant, name
3034          , relationship, sex, born, age, estimatedAge, deceased, reason, note, condition
3035          , procedure);
3036      }
3037
3038  @Override
3039  public ResourceType getResourceType() {
3040    return ResourceType.FamilyMemberHistory;
3041   }
3042
3043 /**
3044   * Search parameter: <b>instantiates-canonical</b>
3045   * <p>
3046   * Description: <b>Instantiates FHIR protocol or definition</b><br>
3047   * Type: <b>reference</b><br>
3048   * Path: <b>FamilyMemberHistory.instantiatesCanonical</b><br>
3049   * </p>
3050   */
3051  @SearchParamDefinition(name="instantiates-canonical", path="FamilyMemberHistory.instantiatesCanonical", description="Instantiates FHIR protocol or definition", type="reference", target={ActivityDefinition.class, Measure.class, OperationDefinition.class, PlanDefinition.class, Questionnaire.class } )
3052  public static final String SP_INSTANTIATES_CANONICAL = "instantiates-canonical";
3053 /**
3054   * <b>Fluent Client</b> search parameter constant for <b>instantiates-canonical</b>
3055   * <p>
3056   * Description: <b>Instantiates FHIR protocol or definition</b><br>
3057   * Type: <b>reference</b><br>
3058   * Path: <b>FamilyMemberHistory.instantiatesCanonical</b><br>
3059   * </p>
3060   */
3061  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INSTANTIATES_CANONICAL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INSTANTIATES_CANONICAL);
3062
3063/**
3064   * Constant for fluent queries to be used to add include statements. Specifies
3065   * the path value of "<b>FamilyMemberHistory:instantiates-canonical</b>".
3066   */
3067  public static final ca.uhn.fhir.model.api.Include INCLUDE_INSTANTIATES_CANONICAL = new ca.uhn.fhir.model.api.Include("FamilyMemberHistory:instantiates-canonical").toLocked();
3068
3069 /**
3070   * Search parameter: <b>instantiates-uri</b>
3071   * <p>
3072   * Description: <b>Instantiates external protocol or definition</b><br>
3073   * Type: <b>uri</b><br>
3074   * Path: <b>FamilyMemberHistory.instantiatesUri</b><br>
3075   * </p>
3076   */
3077  @SearchParamDefinition(name="instantiates-uri", path="FamilyMemberHistory.instantiatesUri", description="Instantiates external protocol or definition", type="uri" )
3078  public static final String SP_INSTANTIATES_URI = "instantiates-uri";
3079 /**
3080   * <b>Fluent Client</b> search parameter constant for <b>instantiates-uri</b>
3081   * <p>
3082   * Description: <b>Instantiates external protocol or definition</b><br>
3083   * Type: <b>uri</b><br>
3084   * Path: <b>FamilyMemberHistory.instantiatesUri</b><br>
3085   * </p>
3086   */
3087  public static final ca.uhn.fhir.rest.gclient.UriClientParam INSTANTIATES_URI = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_INSTANTIATES_URI);
3088
3089 /**
3090   * Search parameter: <b>relationship</b>
3091   * <p>
3092   * Description: <b>A search by a relationship type</b><br>
3093   * Type: <b>token</b><br>
3094   * Path: <b>FamilyMemberHistory.relationship</b><br>
3095   * </p>
3096   */
3097  @SearchParamDefinition(name="relationship", path="FamilyMemberHistory.relationship", description="A search by a relationship type", type="token" )
3098  public static final String SP_RELATIONSHIP = "relationship";
3099 /**
3100   * <b>Fluent Client</b> search parameter constant for <b>relationship</b>
3101   * <p>
3102   * Description: <b>A search by a relationship type</b><br>
3103   * Type: <b>token</b><br>
3104   * Path: <b>FamilyMemberHistory.relationship</b><br>
3105   * </p>
3106   */
3107  public static final ca.uhn.fhir.rest.gclient.TokenClientParam RELATIONSHIP = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RELATIONSHIP);
3108
3109 /**
3110   * Search parameter: <b>sex</b>
3111   * <p>
3112   * Description: <b>A search by a sex code of a family member</b><br>
3113   * Type: <b>token</b><br>
3114   * Path: <b>FamilyMemberHistory.sex</b><br>
3115   * </p>
3116   */
3117  @SearchParamDefinition(name="sex", path="FamilyMemberHistory.sex", description="A search by a sex code of a family member", type="token" )
3118  public static final String SP_SEX = "sex";
3119 /**
3120   * <b>Fluent Client</b> search parameter constant for <b>sex</b>
3121   * <p>
3122   * Description: <b>A search by a sex code of a family member</b><br>
3123   * Type: <b>token</b><br>
3124   * Path: <b>FamilyMemberHistory.sex</b><br>
3125   * </p>
3126   */
3127  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SEX = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SEX);
3128
3129 /**
3130   * Search parameter: <b>status</b>
3131   * <p>
3132   * Description: <b>partial | completed | entered-in-error | health-unknown</b><br>
3133   * Type: <b>token</b><br>
3134   * Path: <b>FamilyMemberHistory.status</b><br>
3135   * </p>
3136   */
3137  @SearchParamDefinition(name="status", path="FamilyMemberHistory.status", description="partial | completed | entered-in-error | health-unknown", type="token" )
3138  public static final String SP_STATUS = "status";
3139 /**
3140   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3141   * <p>
3142   * Description: <b>partial | completed | entered-in-error | health-unknown</b><br>
3143   * Type: <b>token</b><br>
3144   * Path: <b>FamilyMemberHistory.status</b><br>
3145   * </p>
3146   */
3147  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3148
3149 /**
3150   * Search parameter: <b>code</b>
3151   * <p>
3152   * Description: <b>Multiple Resources: 
3153
3154* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted
3155* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
3156* [AuditEvent](auditevent.html): More specific code for the event
3157* [Basic](basic.html): Kind of Resource
3158* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code
3159* [Condition](condition.html): Code for the condition
3160* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.
3161* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
3162* [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
3163* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
3164* [ImagingSelection](imagingselection.html): The imaging selection status
3165* [List](list.html): What the purpose of this list is
3166* [Medication](medication.html): Returns medications for a specific code
3167* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
3168* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
3169* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
3170* [MedicationStatement](medicationstatement.html): Return statements of this medication code
3171* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake
3172* [Observation](observation.html): The code of the observation type
3173* [Procedure](procedure.html): A code to identify a  procedure
3174* [RequestOrchestration](requestorchestration.html): The code of the request orchestration
3175* [Task](task.html): Search by task code
3176</b><br>
3177   * Type: <b>token</b><br>
3178   * 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>
3179   * </p>
3180   */
3181  @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" )
3182  public static final String SP_CODE = "code";
3183 /**
3184   * <b>Fluent Client</b> search parameter constant for <b>code</b>
3185   * <p>
3186   * Description: <b>Multiple Resources: 
3187
3188* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted
3189* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
3190* [AuditEvent](auditevent.html): More specific code for the event
3191* [Basic](basic.html): Kind of Resource
3192* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code
3193* [Condition](condition.html): Code for the condition
3194* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.
3195* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
3196* [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
3197* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
3198* [ImagingSelection](imagingselection.html): The imaging selection status
3199* [List](list.html): What the purpose of this list is
3200* [Medication](medication.html): Returns medications for a specific code
3201* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
3202* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
3203* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
3204* [MedicationStatement](medicationstatement.html): Return statements of this medication code
3205* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake
3206* [Observation](observation.html): The code of the observation type
3207* [Procedure](procedure.html): A code to identify a  procedure
3208* [RequestOrchestration](requestorchestration.html): The code of the request orchestration
3209* [Task](task.html): Search by task code
3210</b><br>
3211   * Type: <b>token</b><br>
3212   * 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>
3213   * </p>
3214   */
3215  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
3216
3217 /**
3218   * Search parameter: <b>date</b>
3219   * <p>
3220   * Description: <b>Multiple Resources: 
3221
3222* [AdverseEvent](adverseevent.html): When the event occurred
3223* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
3224* [Appointment](appointment.html): Appointment date/time.
3225* [AuditEvent](auditevent.html): Time when the event was recorded
3226* [CarePlan](careplan.html): Time period plan covers
3227* [CareTeam](careteam.html): A date within the coverage time period.
3228* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
3229* [Composition](composition.html): Composition editing time
3230* [Consent](consent.html): When consent was agreed to
3231* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
3232* [DocumentReference](documentreference.html): When this document reference was created
3233* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
3234* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
3235* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
3236* [Flag](flag.html): Time period when flag is active
3237* [Immunization](immunization.html): Vaccination  (non)-Administration Date
3238* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
3239* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
3240* [Invoice](invoice.html): Invoice date / posting date
3241* [List](list.html): When the list was prepared
3242* [MeasureReport](measurereport.html): The date of the measure report
3243* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
3244* [Observation](observation.html): Clinically relevant time/time-period for observation
3245* [Procedure](procedure.html): When the procedure occurred or is occurring
3246* [ResearchSubject](researchsubject.html): Start and end of participation
3247* [RiskAssessment](riskassessment.html): When was assessment made?
3248* [SupplyRequest](supplyrequest.html): When the request was made
3249</b><br>
3250   * Type: <b>date</b><br>
3251   * 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>
3252   * </p>
3253   */
3254  @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" )
3255  public static final String SP_DATE = "date";
3256 /**
3257   * <b>Fluent Client</b> search parameter constant for <b>date</b>
3258   * <p>
3259   * Description: <b>Multiple Resources: 
3260
3261* [AdverseEvent](adverseevent.html): When the event occurred
3262* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
3263* [Appointment](appointment.html): Appointment date/time.
3264* [AuditEvent](auditevent.html): Time when the event was recorded
3265* [CarePlan](careplan.html): Time period plan covers
3266* [CareTeam](careteam.html): A date within the coverage time period.
3267* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
3268* [Composition](composition.html): Composition editing time
3269* [Consent](consent.html): When consent was agreed to
3270* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
3271* [DocumentReference](documentreference.html): When this document reference was created
3272* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
3273* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
3274* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
3275* [Flag](flag.html): Time period when flag is active
3276* [Immunization](immunization.html): Vaccination  (non)-Administration Date
3277* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
3278* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
3279* [Invoice](invoice.html): Invoice date / posting date
3280* [List](list.html): When the list was prepared
3281* [MeasureReport](measurereport.html): The date of the measure report
3282* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
3283* [Observation](observation.html): Clinically relevant time/time-period for observation
3284* [Procedure](procedure.html): When the procedure occurred or is occurring
3285* [ResearchSubject](researchsubject.html): Start and end of participation
3286* [RiskAssessment](riskassessment.html): When was assessment made?
3287* [SupplyRequest](supplyrequest.html): When the request was made
3288</b><br>
3289   * Type: <b>date</b><br>
3290   * 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>
3291   * </p>
3292   */
3293  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
3294
3295 /**
3296   * Search parameter: <b>identifier</b>
3297   * <p>
3298   * Description: <b>Multiple Resources: 
3299
3300* [Account](account.html): Account number
3301* [AdverseEvent](adverseevent.html): Business identifier for the event
3302* [AllergyIntolerance](allergyintolerance.html): External ids for this item
3303* [Appointment](appointment.html): An Identifier of the Appointment
3304* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
3305* [Basic](basic.html): Business identifier
3306* [BodyStructure](bodystructure.html): Bodystructure identifier
3307* [CarePlan](careplan.html): External Ids for this plan
3308* [CareTeam](careteam.html): External Ids for this team
3309* [ChargeItem](chargeitem.html): Business Identifier for item
3310* [Claim](claim.html): The primary identifier of the financial resource
3311* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
3312* [ClinicalImpression](clinicalimpression.html): Business identifier
3313* [Communication](communication.html): Unique identifier
3314* [CommunicationRequest](communicationrequest.html): Unique identifier
3315* [Composition](composition.html): Version-independent identifier for the Composition
3316* [Condition](condition.html): A unique identifier of the condition record
3317* [Consent](consent.html): Identifier for this record (external references)
3318* [Contract](contract.html): The identity of the contract
3319* [Coverage](coverage.html): The primary identifier of the insured and the coverage
3320* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
3321* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
3322* [DetectedIssue](detectedissue.html): Unique id for the detected issue
3323* [DeviceRequest](devicerequest.html): Business identifier for request/order
3324* [DeviceUsage](deviceusage.html): Search by identifier
3325* [DiagnosticReport](diagnosticreport.html): An identifier for the report
3326* [DocumentReference](documentreference.html): Identifier of the attachment binary
3327* [Encounter](encounter.html): Identifier(s) by which this encounter is known
3328* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
3329* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3330* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
3331* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3332* [Flag](flag.html): Business identifier
3333* [Goal](goal.html): External Ids for this goal
3334* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
3335* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
3336* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
3337* [Immunization](immunization.html): Business identifier
3338* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
3339* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
3340* [Invoice](invoice.html): Business Identifier for item
3341* [List](list.html): Business identifier
3342* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
3343* [Medication](medication.html): Returns medications with this external identifier
3344* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3345* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3346* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3347* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
3348* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
3349* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
3350* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3351* [Observation](observation.html): The unique id for a particular observation
3352* [Person](person.html): A person Identifier
3353* [Procedure](procedure.html): A unique identifier for a procedure
3354* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
3355* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
3356* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
3357* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
3358* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3359* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3360* [Specimen](specimen.html): The unique identifier associated with the specimen
3361* [SupplyDelivery](supplydelivery.html): External identifier
3362* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3363* [Task](task.html): Search for a task instance by its business identifier
3364* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3365</b><br>
3366   * Type: <b>token</b><br>
3367   * 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>
3368   * </p>
3369   */
3370  @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" )
3371  public static final String SP_IDENTIFIER = "identifier";
3372 /**
3373   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3374   * <p>
3375   * Description: <b>Multiple Resources: 
3376
3377* [Account](account.html): Account number
3378* [AdverseEvent](adverseevent.html): Business identifier for the event
3379* [AllergyIntolerance](allergyintolerance.html): External ids for this item
3380* [Appointment](appointment.html): An Identifier of the Appointment
3381* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
3382* [Basic](basic.html): Business identifier
3383* [BodyStructure](bodystructure.html): Bodystructure identifier
3384* [CarePlan](careplan.html): External Ids for this plan
3385* [CareTeam](careteam.html): External Ids for this team
3386* [ChargeItem](chargeitem.html): Business Identifier for item
3387* [Claim](claim.html): The primary identifier of the financial resource
3388* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
3389* [ClinicalImpression](clinicalimpression.html): Business identifier
3390* [Communication](communication.html): Unique identifier
3391* [CommunicationRequest](communicationrequest.html): Unique identifier
3392* [Composition](composition.html): Version-independent identifier for the Composition
3393* [Condition](condition.html): A unique identifier of the condition record
3394* [Consent](consent.html): Identifier for this record (external references)
3395* [Contract](contract.html): The identity of the contract
3396* [Coverage](coverage.html): The primary identifier of the insured and the coverage
3397* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
3398* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
3399* [DetectedIssue](detectedissue.html): Unique id for the detected issue
3400* [DeviceRequest](devicerequest.html): Business identifier for request/order
3401* [DeviceUsage](deviceusage.html): Search by identifier
3402* [DiagnosticReport](diagnosticreport.html): An identifier for the report
3403* [DocumentReference](documentreference.html): Identifier of the attachment binary
3404* [Encounter](encounter.html): Identifier(s) by which this encounter is known
3405* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
3406* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3407* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
3408* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3409* [Flag](flag.html): Business identifier
3410* [Goal](goal.html): External Ids for this goal
3411* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
3412* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
3413* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
3414* [Immunization](immunization.html): Business identifier
3415* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
3416* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
3417* [Invoice](invoice.html): Business Identifier for item
3418* [List](list.html): Business identifier
3419* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
3420* [Medication](medication.html): Returns medications with this external identifier
3421* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3422* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3423* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3424* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
3425* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
3426* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
3427* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3428* [Observation](observation.html): The unique id for a particular observation
3429* [Person](person.html): A person Identifier
3430* [Procedure](procedure.html): A unique identifier for a procedure
3431* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
3432* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
3433* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
3434* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
3435* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3436* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3437* [Specimen](specimen.html): The unique identifier associated with the specimen
3438* [SupplyDelivery](supplydelivery.html): External identifier
3439* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3440* [Task](task.html): Search for a task instance by its business identifier
3441* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3442</b><br>
3443   * Type: <b>token</b><br>
3444   * 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>
3445   * </p>
3446   */
3447  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3448
3449 /**
3450   * Search parameter: <b>patient</b>
3451   * <p>
3452   * Description: <b>Multiple Resources: 
3453
3454* [Account](account.html): The entity that caused the expenses
3455* [AdverseEvent](adverseevent.html): Subject impacted by event
3456* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3457* [Appointment](appointment.html): One of the individuals of the appointment is this patient
3458* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
3459* [AuditEvent](auditevent.html): Where the activity involved patient data
3460* [Basic](basic.html): Identifies the focus of this resource
3461* [BodyStructure](bodystructure.html): Who this is about
3462* [CarePlan](careplan.html): Who the care plan is for
3463* [CareTeam](careteam.html): Who care team is for
3464* [ChargeItem](chargeitem.html): Individual service was done for/to
3465* [Claim](claim.html): Patient receiving the products or services
3466* [ClaimResponse](claimresponse.html): The subject of care
3467* [ClinicalImpression](clinicalimpression.html): Patient assessed
3468* [Communication](communication.html): Focus of message
3469* [CommunicationRequest](communicationrequest.html): Focus of message
3470* [Composition](composition.html): Who and/or what the composition is about
3471* [Condition](condition.html): Who has the condition?
3472* [Consent](consent.html): Who the consent applies to
3473* [Contract](contract.html): The identity of the subject of the contract (if a patient)
3474* [Coverage](coverage.html): Retrieve coverages for a patient
3475* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
3476* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
3477* [DetectedIssue](detectedissue.html): Associated patient
3478* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3479* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
3480* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3481* [DocumentReference](documentreference.html): Who/what is the subject of the document
3482* [Encounter](encounter.html): The patient present at the encounter
3483* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
3484* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3485* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
3486* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3487* [Flag](flag.html): The identity of a subject to list flags for
3488* [Goal](goal.html): Who this goal is intended for
3489* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
3490* [ImagingSelection](imagingselection.html): Who the study is about
3491* [ImagingStudy](imagingstudy.html): Who the study is about
3492* [Immunization](immunization.html): The patient for the vaccination record
3493* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
3494* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
3495* [Invoice](invoice.html): Recipient(s) of goods and services
3496* [List](list.html): If all resources have the same subject
3497* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
3498* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3499* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3500* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3501* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
3502* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
3503* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
3504* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
3505* [Observation](observation.html): The subject that the observation is about (if patient)
3506* [Person](person.html): The Person links to this Patient
3507* [Procedure](procedure.html): Search by subject - a patient
3508* [Provenance](provenance.html): Where the activity involved patient data
3509* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
3510* [RelatedPerson](relatedperson.html): The patient this related person is related to
3511* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
3512* [ResearchSubject](researchsubject.html): Who or what is part of study
3513* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3514* [ServiceRequest](servicerequest.html): Search by subject - a patient
3515* [Specimen](specimen.html): The patient the specimen comes from
3516* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3517* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
3518* [Task](task.html): Search by patient
3519* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3520</b><br>
3521   * Type: <b>reference</b><br>
3522   * 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>
3523   * </p>
3524   */
3525  @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 } )
3526  public static final String SP_PATIENT = "patient";
3527 /**
3528   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
3529   * <p>
3530   * Description: <b>Multiple Resources: 
3531
3532* [Account](account.html): The entity that caused the expenses
3533* [AdverseEvent](adverseevent.html): Subject impacted by event
3534* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3535* [Appointment](appointment.html): One of the individuals of the appointment is this patient
3536* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
3537* [AuditEvent](auditevent.html): Where the activity involved patient data
3538* [Basic](basic.html): Identifies the focus of this resource
3539* [BodyStructure](bodystructure.html): Who this is about
3540* [CarePlan](careplan.html): Who the care plan is for
3541* [CareTeam](careteam.html): Who care team is for
3542* [ChargeItem](chargeitem.html): Individual service was done for/to
3543* [Claim](claim.html): Patient receiving the products or services
3544* [ClaimResponse](claimresponse.html): The subject of care
3545* [ClinicalImpression](clinicalimpression.html): Patient assessed
3546* [Communication](communication.html): Focus of message
3547* [CommunicationRequest](communicationrequest.html): Focus of message
3548* [Composition](composition.html): Who and/or what the composition is about
3549* [Condition](condition.html): Who has the condition?
3550* [Consent](consent.html): Who the consent applies to
3551* [Contract](contract.html): The identity of the subject of the contract (if a patient)
3552* [Coverage](coverage.html): Retrieve coverages for a patient
3553* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
3554* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
3555* [DetectedIssue](detectedissue.html): Associated patient
3556* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3557* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
3558* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3559* [DocumentReference](documentreference.html): Who/what is the subject of the document
3560* [Encounter](encounter.html): The patient present at the encounter
3561* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
3562* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3563* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
3564* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3565* [Flag](flag.html): The identity of a subject to list flags for
3566* [Goal](goal.html): Who this goal is intended for
3567* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
3568* [ImagingSelection](imagingselection.html): Who the study is about
3569* [ImagingStudy](imagingstudy.html): Who the study is about
3570* [Immunization](immunization.html): The patient for the vaccination record
3571* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
3572* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
3573* [Invoice](invoice.html): Recipient(s) of goods and services
3574* [List](list.html): If all resources have the same subject
3575* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
3576* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3577* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3578* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3579* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
3580* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
3581* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
3582* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
3583* [Observation](observation.html): The subject that the observation is about (if patient)
3584* [Person](person.html): The Person links to this Patient
3585* [Procedure](procedure.html): Search by subject - a patient
3586* [Provenance](provenance.html): Where the activity involved patient data
3587* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
3588* [RelatedPerson](relatedperson.html): The patient this related person is related to
3589* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
3590* [ResearchSubject](researchsubject.html): Who or what is part of study
3591* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3592* [ServiceRequest](servicerequest.html): Search by subject - a patient
3593* [Specimen](specimen.html): The patient the specimen comes from
3594* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3595* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
3596* [Task](task.html): Search by patient
3597* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3598</b><br>
3599   * Type: <b>reference</b><br>
3600   * 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>
3601   * </p>
3602   */
3603  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
3604
3605/**
3606   * Constant for fluent queries to be used to add include statements. Specifies
3607   * the path value of "<b>FamilyMemberHistory:patient</b>".
3608   */
3609  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("FamilyMemberHistory:patient").toLocked();
3610
3611
3612}
3613