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 * A ResearchSubject is a participant or object which is the recipient of investigative activities in a research study.
052 */
053@ResourceDef(name="ResearchSubject", profile="http://hl7.org/fhir/StructureDefinition/ResearchSubject")
054public class ResearchSubject extends DomainResource {
055
056    @Block()
057    public static class ResearchSubjectProgressComponent extends BackboneElement implements IBaseBackboneElement {
058        /**
059         * Identifies the aspect of the subject's journey that the state refers to.
060         */
061        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
062        @Description(shortDefinition="state | milestone", formalDefinition="Identifies the aspect of the subject's journey that the state refers to." )
063        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/research-subject-state-type")
064        protected CodeableConcept type;
065
066        /**
067         * The current state of the subject.
068         */
069        @Child(name = "subjectState", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
070        @Description(shortDefinition="candidate | eligible | follow-up | ineligible | not-registered | off-study | on-study | on-study-intervention | on-study-observation | pending-on-study | potential-candidate | screening | withdrawn", formalDefinition="The current state of the subject." )
071        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/research-subject-state")
072        protected CodeableConcept subjectState;
073
074        /**
075         * The milestones the subject has passed through.
076         */
077        @Child(name = "milestone", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
078        @Description(shortDefinition="SignedUp | Screened | Randomized", formalDefinition="The milestones the subject has passed through." )
079        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/research-subject-milestone")
080        protected CodeableConcept milestone;
081
082        /**
083         * The reason for the state change.  If coded it should follow the formal subject state model.
084         */
085        @Child(name = "reason", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
086        @Description(shortDefinition="State change reason", formalDefinition="The reason for the state change.  If coded it should follow the formal subject state model." )
087        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/state-change-reason")
088        protected CodeableConcept reason;
089
090        /**
091         * The date when the new status started.
092         */
093        @Child(name = "startDate", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=false)
094        @Description(shortDefinition="State change date", formalDefinition="The date when the new status started." )
095        protected DateTimeType startDate;
096
097        /**
098         * The date when the state ended.
099         */
100        @Child(name = "endDate", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=false)
101        @Description(shortDefinition="State change date", formalDefinition="The date when the state ended." )
102        protected DateTimeType endDate;
103
104        private static final long serialVersionUID = -330838916L;
105
106    /**
107     * Constructor
108     */
109      public ResearchSubjectProgressComponent() {
110        super();
111      }
112
113        /**
114         * @return {@link #type} (Identifies the aspect of the subject's journey that the state refers to.)
115         */
116        public CodeableConcept getType() { 
117          if (this.type == null)
118            if (Configuration.errorOnAutoCreate())
119              throw new Error("Attempt to auto-create ResearchSubjectProgressComponent.type");
120            else if (Configuration.doAutoCreate())
121              this.type = new CodeableConcept(); // cc
122          return this.type;
123        }
124
125        public boolean hasType() { 
126          return this.type != null && !this.type.isEmpty();
127        }
128
129        /**
130         * @param value {@link #type} (Identifies the aspect of the subject's journey that the state refers to.)
131         */
132        public ResearchSubjectProgressComponent setType(CodeableConcept value) { 
133          this.type = value;
134          return this;
135        }
136
137        /**
138         * @return {@link #subjectState} (The current state of the subject.)
139         */
140        public CodeableConcept getSubjectState() { 
141          if (this.subjectState == null)
142            if (Configuration.errorOnAutoCreate())
143              throw new Error("Attempt to auto-create ResearchSubjectProgressComponent.subjectState");
144            else if (Configuration.doAutoCreate())
145              this.subjectState = new CodeableConcept(); // cc
146          return this.subjectState;
147        }
148
149        public boolean hasSubjectState() { 
150          return this.subjectState != null && !this.subjectState.isEmpty();
151        }
152
153        /**
154         * @param value {@link #subjectState} (The current state of the subject.)
155         */
156        public ResearchSubjectProgressComponent setSubjectState(CodeableConcept value) { 
157          this.subjectState = value;
158          return this;
159        }
160
161        /**
162         * @return {@link #milestone} (The milestones the subject has passed through.)
163         */
164        public CodeableConcept getMilestone() { 
165          if (this.milestone == null)
166            if (Configuration.errorOnAutoCreate())
167              throw new Error("Attempt to auto-create ResearchSubjectProgressComponent.milestone");
168            else if (Configuration.doAutoCreate())
169              this.milestone = new CodeableConcept(); // cc
170          return this.milestone;
171        }
172
173        public boolean hasMilestone() { 
174          return this.milestone != null && !this.milestone.isEmpty();
175        }
176
177        /**
178         * @param value {@link #milestone} (The milestones the subject has passed through.)
179         */
180        public ResearchSubjectProgressComponent setMilestone(CodeableConcept value) { 
181          this.milestone = value;
182          return this;
183        }
184
185        /**
186         * @return {@link #reason} (The reason for the state change.  If coded it should follow the formal subject state model.)
187         */
188        public CodeableConcept getReason() { 
189          if (this.reason == null)
190            if (Configuration.errorOnAutoCreate())
191              throw new Error("Attempt to auto-create ResearchSubjectProgressComponent.reason");
192            else if (Configuration.doAutoCreate())
193              this.reason = new CodeableConcept(); // cc
194          return this.reason;
195        }
196
197        public boolean hasReason() { 
198          return this.reason != null && !this.reason.isEmpty();
199        }
200
201        /**
202         * @param value {@link #reason} (The reason for the state change.  If coded it should follow the formal subject state model.)
203         */
204        public ResearchSubjectProgressComponent setReason(CodeableConcept value) { 
205          this.reason = value;
206          return this;
207        }
208
209        /**
210         * @return {@link #startDate} (The date when the new status started.). This is the underlying object with id, value and extensions. The accessor "getStartDate" gives direct access to the value
211         */
212        public DateTimeType getStartDateElement() { 
213          if (this.startDate == null)
214            if (Configuration.errorOnAutoCreate())
215              throw new Error("Attempt to auto-create ResearchSubjectProgressComponent.startDate");
216            else if (Configuration.doAutoCreate())
217              this.startDate = new DateTimeType(); // bb
218          return this.startDate;
219        }
220
221        public boolean hasStartDateElement() { 
222          return this.startDate != null && !this.startDate.isEmpty();
223        }
224
225        public boolean hasStartDate() { 
226          return this.startDate != null && !this.startDate.isEmpty();
227        }
228
229        /**
230         * @param value {@link #startDate} (The date when the new status started.). This is the underlying object with id, value and extensions. The accessor "getStartDate" gives direct access to the value
231         */
232        public ResearchSubjectProgressComponent setStartDateElement(DateTimeType value) { 
233          this.startDate = value;
234          return this;
235        }
236
237        /**
238         * @return The date when the new status started.
239         */
240        public Date getStartDate() { 
241          return this.startDate == null ? null : this.startDate.getValue();
242        }
243
244        /**
245         * @param value The date when the new status started.
246         */
247        public ResearchSubjectProgressComponent setStartDate(Date value) { 
248          if (value == null)
249            this.startDate = null;
250          else {
251            if (this.startDate == null)
252              this.startDate = new DateTimeType();
253            this.startDate.setValue(value);
254          }
255          return this;
256        }
257
258        /**
259         * @return {@link #endDate} (The date when the state ended.). This is the underlying object with id, value and extensions. The accessor "getEndDate" gives direct access to the value
260         */
261        public DateTimeType getEndDateElement() { 
262          if (this.endDate == null)
263            if (Configuration.errorOnAutoCreate())
264              throw new Error("Attempt to auto-create ResearchSubjectProgressComponent.endDate");
265            else if (Configuration.doAutoCreate())
266              this.endDate = new DateTimeType(); // bb
267          return this.endDate;
268        }
269
270        public boolean hasEndDateElement() { 
271          return this.endDate != null && !this.endDate.isEmpty();
272        }
273
274        public boolean hasEndDate() { 
275          return this.endDate != null && !this.endDate.isEmpty();
276        }
277
278        /**
279         * @param value {@link #endDate} (The date when the state ended.). This is the underlying object with id, value and extensions. The accessor "getEndDate" gives direct access to the value
280         */
281        public ResearchSubjectProgressComponent setEndDateElement(DateTimeType value) { 
282          this.endDate = value;
283          return this;
284        }
285
286        /**
287         * @return The date when the state ended.
288         */
289        public Date getEndDate() { 
290          return this.endDate == null ? null : this.endDate.getValue();
291        }
292
293        /**
294         * @param value The date when the state ended.
295         */
296        public ResearchSubjectProgressComponent setEndDate(Date value) { 
297          if (value == null)
298            this.endDate = null;
299          else {
300            if (this.endDate == null)
301              this.endDate = new DateTimeType();
302            this.endDate.setValue(value);
303          }
304          return this;
305        }
306
307        protected void listChildren(List<Property> children) {
308          super.listChildren(children);
309          children.add(new Property("type", "CodeableConcept", "Identifies the aspect of the subject's journey that the state refers to.", 0, 1, type));
310          children.add(new Property("subjectState", "CodeableConcept", "The current state of the subject.", 0, 1, subjectState));
311          children.add(new Property("milestone", "CodeableConcept", "The milestones the subject has passed through.", 0, 1, milestone));
312          children.add(new Property("reason", "CodeableConcept", "The reason for the state change.  If coded it should follow the formal subject state model.", 0, 1, reason));
313          children.add(new Property("startDate", "dateTime", "The date when the new status started.", 0, 1, startDate));
314          children.add(new Property("endDate", "dateTime", "The date when the state ended.", 0, 1, endDate));
315        }
316
317        @Override
318        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
319          switch (_hash) {
320          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Identifies the aspect of the subject's journey that the state refers to.", 0, 1, type);
321          case -1520444731: /*subjectState*/  return new Property("subjectState", "CodeableConcept", "The current state of the subject.", 0, 1, subjectState);
322          case -1065084560: /*milestone*/  return new Property("milestone", "CodeableConcept", "The milestones the subject has passed through.", 0, 1, milestone);
323          case -934964668: /*reason*/  return new Property("reason", "CodeableConcept", "The reason for the state change.  If coded it should follow the formal subject state model.", 0, 1, reason);
324          case -2129778896: /*startDate*/  return new Property("startDate", "dateTime", "The date when the new status started.", 0, 1, startDate);
325          case -1607727319: /*endDate*/  return new Property("endDate", "dateTime", "The date when the state ended.", 0, 1, endDate);
326          default: return super.getNamedProperty(_hash, _name, _checkValid);
327          }
328
329        }
330
331      @Override
332      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
333        switch (hash) {
334        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
335        case -1520444731: /*subjectState*/ return this.subjectState == null ? new Base[0] : new Base[] {this.subjectState}; // CodeableConcept
336        case -1065084560: /*milestone*/ return this.milestone == null ? new Base[0] : new Base[] {this.milestone}; // CodeableConcept
337        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // CodeableConcept
338        case -2129778896: /*startDate*/ return this.startDate == null ? new Base[0] : new Base[] {this.startDate}; // DateTimeType
339        case -1607727319: /*endDate*/ return this.endDate == null ? new Base[0] : new Base[] {this.endDate}; // DateTimeType
340        default: return super.getProperty(hash, name, checkValid);
341        }
342
343      }
344
345      @Override
346      public Base setProperty(int hash, String name, Base value) throws FHIRException {
347        switch (hash) {
348        case 3575610: // type
349          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
350          return value;
351        case -1520444731: // subjectState
352          this.subjectState = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
353          return value;
354        case -1065084560: // milestone
355          this.milestone = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
356          return value;
357        case -934964668: // reason
358          this.reason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
359          return value;
360        case -2129778896: // startDate
361          this.startDate = TypeConvertor.castToDateTime(value); // DateTimeType
362          return value;
363        case -1607727319: // endDate
364          this.endDate = TypeConvertor.castToDateTime(value); // DateTimeType
365          return value;
366        default: return super.setProperty(hash, name, value);
367        }
368
369      }
370
371      @Override
372      public Base setProperty(String name, Base value) throws FHIRException {
373        if (name.equals("type")) {
374          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
375        } else if (name.equals("subjectState")) {
376          this.subjectState = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
377        } else if (name.equals("milestone")) {
378          this.milestone = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
379        } else if (name.equals("reason")) {
380          this.reason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
381        } else if (name.equals("startDate")) {
382          this.startDate = TypeConvertor.castToDateTime(value); // DateTimeType
383        } else if (name.equals("endDate")) {
384          this.endDate = TypeConvertor.castToDateTime(value); // DateTimeType
385        } else
386          return super.setProperty(name, value);
387        return value;
388      }
389
390      @Override
391      public Base makeProperty(int hash, String name) throws FHIRException {
392        switch (hash) {
393        case 3575610:  return getType();
394        case -1520444731:  return getSubjectState();
395        case -1065084560:  return getMilestone();
396        case -934964668:  return getReason();
397        case -2129778896:  return getStartDateElement();
398        case -1607727319:  return getEndDateElement();
399        default: return super.makeProperty(hash, name);
400        }
401
402      }
403
404      @Override
405      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
406        switch (hash) {
407        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
408        case -1520444731: /*subjectState*/ return new String[] {"CodeableConcept"};
409        case -1065084560: /*milestone*/ return new String[] {"CodeableConcept"};
410        case -934964668: /*reason*/ return new String[] {"CodeableConcept"};
411        case -2129778896: /*startDate*/ return new String[] {"dateTime"};
412        case -1607727319: /*endDate*/ return new String[] {"dateTime"};
413        default: return super.getTypesForProperty(hash, name);
414        }
415
416      }
417
418      @Override
419      public Base addChild(String name) throws FHIRException {
420        if (name.equals("type")) {
421          this.type = new CodeableConcept();
422          return this.type;
423        }
424        else if (name.equals("subjectState")) {
425          this.subjectState = new CodeableConcept();
426          return this.subjectState;
427        }
428        else if (name.equals("milestone")) {
429          this.milestone = new CodeableConcept();
430          return this.milestone;
431        }
432        else if (name.equals("reason")) {
433          this.reason = new CodeableConcept();
434          return this.reason;
435        }
436        else if (name.equals("startDate")) {
437          throw new FHIRException("Cannot call addChild on a singleton property ResearchSubject.progress.startDate");
438        }
439        else if (name.equals("endDate")) {
440          throw new FHIRException("Cannot call addChild on a singleton property ResearchSubject.progress.endDate");
441        }
442        else
443          return super.addChild(name);
444      }
445
446      public ResearchSubjectProgressComponent copy() {
447        ResearchSubjectProgressComponent dst = new ResearchSubjectProgressComponent();
448        copyValues(dst);
449        return dst;
450      }
451
452      public void copyValues(ResearchSubjectProgressComponent dst) {
453        super.copyValues(dst);
454        dst.type = type == null ? null : type.copy();
455        dst.subjectState = subjectState == null ? null : subjectState.copy();
456        dst.milestone = milestone == null ? null : milestone.copy();
457        dst.reason = reason == null ? null : reason.copy();
458        dst.startDate = startDate == null ? null : startDate.copy();
459        dst.endDate = endDate == null ? null : endDate.copy();
460      }
461
462      @Override
463      public boolean equalsDeep(Base other_) {
464        if (!super.equalsDeep(other_))
465          return false;
466        if (!(other_ instanceof ResearchSubjectProgressComponent))
467          return false;
468        ResearchSubjectProgressComponent o = (ResearchSubjectProgressComponent) other_;
469        return compareDeep(type, o.type, true) && compareDeep(subjectState, o.subjectState, true) && compareDeep(milestone, o.milestone, true)
470           && compareDeep(reason, o.reason, true) && compareDeep(startDate, o.startDate, true) && compareDeep(endDate, o.endDate, true)
471          ;
472      }
473
474      @Override
475      public boolean equalsShallow(Base other_) {
476        if (!super.equalsShallow(other_))
477          return false;
478        if (!(other_ instanceof ResearchSubjectProgressComponent))
479          return false;
480        ResearchSubjectProgressComponent o = (ResearchSubjectProgressComponent) other_;
481        return compareValues(startDate, o.startDate, true) && compareValues(endDate, o.endDate, true);
482      }
483
484      public boolean isEmpty() {
485        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, subjectState, milestone
486          , reason, startDate, endDate);
487      }
488
489  public String fhirType() {
490    return "ResearchSubject.progress";
491
492  }
493
494  }
495
496    /**
497     * Identifiers assigned to this research subject for a study.
498     */
499    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
500    @Description(shortDefinition="Business Identifier for research subject in a study", formalDefinition="Identifiers assigned to this research subject for a study." )
501    protected List<Identifier> identifier;
502
503    /**
504     * The publication state of the resource (not of the subject).
505     */
506    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
507    @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The publication state of the resource (not of the subject)." )
508    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status")
509    protected Enumeration<PublicationStatus> status;
510
511    /**
512     * The current state (status) of the subject and resons for status change where appropriate.
513     */
514    @Child(name = "progress", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
515    @Description(shortDefinition="Subject status", formalDefinition="The current state (status) of the subject and resons for status change where appropriate." )
516    protected List<ResearchSubjectProgressComponent> progress;
517
518    /**
519     * The dates the subject began and ended their participation in the study.
520     */
521    @Child(name = "period", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=true)
522    @Description(shortDefinition="Start and end of participation", formalDefinition="The dates the subject began and ended their participation in the study." )
523    protected Period period;
524
525    /**
526     * Reference to the study the subject is participating in.
527     */
528    @Child(name = "study", type = {ResearchStudy.class}, order=4, min=1, max=1, modifier=false, summary=true)
529    @Description(shortDefinition="Study subject is part of", formalDefinition="Reference to the study the subject is participating in." )
530    protected Reference study;
531
532    /**
533     * The record of the person, animal or other entity involved in the study.
534     */
535    @Child(name = "subject", type = {Patient.class, Group.class, Specimen.class, Device.class, Medication.class, Substance.class, BiologicallyDerivedProduct.class}, order=5, min=1, max=1, modifier=false, summary=true)
536    @Description(shortDefinition="Who or what is part of study", formalDefinition="The record of the person, animal or other entity involved in the study." )
537    protected Reference subject;
538
539    /**
540     * The name of the arm in the study the subject is expected to follow as part of this study.
541     */
542    @Child(name = "assignedComparisonGroup", type = {IdType.class}, order=6, min=0, max=1, modifier=false, summary=false)
543    @Description(shortDefinition="What path should be followed", formalDefinition="The name of the arm in the study the subject is expected to follow as part of this study." )
544    protected IdType assignedComparisonGroup;
545
546    /**
547     * The name of the arm in the study the subject actually followed as part of this study.
548     */
549    @Child(name = "actualComparisonGroup", type = {IdType.class}, order=7, min=0, max=1, modifier=false, summary=false)
550    @Description(shortDefinition="What path was followed", formalDefinition="The name of the arm in the study the subject actually followed as part of this study." )
551    protected IdType actualComparisonGroup;
552
553    /**
554     * A record of the patient's informed agreement to participate in the study.
555     */
556    @Child(name = "consent", type = {Consent.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
557    @Description(shortDefinition="Agreement to participate in study", formalDefinition="A record of the patient's informed agreement to participate in the study." )
558    protected List<Reference> consent;
559
560    private static final long serialVersionUID = -1058527147L;
561
562  /**
563   * Constructor
564   */
565    public ResearchSubject() {
566      super();
567    }
568
569  /**
570   * Constructor
571   */
572    public ResearchSubject(PublicationStatus status, Reference study, Reference subject) {
573      super();
574      this.setStatus(status);
575      this.setStudy(study);
576      this.setSubject(subject);
577    }
578
579    /**
580     * @return {@link #identifier} (Identifiers assigned to this research subject for a study.)
581     */
582    public List<Identifier> getIdentifier() { 
583      if (this.identifier == null)
584        this.identifier = new ArrayList<Identifier>();
585      return this.identifier;
586    }
587
588    /**
589     * @return Returns a reference to <code>this</code> for easy method chaining
590     */
591    public ResearchSubject setIdentifier(List<Identifier> theIdentifier) { 
592      this.identifier = theIdentifier;
593      return this;
594    }
595
596    public boolean hasIdentifier() { 
597      if (this.identifier == null)
598        return false;
599      for (Identifier item : this.identifier)
600        if (!item.isEmpty())
601          return true;
602      return false;
603    }
604
605    public Identifier addIdentifier() { //3
606      Identifier t = new Identifier();
607      if (this.identifier == null)
608        this.identifier = new ArrayList<Identifier>();
609      this.identifier.add(t);
610      return t;
611    }
612
613    public ResearchSubject addIdentifier(Identifier t) { //3
614      if (t == null)
615        return this;
616      if (this.identifier == null)
617        this.identifier = new ArrayList<Identifier>();
618      this.identifier.add(t);
619      return this;
620    }
621
622    /**
623     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
624     */
625    public Identifier getIdentifierFirstRep() { 
626      if (getIdentifier().isEmpty()) {
627        addIdentifier();
628      }
629      return getIdentifier().get(0);
630    }
631
632    /**
633     * @return {@link #status} (The publication state of the resource (not of the subject).). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
634     */
635    public Enumeration<PublicationStatus> getStatusElement() { 
636      if (this.status == null)
637        if (Configuration.errorOnAutoCreate())
638          throw new Error("Attempt to auto-create ResearchSubject.status");
639        else if (Configuration.doAutoCreate())
640          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
641      return this.status;
642    }
643
644    public boolean hasStatusElement() { 
645      return this.status != null && !this.status.isEmpty();
646    }
647
648    public boolean hasStatus() { 
649      return this.status != null && !this.status.isEmpty();
650    }
651
652    /**
653     * @param value {@link #status} (The publication state of the resource (not of the subject).). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
654     */
655    public ResearchSubject setStatusElement(Enumeration<PublicationStatus> value) { 
656      this.status = value;
657      return this;
658    }
659
660    /**
661     * @return The publication state of the resource (not of the subject).
662     */
663    public PublicationStatus getStatus() { 
664      return this.status == null ? null : this.status.getValue();
665    }
666
667    /**
668     * @param value The publication state of the resource (not of the subject).
669     */
670    public ResearchSubject setStatus(PublicationStatus value) { 
671        if (this.status == null)
672          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
673        this.status.setValue(value);
674      return this;
675    }
676
677    /**
678     * @return {@link #progress} (The current state (status) of the subject and resons for status change where appropriate.)
679     */
680    public List<ResearchSubjectProgressComponent> getProgress() { 
681      if (this.progress == null)
682        this.progress = new ArrayList<ResearchSubjectProgressComponent>();
683      return this.progress;
684    }
685
686    /**
687     * @return Returns a reference to <code>this</code> for easy method chaining
688     */
689    public ResearchSubject setProgress(List<ResearchSubjectProgressComponent> theProgress) { 
690      this.progress = theProgress;
691      return this;
692    }
693
694    public boolean hasProgress() { 
695      if (this.progress == null)
696        return false;
697      for (ResearchSubjectProgressComponent item : this.progress)
698        if (!item.isEmpty())
699          return true;
700      return false;
701    }
702
703    public ResearchSubjectProgressComponent addProgress() { //3
704      ResearchSubjectProgressComponent t = new ResearchSubjectProgressComponent();
705      if (this.progress == null)
706        this.progress = new ArrayList<ResearchSubjectProgressComponent>();
707      this.progress.add(t);
708      return t;
709    }
710
711    public ResearchSubject addProgress(ResearchSubjectProgressComponent t) { //3
712      if (t == null)
713        return this;
714      if (this.progress == null)
715        this.progress = new ArrayList<ResearchSubjectProgressComponent>();
716      this.progress.add(t);
717      return this;
718    }
719
720    /**
721     * @return The first repetition of repeating field {@link #progress}, creating it if it does not already exist {3}
722     */
723    public ResearchSubjectProgressComponent getProgressFirstRep() { 
724      if (getProgress().isEmpty()) {
725        addProgress();
726      }
727      return getProgress().get(0);
728    }
729
730    /**
731     * @return {@link #period} (The dates the subject began and ended their participation in the study.)
732     */
733    public Period getPeriod() { 
734      if (this.period == null)
735        if (Configuration.errorOnAutoCreate())
736          throw new Error("Attempt to auto-create ResearchSubject.period");
737        else if (Configuration.doAutoCreate())
738          this.period = new Period(); // cc
739      return this.period;
740    }
741
742    public boolean hasPeriod() { 
743      return this.period != null && !this.period.isEmpty();
744    }
745
746    /**
747     * @param value {@link #period} (The dates the subject began and ended their participation in the study.)
748     */
749    public ResearchSubject setPeriod(Period value) { 
750      this.period = value;
751      return this;
752    }
753
754    /**
755     * @return {@link #study} (Reference to the study the subject is participating in.)
756     */
757    public Reference getStudy() { 
758      if (this.study == null)
759        if (Configuration.errorOnAutoCreate())
760          throw new Error("Attempt to auto-create ResearchSubject.study");
761        else if (Configuration.doAutoCreate())
762          this.study = new Reference(); // cc
763      return this.study;
764    }
765
766    public boolean hasStudy() { 
767      return this.study != null && !this.study.isEmpty();
768    }
769
770    /**
771     * @param value {@link #study} (Reference to the study the subject is participating in.)
772     */
773    public ResearchSubject setStudy(Reference value) { 
774      this.study = value;
775      return this;
776    }
777
778    /**
779     * @return {@link #subject} (The record of the person, animal or other entity involved in the study.)
780     */
781    public Reference getSubject() { 
782      if (this.subject == null)
783        if (Configuration.errorOnAutoCreate())
784          throw new Error("Attempt to auto-create ResearchSubject.subject");
785        else if (Configuration.doAutoCreate())
786          this.subject = new Reference(); // cc
787      return this.subject;
788    }
789
790    public boolean hasSubject() { 
791      return this.subject != null && !this.subject.isEmpty();
792    }
793
794    /**
795     * @param value {@link #subject} (The record of the person, animal or other entity involved in the study.)
796     */
797    public ResearchSubject setSubject(Reference value) { 
798      this.subject = value;
799      return this;
800    }
801
802    /**
803     * @return {@link #assignedComparisonGroup} (The name of the arm in the study the subject is expected to follow as part of this study.). This is the underlying object with id, value and extensions. The accessor "getAssignedComparisonGroup" gives direct access to the value
804     */
805    public IdType getAssignedComparisonGroupElement() { 
806      if (this.assignedComparisonGroup == null)
807        if (Configuration.errorOnAutoCreate())
808          throw new Error("Attempt to auto-create ResearchSubject.assignedComparisonGroup");
809        else if (Configuration.doAutoCreate())
810          this.assignedComparisonGroup = new IdType(); // bb
811      return this.assignedComparisonGroup;
812    }
813
814    public boolean hasAssignedComparisonGroupElement() { 
815      return this.assignedComparisonGroup != null && !this.assignedComparisonGroup.isEmpty();
816    }
817
818    public boolean hasAssignedComparisonGroup() { 
819      return this.assignedComparisonGroup != null && !this.assignedComparisonGroup.isEmpty();
820    }
821
822    /**
823     * @param value {@link #assignedComparisonGroup} (The name of the arm in the study the subject is expected to follow as part of this study.). This is the underlying object with id, value and extensions. The accessor "getAssignedComparisonGroup" gives direct access to the value
824     */
825    public ResearchSubject setAssignedComparisonGroupElement(IdType value) { 
826      this.assignedComparisonGroup = value;
827      return this;
828    }
829
830    /**
831     * @return The name of the arm in the study the subject is expected to follow as part of this study.
832     */
833    public String getAssignedComparisonGroup() { 
834      return this.assignedComparisonGroup == null ? null : this.assignedComparisonGroup.getValue();
835    }
836
837    /**
838     * @param value The name of the arm in the study the subject is expected to follow as part of this study.
839     */
840    public ResearchSubject setAssignedComparisonGroup(String value) { 
841      if (Utilities.noString(value))
842        this.assignedComparisonGroup = null;
843      else {
844        if (this.assignedComparisonGroup == null)
845          this.assignedComparisonGroup = new IdType();
846        this.assignedComparisonGroup.setValue(value);
847      }
848      return this;
849    }
850
851    /**
852     * @return {@link #actualComparisonGroup} (The name of the arm in the study the subject actually followed as part of this study.). This is the underlying object with id, value and extensions. The accessor "getActualComparisonGroup" gives direct access to the value
853     */
854    public IdType getActualComparisonGroupElement() { 
855      if (this.actualComparisonGroup == null)
856        if (Configuration.errorOnAutoCreate())
857          throw new Error("Attempt to auto-create ResearchSubject.actualComparisonGroup");
858        else if (Configuration.doAutoCreate())
859          this.actualComparisonGroup = new IdType(); // bb
860      return this.actualComparisonGroup;
861    }
862
863    public boolean hasActualComparisonGroupElement() { 
864      return this.actualComparisonGroup != null && !this.actualComparisonGroup.isEmpty();
865    }
866
867    public boolean hasActualComparisonGroup() { 
868      return this.actualComparisonGroup != null && !this.actualComparisonGroup.isEmpty();
869    }
870
871    /**
872     * @param value {@link #actualComparisonGroup} (The name of the arm in the study the subject actually followed as part of this study.). This is the underlying object with id, value and extensions. The accessor "getActualComparisonGroup" gives direct access to the value
873     */
874    public ResearchSubject setActualComparisonGroupElement(IdType value) { 
875      this.actualComparisonGroup = value;
876      return this;
877    }
878
879    /**
880     * @return The name of the arm in the study the subject actually followed as part of this study.
881     */
882    public String getActualComparisonGroup() { 
883      return this.actualComparisonGroup == null ? null : this.actualComparisonGroup.getValue();
884    }
885
886    /**
887     * @param value The name of the arm in the study the subject actually followed as part of this study.
888     */
889    public ResearchSubject setActualComparisonGroup(String value) { 
890      if (Utilities.noString(value))
891        this.actualComparisonGroup = null;
892      else {
893        if (this.actualComparisonGroup == null)
894          this.actualComparisonGroup = new IdType();
895        this.actualComparisonGroup.setValue(value);
896      }
897      return this;
898    }
899
900    /**
901     * @return {@link #consent} (A record of the patient's informed agreement to participate in the study.)
902     */
903    public List<Reference> getConsent() { 
904      if (this.consent == null)
905        this.consent = new ArrayList<Reference>();
906      return this.consent;
907    }
908
909    /**
910     * @return Returns a reference to <code>this</code> for easy method chaining
911     */
912    public ResearchSubject setConsent(List<Reference> theConsent) { 
913      this.consent = theConsent;
914      return this;
915    }
916
917    public boolean hasConsent() { 
918      if (this.consent == null)
919        return false;
920      for (Reference item : this.consent)
921        if (!item.isEmpty())
922          return true;
923      return false;
924    }
925
926    public Reference addConsent() { //3
927      Reference t = new Reference();
928      if (this.consent == null)
929        this.consent = new ArrayList<Reference>();
930      this.consent.add(t);
931      return t;
932    }
933
934    public ResearchSubject addConsent(Reference t) { //3
935      if (t == null)
936        return this;
937      if (this.consent == null)
938        this.consent = new ArrayList<Reference>();
939      this.consent.add(t);
940      return this;
941    }
942
943    /**
944     * @return The first repetition of repeating field {@link #consent}, creating it if it does not already exist {3}
945     */
946    public Reference getConsentFirstRep() { 
947      if (getConsent().isEmpty()) {
948        addConsent();
949      }
950      return getConsent().get(0);
951    }
952
953      protected void listChildren(List<Property> children) {
954        super.listChildren(children);
955        children.add(new Property("identifier", "Identifier", "Identifiers assigned to this research subject for a study.", 0, java.lang.Integer.MAX_VALUE, identifier));
956        children.add(new Property("status", "code", "The publication state of the resource (not of the subject).", 0, 1, status));
957        children.add(new Property("progress", "", "The current state (status) of the subject and resons for status change where appropriate.", 0, java.lang.Integer.MAX_VALUE, progress));
958        children.add(new Property("period", "Period", "The dates the subject began and ended their participation in the study.", 0, 1, period));
959        children.add(new Property("study", "Reference(ResearchStudy)", "Reference to the study the subject is participating in.", 0, 1, study));
960        children.add(new Property("subject", "Reference(Patient|Group|Specimen|Device|Medication|Substance|BiologicallyDerivedProduct)", "The record of the person, animal or other entity involved in the study.", 0, 1, subject));
961        children.add(new Property("assignedComparisonGroup", "id", "The name of the arm in the study the subject is expected to follow as part of this study.", 0, 1, assignedComparisonGroup));
962        children.add(new Property("actualComparisonGroup", "id", "The name of the arm in the study the subject actually followed as part of this study.", 0, 1, actualComparisonGroup));
963        children.add(new Property("consent", "Reference(Consent)", "A record of the patient's informed agreement to participate in the study.", 0, java.lang.Integer.MAX_VALUE, consent));
964      }
965
966      @Override
967      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
968        switch (_hash) {
969        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Identifiers assigned to this research subject for a study.", 0, java.lang.Integer.MAX_VALUE, identifier);
970        case -892481550: /*status*/  return new Property("status", "code", "The publication state of the resource (not of the subject).", 0, 1, status);
971        case -1001078227: /*progress*/  return new Property("progress", "", "The current state (status) of the subject and resons for status change where appropriate.", 0, java.lang.Integer.MAX_VALUE, progress);
972        case -991726143: /*period*/  return new Property("period", "Period", "The dates the subject began and ended their participation in the study.", 0, 1, period);
973        case 109776329: /*study*/  return new Property("study", "Reference(ResearchStudy)", "Reference to the study the subject is participating in.", 0, 1, study);
974        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group|Specimen|Device|Medication|Substance|BiologicallyDerivedProduct)", "The record of the person, animal or other entity involved in the study.", 0, 1, subject);
975        case 394644552: /*assignedComparisonGroup*/  return new Property("assignedComparisonGroup", "id", "The name of the arm in the study the subject is expected to follow as part of this study.", 0, 1, assignedComparisonGroup);
976        case -676906872: /*actualComparisonGroup*/  return new Property("actualComparisonGroup", "id", "The name of the arm in the study the subject actually followed as part of this study.", 0, 1, actualComparisonGroup);
977        case 951500826: /*consent*/  return new Property("consent", "Reference(Consent)", "A record of the patient's informed agreement to participate in the study.", 0, java.lang.Integer.MAX_VALUE, consent);
978        default: return super.getNamedProperty(_hash, _name, _checkValid);
979        }
980
981      }
982
983      @Override
984      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
985        switch (hash) {
986        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
987        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
988        case -1001078227: /*progress*/ return this.progress == null ? new Base[0] : this.progress.toArray(new Base[this.progress.size()]); // ResearchSubjectProgressComponent
989        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
990        case 109776329: /*study*/ return this.study == null ? new Base[0] : new Base[] {this.study}; // Reference
991        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
992        case 394644552: /*assignedComparisonGroup*/ return this.assignedComparisonGroup == null ? new Base[0] : new Base[] {this.assignedComparisonGroup}; // IdType
993        case -676906872: /*actualComparisonGroup*/ return this.actualComparisonGroup == null ? new Base[0] : new Base[] {this.actualComparisonGroup}; // IdType
994        case 951500826: /*consent*/ return this.consent == null ? new Base[0] : this.consent.toArray(new Base[this.consent.size()]); // Reference
995        default: return super.getProperty(hash, name, checkValid);
996        }
997
998      }
999
1000      @Override
1001      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1002        switch (hash) {
1003        case -1618432855: // identifier
1004          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1005          return value;
1006        case -892481550: // status
1007          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1008          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
1009          return value;
1010        case -1001078227: // progress
1011          this.getProgress().add((ResearchSubjectProgressComponent) value); // ResearchSubjectProgressComponent
1012          return value;
1013        case -991726143: // period
1014          this.period = TypeConvertor.castToPeriod(value); // Period
1015          return value;
1016        case 109776329: // study
1017          this.study = TypeConvertor.castToReference(value); // Reference
1018          return value;
1019        case -1867885268: // subject
1020          this.subject = TypeConvertor.castToReference(value); // Reference
1021          return value;
1022        case 394644552: // assignedComparisonGroup
1023          this.assignedComparisonGroup = TypeConvertor.castToId(value); // IdType
1024          return value;
1025        case -676906872: // actualComparisonGroup
1026          this.actualComparisonGroup = TypeConvertor.castToId(value); // IdType
1027          return value;
1028        case 951500826: // consent
1029          this.getConsent().add(TypeConvertor.castToReference(value)); // Reference
1030          return value;
1031        default: return super.setProperty(hash, name, value);
1032        }
1033
1034      }
1035
1036      @Override
1037      public Base setProperty(String name, Base value) throws FHIRException {
1038        if (name.equals("identifier")) {
1039          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1040        } else if (name.equals("status")) {
1041          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1042          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
1043        } else if (name.equals("progress")) {
1044          this.getProgress().add((ResearchSubjectProgressComponent) value);
1045        } else if (name.equals("period")) {
1046          this.period = TypeConvertor.castToPeriod(value); // Period
1047        } else if (name.equals("study")) {
1048          this.study = TypeConvertor.castToReference(value); // Reference
1049        } else if (name.equals("subject")) {
1050          this.subject = TypeConvertor.castToReference(value); // Reference
1051        } else if (name.equals("assignedComparisonGroup")) {
1052          this.assignedComparisonGroup = TypeConvertor.castToId(value); // IdType
1053        } else if (name.equals("actualComparisonGroup")) {
1054          this.actualComparisonGroup = TypeConvertor.castToId(value); // IdType
1055        } else if (name.equals("consent")) {
1056          this.getConsent().add(TypeConvertor.castToReference(value));
1057        } else
1058          return super.setProperty(name, value);
1059        return value;
1060      }
1061
1062      @Override
1063      public Base makeProperty(int hash, String name) throws FHIRException {
1064        switch (hash) {
1065        case -1618432855:  return addIdentifier(); 
1066        case -892481550:  return getStatusElement();
1067        case -1001078227:  return addProgress(); 
1068        case -991726143:  return getPeriod();
1069        case 109776329:  return getStudy();
1070        case -1867885268:  return getSubject();
1071        case 394644552:  return getAssignedComparisonGroupElement();
1072        case -676906872:  return getActualComparisonGroupElement();
1073        case 951500826:  return addConsent(); 
1074        default: return super.makeProperty(hash, name);
1075        }
1076
1077      }
1078
1079      @Override
1080      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1081        switch (hash) {
1082        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1083        case -892481550: /*status*/ return new String[] {"code"};
1084        case -1001078227: /*progress*/ return new String[] {};
1085        case -991726143: /*period*/ return new String[] {"Period"};
1086        case 109776329: /*study*/ return new String[] {"Reference"};
1087        case -1867885268: /*subject*/ return new String[] {"Reference"};
1088        case 394644552: /*assignedComparisonGroup*/ return new String[] {"id"};
1089        case -676906872: /*actualComparisonGroup*/ return new String[] {"id"};
1090        case 951500826: /*consent*/ return new String[] {"Reference"};
1091        default: return super.getTypesForProperty(hash, name);
1092        }
1093
1094      }
1095
1096      @Override
1097      public Base addChild(String name) throws FHIRException {
1098        if (name.equals("identifier")) {
1099          return addIdentifier();
1100        }
1101        else if (name.equals("status")) {
1102          throw new FHIRException("Cannot call addChild on a singleton property ResearchSubject.status");
1103        }
1104        else if (name.equals("progress")) {
1105          return addProgress();
1106        }
1107        else if (name.equals("period")) {
1108          this.period = new Period();
1109          return this.period;
1110        }
1111        else if (name.equals("study")) {
1112          this.study = new Reference();
1113          return this.study;
1114        }
1115        else if (name.equals("subject")) {
1116          this.subject = new Reference();
1117          return this.subject;
1118        }
1119        else if (name.equals("assignedComparisonGroup")) {
1120          throw new FHIRException("Cannot call addChild on a singleton property ResearchSubject.assignedComparisonGroup");
1121        }
1122        else if (name.equals("actualComparisonGroup")) {
1123          throw new FHIRException("Cannot call addChild on a singleton property ResearchSubject.actualComparisonGroup");
1124        }
1125        else if (name.equals("consent")) {
1126          return addConsent();
1127        }
1128        else
1129          return super.addChild(name);
1130      }
1131
1132  public String fhirType() {
1133    return "ResearchSubject";
1134
1135  }
1136
1137      public ResearchSubject copy() {
1138        ResearchSubject dst = new ResearchSubject();
1139        copyValues(dst);
1140        return dst;
1141      }
1142
1143      public void copyValues(ResearchSubject dst) {
1144        super.copyValues(dst);
1145        if (identifier != null) {
1146          dst.identifier = new ArrayList<Identifier>();
1147          for (Identifier i : identifier)
1148            dst.identifier.add(i.copy());
1149        };
1150        dst.status = status == null ? null : status.copy();
1151        if (progress != null) {
1152          dst.progress = new ArrayList<ResearchSubjectProgressComponent>();
1153          for (ResearchSubjectProgressComponent i : progress)
1154            dst.progress.add(i.copy());
1155        };
1156        dst.period = period == null ? null : period.copy();
1157        dst.study = study == null ? null : study.copy();
1158        dst.subject = subject == null ? null : subject.copy();
1159        dst.assignedComparisonGroup = assignedComparisonGroup == null ? null : assignedComparisonGroup.copy();
1160        dst.actualComparisonGroup = actualComparisonGroup == null ? null : actualComparisonGroup.copy();
1161        if (consent != null) {
1162          dst.consent = new ArrayList<Reference>();
1163          for (Reference i : consent)
1164            dst.consent.add(i.copy());
1165        };
1166      }
1167
1168      protected ResearchSubject typedCopy() {
1169        return copy();
1170      }
1171
1172      @Override
1173      public boolean equalsDeep(Base other_) {
1174        if (!super.equalsDeep(other_))
1175          return false;
1176        if (!(other_ instanceof ResearchSubject))
1177          return false;
1178        ResearchSubject o = (ResearchSubject) other_;
1179        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(progress, o.progress, true)
1180           && compareDeep(period, o.period, true) && compareDeep(study, o.study, true) && compareDeep(subject, o.subject, true)
1181           && compareDeep(assignedComparisonGroup, o.assignedComparisonGroup, true) && compareDeep(actualComparisonGroup, o.actualComparisonGroup, true)
1182           && compareDeep(consent, o.consent, true);
1183      }
1184
1185      @Override
1186      public boolean equalsShallow(Base other_) {
1187        if (!super.equalsShallow(other_))
1188          return false;
1189        if (!(other_ instanceof ResearchSubject))
1190          return false;
1191        ResearchSubject o = (ResearchSubject) other_;
1192        return compareValues(status, o.status, true) && compareValues(assignedComparisonGroup, o.assignedComparisonGroup, true)
1193           && compareValues(actualComparisonGroup, o.actualComparisonGroup, true);
1194      }
1195
1196      public boolean isEmpty() {
1197        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, progress
1198          , period, study, subject, assignedComparisonGroup, actualComparisonGroup, consent
1199          );
1200      }
1201
1202  @Override
1203  public ResourceType getResourceType() {
1204    return ResourceType.ResearchSubject;
1205   }
1206
1207 /**
1208   * Search parameter: <b>status</b>
1209   * <p>
1210   * Description: <b>draft | active | retired | unknown</b><br>
1211   * Type: <b>token</b><br>
1212   * Path: <b>ResearchSubject.status</b><br>
1213   * </p>
1214   */
1215  @SearchParamDefinition(name="status", path="ResearchSubject.status", description="draft | active | retired | unknown", type="token" )
1216  public static final String SP_STATUS = "status";
1217 /**
1218   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1219   * <p>
1220   * Description: <b>draft | active | retired | unknown</b><br>
1221   * Type: <b>token</b><br>
1222   * Path: <b>ResearchSubject.status</b><br>
1223   * </p>
1224   */
1225  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1226
1227 /**
1228   * Search parameter: <b>study</b>
1229   * <p>
1230   * Description: <b>Study subject is part of</b><br>
1231   * Type: <b>reference</b><br>
1232   * Path: <b>ResearchSubject.study</b><br>
1233   * </p>
1234   */
1235  @SearchParamDefinition(name="study", path="ResearchSubject.study", description="Study subject is part of", type="reference", target={ResearchStudy.class } )
1236  public static final String SP_STUDY = "study";
1237 /**
1238   * <b>Fluent Client</b> search parameter constant for <b>study</b>
1239   * <p>
1240   * Description: <b>Study subject is part of</b><br>
1241   * Type: <b>reference</b><br>
1242   * Path: <b>ResearchSubject.study</b><br>
1243   * </p>
1244   */
1245  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam STUDY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_STUDY);
1246
1247/**
1248   * Constant for fluent queries to be used to add include statements. Specifies
1249   * the path value of "<b>ResearchSubject:study</b>".
1250   */
1251  public static final ca.uhn.fhir.model.api.Include INCLUDE_STUDY = new ca.uhn.fhir.model.api.Include("ResearchSubject:study").toLocked();
1252
1253 /**
1254   * Search parameter: <b>subject</b>
1255   * <p>
1256   * Description: <b>Who or what is part of study</b><br>
1257   * Type: <b>reference</b><br>
1258   * Path: <b>ResearchSubject.subject</b><br>
1259   * </p>
1260   */
1261  @SearchParamDefinition(name="subject", path="ResearchSubject.subject", description="Who or what is part of study", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={BiologicallyDerivedProduct.class, Device.class, Group.class, Medication.class, Patient.class, Specimen.class, Substance.class } )
1262  public static final String SP_SUBJECT = "subject";
1263 /**
1264   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
1265   * <p>
1266   * Description: <b>Who or what is part of study</b><br>
1267   * Type: <b>reference</b><br>
1268   * Path: <b>ResearchSubject.subject</b><br>
1269   * </p>
1270   */
1271  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
1272
1273/**
1274   * Constant for fluent queries to be used to add include statements. Specifies
1275   * the path value of "<b>ResearchSubject:subject</b>".
1276   */
1277  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("ResearchSubject:subject").toLocked();
1278
1279 /**
1280   * Search parameter: <b>subject_state</b>
1281   * <p>
1282   * Description: <b>candidate | eligible | follow-up | ineligible | not-registered | off-study | on-study | on-study-intervention | on-study-observation | pending-on-study | potential-candidate | screening | withdrawn</b><br>
1283   * Type: <b>token</b><br>
1284   * Path: <b>ResearchSubject.progress.subjectState</b><br>
1285   * </p>
1286   */
1287  @SearchParamDefinition(name="subject_state", path="ResearchSubject.progress.subjectState", description="candidate | eligible | follow-up | ineligible | not-registered | off-study | on-study | on-study-intervention | on-study-observation | pending-on-study | potential-candidate | screening | withdrawn", type="token" )
1288  public static final String SP_SUBJECTSTATE = "subject_state";
1289 /**
1290   * <b>Fluent Client</b> search parameter constant for <b>subject_state</b>
1291   * <p>
1292   * Description: <b>candidate | eligible | follow-up | ineligible | not-registered | off-study | on-study | on-study-intervention | on-study-observation | pending-on-study | potential-candidate | screening | withdrawn</b><br>
1293   * Type: <b>token</b><br>
1294   * Path: <b>ResearchSubject.progress.subjectState</b><br>
1295   * </p>
1296   */
1297  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SUBJECTSTATE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SUBJECTSTATE);
1298
1299 /**
1300   * Search parameter: <b>date</b>
1301   * <p>
1302   * Description: <b>Multiple Resources: 
1303
1304* [AdverseEvent](adverseevent.html): When the event occurred
1305* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
1306* [Appointment](appointment.html): Appointment date/time.
1307* [AuditEvent](auditevent.html): Time when the event was recorded
1308* [CarePlan](careplan.html): Time period plan covers
1309* [CareTeam](careteam.html): A date within the coverage time period.
1310* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
1311* [Composition](composition.html): Composition editing time
1312* [Consent](consent.html): When consent was agreed to
1313* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
1314* [DocumentReference](documentreference.html): When this document reference was created
1315* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
1316* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
1317* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
1318* [Flag](flag.html): Time period when flag is active
1319* [Immunization](immunization.html): Vaccination  (non)-Administration Date
1320* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
1321* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
1322* [Invoice](invoice.html): Invoice date / posting date
1323* [List](list.html): When the list was prepared
1324* [MeasureReport](measurereport.html): The date of the measure report
1325* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
1326* [Observation](observation.html): Clinically relevant time/time-period for observation
1327* [Procedure](procedure.html): When the procedure occurred or is occurring
1328* [ResearchSubject](researchsubject.html): Start and end of participation
1329* [RiskAssessment](riskassessment.html): When was assessment made?
1330* [SupplyRequest](supplyrequest.html): When the request was made
1331</b><br>
1332   * Type: <b>date</b><br>
1333   * 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>
1334   * </p>
1335   */
1336  @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" )
1337  public static final String SP_DATE = "date";
1338 /**
1339   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1340   * <p>
1341   * Description: <b>Multiple Resources: 
1342
1343* [AdverseEvent](adverseevent.html): When the event occurred
1344* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
1345* [Appointment](appointment.html): Appointment date/time.
1346* [AuditEvent](auditevent.html): Time when the event was recorded
1347* [CarePlan](careplan.html): Time period plan covers
1348* [CareTeam](careteam.html): A date within the coverage time period.
1349* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
1350* [Composition](composition.html): Composition editing time
1351* [Consent](consent.html): When consent was agreed to
1352* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
1353* [DocumentReference](documentreference.html): When this document reference was created
1354* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
1355* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
1356* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
1357* [Flag](flag.html): Time period when flag is active
1358* [Immunization](immunization.html): Vaccination  (non)-Administration Date
1359* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
1360* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
1361* [Invoice](invoice.html): Invoice date / posting date
1362* [List](list.html): When the list was prepared
1363* [MeasureReport](measurereport.html): The date of the measure report
1364* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
1365* [Observation](observation.html): Clinically relevant time/time-period for observation
1366* [Procedure](procedure.html): When the procedure occurred or is occurring
1367* [ResearchSubject](researchsubject.html): Start and end of participation
1368* [RiskAssessment](riskassessment.html): When was assessment made?
1369* [SupplyRequest](supplyrequest.html): When the request was made
1370</b><br>
1371   * Type: <b>date</b><br>
1372   * 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>
1373   * </p>
1374   */
1375  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1376
1377 /**
1378   * Search parameter: <b>identifier</b>
1379   * <p>
1380   * Description: <b>Multiple Resources: 
1381
1382* [Account](account.html): Account number
1383* [AdverseEvent](adverseevent.html): Business identifier for the event
1384* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1385* [Appointment](appointment.html): An Identifier of the Appointment
1386* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
1387* [Basic](basic.html): Business identifier
1388* [BodyStructure](bodystructure.html): Bodystructure identifier
1389* [CarePlan](careplan.html): External Ids for this plan
1390* [CareTeam](careteam.html): External Ids for this team
1391* [ChargeItem](chargeitem.html): Business Identifier for item
1392* [Claim](claim.html): The primary identifier of the financial resource
1393* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
1394* [ClinicalImpression](clinicalimpression.html): Business identifier
1395* [Communication](communication.html): Unique identifier
1396* [CommunicationRequest](communicationrequest.html): Unique identifier
1397* [Composition](composition.html): Version-independent identifier for the Composition
1398* [Condition](condition.html): A unique identifier of the condition record
1399* [Consent](consent.html): Identifier for this record (external references)
1400* [Contract](contract.html): The identity of the contract
1401* [Coverage](coverage.html): The primary identifier of the insured and the coverage
1402* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
1403* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
1404* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1405* [DeviceRequest](devicerequest.html): Business identifier for request/order
1406* [DeviceUsage](deviceusage.html): Search by identifier
1407* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1408* [DocumentReference](documentreference.html): Identifier of the attachment binary
1409* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1410* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
1411* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1412* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
1413* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1414* [Flag](flag.html): Business identifier
1415* [Goal](goal.html): External Ids for this goal
1416* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
1417* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
1418* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
1419* [Immunization](immunization.html): Business identifier
1420* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
1421* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
1422* [Invoice](invoice.html): Business Identifier for item
1423* [List](list.html): Business identifier
1424* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
1425* [Medication](medication.html): Returns medications with this external identifier
1426* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1427* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1428* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1429* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
1430* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
1431* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
1432* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
1433* [Observation](observation.html): The unique id for a particular observation
1434* [Person](person.html): A person Identifier
1435* [Procedure](procedure.html): A unique identifier for a procedure
1436* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
1437* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
1438* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
1439* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
1440* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1441* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1442* [Specimen](specimen.html): The unique identifier associated with the specimen
1443* [SupplyDelivery](supplydelivery.html): External identifier
1444* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1445* [Task](task.html): Search for a task instance by its business identifier
1446* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1447</b><br>
1448   * Type: <b>token</b><br>
1449   * 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>
1450   * </p>
1451   */
1452  @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" )
1453  public static final String SP_IDENTIFIER = "identifier";
1454 /**
1455   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1456   * <p>
1457   * Description: <b>Multiple Resources: 
1458
1459* [Account](account.html): Account number
1460* [AdverseEvent](adverseevent.html): Business identifier for the event
1461* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1462* [Appointment](appointment.html): An Identifier of the Appointment
1463* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
1464* [Basic](basic.html): Business identifier
1465* [BodyStructure](bodystructure.html): Bodystructure identifier
1466* [CarePlan](careplan.html): External Ids for this plan
1467* [CareTeam](careteam.html): External Ids for this team
1468* [ChargeItem](chargeitem.html): Business Identifier for item
1469* [Claim](claim.html): The primary identifier of the financial resource
1470* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
1471* [ClinicalImpression](clinicalimpression.html): Business identifier
1472* [Communication](communication.html): Unique identifier
1473* [CommunicationRequest](communicationrequest.html): Unique identifier
1474* [Composition](composition.html): Version-independent identifier for the Composition
1475* [Condition](condition.html): A unique identifier of the condition record
1476* [Consent](consent.html): Identifier for this record (external references)
1477* [Contract](contract.html): The identity of the contract
1478* [Coverage](coverage.html): The primary identifier of the insured and the coverage
1479* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
1480* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
1481* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1482* [DeviceRequest](devicerequest.html): Business identifier for request/order
1483* [DeviceUsage](deviceusage.html): Search by identifier
1484* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1485* [DocumentReference](documentreference.html): Identifier of the attachment binary
1486* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1487* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
1488* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1489* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
1490* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1491* [Flag](flag.html): Business identifier
1492* [Goal](goal.html): External Ids for this goal
1493* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
1494* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
1495* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
1496* [Immunization](immunization.html): Business identifier
1497* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
1498* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
1499* [Invoice](invoice.html): Business Identifier for item
1500* [List](list.html): Business identifier
1501* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
1502* [Medication](medication.html): Returns medications with this external identifier
1503* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1504* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1505* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1506* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
1507* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
1508* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
1509* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
1510* [Observation](observation.html): The unique id for a particular observation
1511* [Person](person.html): A person Identifier
1512* [Procedure](procedure.html): A unique identifier for a procedure
1513* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
1514* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
1515* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
1516* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
1517* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1518* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1519* [Specimen](specimen.html): The unique identifier associated with the specimen
1520* [SupplyDelivery](supplydelivery.html): External identifier
1521* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1522* [Task](task.html): Search for a task instance by its business identifier
1523* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1524</b><br>
1525   * Type: <b>token</b><br>
1526   * 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>
1527   * </p>
1528   */
1529  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1530
1531 /**
1532   * Search parameter: <b>patient</b>
1533   * <p>
1534   * Description: <b>Multiple Resources: 
1535
1536* [Account](account.html): The entity that caused the expenses
1537* [AdverseEvent](adverseevent.html): Subject impacted by event
1538* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
1539* [Appointment](appointment.html): One of the individuals of the appointment is this patient
1540* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
1541* [AuditEvent](auditevent.html): Where the activity involved patient data
1542* [Basic](basic.html): Identifies the focus of this resource
1543* [BodyStructure](bodystructure.html): Who this is about
1544* [CarePlan](careplan.html): Who the care plan is for
1545* [CareTeam](careteam.html): Who care team is for
1546* [ChargeItem](chargeitem.html): Individual service was done for/to
1547* [Claim](claim.html): Patient receiving the products or services
1548* [ClaimResponse](claimresponse.html): The subject of care
1549* [ClinicalImpression](clinicalimpression.html): Patient assessed
1550* [Communication](communication.html): Focus of message
1551* [CommunicationRequest](communicationrequest.html): Focus of message
1552* [Composition](composition.html): Who and/or what the composition is about
1553* [Condition](condition.html): Who has the condition?
1554* [Consent](consent.html): Who the consent applies to
1555* [Contract](contract.html): The identity of the subject of the contract (if a patient)
1556* [Coverage](coverage.html): Retrieve coverages for a patient
1557* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
1558* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
1559* [DetectedIssue](detectedissue.html): Associated patient
1560* [DeviceRequest](devicerequest.html): Individual the service is ordered for
1561* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
1562* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
1563* [DocumentReference](documentreference.html): Who/what is the subject of the document
1564* [Encounter](encounter.html): The patient present at the encounter
1565* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
1566* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
1567* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
1568* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
1569* [Flag](flag.html): The identity of a subject to list flags for
1570* [Goal](goal.html): Who this goal is intended for
1571* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
1572* [ImagingSelection](imagingselection.html): Who the study is about
1573* [ImagingStudy](imagingstudy.html): Who the study is about
1574* [Immunization](immunization.html): The patient for the vaccination record
1575* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
1576* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
1577* [Invoice](invoice.html): Recipient(s) of goods and services
1578* [List](list.html): If all resources have the same subject
1579* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
1580* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
1581* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
1582* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
1583* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
1584* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
1585* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
1586* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
1587* [Observation](observation.html): The subject that the observation is about (if patient)
1588* [Person](person.html): The Person links to this Patient
1589* [Procedure](procedure.html): Search by subject - a patient
1590* [Provenance](provenance.html): Where the activity involved patient data
1591* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
1592* [RelatedPerson](relatedperson.html): The patient this related person is related to
1593* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
1594* [ResearchSubject](researchsubject.html): Who or what is part of study
1595* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
1596* [ServiceRequest](servicerequest.html): Search by subject - a patient
1597* [Specimen](specimen.html): The patient the specimen comes from
1598* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
1599* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
1600* [Task](task.html): Search by patient
1601* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
1602</b><br>
1603   * Type: <b>reference</b><br>
1604   * 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>
1605   * </p>
1606   */
1607  @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", target={Patient.class } )
1608  public static final String SP_PATIENT = "patient";
1609 /**
1610   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1611   * <p>
1612   * Description: <b>Multiple Resources: 
1613
1614* [Account](account.html): The entity that caused the expenses
1615* [AdverseEvent](adverseevent.html): Subject impacted by event
1616* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
1617* [Appointment](appointment.html): One of the individuals of the appointment is this patient
1618* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
1619* [AuditEvent](auditevent.html): Where the activity involved patient data
1620* [Basic](basic.html): Identifies the focus of this resource
1621* [BodyStructure](bodystructure.html): Who this is about
1622* [CarePlan](careplan.html): Who the care plan is for
1623* [CareTeam](careteam.html): Who care team is for
1624* [ChargeItem](chargeitem.html): Individual service was done for/to
1625* [Claim](claim.html): Patient receiving the products or services
1626* [ClaimResponse](claimresponse.html): The subject of care
1627* [ClinicalImpression](clinicalimpression.html): Patient assessed
1628* [Communication](communication.html): Focus of message
1629* [CommunicationRequest](communicationrequest.html): Focus of message
1630* [Composition](composition.html): Who and/or what the composition is about
1631* [Condition](condition.html): Who has the condition?
1632* [Consent](consent.html): Who the consent applies to
1633* [Contract](contract.html): The identity of the subject of the contract (if a patient)
1634* [Coverage](coverage.html): Retrieve coverages for a patient
1635* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
1636* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
1637* [DetectedIssue](detectedissue.html): Associated patient
1638* [DeviceRequest](devicerequest.html): Individual the service is ordered for
1639* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
1640* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
1641* [DocumentReference](documentreference.html): Who/what is the subject of the document
1642* [Encounter](encounter.html): The patient present at the encounter
1643* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
1644* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
1645* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
1646* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
1647* [Flag](flag.html): The identity of a subject to list flags for
1648* [Goal](goal.html): Who this goal is intended for
1649* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
1650* [ImagingSelection](imagingselection.html): Who the study is about
1651* [ImagingStudy](imagingstudy.html): Who the study is about
1652* [Immunization](immunization.html): The patient for the vaccination record
1653* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
1654* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
1655* [Invoice](invoice.html): Recipient(s) of goods and services
1656* [List](list.html): If all resources have the same subject
1657* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
1658* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
1659* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
1660* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
1661* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
1662* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
1663* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
1664* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
1665* [Observation](observation.html): The subject that the observation is about (if patient)
1666* [Person](person.html): The Person links to this Patient
1667* [Procedure](procedure.html): Search by subject - a patient
1668* [Provenance](provenance.html): Where the activity involved patient data
1669* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
1670* [RelatedPerson](relatedperson.html): The patient this related person is related to
1671* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
1672* [ResearchSubject](researchsubject.html): Who or what is part of study
1673* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
1674* [ServiceRequest](servicerequest.html): Search by subject - a patient
1675* [Specimen](specimen.html): The patient the specimen comes from
1676* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
1677* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
1678* [Task](task.html): Search by patient
1679* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
1680</b><br>
1681   * Type: <b>reference</b><br>
1682   * 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>
1683   * </p>
1684   */
1685  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1686
1687/**
1688   * Constant for fluent queries to be used to add include statements. Specifies
1689   * the path value of "<b>ResearchSubject:patient</b>".
1690   */
1691  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ResearchSubject:patient").toLocked();
1692
1693
1694}
1695