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 * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.
052 */
053@ResourceDef(name="ImagingStudy", profile="http://hl7.org/fhir/StructureDefinition/ImagingStudy")
054public class ImagingStudy extends DomainResource {
055
056    public enum ImagingStudyStatus {
057        /**
058         * The existence of the imaging study is registered, but there is nothing yet available.
059         */
060        REGISTERED, 
061        /**
062         * At least one instance has been associated with this imaging study.
063         */
064        AVAILABLE, 
065        /**
066         * The imaging study is unavailable because the imaging study was not started or not completed (also sometimes called \"aborted\").
067         */
068        CANCELLED, 
069        /**
070         * The imaging study has been withdrawn following a previous final release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".).
071         */
072        ENTEREDINERROR, 
073        /**
074         * The system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one.
075         */
076        UNKNOWN, 
077        /**
078         * added to help the parsers with the generic types
079         */
080        NULL;
081        public static ImagingStudyStatus fromCode(String codeString) throws FHIRException {
082            if (codeString == null || "".equals(codeString))
083                return null;
084        if ("registered".equals(codeString))
085          return REGISTERED;
086        if ("available".equals(codeString))
087          return AVAILABLE;
088        if ("cancelled".equals(codeString))
089          return CANCELLED;
090        if ("entered-in-error".equals(codeString))
091          return ENTEREDINERROR;
092        if ("unknown".equals(codeString))
093          return UNKNOWN;
094        if (Configuration.isAcceptInvalidEnums())
095          return null;
096        else
097          throw new FHIRException("Unknown ImagingStudyStatus code '"+codeString+"'");
098        }
099        public String toCode() {
100          switch (this) {
101            case REGISTERED: return "registered";
102            case AVAILABLE: return "available";
103            case CANCELLED: return "cancelled";
104            case ENTEREDINERROR: return "entered-in-error";
105            case UNKNOWN: return "unknown";
106            case NULL: return null;
107            default: return "?";
108          }
109        }
110        public String getSystem() {
111          switch (this) {
112            case REGISTERED: return "http://hl7.org/fhir/imagingstudy-status";
113            case AVAILABLE: return "http://hl7.org/fhir/imagingstudy-status";
114            case CANCELLED: return "http://hl7.org/fhir/imagingstudy-status";
115            case ENTEREDINERROR: return "http://hl7.org/fhir/imagingstudy-status";
116            case UNKNOWN: return "http://hl7.org/fhir/imagingstudy-status";
117            case NULL: return null;
118            default: return "?";
119          }
120        }
121        public String getDefinition() {
122          switch (this) {
123            case REGISTERED: return "The existence of the imaging study is registered, but there is nothing yet available.";
124            case AVAILABLE: return "At least one instance has been associated with this imaging study.";
125            case CANCELLED: return "The imaging study is unavailable because the imaging study was not started or not completed (also sometimes called \"aborted\").";
126            case ENTEREDINERROR: return "The imaging study has been withdrawn following a previous final release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".).";
127            case UNKNOWN: return "The system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one.";
128            case NULL: return null;
129            default: return "?";
130          }
131        }
132        public String getDisplay() {
133          switch (this) {
134            case REGISTERED: return "Registered";
135            case AVAILABLE: return "Available";
136            case CANCELLED: return "Cancelled";
137            case ENTEREDINERROR: return "Entered in Error";
138            case UNKNOWN: return "Unknown";
139            case NULL: return null;
140            default: return "?";
141          }
142        }
143    }
144
145  public static class ImagingStudyStatusEnumFactory implements EnumFactory<ImagingStudyStatus> {
146    public ImagingStudyStatus fromCode(String codeString) throws IllegalArgumentException {
147      if (codeString == null || "".equals(codeString))
148            if (codeString == null || "".equals(codeString))
149                return null;
150        if ("registered".equals(codeString))
151          return ImagingStudyStatus.REGISTERED;
152        if ("available".equals(codeString))
153          return ImagingStudyStatus.AVAILABLE;
154        if ("cancelled".equals(codeString))
155          return ImagingStudyStatus.CANCELLED;
156        if ("entered-in-error".equals(codeString))
157          return ImagingStudyStatus.ENTEREDINERROR;
158        if ("unknown".equals(codeString))
159          return ImagingStudyStatus.UNKNOWN;
160        throw new IllegalArgumentException("Unknown ImagingStudyStatus code '"+codeString+"'");
161        }
162        public Enumeration<ImagingStudyStatus> fromType(PrimitiveType<?> code) throws FHIRException {
163          if (code == null)
164            return null;
165          if (code.isEmpty())
166            return new Enumeration<ImagingStudyStatus>(this, ImagingStudyStatus.NULL, code);
167          String codeString = ((PrimitiveType) code).asStringValue();
168          if (codeString == null || "".equals(codeString))
169            return new Enumeration<ImagingStudyStatus>(this, ImagingStudyStatus.NULL, code);
170        if ("registered".equals(codeString))
171          return new Enumeration<ImagingStudyStatus>(this, ImagingStudyStatus.REGISTERED, code);
172        if ("available".equals(codeString))
173          return new Enumeration<ImagingStudyStatus>(this, ImagingStudyStatus.AVAILABLE, code);
174        if ("cancelled".equals(codeString))
175          return new Enumeration<ImagingStudyStatus>(this, ImagingStudyStatus.CANCELLED, code);
176        if ("entered-in-error".equals(codeString))
177          return new Enumeration<ImagingStudyStatus>(this, ImagingStudyStatus.ENTEREDINERROR, code);
178        if ("unknown".equals(codeString))
179          return new Enumeration<ImagingStudyStatus>(this, ImagingStudyStatus.UNKNOWN, code);
180        throw new FHIRException("Unknown ImagingStudyStatus code '"+codeString+"'");
181        }
182    public String toCode(ImagingStudyStatus code) {
183      if (code == ImagingStudyStatus.REGISTERED)
184        return "registered";
185      if (code == ImagingStudyStatus.AVAILABLE)
186        return "available";
187      if (code == ImagingStudyStatus.CANCELLED)
188        return "cancelled";
189      if (code == ImagingStudyStatus.ENTEREDINERROR)
190        return "entered-in-error";
191      if (code == ImagingStudyStatus.UNKNOWN)
192        return "unknown";
193      return "?";
194      }
195    public String toSystem(ImagingStudyStatus code) {
196      return code.getSystem();
197      }
198    }
199
200    @Block()
201    public static class ImagingStudySeriesComponent extends BackboneElement implements IBaseBackboneElement {
202        /**
203         * The DICOM Series Instance UID for the series.
204         */
205        @Child(name = "uid", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=true)
206        @Description(shortDefinition="DICOM Series Instance UID for the series", formalDefinition="The DICOM Series Instance UID for the series." )
207        protected IdType uid;
208
209        /**
210         * The numeric identifier of this series in the study.
211         */
212        @Child(name = "number", type = {UnsignedIntType.class}, order=2, min=0, max=1, modifier=false, summary=true)
213        @Description(shortDefinition="Numeric identifier of this series", formalDefinition="The numeric identifier of this series in the study." )
214        protected UnsignedIntType number;
215
216        /**
217         * The distinct modality for this series. This may include both acquisition and non-acquisition modalities.
218         */
219        @Child(name = "modality", type = {CodeableConcept.class}, order=3, min=1, max=1, modifier=false, summary=true)
220        @Description(shortDefinition="The modality used for this series", formalDefinition="The distinct modality for this series. This may include both acquisition and non-acquisition modalities." )
221        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_33.html")
222        protected CodeableConcept modality;
223
224        /**
225         * A description of the series.
226         */
227        @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
228        @Description(shortDefinition="A short human readable summary of the series", formalDefinition="A description of the series." )
229        protected StringType description;
230
231        /**
232         * Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.
233         */
234        @Child(name = "numberOfInstances", type = {UnsignedIntType.class}, order=5, min=0, max=1, modifier=false, summary=true)
235        @Description(shortDefinition="Number of Series Related Instances", formalDefinition="Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present." )
236        protected UnsignedIntType numberOfInstances;
237
238        /**
239         * The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType.
240         */
241        @Child(name = "endpoint", type = {Endpoint.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
242        @Description(shortDefinition="Series access endpoint", formalDefinition="The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType." )
243        protected List<Reference> endpoint;
244
245        /**
246         * The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.
247         */
248        @Child(name = "bodySite", type = {CodeableReference.class}, order=7, min=0, max=1, modifier=false, summary=true)
249        @Description(shortDefinition="Body part examined", formalDefinition="The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality." )
250        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site")
251        protected CodeableReference bodySite;
252
253        /**
254         * The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.
255         */
256        @Child(name = "laterality", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=true)
257        @Description(shortDefinition="Body part laterality", formalDefinition="The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite." )
258        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_244.html")
259        protected CodeableConcept laterality;
260
261        /**
262         * The specimen imaged, e.g., for whole slide imaging of a biopsy.
263         */
264        @Child(name = "specimen", type = {Specimen.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
265        @Description(shortDefinition="Specimen imaged", formalDefinition="The specimen imaged, e.g., for whole slide imaging of a biopsy." )
266        protected List<Reference> specimen;
267
268        /**
269         * The date and time the series was started.
270         */
271        @Child(name = "started", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=true)
272        @Description(shortDefinition="When the series started", formalDefinition="The date and time the series was started." )
273        protected DateTimeType started;
274
275        /**
276         * Indicates who or what performed the series and how they were involved.
277         */
278        @Child(name = "performer", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
279        @Description(shortDefinition="Who performed the series", formalDefinition="Indicates who or what performed the series and how they were involved." )
280        protected List<ImagingStudySeriesPerformerComponent> performer;
281
282        /**
283         * A single SOP instance within the series, e.g. an image, or presentation state.
284         */
285        @Child(name = "instance", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
286        @Description(shortDefinition="A single SOP instance from the series", formalDefinition="A single SOP instance within the series, e.g. an image, or presentation state." )
287        protected List<ImagingStudySeriesInstanceComponent> instance;
288
289        private static final long serialVersionUID = 755136591L;
290
291    /**
292     * Constructor
293     */
294      public ImagingStudySeriesComponent() {
295        super();
296      }
297
298    /**
299     * Constructor
300     */
301      public ImagingStudySeriesComponent(String uid, CodeableConcept modality) {
302        super();
303        this.setUid(uid);
304        this.setModality(modality);
305      }
306
307        /**
308         * @return {@link #uid} (The DICOM Series Instance UID for the series.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
309         */
310        public IdType getUidElement() { 
311          if (this.uid == null)
312            if (Configuration.errorOnAutoCreate())
313              throw new Error("Attempt to auto-create ImagingStudySeriesComponent.uid");
314            else if (Configuration.doAutoCreate())
315              this.uid = new IdType(); // bb
316          return this.uid;
317        }
318
319        public boolean hasUidElement() { 
320          return this.uid != null && !this.uid.isEmpty();
321        }
322
323        public boolean hasUid() { 
324          return this.uid != null && !this.uid.isEmpty();
325        }
326
327        /**
328         * @param value {@link #uid} (The DICOM Series Instance UID for the series.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
329         */
330        public ImagingStudySeriesComponent setUidElement(IdType value) { 
331          this.uid = value;
332          return this;
333        }
334
335        /**
336         * @return The DICOM Series Instance UID for the series.
337         */
338        public String getUid() { 
339          return this.uid == null ? null : this.uid.getValue();
340        }
341
342        /**
343         * @param value The DICOM Series Instance UID for the series.
344         */
345        public ImagingStudySeriesComponent setUid(String value) { 
346            if (this.uid == null)
347              this.uid = new IdType();
348            this.uid.setValue(value);
349          return this;
350        }
351
352        /**
353         * @return {@link #number} (The numeric identifier of this series in the study.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value
354         */
355        public UnsignedIntType getNumberElement() { 
356          if (this.number == null)
357            if (Configuration.errorOnAutoCreate())
358              throw new Error("Attempt to auto-create ImagingStudySeriesComponent.number");
359            else if (Configuration.doAutoCreate())
360              this.number = new UnsignedIntType(); // bb
361          return this.number;
362        }
363
364        public boolean hasNumberElement() { 
365          return this.number != null && !this.number.isEmpty();
366        }
367
368        public boolean hasNumber() { 
369          return this.number != null && !this.number.isEmpty();
370        }
371
372        /**
373         * @param value {@link #number} (The numeric identifier of this series in the study.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value
374         */
375        public ImagingStudySeriesComponent setNumberElement(UnsignedIntType value) { 
376          this.number = value;
377          return this;
378        }
379
380        /**
381         * @return The numeric identifier of this series in the study.
382         */
383        public int getNumber() { 
384          return this.number == null || this.number.isEmpty() ? 0 : this.number.getValue();
385        }
386
387        /**
388         * @param value The numeric identifier of this series in the study.
389         */
390        public ImagingStudySeriesComponent setNumber(int value) { 
391            if (this.number == null)
392              this.number = new UnsignedIntType();
393            this.number.setValue(value);
394          return this;
395        }
396
397        /**
398         * @return {@link #modality} (The distinct modality for this series. This may include both acquisition and non-acquisition modalities.)
399         */
400        public CodeableConcept getModality() { 
401          if (this.modality == null)
402            if (Configuration.errorOnAutoCreate())
403              throw new Error("Attempt to auto-create ImagingStudySeriesComponent.modality");
404            else if (Configuration.doAutoCreate())
405              this.modality = new CodeableConcept(); // cc
406          return this.modality;
407        }
408
409        public boolean hasModality() { 
410          return this.modality != null && !this.modality.isEmpty();
411        }
412
413        /**
414         * @param value {@link #modality} (The distinct modality for this series. This may include both acquisition and non-acquisition modalities.)
415         */
416        public ImagingStudySeriesComponent setModality(CodeableConcept value) { 
417          this.modality = value;
418          return this;
419        }
420
421        /**
422         * @return {@link #description} (A description of the series.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
423         */
424        public StringType getDescriptionElement() { 
425          if (this.description == null)
426            if (Configuration.errorOnAutoCreate())
427              throw new Error("Attempt to auto-create ImagingStudySeriesComponent.description");
428            else if (Configuration.doAutoCreate())
429              this.description = new StringType(); // bb
430          return this.description;
431        }
432
433        public boolean hasDescriptionElement() { 
434          return this.description != null && !this.description.isEmpty();
435        }
436
437        public boolean hasDescription() { 
438          return this.description != null && !this.description.isEmpty();
439        }
440
441        /**
442         * @param value {@link #description} (A description of the series.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
443         */
444        public ImagingStudySeriesComponent setDescriptionElement(StringType value) { 
445          this.description = value;
446          return this;
447        }
448
449        /**
450         * @return A description of the series.
451         */
452        public String getDescription() { 
453          return this.description == null ? null : this.description.getValue();
454        }
455
456        /**
457         * @param value A description of the series.
458         */
459        public ImagingStudySeriesComponent setDescription(String value) { 
460          if (Utilities.noString(value))
461            this.description = null;
462          else {
463            if (this.description == null)
464              this.description = new StringType();
465            this.description.setValue(value);
466          }
467          return this;
468        }
469
470        /**
471         * @return {@link #numberOfInstances} (Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value
472         */
473        public UnsignedIntType getNumberOfInstancesElement() { 
474          if (this.numberOfInstances == null)
475            if (Configuration.errorOnAutoCreate())
476              throw new Error("Attempt to auto-create ImagingStudySeriesComponent.numberOfInstances");
477            else if (Configuration.doAutoCreate())
478              this.numberOfInstances = new UnsignedIntType(); // bb
479          return this.numberOfInstances;
480        }
481
482        public boolean hasNumberOfInstancesElement() { 
483          return this.numberOfInstances != null && !this.numberOfInstances.isEmpty();
484        }
485
486        public boolean hasNumberOfInstances() { 
487          return this.numberOfInstances != null && !this.numberOfInstances.isEmpty();
488        }
489
490        /**
491         * @param value {@link #numberOfInstances} (Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value
492         */
493        public ImagingStudySeriesComponent setNumberOfInstancesElement(UnsignedIntType value) { 
494          this.numberOfInstances = value;
495          return this;
496        }
497
498        /**
499         * @return Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.
500         */
501        public int getNumberOfInstances() { 
502          return this.numberOfInstances == null || this.numberOfInstances.isEmpty() ? 0 : this.numberOfInstances.getValue();
503        }
504
505        /**
506         * @param value Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.
507         */
508        public ImagingStudySeriesComponent setNumberOfInstances(int value) { 
509            if (this.numberOfInstances == null)
510              this.numberOfInstances = new UnsignedIntType();
511            this.numberOfInstances.setValue(value);
512          return this;
513        }
514
515        /**
516         * @return {@link #endpoint} (The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType.)
517         */
518        public List<Reference> getEndpoint() { 
519          if (this.endpoint == null)
520            this.endpoint = new ArrayList<Reference>();
521          return this.endpoint;
522        }
523
524        /**
525         * @return Returns a reference to <code>this</code> for easy method chaining
526         */
527        public ImagingStudySeriesComponent setEndpoint(List<Reference> theEndpoint) { 
528          this.endpoint = theEndpoint;
529          return this;
530        }
531
532        public boolean hasEndpoint() { 
533          if (this.endpoint == null)
534            return false;
535          for (Reference item : this.endpoint)
536            if (!item.isEmpty())
537              return true;
538          return false;
539        }
540
541        public Reference addEndpoint() { //3
542          Reference t = new Reference();
543          if (this.endpoint == null)
544            this.endpoint = new ArrayList<Reference>();
545          this.endpoint.add(t);
546          return t;
547        }
548
549        public ImagingStudySeriesComponent addEndpoint(Reference t) { //3
550          if (t == null)
551            return this;
552          if (this.endpoint == null)
553            this.endpoint = new ArrayList<Reference>();
554          this.endpoint.add(t);
555          return this;
556        }
557
558        /**
559         * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist {3}
560         */
561        public Reference getEndpointFirstRep() { 
562          if (getEndpoint().isEmpty()) {
563            addEndpoint();
564          }
565          return getEndpoint().get(0);
566        }
567
568        /**
569         * @return {@link #bodySite} (The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.)
570         */
571        public CodeableReference getBodySite() { 
572          if (this.bodySite == null)
573            if (Configuration.errorOnAutoCreate())
574              throw new Error("Attempt to auto-create ImagingStudySeriesComponent.bodySite");
575            else if (Configuration.doAutoCreate())
576              this.bodySite = new CodeableReference(); // cc
577          return this.bodySite;
578        }
579
580        public boolean hasBodySite() { 
581          return this.bodySite != null && !this.bodySite.isEmpty();
582        }
583
584        /**
585         * @param value {@link #bodySite} (The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.)
586         */
587        public ImagingStudySeriesComponent setBodySite(CodeableReference value) { 
588          this.bodySite = value;
589          return this;
590        }
591
592        /**
593         * @return {@link #laterality} (The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.)
594         */
595        public CodeableConcept getLaterality() { 
596          if (this.laterality == null)
597            if (Configuration.errorOnAutoCreate())
598              throw new Error("Attempt to auto-create ImagingStudySeriesComponent.laterality");
599            else if (Configuration.doAutoCreate())
600              this.laterality = new CodeableConcept(); // cc
601          return this.laterality;
602        }
603
604        public boolean hasLaterality() { 
605          return this.laterality != null && !this.laterality.isEmpty();
606        }
607
608        /**
609         * @param value {@link #laterality} (The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.)
610         */
611        public ImagingStudySeriesComponent setLaterality(CodeableConcept value) { 
612          this.laterality = value;
613          return this;
614        }
615
616        /**
617         * @return {@link #specimen} (The specimen imaged, e.g., for whole slide imaging of a biopsy.)
618         */
619        public List<Reference> getSpecimen() { 
620          if (this.specimen == null)
621            this.specimen = new ArrayList<Reference>();
622          return this.specimen;
623        }
624
625        /**
626         * @return Returns a reference to <code>this</code> for easy method chaining
627         */
628        public ImagingStudySeriesComponent setSpecimen(List<Reference> theSpecimen) { 
629          this.specimen = theSpecimen;
630          return this;
631        }
632
633        public boolean hasSpecimen() { 
634          if (this.specimen == null)
635            return false;
636          for (Reference item : this.specimen)
637            if (!item.isEmpty())
638              return true;
639          return false;
640        }
641
642        public Reference addSpecimen() { //3
643          Reference t = new Reference();
644          if (this.specimen == null)
645            this.specimen = new ArrayList<Reference>();
646          this.specimen.add(t);
647          return t;
648        }
649
650        public ImagingStudySeriesComponent addSpecimen(Reference t) { //3
651          if (t == null)
652            return this;
653          if (this.specimen == null)
654            this.specimen = new ArrayList<Reference>();
655          this.specimen.add(t);
656          return this;
657        }
658
659        /**
660         * @return The first repetition of repeating field {@link #specimen}, creating it if it does not already exist {3}
661         */
662        public Reference getSpecimenFirstRep() { 
663          if (getSpecimen().isEmpty()) {
664            addSpecimen();
665          }
666          return getSpecimen().get(0);
667        }
668
669        /**
670         * @return {@link #started} (The date and time the series was started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value
671         */
672        public DateTimeType getStartedElement() { 
673          if (this.started == null)
674            if (Configuration.errorOnAutoCreate())
675              throw new Error("Attempt to auto-create ImagingStudySeriesComponent.started");
676            else if (Configuration.doAutoCreate())
677              this.started = new DateTimeType(); // bb
678          return this.started;
679        }
680
681        public boolean hasStartedElement() { 
682          return this.started != null && !this.started.isEmpty();
683        }
684
685        public boolean hasStarted() { 
686          return this.started != null && !this.started.isEmpty();
687        }
688
689        /**
690         * @param value {@link #started} (The date and time the series was started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value
691         */
692        public ImagingStudySeriesComponent setStartedElement(DateTimeType value) { 
693          this.started = value;
694          return this;
695        }
696
697        /**
698         * @return The date and time the series was started.
699         */
700        public Date getStarted() { 
701          return this.started == null ? null : this.started.getValue();
702        }
703
704        /**
705         * @param value The date and time the series was started.
706         */
707        public ImagingStudySeriesComponent setStarted(Date value) { 
708          if (value == null)
709            this.started = null;
710          else {
711            if (this.started == null)
712              this.started = new DateTimeType();
713            this.started.setValue(value);
714          }
715          return this;
716        }
717
718        /**
719         * @return {@link #performer} (Indicates who or what performed the series and how they were involved.)
720         */
721        public List<ImagingStudySeriesPerformerComponent> getPerformer() { 
722          if (this.performer == null)
723            this.performer = new ArrayList<ImagingStudySeriesPerformerComponent>();
724          return this.performer;
725        }
726
727        /**
728         * @return Returns a reference to <code>this</code> for easy method chaining
729         */
730        public ImagingStudySeriesComponent setPerformer(List<ImagingStudySeriesPerformerComponent> thePerformer) { 
731          this.performer = thePerformer;
732          return this;
733        }
734
735        public boolean hasPerformer() { 
736          if (this.performer == null)
737            return false;
738          for (ImagingStudySeriesPerformerComponent item : this.performer)
739            if (!item.isEmpty())
740              return true;
741          return false;
742        }
743
744        public ImagingStudySeriesPerformerComponent addPerformer() { //3
745          ImagingStudySeriesPerformerComponent t = new ImagingStudySeriesPerformerComponent();
746          if (this.performer == null)
747            this.performer = new ArrayList<ImagingStudySeriesPerformerComponent>();
748          this.performer.add(t);
749          return t;
750        }
751
752        public ImagingStudySeriesComponent addPerformer(ImagingStudySeriesPerformerComponent t) { //3
753          if (t == null)
754            return this;
755          if (this.performer == null)
756            this.performer = new ArrayList<ImagingStudySeriesPerformerComponent>();
757          this.performer.add(t);
758          return this;
759        }
760
761        /**
762         * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist {3}
763         */
764        public ImagingStudySeriesPerformerComponent getPerformerFirstRep() { 
765          if (getPerformer().isEmpty()) {
766            addPerformer();
767          }
768          return getPerformer().get(0);
769        }
770
771        /**
772         * @return {@link #instance} (A single SOP instance within the series, e.g. an image, or presentation state.)
773         */
774        public List<ImagingStudySeriesInstanceComponent> getInstance() { 
775          if (this.instance == null)
776            this.instance = new ArrayList<ImagingStudySeriesInstanceComponent>();
777          return this.instance;
778        }
779
780        /**
781         * @return Returns a reference to <code>this</code> for easy method chaining
782         */
783        public ImagingStudySeriesComponent setInstance(List<ImagingStudySeriesInstanceComponent> theInstance) { 
784          this.instance = theInstance;
785          return this;
786        }
787
788        public boolean hasInstance() { 
789          if (this.instance == null)
790            return false;
791          for (ImagingStudySeriesInstanceComponent item : this.instance)
792            if (!item.isEmpty())
793              return true;
794          return false;
795        }
796
797        public ImagingStudySeriesInstanceComponent addInstance() { //3
798          ImagingStudySeriesInstanceComponent t = new ImagingStudySeriesInstanceComponent();
799          if (this.instance == null)
800            this.instance = new ArrayList<ImagingStudySeriesInstanceComponent>();
801          this.instance.add(t);
802          return t;
803        }
804
805        public ImagingStudySeriesComponent addInstance(ImagingStudySeriesInstanceComponent t) { //3
806          if (t == null)
807            return this;
808          if (this.instance == null)
809            this.instance = new ArrayList<ImagingStudySeriesInstanceComponent>();
810          this.instance.add(t);
811          return this;
812        }
813
814        /**
815         * @return The first repetition of repeating field {@link #instance}, creating it if it does not already exist {3}
816         */
817        public ImagingStudySeriesInstanceComponent getInstanceFirstRep() { 
818          if (getInstance().isEmpty()) {
819            addInstance();
820          }
821          return getInstance().get(0);
822        }
823
824        protected void listChildren(List<Property> children) {
825          super.listChildren(children);
826          children.add(new Property("uid", "id", "The DICOM Series Instance UID for the series.", 0, 1, uid));
827          children.add(new Property("number", "unsignedInt", "The numeric identifier of this series in the study.", 0, 1, number));
828          children.add(new Property("modality", "CodeableConcept", "The distinct modality for this series. This may include both acquisition and non-acquisition modalities.", 0, 1, modality));
829          children.add(new Property("description", "string", "A description of the series.", 0, 1, description));
830          children.add(new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.", 0, 1, numberOfInstances));
831          children.add(new Property("endpoint", "Reference(Endpoint)", "The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType.", 0, java.lang.Integer.MAX_VALUE, endpoint));
832          children.add(new Property("bodySite", "CodeableReference(BodyStructure)", "The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.", 0, 1, bodySite));
833          children.add(new Property("laterality", "CodeableConcept", "The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.", 0, 1, laterality));
834          children.add(new Property("specimen", "Reference(Specimen)", "The specimen imaged, e.g., for whole slide imaging of a biopsy.", 0, java.lang.Integer.MAX_VALUE, specimen));
835          children.add(new Property("started", "dateTime", "The date and time the series was started.", 0, 1, started));
836          children.add(new Property("performer", "", "Indicates who or what performed the series and how they were involved.", 0, java.lang.Integer.MAX_VALUE, performer));
837          children.add(new Property("instance", "", "A single SOP instance within the series, e.g. an image, or presentation state.", 0, java.lang.Integer.MAX_VALUE, instance));
838        }
839
840        @Override
841        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
842          switch (_hash) {
843          case 115792: /*uid*/  return new Property("uid", "id", "The DICOM Series Instance UID for the series.", 0, 1, uid);
844          case -1034364087: /*number*/  return new Property("number", "unsignedInt", "The numeric identifier of this series in the study.", 0, 1, number);
845          case -622722335: /*modality*/  return new Property("modality", "CodeableConcept", "The distinct modality for this series. This may include both acquisition and non-acquisition modalities.", 0, 1, modality);
846          case -1724546052: /*description*/  return new Property("description", "string", "A description of the series.", 0, 1, description);
847          case -1043544226: /*numberOfInstances*/  return new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.", 0, 1, numberOfInstances);
848          case 1741102485: /*endpoint*/  return new Property("endpoint", "Reference(Endpoint)", "The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType.", 0, java.lang.Integer.MAX_VALUE, endpoint);
849          case 1702620169: /*bodySite*/  return new Property("bodySite", "CodeableReference(BodyStructure)", "The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.", 0, 1, bodySite);
850          case -170291817: /*laterality*/  return new Property("laterality", "CodeableConcept", "The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.", 0, 1, laterality);
851          case -2132868344: /*specimen*/  return new Property("specimen", "Reference(Specimen)", "The specimen imaged, e.g., for whole slide imaging of a biopsy.", 0, java.lang.Integer.MAX_VALUE, specimen);
852          case -1897185151: /*started*/  return new Property("started", "dateTime", "The date and time the series was started.", 0, 1, started);
853          case 481140686: /*performer*/  return new Property("performer", "", "Indicates who or what performed the series and how they were involved.", 0, java.lang.Integer.MAX_VALUE, performer);
854          case 555127957: /*instance*/  return new Property("instance", "", "A single SOP instance within the series, e.g. an image, or presentation state.", 0, java.lang.Integer.MAX_VALUE, instance);
855          default: return super.getNamedProperty(_hash, _name, _checkValid);
856          }
857
858        }
859
860      @Override
861      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
862        switch (hash) {
863        case 115792: /*uid*/ return this.uid == null ? new Base[0] : new Base[] {this.uid}; // IdType
864        case -1034364087: /*number*/ return this.number == null ? new Base[0] : new Base[] {this.number}; // UnsignedIntType
865        case -622722335: /*modality*/ return this.modality == null ? new Base[0] : new Base[] {this.modality}; // CodeableConcept
866        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
867        case -1043544226: /*numberOfInstances*/ return this.numberOfInstances == null ? new Base[0] : new Base[] {this.numberOfInstances}; // UnsignedIntType
868        case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference
869        case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : new Base[] {this.bodySite}; // CodeableReference
870        case -170291817: /*laterality*/ return this.laterality == null ? new Base[0] : new Base[] {this.laterality}; // CodeableConcept
871        case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : this.specimen.toArray(new Base[this.specimen.size()]); // Reference
872        case -1897185151: /*started*/ return this.started == null ? new Base[0] : new Base[] {this.started}; // DateTimeType
873        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // ImagingStudySeriesPerformerComponent
874        case 555127957: /*instance*/ return this.instance == null ? new Base[0] : this.instance.toArray(new Base[this.instance.size()]); // ImagingStudySeriesInstanceComponent
875        default: return super.getProperty(hash, name, checkValid);
876        }
877
878      }
879
880      @Override
881      public Base setProperty(int hash, String name, Base value) throws FHIRException {
882        switch (hash) {
883        case 115792: // uid
884          this.uid = TypeConvertor.castToId(value); // IdType
885          return value;
886        case -1034364087: // number
887          this.number = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
888          return value;
889        case -622722335: // modality
890          this.modality = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
891          return value;
892        case -1724546052: // description
893          this.description = TypeConvertor.castToString(value); // StringType
894          return value;
895        case -1043544226: // numberOfInstances
896          this.numberOfInstances = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
897          return value;
898        case 1741102485: // endpoint
899          this.getEndpoint().add(TypeConvertor.castToReference(value)); // Reference
900          return value;
901        case 1702620169: // bodySite
902          this.bodySite = TypeConvertor.castToCodeableReference(value); // CodeableReference
903          return value;
904        case -170291817: // laterality
905          this.laterality = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
906          return value;
907        case -2132868344: // specimen
908          this.getSpecimen().add(TypeConvertor.castToReference(value)); // Reference
909          return value;
910        case -1897185151: // started
911          this.started = TypeConvertor.castToDateTime(value); // DateTimeType
912          return value;
913        case 481140686: // performer
914          this.getPerformer().add((ImagingStudySeriesPerformerComponent) value); // ImagingStudySeriesPerformerComponent
915          return value;
916        case 555127957: // instance
917          this.getInstance().add((ImagingStudySeriesInstanceComponent) value); // ImagingStudySeriesInstanceComponent
918          return value;
919        default: return super.setProperty(hash, name, value);
920        }
921
922      }
923
924      @Override
925      public Base setProperty(String name, Base value) throws FHIRException {
926        if (name.equals("uid")) {
927          this.uid = TypeConvertor.castToId(value); // IdType
928        } else if (name.equals("number")) {
929          this.number = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
930        } else if (name.equals("modality")) {
931          this.modality = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
932        } else if (name.equals("description")) {
933          this.description = TypeConvertor.castToString(value); // StringType
934        } else if (name.equals("numberOfInstances")) {
935          this.numberOfInstances = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
936        } else if (name.equals("endpoint")) {
937          this.getEndpoint().add(TypeConvertor.castToReference(value));
938        } else if (name.equals("bodySite")) {
939          this.bodySite = TypeConvertor.castToCodeableReference(value); // CodeableReference
940        } else if (name.equals("laterality")) {
941          this.laterality = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
942        } else if (name.equals("specimen")) {
943          this.getSpecimen().add(TypeConvertor.castToReference(value));
944        } else if (name.equals("started")) {
945          this.started = TypeConvertor.castToDateTime(value); // DateTimeType
946        } else if (name.equals("performer")) {
947          this.getPerformer().add((ImagingStudySeriesPerformerComponent) value);
948        } else if (name.equals("instance")) {
949          this.getInstance().add((ImagingStudySeriesInstanceComponent) value);
950        } else
951          return super.setProperty(name, value);
952        return value;
953      }
954
955  @Override
956  public void removeChild(String name, Base value) throws FHIRException {
957        if (name.equals("uid")) {
958          this.uid = null;
959        } else if (name.equals("number")) {
960          this.number = null;
961        } else if (name.equals("modality")) {
962          this.modality = null;
963        } else if (name.equals("description")) {
964          this.description = null;
965        } else if (name.equals("numberOfInstances")) {
966          this.numberOfInstances = null;
967        } else if (name.equals("endpoint")) {
968          this.getEndpoint().remove(value);
969        } else if (name.equals("bodySite")) {
970          this.bodySite = null;
971        } else if (name.equals("laterality")) {
972          this.laterality = null;
973        } else if (name.equals("specimen")) {
974          this.getSpecimen().remove(value);
975        } else if (name.equals("started")) {
976          this.started = null;
977        } else if (name.equals("performer")) {
978          this.getPerformer().remove((ImagingStudySeriesPerformerComponent) value);
979        } else if (name.equals("instance")) {
980          this.getInstance().remove((ImagingStudySeriesInstanceComponent) value);
981        } else
982          super.removeChild(name, value);
983        
984      }
985
986      @Override
987      public Base makeProperty(int hash, String name) throws FHIRException {
988        switch (hash) {
989        case 115792:  return getUidElement();
990        case -1034364087:  return getNumberElement();
991        case -622722335:  return getModality();
992        case -1724546052:  return getDescriptionElement();
993        case -1043544226:  return getNumberOfInstancesElement();
994        case 1741102485:  return addEndpoint(); 
995        case 1702620169:  return getBodySite();
996        case -170291817:  return getLaterality();
997        case -2132868344:  return addSpecimen(); 
998        case -1897185151:  return getStartedElement();
999        case 481140686:  return addPerformer(); 
1000        case 555127957:  return addInstance(); 
1001        default: return super.makeProperty(hash, name);
1002        }
1003
1004      }
1005
1006      @Override
1007      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1008        switch (hash) {
1009        case 115792: /*uid*/ return new String[] {"id"};
1010        case -1034364087: /*number*/ return new String[] {"unsignedInt"};
1011        case -622722335: /*modality*/ return new String[] {"CodeableConcept"};
1012        case -1724546052: /*description*/ return new String[] {"string"};
1013        case -1043544226: /*numberOfInstances*/ return new String[] {"unsignedInt"};
1014        case 1741102485: /*endpoint*/ return new String[] {"Reference"};
1015        case 1702620169: /*bodySite*/ return new String[] {"CodeableReference"};
1016        case -170291817: /*laterality*/ return new String[] {"CodeableConcept"};
1017        case -2132868344: /*specimen*/ return new String[] {"Reference"};
1018        case -1897185151: /*started*/ return new String[] {"dateTime"};
1019        case 481140686: /*performer*/ return new String[] {};
1020        case 555127957: /*instance*/ return new String[] {};
1021        default: return super.getTypesForProperty(hash, name);
1022        }
1023
1024      }
1025
1026      @Override
1027      public Base addChild(String name) throws FHIRException {
1028        if (name.equals("uid")) {
1029          throw new FHIRException("Cannot call addChild on a singleton property ImagingStudy.series.uid");
1030        }
1031        else if (name.equals("number")) {
1032          throw new FHIRException("Cannot call addChild on a singleton property ImagingStudy.series.number");
1033        }
1034        else if (name.equals("modality")) {
1035          this.modality = new CodeableConcept();
1036          return this.modality;
1037        }
1038        else if (name.equals("description")) {
1039          throw new FHIRException("Cannot call addChild on a singleton property ImagingStudy.series.description");
1040        }
1041        else if (name.equals("numberOfInstances")) {
1042          throw new FHIRException("Cannot call addChild on a singleton property ImagingStudy.series.numberOfInstances");
1043        }
1044        else if (name.equals("endpoint")) {
1045          return addEndpoint();
1046        }
1047        else if (name.equals("bodySite")) {
1048          this.bodySite = new CodeableReference();
1049          return this.bodySite;
1050        }
1051        else if (name.equals("laterality")) {
1052          this.laterality = new CodeableConcept();
1053          return this.laterality;
1054        }
1055        else if (name.equals("specimen")) {
1056          return addSpecimen();
1057        }
1058        else if (name.equals("started")) {
1059          throw new FHIRException("Cannot call addChild on a singleton property ImagingStudy.series.started");
1060        }
1061        else if (name.equals("performer")) {
1062          return addPerformer();
1063        }
1064        else if (name.equals("instance")) {
1065          return addInstance();
1066        }
1067        else
1068          return super.addChild(name);
1069      }
1070
1071      public ImagingStudySeriesComponent copy() {
1072        ImagingStudySeriesComponent dst = new ImagingStudySeriesComponent();
1073        copyValues(dst);
1074        return dst;
1075      }
1076
1077      public void copyValues(ImagingStudySeriesComponent dst) {
1078        super.copyValues(dst);
1079        dst.uid = uid == null ? null : uid.copy();
1080        dst.number = number == null ? null : number.copy();
1081        dst.modality = modality == null ? null : modality.copy();
1082        dst.description = description == null ? null : description.copy();
1083        dst.numberOfInstances = numberOfInstances == null ? null : numberOfInstances.copy();
1084        if (endpoint != null) {
1085          dst.endpoint = new ArrayList<Reference>();
1086          for (Reference i : endpoint)
1087            dst.endpoint.add(i.copy());
1088        };
1089        dst.bodySite = bodySite == null ? null : bodySite.copy();
1090        dst.laterality = laterality == null ? null : laterality.copy();
1091        if (specimen != null) {
1092          dst.specimen = new ArrayList<Reference>();
1093          for (Reference i : specimen)
1094            dst.specimen.add(i.copy());
1095        };
1096        dst.started = started == null ? null : started.copy();
1097        if (performer != null) {
1098          dst.performer = new ArrayList<ImagingStudySeriesPerformerComponent>();
1099          for (ImagingStudySeriesPerformerComponent i : performer)
1100            dst.performer.add(i.copy());
1101        };
1102        if (instance != null) {
1103          dst.instance = new ArrayList<ImagingStudySeriesInstanceComponent>();
1104          for (ImagingStudySeriesInstanceComponent i : instance)
1105            dst.instance.add(i.copy());
1106        };
1107      }
1108
1109      @Override
1110      public boolean equalsDeep(Base other_) {
1111        if (!super.equalsDeep(other_))
1112          return false;
1113        if (!(other_ instanceof ImagingStudySeriesComponent))
1114          return false;
1115        ImagingStudySeriesComponent o = (ImagingStudySeriesComponent) other_;
1116        return compareDeep(uid, o.uid, true) && compareDeep(number, o.number, true) && compareDeep(modality, o.modality, true)
1117           && compareDeep(description, o.description, true) && compareDeep(numberOfInstances, o.numberOfInstances, true)
1118           && compareDeep(endpoint, o.endpoint, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(laterality, o.laterality, true)
1119           && compareDeep(specimen, o.specimen, true) && compareDeep(started, o.started, true) && compareDeep(performer, o.performer, true)
1120           && compareDeep(instance, o.instance, true);
1121      }
1122
1123      @Override
1124      public boolean equalsShallow(Base other_) {
1125        if (!super.equalsShallow(other_))
1126          return false;
1127        if (!(other_ instanceof ImagingStudySeriesComponent))
1128          return false;
1129        ImagingStudySeriesComponent o = (ImagingStudySeriesComponent) other_;
1130        return compareValues(uid, o.uid, true) && compareValues(number, o.number, true) && compareValues(description, o.description, true)
1131           && compareValues(numberOfInstances, o.numberOfInstances, true) && compareValues(started, o.started, true)
1132          ;
1133      }
1134
1135      public boolean isEmpty() {
1136        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(uid, number, modality, description
1137          , numberOfInstances, endpoint, bodySite, laterality, specimen, started, performer
1138          , instance);
1139      }
1140
1141  public String fhirType() {
1142    return "ImagingStudy.series";
1143
1144  }
1145
1146  }
1147
1148    @Block()
1149    public static class ImagingStudySeriesPerformerComponent extends BackboneElement implements IBaseBackboneElement {
1150        /**
1151         * Distinguishes the type of involvement of the performer in the series.
1152         */
1153        @Child(name = "function", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
1154        @Description(shortDefinition="Type of performance", formalDefinition="Distinguishes the type of involvement of the performer in the series." )
1155        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/series-performer-function")
1156        protected CodeableConcept function;
1157
1158        /**
1159         * Indicates who or what performed the series.
1160         */
1161        @Child(name = "actor", type = {Practitioner.class, PractitionerRole.class, Organization.class, CareTeam.class, Patient.class, Device.class, RelatedPerson.class, HealthcareService.class}, order=2, min=1, max=1, modifier=false, summary=true)
1162        @Description(shortDefinition="Who performed the series", formalDefinition="Indicates who or what performed the series." )
1163        protected Reference actor;
1164
1165        private static final long serialVersionUID = -576943815L;
1166
1167    /**
1168     * Constructor
1169     */
1170      public ImagingStudySeriesPerformerComponent() {
1171        super();
1172      }
1173
1174    /**
1175     * Constructor
1176     */
1177      public ImagingStudySeriesPerformerComponent(Reference actor) {
1178        super();
1179        this.setActor(actor);
1180      }
1181
1182        /**
1183         * @return {@link #function} (Distinguishes the type of involvement of the performer in the series.)
1184         */
1185        public CodeableConcept getFunction() { 
1186          if (this.function == null)
1187            if (Configuration.errorOnAutoCreate())
1188              throw new Error("Attempt to auto-create ImagingStudySeriesPerformerComponent.function");
1189            else if (Configuration.doAutoCreate())
1190              this.function = new CodeableConcept(); // cc
1191          return this.function;
1192        }
1193
1194        public boolean hasFunction() { 
1195          return this.function != null && !this.function.isEmpty();
1196        }
1197
1198        /**
1199         * @param value {@link #function} (Distinguishes the type of involvement of the performer in the series.)
1200         */
1201        public ImagingStudySeriesPerformerComponent setFunction(CodeableConcept value) { 
1202          this.function = value;
1203          return this;
1204        }
1205
1206        /**
1207         * @return {@link #actor} (Indicates who or what performed the series.)
1208         */
1209        public Reference getActor() { 
1210          if (this.actor == null)
1211            if (Configuration.errorOnAutoCreate())
1212              throw new Error("Attempt to auto-create ImagingStudySeriesPerformerComponent.actor");
1213            else if (Configuration.doAutoCreate())
1214              this.actor = new Reference(); // cc
1215          return this.actor;
1216        }
1217
1218        public boolean hasActor() { 
1219          return this.actor != null && !this.actor.isEmpty();
1220        }
1221
1222        /**
1223         * @param value {@link #actor} (Indicates who or what performed the series.)
1224         */
1225        public ImagingStudySeriesPerformerComponent setActor(Reference value) { 
1226          this.actor = value;
1227          return this;
1228        }
1229
1230        protected void listChildren(List<Property> children) {
1231          super.listChildren(children);
1232          children.add(new Property("function", "CodeableConcept", "Distinguishes the type of involvement of the performer in the series.", 0, 1, function));
1233          children.add(new Property("actor", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|Device|RelatedPerson|HealthcareService)", "Indicates who or what performed the series.", 0, 1, actor));
1234        }
1235
1236        @Override
1237        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1238          switch (_hash) {
1239          case 1380938712: /*function*/  return new Property("function", "CodeableConcept", "Distinguishes the type of involvement of the performer in the series.", 0, 1, function);
1240          case 92645877: /*actor*/  return new Property("actor", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|Device|RelatedPerson|HealthcareService)", "Indicates who or what performed the series.", 0, 1, actor);
1241          default: return super.getNamedProperty(_hash, _name, _checkValid);
1242          }
1243
1244        }
1245
1246      @Override
1247      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1248        switch (hash) {
1249        case 1380938712: /*function*/ return this.function == null ? new Base[0] : new Base[] {this.function}; // CodeableConcept
1250        case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference
1251        default: return super.getProperty(hash, name, checkValid);
1252        }
1253
1254      }
1255
1256      @Override
1257      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1258        switch (hash) {
1259        case 1380938712: // function
1260          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1261          return value;
1262        case 92645877: // actor
1263          this.actor = TypeConvertor.castToReference(value); // Reference
1264          return value;
1265        default: return super.setProperty(hash, name, value);
1266        }
1267
1268      }
1269
1270      @Override
1271      public Base setProperty(String name, Base value) throws FHIRException {
1272        if (name.equals("function")) {
1273          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1274        } else if (name.equals("actor")) {
1275          this.actor = TypeConvertor.castToReference(value); // Reference
1276        } else
1277          return super.setProperty(name, value);
1278        return value;
1279      }
1280
1281  @Override
1282  public void removeChild(String name, Base value) throws FHIRException {
1283        if (name.equals("function")) {
1284          this.function = null;
1285        } else if (name.equals("actor")) {
1286          this.actor = null;
1287        } else
1288          super.removeChild(name, value);
1289        
1290      }
1291
1292      @Override
1293      public Base makeProperty(int hash, String name) throws FHIRException {
1294        switch (hash) {
1295        case 1380938712:  return getFunction();
1296        case 92645877:  return getActor();
1297        default: return super.makeProperty(hash, name);
1298        }
1299
1300      }
1301
1302      @Override
1303      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1304        switch (hash) {
1305        case 1380938712: /*function*/ return new String[] {"CodeableConcept"};
1306        case 92645877: /*actor*/ return new String[] {"Reference"};
1307        default: return super.getTypesForProperty(hash, name);
1308        }
1309
1310      }
1311
1312      @Override
1313      public Base addChild(String name) throws FHIRException {
1314        if (name.equals("function")) {
1315          this.function = new CodeableConcept();
1316          return this.function;
1317        }
1318        else if (name.equals("actor")) {
1319          this.actor = new Reference();
1320          return this.actor;
1321        }
1322        else
1323          return super.addChild(name);
1324      }
1325
1326      public ImagingStudySeriesPerformerComponent copy() {
1327        ImagingStudySeriesPerformerComponent dst = new ImagingStudySeriesPerformerComponent();
1328        copyValues(dst);
1329        return dst;
1330      }
1331
1332      public void copyValues(ImagingStudySeriesPerformerComponent dst) {
1333        super.copyValues(dst);
1334        dst.function = function == null ? null : function.copy();
1335        dst.actor = actor == null ? null : actor.copy();
1336      }
1337
1338      @Override
1339      public boolean equalsDeep(Base other_) {
1340        if (!super.equalsDeep(other_))
1341          return false;
1342        if (!(other_ instanceof ImagingStudySeriesPerformerComponent))
1343          return false;
1344        ImagingStudySeriesPerformerComponent o = (ImagingStudySeriesPerformerComponent) other_;
1345        return compareDeep(function, o.function, true) && compareDeep(actor, o.actor, true);
1346      }
1347
1348      @Override
1349      public boolean equalsShallow(Base other_) {
1350        if (!super.equalsShallow(other_))
1351          return false;
1352        if (!(other_ instanceof ImagingStudySeriesPerformerComponent))
1353          return false;
1354        ImagingStudySeriesPerformerComponent o = (ImagingStudySeriesPerformerComponent) other_;
1355        return true;
1356      }
1357
1358      public boolean isEmpty() {
1359        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(function, actor);
1360      }
1361
1362  public String fhirType() {
1363    return "ImagingStudy.series.performer";
1364
1365  }
1366
1367  }
1368
1369    @Block()
1370    public static class ImagingStudySeriesInstanceComponent extends BackboneElement implements IBaseBackboneElement {
1371        /**
1372         * The DICOM SOP Instance UID for this image or other DICOM content.
1373         */
1374        @Child(name = "uid", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1375        @Description(shortDefinition="DICOM SOP Instance UID", formalDefinition="The DICOM SOP Instance UID for this image or other DICOM content." )
1376        protected IdType uid;
1377
1378        /**
1379         * DICOM instance  type.
1380         */
1381        @Child(name = "sopClass", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false)
1382        @Description(shortDefinition="DICOM class type", formalDefinition="DICOM instance  type." )
1383        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_B.5.html#table_B.5-1")
1384        protected Coding sopClass;
1385
1386        /**
1387         * The number of instance in the series.
1388         */
1389        @Child(name = "number", type = {UnsignedIntType.class}, order=3, min=0, max=1, modifier=false, summary=false)
1390        @Description(shortDefinition="The number of this instance in the series", formalDefinition="The number of instance in the series." )
1391        protected UnsignedIntType number;
1392
1393        /**
1394         * The description of the instance.
1395         */
1396        @Child(name = "title", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
1397        @Description(shortDefinition="Description of instance", formalDefinition="The description of the instance." )
1398        protected StringType title;
1399
1400        private static final long serialVersionUID = -888152445L;
1401
1402    /**
1403     * Constructor
1404     */
1405      public ImagingStudySeriesInstanceComponent() {
1406        super();
1407      }
1408
1409    /**
1410     * Constructor
1411     */
1412      public ImagingStudySeriesInstanceComponent(String uid, Coding sopClass) {
1413        super();
1414        this.setUid(uid);
1415        this.setSopClass(sopClass);
1416      }
1417
1418        /**
1419         * @return {@link #uid} (The DICOM SOP Instance UID for this image or other DICOM content.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
1420         */
1421        public IdType getUidElement() { 
1422          if (this.uid == null)
1423            if (Configuration.errorOnAutoCreate())
1424              throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.uid");
1425            else if (Configuration.doAutoCreate())
1426              this.uid = new IdType(); // bb
1427          return this.uid;
1428        }
1429
1430        public boolean hasUidElement() { 
1431          return this.uid != null && !this.uid.isEmpty();
1432        }
1433
1434        public boolean hasUid() { 
1435          return this.uid != null && !this.uid.isEmpty();
1436        }
1437
1438        /**
1439         * @param value {@link #uid} (The DICOM SOP Instance UID for this image or other DICOM content.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value
1440         */
1441        public ImagingStudySeriesInstanceComponent setUidElement(IdType value) { 
1442          this.uid = value;
1443          return this;
1444        }
1445
1446        /**
1447         * @return The DICOM SOP Instance UID for this image or other DICOM content.
1448         */
1449        public String getUid() { 
1450          return this.uid == null ? null : this.uid.getValue();
1451        }
1452
1453        /**
1454         * @param value The DICOM SOP Instance UID for this image or other DICOM content.
1455         */
1456        public ImagingStudySeriesInstanceComponent setUid(String value) { 
1457            if (this.uid == null)
1458              this.uid = new IdType();
1459            this.uid.setValue(value);
1460          return this;
1461        }
1462
1463        /**
1464         * @return {@link #sopClass} (DICOM instance  type.)
1465         */
1466        public Coding getSopClass() { 
1467          if (this.sopClass == null)
1468            if (Configuration.errorOnAutoCreate())
1469              throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.sopClass");
1470            else if (Configuration.doAutoCreate())
1471              this.sopClass = new Coding(); // cc
1472          return this.sopClass;
1473        }
1474
1475        public boolean hasSopClass() { 
1476          return this.sopClass != null && !this.sopClass.isEmpty();
1477        }
1478
1479        /**
1480         * @param value {@link #sopClass} (DICOM instance  type.)
1481         */
1482        public ImagingStudySeriesInstanceComponent setSopClass(Coding value) { 
1483          this.sopClass = value;
1484          return this;
1485        }
1486
1487        /**
1488         * @return {@link #number} (The number of instance in the series.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value
1489         */
1490        public UnsignedIntType getNumberElement() { 
1491          if (this.number == null)
1492            if (Configuration.errorOnAutoCreate())
1493              throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.number");
1494            else if (Configuration.doAutoCreate())
1495              this.number = new UnsignedIntType(); // bb
1496          return this.number;
1497        }
1498
1499        public boolean hasNumberElement() { 
1500          return this.number != null && !this.number.isEmpty();
1501        }
1502
1503        public boolean hasNumber() { 
1504          return this.number != null && !this.number.isEmpty();
1505        }
1506
1507        /**
1508         * @param value {@link #number} (The number of instance in the series.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value
1509         */
1510        public ImagingStudySeriesInstanceComponent setNumberElement(UnsignedIntType value) { 
1511          this.number = value;
1512          return this;
1513        }
1514
1515        /**
1516         * @return The number of instance in the series.
1517         */
1518        public int getNumber() { 
1519          return this.number == null || this.number.isEmpty() ? 0 : this.number.getValue();
1520        }
1521
1522        /**
1523         * @param value The number of instance in the series.
1524         */
1525        public ImagingStudySeriesInstanceComponent setNumber(int value) { 
1526            if (this.number == null)
1527              this.number = new UnsignedIntType();
1528            this.number.setValue(value);
1529          return this;
1530        }
1531
1532        /**
1533         * @return {@link #title} (The description of the instance.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1534         */
1535        public StringType getTitleElement() { 
1536          if (this.title == null)
1537            if (Configuration.errorOnAutoCreate())
1538              throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.title");
1539            else if (Configuration.doAutoCreate())
1540              this.title = new StringType(); // bb
1541          return this.title;
1542        }
1543
1544        public boolean hasTitleElement() { 
1545          return this.title != null && !this.title.isEmpty();
1546        }
1547
1548        public boolean hasTitle() { 
1549          return this.title != null && !this.title.isEmpty();
1550        }
1551
1552        /**
1553         * @param value {@link #title} (The description of the instance.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1554         */
1555        public ImagingStudySeriesInstanceComponent setTitleElement(StringType value) { 
1556          this.title = value;
1557          return this;
1558        }
1559
1560        /**
1561         * @return The description of the instance.
1562         */
1563        public String getTitle() { 
1564          return this.title == null ? null : this.title.getValue();
1565        }
1566
1567        /**
1568         * @param value The description of the instance.
1569         */
1570        public ImagingStudySeriesInstanceComponent setTitle(String value) { 
1571          if (Utilities.noString(value))
1572            this.title = null;
1573          else {
1574            if (this.title == null)
1575              this.title = new StringType();
1576            this.title.setValue(value);
1577          }
1578          return this;
1579        }
1580
1581        protected void listChildren(List<Property> children) {
1582          super.listChildren(children);
1583          children.add(new Property("uid", "id", "The DICOM SOP Instance UID for this image or other DICOM content.", 0, 1, uid));
1584          children.add(new Property("sopClass", "Coding", "DICOM instance  type.", 0, 1, sopClass));
1585          children.add(new Property("number", "unsignedInt", "The number of instance in the series.", 0, 1, number));
1586          children.add(new Property("title", "string", "The description of the instance.", 0, 1, title));
1587        }
1588
1589        @Override
1590        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1591          switch (_hash) {
1592          case 115792: /*uid*/  return new Property("uid", "id", "The DICOM SOP Instance UID for this image or other DICOM content.", 0, 1, uid);
1593          case 1560041540: /*sopClass*/  return new Property("sopClass", "Coding", "DICOM instance  type.", 0, 1, sopClass);
1594          case -1034364087: /*number*/  return new Property("number", "unsignedInt", "The number of instance in the series.", 0, 1, number);
1595          case 110371416: /*title*/  return new Property("title", "string", "The description of the instance.", 0, 1, title);
1596          default: return super.getNamedProperty(_hash, _name, _checkValid);
1597          }
1598
1599        }
1600
1601      @Override
1602      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1603        switch (hash) {
1604        case 115792: /*uid*/ return this.uid == null ? new Base[0] : new Base[] {this.uid}; // IdType
1605        case 1560041540: /*sopClass*/ return this.sopClass == null ? new Base[0] : new Base[] {this.sopClass}; // Coding
1606        case -1034364087: /*number*/ return this.number == null ? new Base[0] : new Base[] {this.number}; // UnsignedIntType
1607        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
1608        default: return super.getProperty(hash, name, checkValid);
1609        }
1610
1611      }
1612
1613      @Override
1614      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1615        switch (hash) {
1616        case 115792: // uid
1617          this.uid = TypeConvertor.castToId(value); // IdType
1618          return value;
1619        case 1560041540: // sopClass
1620          this.sopClass = TypeConvertor.castToCoding(value); // Coding
1621          return value;
1622        case -1034364087: // number
1623          this.number = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1624          return value;
1625        case 110371416: // title
1626          this.title = TypeConvertor.castToString(value); // StringType
1627          return value;
1628        default: return super.setProperty(hash, name, value);
1629        }
1630
1631      }
1632
1633      @Override
1634      public Base setProperty(String name, Base value) throws FHIRException {
1635        if (name.equals("uid")) {
1636          this.uid = TypeConvertor.castToId(value); // IdType
1637        } else if (name.equals("sopClass")) {
1638          this.sopClass = TypeConvertor.castToCoding(value); // Coding
1639        } else if (name.equals("number")) {
1640          this.number = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1641        } else if (name.equals("title")) {
1642          this.title = TypeConvertor.castToString(value); // StringType
1643        } else
1644          return super.setProperty(name, value);
1645        return value;
1646      }
1647
1648  @Override
1649  public void removeChild(String name, Base value) throws FHIRException {
1650        if (name.equals("uid")) {
1651          this.uid = null;
1652        } else if (name.equals("sopClass")) {
1653          this.sopClass = null;
1654        } else if (name.equals("number")) {
1655          this.number = null;
1656        } else if (name.equals("title")) {
1657          this.title = null;
1658        } else
1659          super.removeChild(name, value);
1660        
1661      }
1662
1663      @Override
1664      public Base makeProperty(int hash, String name) throws FHIRException {
1665        switch (hash) {
1666        case 115792:  return getUidElement();
1667        case 1560041540:  return getSopClass();
1668        case -1034364087:  return getNumberElement();
1669        case 110371416:  return getTitleElement();
1670        default: return super.makeProperty(hash, name);
1671        }
1672
1673      }
1674
1675      @Override
1676      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1677        switch (hash) {
1678        case 115792: /*uid*/ return new String[] {"id"};
1679        case 1560041540: /*sopClass*/ return new String[] {"Coding"};
1680        case -1034364087: /*number*/ return new String[] {"unsignedInt"};
1681        case 110371416: /*title*/ return new String[] {"string"};
1682        default: return super.getTypesForProperty(hash, name);
1683        }
1684
1685      }
1686
1687      @Override
1688      public Base addChild(String name) throws FHIRException {
1689        if (name.equals("uid")) {
1690          throw new FHIRException("Cannot call addChild on a singleton property ImagingStudy.series.instance.uid");
1691        }
1692        else if (name.equals("sopClass")) {
1693          this.sopClass = new Coding();
1694          return this.sopClass;
1695        }
1696        else if (name.equals("number")) {
1697          throw new FHIRException("Cannot call addChild on a singleton property ImagingStudy.series.instance.number");
1698        }
1699        else if (name.equals("title")) {
1700          throw new FHIRException("Cannot call addChild on a singleton property ImagingStudy.series.instance.title");
1701        }
1702        else
1703          return super.addChild(name);
1704      }
1705
1706      public ImagingStudySeriesInstanceComponent copy() {
1707        ImagingStudySeriesInstanceComponent dst = new ImagingStudySeriesInstanceComponent();
1708        copyValues(dst);
1709        return dst;
1710      }
1711
1712      public void copyValues(ImagingStudySeriesInstanceComponent dst) {
1713        super.copyValues(dst);
1714        dst.uid = uid == null ? null : uid.copy();
1715        dst.sopClass = sopClass == null ? null : sopClass.copy();
1716        dst.number = number == null ? null : number.copy();
1717        dst.title = title == null ? null : title.copy();
1718      }
1719
1720      @Override
1721      public boolean equalsDeep(Base other_) {
1722        if (!super.equalsDeep(other_))
1723          return false;
1724        if (!(other_ instanceof ImagingStudySeriesInstanceComponent))
1725          return false;
1726        ImagingStudySeriesInstanceComponent o = (ImagingStudySeriesInstanceComponent) other_;
1727        return compareDeep(uid, o.uid, true) && compareDeep(sopClass, o.sopClass, true) && compareDeep(number, o.number, true)
1728           && compareDeep(title, o.title, true);
1729      }
1730
1731      @Override
1732      public boolean equalsShallow(Base other_) {
1733        if (!super.equalsShallow(other_))
1734          return false;
1735        if (!(other_ instanceof ImagingStudySeriesInstanceComponent))
1736          return false;
1737        ImagingStudySeriesInstanceComponent o = (ImagingStudySeriesInstanceComponent) other_;
1738        return compareValues(uid, o.uid, true) && compareValues(number, o.number, true) && compareValues(title, o.title, true)
1739          ;
1740      }
1741
1742      public boolean isEmpty() {
1743        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(uid, sopClass, number, title
1744          );
1745      }
1746
1747  public String fhirType() {
1748    return "ImagingStudy.series.instance";
1749
1750  }
1751
1752  }
1753
1754    /**
1755     * Identifiers for the ImagingStudy such as DICOM Study Instance UID.
1756     */
1757    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1758    @Description(shortDefinition="Identifiers for the whole study", formalDefinition="Identifiers for the ImagingStudy such as DICOM Study Instance UID." )
1759    protected List<Identifier> identifier;
1760
1761    /**
1762     * The current state of the ImagingStudy resource. This is not the status of any ServiceRequest or Task resources associated with the ImagingStudy.
1763     */
1764    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
1765    @Description(shortDefinition="registered | available | cancelled | entered-in-error | unknown", formalDefinition="The current state of the ImagingStudy resource. This is not the status of any ServiceRequest or Task resources associated with the ImagingStudy." )
1766    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/imagingstudy-status")
1767    protected Enumeration<ImagingStudyStatus> status;
1768
1769    /**
1770     * A list of all the distinct values of series.modality. This may include both acquisition and non-acquisition modalities.
1771     */
1772    @Child(name = "modality", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1773    @Description(shortDefinition="All of the distinct values for series' modalities", formalDefinition="A list of all the distinct values of series.modality. This may include both acquisition and non-acquisition modalities." )
1774    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_33.html")
1775    protected List<CodeableConcept> modality;
1776
1777    /**
1778     * The subject, typically a patient, of the imaging study.
1779     */
1780    @Child(name = "subject", type = {Patient.class, Device.class, Group.class}, order=3, min=1, max=1, modifier=false, summary=true)
1781    @Description(shortDefinition="Who or what is the subject of the study", formalDefinition="The subject, typically a patient, of the imaging study." )
1782    protected Reference subject;
1783
1784    /**
1785     * The healthcare event (e.g. a patient and healthcare provider interaction) during which this ImagingStudy is made.
1786     */
1787    @Child(name = "encounter", type = {Encounter.class}, order=4, min=0, max=1, modifier=false, summary=true)
1788    @Description(shortDefinition="Encounter with which this imaging study is associated", formalDefinition="The healthcare event (e.g. a patient and healthcare provider interaction) during which this ImagingStudy is made." )
1789    protected Reference encounter;
1790
1791    /**
1792     * Date and time the study started.
1793     */
1794    @Child(name = "started", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true)
1795    @Description(shortDefinition="When the study was started", formalDefinition="Date and time the study started." )
1796    protected DateTimeType started;
1797
1798    /**
1799     * A list of the diagnostic requests that resulted in this imaging study being performed.
1800     */
1801    @Child(name = "basedOn", type = {CarePlan.class, ServiceRequest.class, Appointment.class, AppointmentResponse.class, Task.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1802    @Description(shortDefinition="Request fulfilled", formalDefinition="A list of the diagnostic requests that resulted in this imaging study being performed." )
1803    protected List<Reference> basedOn;
1804
1805    /**
1806     * A larger event of which this particular ImagingStudy is a component or step.  For example,  an ImagingStudy as part of a procedure.
1807     */
1808    @Child(name = "partOf", type = {Procedure.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1809    @Description(shortDefinition="Part of referenced event", formalDefinition="A larger event of which this particular ImagingStudy is a component or step.  For example,  an ImagingStudy as part of a procedure." )
1810    protected List<Reference> partOf;
1811
1812    /**
1813     * The requesting/referring physician.
1814     */
1815    @Child(name = "referrer", type = {Practitioner.class, PractitionerRole.class}, order=8, min=0, max=1, modifier=false, summary=true)
1816    @Description(shortDefinition="Referring physician", formalDefinition="The requesting/referring physician." )
1817    protected Reference referrer;
1818
1819    /**
1820     * The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.
1821     */
1822    @Child(name = "endpoint", type = {Endpoint.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1823    @Description(shortDefinition="Study access endpoint", formalDefinition="The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType." )
1824    protected List<Reference> endpoint;
1825
1826    /**
1827     * Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.
1828     */
1829    @Child(name = "numberOfSeries", type = {UnsignedIntType.class}, order=10, min=0, max=1, modifier=false, summary=true)
1830    @Description(shortDefinition="Number of Study Related Series", formalDefinition="Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present." )
1831    protected UnsignedIntType numberOfSeries;
1832
1833    /**
1834     * Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.
1835     */
1836    @Child(name = "numberOfInstances", type = {UnsignedIntType.class}, order=11, min=0, max=1, modifier=false, summary=true)
1837    @Description(shortDefinition="Number of Study Related Instances", formalDefinition="Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present." )
1838    protected UnsignedIntType numberOfInstances;
1839
1840    /**
1841     * This field corresponds to the DICOM Procedure Code Sequence (0008,1032). This is different from the FHIR Procedure resource that may include the ImagingStudy.
1842     */
1843    @Child(name = "procedure", type = {CodeableReference.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1844    @Description(shortDefinition="The performed procedure or code", formalDefinition="This field corresponds to the DICOM Procedure Code Sequence (0008,1032). This is different from the FHIR Procedure resource that may include the ImagingStudy." )
1845    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://loinc.org/vs/loinc-rsna-radiology-playbook")
1846    protected List<CodeableReference> procedure;
1847
1848    /**
1849     * The principal physical location where the ImagingStudy was performed.
1850     */
1851    @Child(name = "location", type = {Location.class}, order=13, min=0, max=1, modifier=false, summary=true)
1852    @Description(shortDefinition="Where ImagingStudy occurred", formalDefinition="The principal physical location where the ImagingStudy was performed." )
1853    protected Reference location;
1854
1855    /**
1856     * Description of clinical condition indicating why the ImagingStudy was requested, and/or Indicates another resource whose existence justifies this Study.
1857     */
1858    @Child(name = "reason", type = {CodeableReference.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1859    @Description(shortDefinition="Why the study was requested / performed", formalDefinition="Description of clinical condition indicating why the ImagingStudy was requested, and/or Indicates another resource whose existence justifies this Study." )
1860    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/procedure-reason")
1861    protected List<CodeableReference> reason;
1862
1863    /**
1864     * Per the recommended DICOM mapping, this element is derived from the Study Description attribute (0008,1030). Observations or findings about the imaging study should be recorded in another resource, e.g. Observation, and not in this element.
1865     */
1866    @Child(name = "note", type = {Annotation.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1867    @Description(shortDefinition="User-defined comments", formalDefinition="Per the recommended DICOM mapping, this element is derived from the Study Description attribute (0008,1030). Observations or findings about the imaging study should be recorded in another resource, e.g. Observation, and not in this element." )
1868    protected List<Annotation> note;
1869
1870    /**
1871     * The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed.
1872     */
1873    @Child(name = "description", type = {StringType.class}, order=16, min=0, max=1, modifier=false, summary=true)
1874    @Description(shortDefinition="Institution-generated description", formalDefinition="The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed." )
1875    protected StringType description;
1876
1877    /**
1878     * Each study has one or more series of images or other content.
1879     */
1880    @Child(name = "series", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1881    @Description(shortDefinition="Each study has one or more series of instances", formalDefinition="Each study has one or more series of images or other content." )
1882    protected List<ImagingStudySeriesComponent> series;
1883
1884    private static final long serialVersionUID = -1519153867L;
1885
1886  /**
1887   * Constructor
1888   */
1889    public ImagingStudy() {
1890      super();
1891    }
1892
1893  /**
1894   * Constructor
1895   */
1896    public ImagingStudy(ImagingStudyStatus status, Reference subject) {
1897      super();
1898      this.setStatus(status);
1899      this.setSubject(subject);
1900    }
1901
1902    /**
1903     * @return {@link #identifier} (Identifiers for the ImagingStudy such as DICOM Study Instance UID.)
1904     */
1905    public List<Identifier> getIdentifier() { 
1906      if (this.identifier == null)
1907        this.identifier = new ArrayList<Identifier>();
1908      return this.identifier;
1909    }
1910
1911    /**
1912     * @return Returns a reference to <code>this</code> for easy method chaining
1913     */
1914    public ImagingStudy setIdentifier(List<Identifier> theIdentifier) { 
1915      this.identifier = theIdentifier;
1916      return this;
1917    }
1918
1919    public boolean hasIdentifier() { 
1920      if (this.identifier == null)
1921        return false;
1922      for (Identifier item : this.identifier)
1923        if (!item.isEmpty())
1924          return true;
1925      return false;
1926    }
1927
1928    public Identifier addIdentifier() { //3
1929      Identifier t = new Identifier();
1930      if (this.identifier == null)
1931        this.identifier = new ArrayList<Identifier>();
1932      this.identifier.add(t);
1933      return t;
1934    }
1935
1936    public ImagingStudy addIdentifier(Identifier t) { //3
1937      if (t == null)
1938        return this;
1939      if (this.identifier == null)
1940        this.identifier = new ArrayList<Identifier>();
1941      this.identifier.add(t);
1942      return this;
1943    }
1944
1945    /**
1946     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1947     */
1948    public Identifier getIdentifierFirstRep() { 
1949      if (getIdentifier().isEmpty()) {
1950        addIdentifier();
1951      }
1952      return getIdentifier().get(0);
1953    }
1954
1955    /**
1956     * @return {@link #status} (The current state of the ImagingStudy resource. This is not the status of any ServiceRequest or Task resources associated with the ImagingStudy.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1957     */
1958    public Enumeration<ImagingStudyStatus> getStatusElement() { 
1959      if (this.status == null)
1960        if (Configuration.errorOnAutoCreate())
1961          throw new Error("Attempt to auto-create ImagingStudy.status");
1962        else if (Configuration.doAutoCreate())
1963          this.status = new Enumeration<ImagingStudyStatus>(new ImagingStudyStatusEnumFactory()); // bb
1964      return this.status;
1965    }
1966
1967    public boolean hasStatusElement() { 
1968      return this.status != null && !this.status.isEmpty();
1969    }
1970
1971    public boolean hasStatus() { 
1972      return this.status != null && !this.status.isEmpty();
1973    }
1974
1975    /**
1976     * @param value {@link #status} (The current state of the ImagingStudy resource. This is not the status of any ServiceRequest or Task resources associated with the ImagingStudy.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1977     */
1978    public ImagingStudy setStatusElement(Enumeration<ImagingStudyStatus> value) { 
1979      this.status = value;
1980      return this;
1981    }
1982
1983    /**
1984     * @return The current state of the ImagingStudy resource. This is not the status of any ServiceRequest or Task resources associated with the ImagingStudy.
1985     */
1986    public ImagingStudyStatus getStatus() { 
1987      return this.status == null ? null : this.status.getValue();
1988    }
1989
1990    /**
1991     * @param value The current state of the ImagingStudy resource. This is not the status of any ServiceRequest or Task resources associated with the ImagingStudy.
1992     */
1993    public ImagingStudy setStatus(ImagingStudyStatus value) { 
1994        if (this.status == null)
1995          this.status = new Enumeration<ImagingStudyStatus>(new ImagingStudyStatusEnumFactory());
1996        this.status.setValue(value);
1997      return this;
1998    }
1999
2000    /**
2001     * @return {@link #modality} (A list of all the distinct values of series.modality. This may include both acquisition and non-acquisition modalities.)
2002     */
2003    public List<CodeableConcept> getModality() { 
2004      if (this.modality == null)
2005        this.modality = new ArrayList<CodeableConcept>();
2006      return this.modality;
2007    }
2008
2009    /**
2010     * @return Returns a reference to <code>this</code> for easy method chaining
2011     */
2012    public ImagingStudy setModality(List<CodeableConcept> theModality) { 
2013      this.modality = theModality;
2014      return this;
2015    }
2016
2017    public boolean hasModality() { 
2018      if (this.modality == null)
2019        return false;
2020      for (CodeableConcept item : this.modality)
2021        if (!item.isEmpty())
2022          return true;
2023      return false;
2024    }
2025
2026    public CodeableConcept addModality() { //3
2027      CodeableConcept t = new CodeableConcept();
2028      if (this.modality == null)
2029        this.modality = new ArrayList<CodeableConcept>();
2030      this.modality.add(t);
2031      return t;
2032    }
2033
2034    public ImagingStudy addModality(CodeableConcept t) { //3
2035      if (t == null)
2036        return this;
2037      if (this.modality == null)
2038        this.modality = new ArrayList<CodeableConcept>();
2039      this.modality.add(t);
2040      return this;
2041    }
2042
2043    /**
2044     * @return The first repetition of repeating field {@link #modality}, creating it if it does not already exist {3}
2045     */
2046    public CodeableConcept getModalityFirstRep() { 
2047      if (getModality().isEmpty()) {
2048        addModality();
2049      }
2050      return getModality().get(0);
2051    }
2052
2053    /**
2054     * @return {@link #subject} (The subject, typically a patient, of the imaging study.)
2055     */
2056    public Reference getSubject() { 
2057      if (this.subject == null)
2058        if (Configuration.errorOnAutoCreate())
2059          throw new Error("Attempt to auto-create ImagingStudy.subject");
2060        else if (Configuration.doAutoCreate())
2061          this.subject = new Reference(); // cc
2062      return this.subject;
2063    }
2064
2065    public boolean hasSubject() { 
2066      return this.subject != null && !this.subject.isEmpty();
2067    }
2068
2069    /**
2070     * @param value {@link #subject} (The subject, typically a patient, of the imaging study.)
2071     */
2072    public ImagingStudy setSubject(Reference value) { 
2073      this.subject = value;
2074      return this;
2075    }
2076
2077    /**
2078     * @return {@link #encounter} (The healthcare event (e.g. a patient and healthcare provider interaction) during which this ImagingStudy is made.)
2079     */
2080    public Reference getEncounter() { 
2081      if (this.encounter == null)
2082        if (Configuration.errorOnAutoCreate())
2083          throw new Error("Attempt to auto-create ImagingStudy.encounter");
2084        else if (Configuration.doAutoCreate())
2085          this.encounter = new Reference(); // cc
2086      return this.encounter;
2087    }
2088
2089    public boolean hasEncounter() { 
2090      return this.encounter != null && !this.encounter.isEmpty();
2091    }
2092
2093    /**
2094     * @param value {@link #encounter} (The healthcare event (e.g. a patient and healthcare provider interaction) during which this ImagingStudy is made.)
2095     */
2096    public ImagingStudy setEncounter(Reference value) { 
2097      this.encounter = value;
2098      return this;
2099    }
2100
2101    /**
2102     * @return {@link #started} (Date and time the study started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value
2103     */
2104    public DateTimeType getStartedElement() { 
2105      if (this.started == null)
2106        if (Configuration.errorOnAutoCreate())
2107          throw new Error("Attempt to auto-create ImagingStudy.started");
2108        else if (Configuration.doAutoCreate())
2109          this.started = new DateTimeType(); // bb
2110      return this.started;
2111    }
2112
2113    public boolean hasStartedElement() { 
2114      return this.started != null && !this.started.isEmpty();
2115    }
2116
2117    public boolean hasStarted() { 
2118      return this.started != null && !this.started.isEmpty();
2119    }
2120
2121    /**
2122     * @param value {@link #started} (Date and time the study started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value
2123     */
2124    public ImagingStudy setStartedElement(DateTimeType value) { 
2125      this.started = value;
2126      return this;
2127    }
2128
2129    /**
2130     * @return Date and time the study started.
2131     */
2132    public Date getStarted() { 
2133      return this.started == null ? null : this.started.getValue();
2134    }
2135
2136    /**
2137     * @param value Date and time the study started.
2138     */
2139    public ImagingStudy setStarted(Date value) { 
2140      if (value == null)
2141        this.started = null;
2142      else {
2143        if (this.started == null)
2144          this.started = new DateTimeType();
2145        this.started.setValue(value);
2146      }
2147      return this;
2148    }
2149
2150    /**
2151     * @return {@link #basedOn} (A list of the diagnostic requests that resulted in this imaging study being performed.)
2152     */
2153    public List<Reference> getBasedOn() { 
2154      if (this.basedOn == null)
2155        this.basedOn = new ArrayList<Reference>();
2156      return this.basedOn;
2157    }
2158
2159    /**
2160     * @return Returns a reference to <code>this</code> for easy method chaining
2161     */
2162    public ImagingStudy setBasedOn(List<Reference> theBasedOn) { 
2163      this.basedOn = theBasedOn;
2164      return this;
2165    }
2166
2167    public boolean hasBasedOn() { 
2168      if (this.basedOn == null)
2169        return false;
2170      for (Reference item : this.basedOn)
2171        if (!item.isEmpty())
2172          return true;
2173      return false;
2174    }
2175
2176    public Reference addBasedOn() { //3
2177      Reference t = new Reference();
2178      if (this.basedOn == null)
2179        this.basedOn = new ArrayList<Reference>();
2180      this.basedOn.add(t);
2181      return t;
2182    }
2183
2184    public ImagingStudy addBasedOn(Reference t) { //3
2185      if (t == null)
2186        return this;
2187      if (this.basedOn == null)
2188        this.basedOn = new ArrayList<Reference>();
2189      this.basedOn.add(t);
2190      return this;
2191    }
2192
2193    /**
2194     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
2195     */
2196    public Reference getBasedOnFirstRep() { 
2197      if (getBasedOn().isEmpty()) {
2198        addBasedOn();
2199      }
2200      return getBasedOn().get(0);
2201    }
2202
2203    /**
2204     * @return {@link #partOf} (A larger event of which this particular ImagingStudy is a component or step.  For example,  an ImagingStudy as part of a procedure.)
2205     */
2206    public List<Reference> getPartOf() { 
2207      if (this.partOf == null)
2208        this.partOf = new ArrayList<Reference>();
2209      return this.partOf;
2210    }
2211
2212    /**
2213     * @return Returns a reference to <code>this</code> for easy method chaining
2214     */
2215    public ImagingStudy setPartOf(List<Reference> thePartOf) { 
2216      this.partOf = thePartOf;
2217      return this;
2218    }
2219
2220    public boolean hasPartOf() { 
2221      if (this.partOf == null)
2222        return false;
2223      for (Reference item : this.partOf)
2224        if (!item.isEmpty())
2225          return true;
2226      return false;
2227    }
2228
2229    public Reference addPartOf() { //3
2230      Reference t = new Reference();
2231      if (this.partOf == null)
2232        this.partOf = new ArrayList<Reference>();
2233      this.partOf.add(t);
2234      return t;
2235    }
2236
2237    public ImagingStudy addPartOf(Reference t) { //3
2238      if (t == null)
2239        return this;
2240      if (this.partOf == null)
2241        this.partOf = new ArrayList<Reference>();
2242      this.partOf.add(t);
2243      return this;
2244    }
2245
2246    /**
2247     * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3}
2248     */
2249    public Reference getPartOfFirstRep() { 
2250      if (getPartOf().isEmpty()) {
2251        addPartOf();
2252      }
2253      return getPartOf().get(0);
2254    }
2255
2256    /**
2257     * @return {@link #referrer} (The requesting/referring physician.)
2258     */
2259    public Reference getReferrer() { 
2260      if (this.referrer == null)
2261        if (Configuration.errorOnAutoCreate())
2262          throw new Error("Attempt to auto-create ImagingStudy.referrer");
2263        else if (Configuration.doAutoCreate())
2264          this.referrer = new Reference(); // cc
2265      return this.referrer;
2266    }
2267
2268    public boolean hasReferrer() { 
2269      return this.referrer != null && !this.referrer.isEmpty();
2270    }
2271
2272    /**
2273     * @param value {@link #referrer} (The requesting/referring physician.)
2274     */
2275    public ImagingStudy setReferrer(Reference value) { 
2276      this.referrer = value;
2277      return this;
2278    }
2279
2280    /**
2281     * @return {@link #endpoint} (The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.)
2282     */
2283    public List<Reference> getEndpoint() { 
2284      if (this.endpoint == null)
2285        this.endpoint = new ArrayList<Reference>();
2286      return this.endpoint;
2287    }
2288
2289    /**
2290     * @return Returns a reference to <code>this</code> for easy method chaining
2291     */
2292    public ImagingStudy setEndpoint(List<Reference> theEndpoint) { 
2293      this.endpoint = theEndpoint;
2294      return this;
2295    }
2296
2297    public boolean hasEndpoint() { 
2298      if (this.endpoint == null)
2299        return false;
2300      for (Reference item : this.endpoint)
2301        if (!item.isEmpty())
2302          return true;
2303      return false;
2304    }
2305
2306    public Reference addEndpoint() { //3
2307      Reference t = new Reference();
2308      if (this.endpoint == null)
2309        this.endpoint = new ArrayList<Reference>();
2310      this.endpoint.add(t);
2311      return t;
2312    }
2313
2314    public ImagingStudy addEndpoint(Reference t) { //3
2315      if (t == null)
2316        return this;
2317      if (this.endpoint == null)
2318        this.endpoint = new ArrayList<Reference>();
2319      this.endpoint.add(t);
2320      return this;
2321    }
2322
2323    /**
2324     * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist {3}
2325     */
2326    public Reference getEndpointFirstRep() { 
2327      if (getEndpoint().isEmpty()) {
2328        addEndpoint();
2329      }
2330      return getEndpoint().get(0);
2331    }
2332
2333    /**
2334     * @return {@link #numberOfSeries} (Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.). This is the underlying object with id, value and extensions. The accessor "getNumberOfSeries" gives direct access to the value
2335     */
2336    public UnsignedIntType getNumberOfSeriesElement() { 
2337      if (this.numberOfSeries == null)
2338        if (Configuration.errorOnAutoCreate())
2339          throw new Error("Attempt to auto-create ImagingStudy.numberOfSeries");
2340        else if (Configuration.doAutoCreate())
2341          this.numberOfSeries = new UnsignedIntType(); // bb
2342      return this.numberOfSeries;
2343    }
2344
2345    public boolean hasNumberOfSeriesElement() { 
2346      return this.numberOfSeries != null && !this.numberOfSeries.isEmpty();
2347    }
2348
2349    public boolean hasNumberOfSeries() { 
2350      return this.numberOfSeries != null && !this.numberOfSeries.isEmpty();
2351    }
2352
2353    /**
2354     * @param value {@link #numberOfSeries} (Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.). This is the underlying object with id, value and extensions. The accessor "getNumberOfSeries" gives direct access to the value
2355     */
2356    public ImagingStudy setNumberOfSeriesElement(UnsignedIntType value) { 
2357      this.numberOfSeries = value;
2358      return this;
2359    }
2360
2361    /**
2362     * @return Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.
2363     */
2364    public int getNumberOfSeries() { 
2365      return this.numberOfSeries == null || this.numberOfSeries.isEmpty() ? 0 : this.numberOfSeries.getValue();
2366    }
2367
2368    /**
2369     * @param value Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.
2370     */
2371    public ImagingStudy setNumberOfSeries(int value) { 
2372        if (this.numberOfSeries == null)
2373          this.numberOfSeries = new UnsignedIntType();
2374        this.numberOfSeries.setValue(value);
2375      return this;
2376    }
2377
2378    /**
2379     * @return {@link #numberOfInstances} (Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value
2380     */
2381    public UnsignedIntType getNumberOfInstancesElement() { 
2382      if (this.numberOfInstances == null)
2383        if (Configuration.errorOnAutoCreate())
2384          throw new Error("Attempt to auto-create ImagingStudy.numberOfInstances");
2385        else if (Configuration.doAutoCreate())
2386          this.numberOfInstances = new UnsignedIntType(); // bb
2387      return this.numberOfInstances;
2388    }
2389
2390    public boolean hasNumberOfInstancesElement() { 
2391      return this.numberOfInstances != null && !this.numberOfInstances.isEmpty();
2392    }
2393
2394    public boolean hasNumberOfInstances() { 
2395      return this.numberOfInstances != null && !this.numberOfInstances.isEmpty();
2396    }
2397
2398    /**
2399     * @param value {@link #numberOfInstances} (Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value
2400     */
2401    public ImagingStudy setNumberOfInstancesElement(UnsignedIntType value) { 
2402      this.numberOfInstances = value;
2403      return this;
2404    }
2405
2406    /**
2407     * @return Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.
2408     */
2409    public int getNumberOfInstances() { 
2410      return this.numberOfInstances == null || this.numberOfInstances.isEmpty() ? 0 : this.numberOfInstances.getValue();
2411    }
2412
2413    /**
2414     * @param value Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.
2415     */
2416    public ImagingStudy setNumberOfInstances(int value) { 
2417        if (this.numberOfInstances == null)
2418          this.numberOfInstances = new UnsignedIntType();
2419        this.numberOfInstances.setValue(value);
2420      return this;
2421    }
2422
2423    /**
2424     * @return {@link #procedure} (This field corresponds to the DICOM Procedure Code Sequence (0008,1032). This is different from the FHIR Procedure resource that may include the ImagingStudy.)
2425     */
2426    public List<CodeableReference> getProcedure() { 
2427      if (this.procedure == null)
2428        this.procedure = new ArrayList<CodeableReference>();
2429      return this.procedure;
2430    }
2431
2432    /**
2433     * @return Returns a reference to <code>this</code> for easy method chaining
2434     */
2435    public ImagingStudy setProcedure(List<CodeableReference> theProcedure) { 
2436      this.procedure = theProcedure;
2437      return this;
2438    }
2439
2440    public boolean hasProcedure() { 
2441      if (this.procedure == null)
2442        return false;
2443      for (CodeableReference item : this.procedure)
2444        if (!item.isEmpty())
2445          return true;
2446      return false;
2447    }
2448
2449    public CodeableReference addProcedure() { //3
2450      CodeableReference t = new CodeableReference();
2451      if (this.procedure == null)
2452        this.procedure = new ArrayList<CodeableReference>();
2453      this.procedure.add(t);
2454      return t;
2455    }
2456
2457    public ImagingStudy addProcedure(CodeableReference t) { //3
2458      if (t == null)
2459        return this;
2460      if (this.procedure == null)
2461        this.procedure = new ArrayList<CodeableReference>();
2462      this.procedure.add(t);
2463      return this;
2464    }
2465
2466    /**
2467     * @return The first repetition of repeating field {@link #procedure}, creating it if it does not already exist {3}
2468     */
2469    public CodeableReference getProcedureFirstRep() { 
2470      if (getProcedure().isEmpty()) {
2471        addProcedure();
2472      }
2473      return getProcedure().get(0);
2474    }
2475
2476    /**
2477     * @return {@link #location} (The principal physical location where the ImagingStudy was performed.)
2478     */
2479    public Reference getLocation() { 
2480      if (this.location == null)
2481        if (Configuration.errorOnAutoCreate())
2482          throw new Error("Attempt to auto-create ImagingStudy.location");
2483        else if (Configuration.doAutoCreate())
2484          this.location = new Reference(); // cc
2485      return this.location;
2486    }
2487
2488    public boolean hasLocation() { 
2489      return this.location != null && !this.location.isEmpty();
2490    }
2491
2492    /**
2493     * @param value {@link #location} (The principal physical location where the ImagingStudy was performed.)
2494     */
2495    public ImagingStudy setLocation(Reference value) { 
2496      this.location = value;
2497      return this;
2498    }
2499
2500    /**
2501     * @return {@link #reason} (Description of clinical condition indicating why the ImagingStudy was requested, and/or Indicates another resource whose existence justifies this Study.)
2502     */
2503    public List<CodeableReference> getReason() { 
2504      if (this.reason == null)
2505        this.reason = new ArrayList<CodeableReference>();
2506      return this.reason;
2507    }
2508
2509    /**
2510     * @return Returns a reference to <code>this</code> for easy method chaining
2511     */
2512    public ImagingStudy setReason(List<CodeableReference> theReason) { 
2513      this.reason = theReason;
2514      return this;
2515    }
2516
2517    public boolean hasReason() { 
2518      if (this.reason == null)
2519        return false;
2520      for (CodeableReference item : this.reason)
2521        if (!item.isEmpty())
2522          return true;
2523      return false;
2524    }
2525
2526    public CodeableReference addReason() { //3
2527      CodeableReference t = new CodeableReference();
2528      if (this.reason == null)
2529        this.reason = new ArrayList<CodeableReference>();
2530      this.reason.add(t);
2531      return t;
2532    }
2533
2534    public ImagingStudy addReason(CodeableReference t) { //3
2535      if (t == null)
2536        return this;
2537      if (this.reason == null)
2538        this.reason = new ArrayList<CodeableReference>();
2539      this.reason.add(t);
2540      return this;
2541    }
2542
2543    /**
2544     * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3}
2545     */
2546    public CodeableReference getReasonFirstRep() { 
2547      if (getReason().isEmpty()) {
2548        addReason();
2549      }
2550      return getReason().get(0);
2551    }
2552
2553    /**
2554     * @return {@link #note} (Per the recommended DICOM mapping, this element is derived from the Study Description attribute (0008,1030). Observations or findings about the imaging study should be recorded in another resource, e.g. Observation, and not in this element.)
2555     */
2556    public List<Annotation> getNote() { 
2557      if (this.note == null)
2558        this.note = new ArrayList<Annotation>();
2559      return this.note;
2560    }
2561
2562    /**
2563     * @return Returns a reference to <code>this</code> for easy method chaining
2564     */
2565    public ImagingStudy setNote(List<Annotation> theNote) { 
2566      this.note = theNote;
2567      return this;
2568    }
2569
2570    public boolean hasNote() { 
2571      if (this.note == null)
2572        return false;
2573      for (Annotation item : this.note)
2574        if (!item.isEmpty())
2575          return true;
2576      return false;
2577    }
2578
2579    public Annotation addNote() { //3
2580      Annotation t = new Annotation();
2581      if (this.note == null)
2582        this.note = new ArrayList<Annotation>();
2583      this.note.add(t);
2584      return t;
2585    }
2586
2587    public ImagingStudy addNote(Annotation t) { //3
2588      if (t == null)
2589        return this;
2590      if (this.note == null)
2591        this.note = new ArrayList<Annotation>();
2592      this.note.add(t);
2593      return this;
2594    }
2595
2596    /**
2597     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
2598     */
2599    public Annotation getNoteFirstRep() { 
2600      if (getNote().isEmpty()) {
2601        addNote();
2602      }
2603      return getNote().get(0);
2604    }
2605
2606    /**
2607     * @return {@link #description} (The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2608     */
2609    public StringType getDescriptionElement() { 
2610      if (this.description == null)
2611        if (Configuration.errorOnAutoCreate())
2612          throw new Error("Attempt to auto-create ImagingStudy.description");
2613        else if (Configuration.doAutoCreate())
2614          this.description = new StringType(); // bb
2615      return this.description;
2616    }
2617
2618    public boolean hasDescriptionElement() { 
2619      return this.description != null && !this.description.isEmpty();
2620    }
2621
2622    public boolean hasDescription() { 
2623      return this.description != null && !this.description.isEmpty();
2624    }
2625
2626    /**
2627     * @param value {@link #description} (The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2628     */
2629    public ImagingStudy setDescriptionElement(StringType value) { 
2630      this.description = value;
2631      return this;
2632    }
2633
2634    /**
2635     * @return The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed.
2636     */
2637    public String getDescription() { 
2638      return this.description == null ? null : this.description.getValue();
2639    }
2640
2641    /**
2642     * @param value The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed.
2643     */
2644    public ImagingStudy setDescription(String value) { 
2645      if (Utilities.noString(value))
2646        this.description = null;
2647      else {
2648        if (this.description == null)
2649          this.description = new StringType();
2650        this.description.setValue(value);
2651      }
2652      return this;
2653    }
2654
2655    /**
2656     * @return {@link #series} (Each study has one or more series of images or other content.)
2657     */
2658    public List<ImagingStudySeriesComponent> getSeries() { 
2659      if (this.series == null)
2660        this.series = new ArrayList<ImagingStudySeriesComponent>();
2661      return this.series;
2662    }
2663
2664    /**
2665     * @return Returns a reference to <code>this</code> for easy method chaining
2666     */
2667    public ImagingStudy setSeries(List<ImagingStudySeriesComponent> theSeries) { 
2668      this.series = theSeries;
2669      return this;
2670    }
2671
2672    public boolean hasSeries() { 
2673      if (this.series == null)
2674        return false;
2675      for (ImagingStudySeriesComponent item : this.series)
2676        if (!item.isEmpty())
2677          return true;
2678      return false;
2679    }
2680
2681    public ImagingStudySeriesComponent addSeries() { //3
2682      ImagingStudySeriesComponent t = new ImagingStudySeriesComponent();
2683      if (this.series == null)
2684        this.series = new ArrayList<ImagingStudySeriesComponent>();
2685      this.series.add(t);
2686      return t;
2687    }
2688
2689    public ImagingStudy addSeries(ImagingStudySeriesComponent t) { //3
2690      if (t == null)
2691        return this;
2692      if (this.series == null)
2693        this.series = new ArrayList<ImagingStudySeriesComponent>();
2694      this.series.add(t);
2695      return this;
2696    }
2697
2698    /**
2699     * @return The first repetition of repeating field {@link #series}, creating it if it does not already exist {3}
2700     */
2701    public ImagingStudySeriesComponent getSeriesFirstRep() { 
2702      if (getSeries().isEmpty()) {
2703        addSeries();
2704      }
2705      return getSeries().get(0);
2706    }
2707
2708      protected void listChildren(List<Property> children) {
2709        super.listChildren(children);
2710        children.add(new Property("identifier", "Identifier", "Identifiers for the ImagingStudy such as DICOM Study Instance UID.", 0, java.lang.Integer.MAX_VALUE, identifier));
2711        children.add(new Property("status", "code", "The current state of the ImagingStudy resource. This is not the status of any ServiceRequest or Task resources associated with the ImagingStudy.", 0, 1, status));
2712        children.add(new Property("modality", "CodeableConcept", "A list of all the distinct values of series.modality. This may include both acquisition and non-acquisition modalities.", 0, java.lang.Integer.MAX_VALUE, modality));
2713        children.add(new Property("subject", "Reference(Patient|Device|Group)", "The subject, typically a patient, of the imaging study.", 0, 1, subject));
2714        children.add(new Property("encounter", "Reference(Encounter)", "The healthcare event (e.g. a patient and healthcare provider interaction) during which this ImagingStudy is made.", 0, 1, encounter));
2715        children.add(new Property("started", "dateTime", "Date and time the study started.", 0, 1, started));
2716        children.add(new Property("basedOn", "Reference(CarePlan|ServiceRequest|Appointment|AppointmentResponse|Task)", "A list of the diagnostic requests that resulted in this imaging study being performed.", 0, java.lang.Integer.MAX_VALUE, basedOn));
2717        children.add(new Property("partOf", "Reference(Procedure)", "A larger event of which this particular ImagingStudy is a component or step.  For example,  an ImagingStudy as part of a procedure.", 0, java.lang.Integer.MAX_VALUE, partOf));
2718        children.add(new Property("referrer", "Reference(Practitioner|PractitionerRole)", "The requesting/referring physician.", 0, 1, referrer));
2719        children.add(new Property("endpoint", "Reference(Endpoint)", "The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.", 0, java.lang.Integer.MAX_VALUE, endpoint));
2720        children.add(new Property("numberOfSeries", "unsignedInt", "Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.", 0, 1, numberOfSeries));
2721        children.add(new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.", 0, 1, numberOfInstances));
2722        children.add(new Property("procedure", "CodeableReference(PlanDefinition|ActivityDefinition)", "This field corresponds to the DICOM Procedure Code Sequence (0008,1032). This is different from the FHIR Procedure resource that may include the ImagingStudy.", 0, java.lang.Integer.MAX_VALUE, procedure));
2723        children.add(new Property("location", "Reference(Location)", "The principal physical location where the ImagingStudy was performed.", 0, 1, location));
2724        children.add(new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport|DocumentReference)", "Description of clinical condition indicating why the ImagingStudy was requested, and/or Indicates another resource whose existence justifies this Study.", 0, java.lang.Integer.MAX_VALUE, reason));
2725        children.add(new Property("note", "Annotation", "Per the recommended DICOM mapping, this element is derived from the Study Description attribute (0008,1030). Observations or findings about the imaging study should be recorded in another resource, e.g. Observation, and not in this element.", 0, java.lang.Integer.MAX_VALUE, note));
2726        children.add(new Property("description", "string", "The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed.", 0, 1, description));
2727        children.add(new Property("series", "", "Each study has one or more series of images or other content.", 0, java.lang.Integer.MAX_VALUE, series));
2728      }
2729
2730      @Override
2731      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2732        switch (_hash) {
2733        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Identifiers for the ImagingStudy such as DICOM Study Instance UID.", 0, java.lang.Integer.MAX_VALUE, identifier);
2734        case -892481550: /*status*/  return new Property("status", "code", "The current state of the ImagingStudy resource. This is not the status of any ServiceRequest or Task resources associated with the ImagingStudy.", 0, 1, status);
2735        case -622722335: /*modality*/  return new Property("modality", "CodeableConcept", "A list of all the distinct values of series.modality. This may include both acquisition and non-acquisition modalities.", 0, java.lang.Integer.MAX_VALUE, modality);
2736        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Device|Group)", "The subject, typically a patient, of the imaging study.", 0, 1, subject);
2737        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The healthcare event (e.g. a patient and healthcare provider interaction) during which this ImagingStudy is made.", 0, 1, encounter);
2738        case -1897185151: /*started*/  return new Property("started", "dateTime", "Date and time the study started.", 0, 1, started);
2739        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(CarePlan|ServiceRequest|Appointment|AppointmentResponse|Task)", "A list of the diagnostic requests that resulted in this imaging study being performed.", 0, java.lang.Integer.MAX_VALUE, basedOn);
2740        case -995410646: /*partOf*/  return new Property("partOf", "Reference(Procedure)", "A larger event of which this particular ImagingStudy is a component or step.  For example,  an ImagingStudy as part of a procedure.", 0, java.lang.Integer.MAX_VALUE, partOf);
2741        case -722568161: /*referrer*/  return new Property("referrer", "Reference(Practitioner|PractitionerRole)", "The requesting/referring physician.", 0, 1, referrer);
2742        case 1741102485: /*endpoint*/  return new Property("endpoint", "Reference(Endpoint)", "The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.", 0, java.lang.Integer.MAX_VALUE, endpoint);
2743        case 1920000407: /*numberOfSeries*/  return new Property("numberOfSeries", "unsignedInt", "Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.", 0, 1, numberOfSeries);
2744        case -1043544226: /*numberOfInstances*/  return new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.", 0, 1, numberOfInstances);
2745        case -1095204141: /*procedure*/  return new Property("procedure", "CodeableReference(PlanDefinition|ActivityDefinition)", "This field corresponds to the DICOM Procedure Code Sequence (0008,1032). This is different from the FHIR Procedure resource that may include the ImagingStudy.", 0, java.lang.Integer.MAX_VALUE, procedure);
2746        case 1901043637: /*location*/  return new Property("location", "Reference(Location)", "The principal physical location where the ImagingStudy was performed.", 0, 1, location);
2747        case -934964668: /*reason*/  return new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport|DocumentReference)", "Description of clinical condition indicating why the ImagingStudy was requested, and/or Indicates another resource whose existence justifies this Study.", 0, java.lang.Integer.MAX_VALUE, reason);
2748        case 3387378: /*note*/  return new Property("note", "Annotation", "Per the recommended DICOM mapping, this element is derived from the Study Description attribute (0008,1030). Observations or findings about the imaging study should be recorded in another resource, e.g. Observation, and not in this element.", 0, java.lang.Integer.MAX_VALUE, note);
2749        case -1724546052: /*description*/  return new Property("description", "string", "The Imaging Manager description of the study. Institution-generated description or classification of the Study (component) performed.", 0, 1, description);
2750        case -905838985: /*series*/  return new Property("series", "", "Each study has one or more series of images or other content.", 0, java.lang.Integer.MAX_VALUE, series);
2751        default: return super.getNamedProperty(_hash, _name, _checkValid);
2752        }
2753
2754      }
2755
2756      @Override
2757      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2758        switch (hash) {
2759        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2760        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ImagingStudyStatus>
2761        case -622722335: /*modality*/ return this.modality == null ? new Base[0] : this.modality.toArray(new Base[this.modality.size()]); // CodeableConcept
2762        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
2763        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
2764        case -1897185151: /*started*/ return this.started == null ? new Base[0] : new Base[] {this.started}; // DateTimeType
2765        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
2766        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference
2767        case -722568161: /*referrer*/ return this.referrer == null ? new Base[0] : new Base[] {this.referrer}; // Reference
2768        case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference
2769        case 1920000407: /*numberOfSeries*/ return this.numberOfSeries == null ? new Base[0] : new Base[] {this.numberOfSeries}; // UnsignedIntType
2770        case -1043544226: /*numberOfInstances*/ return this.numberOfInstances == null ? new Base[0] : new Base[] {this.numberOfInstances}; // UnsignedIntType
2771        case -1095204141: /*procedure*/ return this.procedure == null ? new Base[0] : this.procedure.toArray(new Base[this.procedure.size()]); // CodeableReference
2772        case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
2773        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference
2774        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
2775        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
2776        case -905838985: /*series*/ return this.series == null ? new Base[0] : this.series.toArray(new Base[this.series.size()]); // ImagingStudySeriesComponent
2777        default: return super.getProperty(hash, name, checkValid);
2778        }
2779
2780      }
2781
2782      @Override
2783      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2784        switch (hash) {
2785        case -1618432855: // identifier
2786          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
2787          return value;
2788        case -892481550: // status
2789          value = new ImagingStudyStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2790          this.status = (Enumeration) value; // Enumeration<ImagingStudyStatus>
2791          return value;
2792        case -622722335: // modality
2793          this.getModality().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
2794          return value;
2795        case -1867885268: // subject
2796          this.subject = TypeConvertor.castToReference(value); // Reference
2797          return value;
2798        case 1524132147: // encounter
2799          this.encounter = TypeConvertor.castToReference(value); // Reference
2800          return value;
2801        case -1897185151: // started
2802          this.started = TypeConvertor.castToDateTime(value); // DateTimeType
2803          return value;
2804        case -332612366: // basedOn
2805          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
2806          return value;
2807        case -995410646: // partOf
2808          this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference
2809          return value;
2810        case -722568161: // referrer
2811          this.referrer = TypeConvertor.castToReference(value); // Reference
2812          return value;
2813        case 1741102485: // endpoint
2814          this.getEndpoint().add(TypeConvertor.castToReference(value)); // Reference
2815          return value;
2816        case 1920000407: // numberOfSeries
2817          this.numberOfSeries = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
2818          return value;
2819        case -1043544226: // numberOfInstances
2820          this.numberOfInstances = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
2821          return value;
2822        case -1095204141: // procedure
2823          this.getProcedure().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
2824          return value;
2825        case 1901043637: // location
2826          this.location = TypeConvertor.castToReference(value); // Reference
2827          return value;
2828        case -934964668: // reason
2829          this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
2830          return value;
2831        case 3387378: // note
2832          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
2833          return value;
2834        case -1724546052: // description
2835          this.description = TypeConvertor.castToString(value); // StringType
2836          return value;
2837        case -905838985: // series
2838          this.getSeries().add((ImagingStudySeriesComponent) value); // ImagingStudySeriesComponent
2839          return value;
2840        default: return super.setProperty(hash, name, value);
2841        }
2842
2843      }
2844
2845      @Override
2846      public Base setProperty(String name, Base value) throws FHIRException {
2847        if (name.equals("identifier")) {
2848          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2849        } else if (name.equals("status")) {
2850          value = new ImagingStudyStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2851          this.status = (Enumeration) value; // Enumeration<ImagingStudyStatus>
2852        } else if (name.equals("modality")) {
2853          this.getModality().add(TypeConvertor.castToCodeableConcept(value));
2854        } else if (name.equals("subject")) {
2855          this.subject = TypeConvertor.castToReference(value); // Reference
2856        } else if (name.equals("encounter")) {
2857          this.encounter = TypeConvertor.castToReference(value); // Reference
2858        } else if (name.equals("started")) {
2859          this.started = TypeConvertor.castToDateTime(value); // DateTimeType
2860        } else if (name.equals("basedOn")) {
2861          this.getBasedOn().add(TypeConvertor.castToReference(value));
2862        } else if (name.equals("partOf")) {
2863          this.getPartOf().add(TypeConvertor.castToReference(value));
2864        } else if (name.equals("referrer")) {
2865          this.referrer = TypeConvertor.castToReference(value); // Reference
2866        } else if (name.equals("endpoint")) {
2867          this.getEndpoint().add(TypeConvertor.castToReference(value));
2868        } else if (name.equals("numberOfSeries")) {
2869          this.numberOfSeries = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
2870        } else if (name.equals("numberOfInstances")) {
2871          this.numberOfInstances = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
2872        } else if (name.equals("procedure")) {
2873          this.getProcedure().add(TypeConvertor.castToCodeableReference(value));
2874        } else if (name.equals("location")) {
2875          this.location = TypeConvertor.castToReference(value); // Reference
2876        } else if (name.equals("reason")) {
2877          this.getReason().add(TypeConvertor.castToCodeableReference(value));
2878        } else if (name.equals("note")) {
2879          this.getNote().add(TypeConvertor.castToAnnotation(value));
2880        } else if (name.equals("description")) {
2881          this.description = TypeConvertor.castToString(value); // StringType
2882        } else if (name.equals("series")) {
2883          this.getSeries().add((ImagingStudySeriesComponent) value);
2884        } else
2885          return super.setProperty(name, value);
2886        return value;
2887      }
2888
2889  @Override
2890  public void removeChild(String name, Base value) throws FHIRException {
2891        if (name.equals("identifier")) {
2892          this.getIdentifier().remove(value);
2893        } else if (name.equals("status")) {
2894          value = new ImagingStudyStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2895          this.status = (Enumeration) value; // Enumeration<ImagingStudyStatus>
2896        } else if (name.equals("modality")) {
2897          this.getModality().remove(value);
2898        } else if (name.equals("subject")) {
2899          this.subject = null;
2900        } else if (name.equals("encounter")) {
2901          this.encounter = null;
2902        } else if (name.equals("started")) {
2903          this.started = null;
2904        } else if (name.equals("basedOn")) {
2905          this.getBasedOn().remove(value);
2906        } else if (name.equals("partOf")) {
2907          this.getPartOf().remove(value);
2908        } else if (name.equals("referrer")) {
2909          this.referrer = null;
2910        } else if (name.equals("endpoint")) {
2911          this.getEndpoint().remove(value);
2912        } else if (name.equals("numberOfSeries")) {
2913          this.numberOfSeries = null;
2914        } else if (name.equals("numberOfInstances")) {
2915          this.numberOfInstances = null;
2916        } else if (name.equals("procedure")) {
2917          this.getProcedure().remove(value);
2918        } else if (name.equals("location")) {
2919          this.location = null;
2920        } else if (name.equals("reason")) {
2921          this.getReason().remove(value);
2922        } else if (name.equals("note")) {
2923          this.getNote().remove(value);
2924        } else if (name.equals("description")) {
2925          this.description = null;
2926        } else if (name.equals("series")) {
2927          this.getSeries().remove((ImagingStudySeriesComponent) value);
2928        } else
2929          super.removeChild(name, value);
2930        
2931      }
2932
2933      @Override
2934      public Base makeProperty(int hash, String name) throws FHIRException {
2935        switch (hash) {
2936        case -1618432855:  return addIdentifier(); 
2937        case -892481550:  return getStatusElement();
2938        case -622722335:  return addModality(); 
2939        case -1867885268:  return getSubject();
2940        case 1524132147:  return getEncounter();
2941        case -1897185151:  return getStartedElement();
2942        case -332612366:  return addBasedOn(); 
2943        case -995410646:  return addPartOf(); 
2944        case -722568161:  return getReferrer();
2945        case 1741102485:  return addEndpoint(); 
2946        case 1920000407:  return getNumberOfSeriesElement();
2947        case -1043544226:  return getNumberOfInstancesElement();
2948        case -1095204141:  return addProcedure(); 
2949        case 1901043637:  return getLocation();
2950        case -934964668:  return addReason(); 
2951        case 3387378:  return addNote(); 
2952        case -1724546052:  return getDescriptionElement();
2953        case -905838985:  return addSeries(); 
2954        default: return super.makeProperty(hash, name);
2955        }
2956
2957      }
2958
2959      @Override
2960      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2961        switch (hash) {
2962        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2963        case -892481550: /*status*/ return new String[] {"code"};
2964        case -622722335: /*modality*/ return new String[] {"CodeableConcept"};
2965        case -1867885268: /*subject*/ return new String[] {"Reference"};
2966        case 1524132147: /*encounter*/ return new String[] {"Reference"};
2967        case -1897185151: /*started*/ return new String[] {"dateTime"};
2968        case -332612366: /*basedOn*/ return new String[] {"Reference"};
2969        case -995410646: /*partOf*/ return new String[] {"Reference"};
2970        case -722568161: /*referrer*/ return new String[] {"Reference"};
2971        case 1741102485: /*endpoint*/ return new String[] {"Reference"};
2972        case 1920000407: /*numberOfSeries*/ return new String[] {"unsignedInt"};
2973        case -1043544226: /*numberOfInstances*/ return new String[] {"unsignedInt"};
2974        case -1095204141: /*procedure*/ return new String[] {"CodeableReference"};
2975        case 1901043637: /*location*/ return new String[] {"Reference"};
2976        case -934964668: /*reason*/ return new String[] {"CodeableReference"};
2977        case 3387378: /*note*/ return new String[] {"Annotation"};
2978        case -1724546052: /*description*/ return new String[] {"string"};
2979        case -905838985: /*series*/ return new String[] {};
2980        default: return super.getTypesForProperty(hash, name);
2981        }
2982
2983      }
2984
2985      @Override
2986      public Base addChild(String name) throws FHIRException {
2987        if (name.equals("identifier")) {
2988          return addIdentifier();
2989        }
2990        else if (name.equals("status")) {
2991          throw new FHIRException("Cannot call addChild on a singleton property ImagingStudy.status");
2992        }
2993        else if (name.equals("modality")) {
2994          return addModality();
2995        }
2996        else if (name.equals("subject")) {
2997          this.subject = new Reference();
2998          return this.subject;
2999        }
3000        else if (name.equals("encounter")) {
3001          this.encounter = new Reference();
3002          return this.encounter;
3003        }
3004        else if (name.equals("started")) {
3005          throw new FHIRException("Cannot call addChild on a singleton property ImagingStudy.started");
3006        }
3007        else if (name.equals("basedOn")) {
3008          return addBasedOn();
3009        }
3010        else if (name.equals("partOf")) {
3011          return addPartOf();
3012        }
3013        else if (name.equals("referrer")) {
3014          this.referrer = new Reference();
3015          return this.referrer;
3016        }
3017        else if (name.equals("endpoint")) {
3018          return addEndpoint();
3019        }
3020        else if (name.equals("numberOfSeries")) {
3021          throw new FHIRException("Cannot call addChild on a singleton property ImagingStudy.numberOfSeries");
3022        }
3023        else if (name.equals("numberOfInstances")) {
3024          throw new FHIRException("Cannot call addChild on a singleton property ImagingStudy.numberOfInstances");
3025        }
3026        else if (name.equals("procedure")) {
3027          return addProcedure();
3028        }
3029        else if (name.equals("location")) {
3030          this.location = new Reference();
3031          return this.location;
3032        }
3033        else if (name.equals("reason")) {
3034          return addReason();
3035        }
3036        else if (name.equals("note")) {
3037          return addNote();
3038        }
3039        else if (name.equals("description")) {
3040          throw new FHIRException("Cannot call addChild on a singleton property ImagingStudy.description");
3041        }
3042        else if (name.equals("series")) {
3043          return addSeries();
3044        }
3045        else
3046          return super.addChild(name);
3047      }
3048
3049  public String fhirType() {
3050    return "ImagingStudy";
3051
3052  }
3053
3054      public ImagingStudy copy() {
3055        ImagingStudy dst = new ImagingStudy();
3056        copyValues(dst);
3057        return dst;
3058      }
3059
3060      public void copyValues(ImagingStudy dst) {
3061        super.copyValues(dst);
3062        if (identifier != null) {
3063          dst.identifier = new ArrayList<Identifier>();
3064          for (Identifier i : identifier)
3065            dst.identifier.add(i.copy());
3066        };
3067        dst.status = status == null ? null : status.copy();
3068        if (modality != null) {
3069          dst.modality = new ArrayList<CodeableConcept>();
3070          for (CodeableConcept i : modality)
3071            dst.modality.add(i.copy());
3072        };
3073        dst.subject = subject == null ? null : subject.copy();
3074        dst.encounter = encounter == null ? null : encounter.copy();
3075        dst.started = started == null ? null : started.copy();
3076        if (basedOn != null) {
3077          dst.basedOn = new ArrayList<Reference>();
3078          for (Reference i : basedOn)
3079            dst.basedOn.add(i.copy());
3080        };
3081        if (partOf != null) {
3082          dst.partOf = new ArrayList<Reference>();
3083          for (Reference i : partOf)
3084            dst.partOf.add(i.copy());
3085        };
3086        dst.referrer = referrer == null ? null : referrer.copy();
3087        if (endpoint != null) {
3088          dst.endpoint = new ArrayList<Reference>();
3089          for (Reference i : endpoint)
3090            dst.endpoint.add(i.copy());
3091        };
3092        dst.numberOfSeries = numberOfSeries == null ? null : numberOfSeries.copy();
3093        dst.numberOfInstances = numberOfInstances == null ? null : numberOfInstances.copy();
3094        if (procedure != null) {
3095          dst.procedure = new ArrayList<CodeableReference>();
3096          for (CodeableReference i : procedure)
3097            dst.procedure.add(i.copy());
3098        };
3099        dst.location = location == null ? null : location.copy();
3100        if (reason != null) {
3101          dst.reason = new ArrayList<CodeableReference>();
3102          for (CodeableReference i : reason)
3103            dst.reason.add(i.copy());
3104        };
3105        if (note != null) {
3106          dst.note = new ArrayList<Annotation>();
3107          for (Annotation i : note)
3108            dst.note.add(i.copy());
3109        };
3110        dst.description = description == null ? null : description.copy();
3111        if (series != null) {
3112          dst.series = new ArrayList<ImagingStudySeriesComponent>();
3113          for (ImagingStudySeriesComponent i : series)
3114            dst.series.add(i.copy());
3115        };
3116      }
3117
3118      protected ImagingStudy typedCopy() {
3119        return copy();
3120      }
3121
3122      @Override
3123      public boolean equalsDeep(Base other_) {
3124        if (!super.equalsDeep(other_))
3125          return false;
3126        if (!(other_ instanceof ImagingStudy))
3127          return false;
3128        ImagingStudy o = (ImagingStudy) other_;
3129        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(modality, o.modality, true)
3130           && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) && compareDeep(started, o.started, true)
3131           && compareDeep(basedOn, o.basedOn, true) && compareDeep(partOf, o.partOf, true) && compareDeep(referrer, o.referrer, true)
3132           && compareDeep(endpoint, o.endpoint, true) && compareDeep(numberOfSeries, o.numberOfSeries, true)
3133           && compareDeep(numberOfInstances, o.numberOfInstances, true) && compareDeep(procedure, o.procedure, true)
3134           && compareDeep(location, o.location, true) && compareDeep(reason, o.reason, true) && compareDeep(note, o.note, true)
3135           && compareDeep(description, o.description, true) && compareDeep(series, o.series, true);
3136      }
3137
3138      @Override
3139      public boolean equalsShallow(Base other_) {
3140        if (!super.equalsShallow(other_))
3141          return false;
3142        if (!(other_ instanceof ImagingStudy))
3143          return false;
3144        ImagingStudy o = (ImagingStudy) other_;
3145        return compareValues(status, o.status, true) && compareValues(started, o.started, true) && compareValues(numberOfSeries, o.numberOfSeries, true)
3146           && compareValues(numberOfInstances, o.numberOfInstances, true) && compareValues(description, o.description, true)
3147          ;
3148      }
3149
3150      public boolean isEmpty() {
3151        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, modality
3152          , subject, encounter, started, basedOn, partOf, referrer, endpoint, numberOfSeries
3153          , numberOfInstances, procedure, location, reason, note, description, series);
3154      }
3155
3156  @Override
3157  public ResourceType getResourceType() {
3158    return ResourceType.ImagingStudy;
3159   }
3160
3161 /**
3162   * Search parameter: <b>based-on</b>
3163   * <p>
3164   * Description: <b>The order for the image, such as Accession Number associated with a ServiceRequest</b><br>
3165   * Type: <b>reference</b><br>
3166   * Path: <b>ImagingStudy.basedOn</b><br>
3167   * </p>
3168   */
3169  @SearchParamDefinition(name="based-on", path="ImagingStudy.basedOn", description="The order for the image, such as Accession Number associated with a ServiceRequest", type="reference", target={Appointment.class, AppointmentResponse.class, CarePlan.class, ServiceRequest.class, Task.class } )
3170  public static final String SP_BASED_ON = "based-on";
3171 /**
3172   * <b>Fluent Client</b> search parameter constant for <b>based-on</b>
3173   * <p>
3174   * Description: <b>The order for the image, such as Accession Number associated with a ServiceRequest</b><br>
3175   * Type: <b>reference</b><br>
3176   * Path: <b>ImagingStudy.basedOn</b><br>
3177   * </p>
3178   */
3179  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON);
3180
3181/**
3182   * Constant for fluent queries to be used to add include statements. Specifies
3183   * the path value of "<b>ImagingStudy:based-on</b>".
3184   */
3185  public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("ImagingStudy:based-on").toLocked();
3186
3187 /**
3188   * Search parameter: <b>body-site</b>
3189   * <p>
3190   * Description: <b>The body site code studied</b><br>
3191   * Type: <b>token</b><br>
3192   * Path: <b>ImagingStudy.series.bodySite.concept</b><br>
3193   * </p>
3194   */
3195  @SearchParamDefinition(name="body-site", path="ImagingStudy.series.bodySite.concept", description="The body site code studied", type="token" )
3196  public static final String SP_BODY_SITE = "body-site";
3197 /**
3198   * <b>Fluent Client</b> search parameter constant for <b>body-site</b>
3199   * <p>
3200   * Description: <b>The body site code studied</b><br>
3201   * Type: <b>token</b><br>
3202   * Path: <b>ImagingStudy.series.bodySite.concept</b><br>
3203   * </p>
3204   */
3205  public static final ca.uhn.fhir.rest.gclient.TokenClientParam BODY_SITE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BODY_SITE);
3206
3207 /**
3208   * Search parameter: <b>body-structure</b>
3209   * <p>
3210   * Description: <b>The body structure resource associated with the ImagingStudy</b><br>
3211   * Type: <b>reference</b><br>
3212   * Path: <b>ImagingStudy.series.bodySite.reference</b><br>
3213   * </p>
3214   */
3215  @SearchParamDefinition(name="body-structure", path="ImagingStudy.series.bodySite.reference", description="The body structure resource associated with the ImagingStudy", type="reference", target={BodyStructure.class } )
3216  public static final String SP_BODY_STRUCTURE = "body-structure";
3217 /**
3218   * <b>Fluent Client</b> search parameter constant for <b>body-structure</b>
3219   * <p>
3220   * Description: <b>The body structure resource associated with the ImagingStudy</b><br>
3221   * Type: <b>reference</b><br>
3222   * Path: <b>ImagingStudy.series.bodySite.reference</b><br>
3223   * </p>
3224   */
3225  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BODY_STRUCTURE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BODY_STRUCTURE);
3226
3227/**
3228   * Constant for fluent queries to be used to add include statements. Specifies
3229   * the path value of "<b>ImagingStudy:body-structure</b>".
3230   */
3231  public static final ca.uhn.fhir.model.api.Include INCLUDE_BODY_STRUCTURE = new ca.uhn.fhir.model.api.Include("ImagingStudy:body-structure").toLocked();
3232
3233 /**
3234   * Search parameter: <b>dicom-class</b>
3235   * <p>
3236   * Description: <b>The type of the instance</b><br>
3237   * Type: <b>token</b><br>
3238   * Path: <b>ImagingStudy.series.instance.sopClass</b><br>
3239   * </p>
3240   */
3241  @SearchParamDefinition(name="dicom-class", path="ImagingStudy.series.instance.sopClass", description="The type of the instance", type="token" )
3242  public static final String SP_DICOM_CLASS = "dicom-class";
3243 /**
3244   * <b>Fluent Client</b> search parameter constant for <b>dicom-class</b>
3245   * <p>
3246   * Description: <b>The type of the instance</b><br>
3247   * Type: <b>token</b><br>
3248   * Path: <b>ImagingStudy.series.instance.sopClass</b><br>
3249   * </p>
3250   */
3251  public static final ca.uhn.fhir.rest.gclient.TokenClientParam DICOM_CLASS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DICOM_CLASS);
3252
3253 /**
3254   * Search parameter: <b>endpoint</b>
3255   * <p>
3256   * Description: <b>The endpoint for the study or series</b><br>
3257   * Type: <b>reference</b><br>
3258   * Path: <b>ImagingStudy.endpoint | ImagingStudy.series.endpoint</b><br>
3259   * </p>
3260   */
3261  @SearchParamDefinition(name="endpoint", path="ImagingStudy.endpoint | ImagingStudy.series.endpoint", description="The endpoint for the study or series", type="reference", target={Endpoint.class } )
3262  public static final String SP_ENDPOINT = "endpoint";
3263 /**
3264   * <b>Fluent Client</b> search parameter constant for <b>endpoint</b>
3265   * <p>
3266   * Description: <b>The endpoint for the study or series</b><br>
3267   * Type: <b>reference</b><br>
3268   * Path: <b>ImagingStudy.endpoint | ImagingStudy.series.endpoint</b><br>
3269   * </p>
3270   */
3271  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENDPOINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENDPOINT);
3272
3273/**
3274   * Constant for fluent queries to be used to add include statements. Specifies
3275   * the path value of "<b>ImagingStudy:endpoint</b>".
3276   */
3277  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENDPOINT = new ca.uhn.fhir.model.api.Include("ImagingStudy:endpoint").toLocked();
3278
3279 /**
3280   * Search parameter: <b>instance</b>
3281   * <p>
3282   * Description: <b>SOP Instance UID for an instance</b><br>
3283   * Type: <b>token</b><br>
3284   * Path: <b>ImagingStudy.series.instance.uid</b><br>
3285   * </p>
3286   */
3287  @SearchParamDefinition(name="instance", path="ImagingStudy.series.instance.uid", description="SOP Instance UID for an instance", type="token" )
3288  public static final String SP_INSTANCE = "instance";
3289 /**
3290   * <b>Fluent Client</b> search parameter constant for <b>instance</b>
3291   * <p>
3292   * Description: <b>SOP Instance UID for an instance</b><br>
3293   * Type: <b>token</b><br>
3294   * Path: <b>ImagingStudy.series.instance.uid</b><br>
3295   * </p>
3296   */
3297  public static final ca.uhn.fhir.rest.gclient.TokenClientParam INSTANCE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INSTANCE);
3298
3299 /**
3300   * Search parameter: <b>modality</b>
3301   * <p>
3302   * Description: <b>The modality of the series</b><br>
3303   * Type: <b>token</b><br>
3304   * Path: <b>ImagingStudy.series.modality</b><br>
3305   * </p>
3306   */
3307  @SearchParamDefinition(name="modality", path="ImagingStudy.series.modality", description="The modality of the series", type="token" )
3308  public static final String SP_MODALITY = "modality";
3309 /**
3310   * <b>Fluent Client</b> search parameter constant for <b>modality</b>
3311   * <p>
3312   * Description: <b>The modality of the series</b><br>
3313   * Type: <b>token</b><br>
3314   * Path: <b>ImagingStudy.series.modality</b><br>
3315   * </p>
3316   */
3317  public static final ca.uhn.fhir.rest.gclient.TokenClientParam MODALITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_MODALITY);
3318
3319 /**
3320   * Search parameter: <b>performer</b>
3321   * <p>
3322   * Description: <b>The person who performed the study</b><br>
3323   * Type: <b>reference</b><br>
3324   * Path: <b>ImagingStudy.series.performer.actor</b><br>
3325   * </p>
3326   */
3327  @SearchParamDefinition(name="performer", path="ImagingStudy.series.performer.actor", description="The person who performed the study", type="reference", target={CareTeam.class, Device.class, HealthcareService.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
3328  public static final String SP_PERFORMER = "performer";
3329 /**
3330   * <b>Fluent Client</b> search parameter constant for <b>performer</b>
3331   * <p>
3332   * Description: <b>The person who performed the study</b><br>
3333   * Type: <b>reference</b><br>
3334   * Path: <b>ImagingStudy.series.performer.actor</b><br>
3335   * </p>
3336   */
3337  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER);
3338
3339/**
3340   * Constant for fluent queries to be used to add include statements. Specifies
3341   * the path value of "<b>ImagingStudy:performer</b>".
3342   */
3343  public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("ImagingStudy:performer").toLocked();
3344
3345 /**
3346   * Search parameter: <b>reason</b>
3347   * <p>
3348   * Description: <b>The reason for the study</b><br>
3349   * Type: <b>token</b><br>
3350   * Path: <b>null</b><br>
3351   * </p>
3352   */
3353  @SearchParamDefinition(name="reason", path="", description="The reason for the study", type="token" )
3354  public static final String SP_REASON = "reason";
3355 /**
3356   * <b>Fluent Client</b> search parameter constant for <b>reason</b>
3357   * <p>
3358   * Description: <b>The reason for the study</b><br>
3359   * Type: <b>token</b><br>
3360   * Path: <b>null</b><br>
3361   * </p>
3362   */
3363  public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON);
3364
3365 /**
3366   * Search parameter: <b>referrer</b>
3367   * <p>
3368   * Description: <b>The referring physician</b><br>
3369   * Type: <b>reference</b><br>
3370   * Path: <b>ImagingStudy.referrer</b><br>
3371   * </p>
3372   */
3373  @SearchParamDefinition(name="referrer", path="ImagingStudy.referrer", description="The referring physician", type="reference", target={Practitioner.class, PractitionerRole.class } )
3374  public static final String SP_REFERRER = "referrer";
3375 /**
3376   * <b>Fluent Client</b> search parameter constant for <b>referrer</b>
3377   * <p>
3378   * Description: <b>The referring physician</b><br>
3379   * Type: <b>reference</b><br>
3380   * Path: <b>ImagingStudy.referrer</b><br>
3381   * </p>
3382   */
3383  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REFERRER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REFERRER);
3384
3385/**
3386   * Constant for fluent queries to be used to add include statements. Specifies
3387   * the path value of "<b>ImagingStudy:referrer</b>".
3388   */
3389  public static final ca.uhn.fhir.model.api.Include INCLUDE_REFERRER = new ca.uhn.fhir.model.api.Include("ImagingStudy:referrer").toLocked();
3390
3391 /**
3392   * Search parameter: <b>series</b>
3393   * <p>
3394   * Description: <b>DICOM Series Instance UID for a series</b><br>
3395   * Type: <b>token</b><br>
3396   * Path: <b>ImagingStudy.series.uid</b><br>
3397   * </p>
3398   */
3399  @SearchParamDefinition(name="series", path="ImagingStudy.series.uid", description="DICOM Series Instance UID for a series", type="token" )
3400  public static final String SP_SERIES = "series";
3401 /**
3402   * <b>Fluent Client</b> search parameter constant for <b>series</b>
3403   * <p>
3404   * Description: <b>DICOM Series Instance UID for a series</b><br>
3405   * Type: <b>token</b><br>
3406   * Path: <b>ImagingStudy.series.uid</b><br>
3407   * </p>
3408   */
3409  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SERIES = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SERIES);
3410
3411 /**
3412   * Search parameter: <b>started</b>
3413   * <p>
3414   * Description: <b>When the study was started</b><br>
3415   * Type: <b>date</b><br>
3416   * Path: <b>ImagingStudy.started</b><br>
3417   * </p>
3418   */
3419  @SearchParamDefinition(name="started", path="ImagingStudy.started", description="When the study was started", type="date" )
3420  public static final String SP_STARTED = "started";
3421 /**
3422   * <b>Fluent Client</b> search parameter constant for <b>started</b>
3423   * <p>
3424   * Description: <b>When the study was started</b><br>
3425   * Type: <b>date</b><br>
3426   * Path: <b>ImagingStudy.started</b><br>
3427   * </p>
3428   */
3429  public static final ca.uhn.fhir.rest.gclient.DateClientParam STARTED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_STARTED);
3430
3431 /**
3432   * Search parameter: <b>status</b>
3433   * <p>
3434   * Description: <b>The status of the study</b><br>
3435   * Type: <b>token</b><br>
3436   * Path: <b>ImagingStudy.status</b><br>
3437   * </p>
3438   */
3439  @SearchParamDefinition(name="status", path="ImagingStudy.status", description="The status of the study", type="token" )
3440  public static final String SP_STATUS = "status";
3441 /**
3442   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3443   * <p>
3444   * Description: <b>The status of the study</b><br>
3445   * Type: <b>token</b><br>
3446   * Path: <b>ImagingStudy.status</b><br>
3447   * </p>
3448   */
3449  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3450
3451 /**
3452   * Search parameter: <b>subject</b>
3453   * <p>
3454   * Description: <b>Who the study is about</b><br>
3455   * Type: <b>reference</b><br>
3456   * Path: <b>ImagingStudy.subject</b><br>
3457   * </p>
3458   */
3459  @SearchParamDefinition(name="subject", path="ImagingStudy.subject", description="Who the study is about", type="reference", target={Device.class, Group.class, Patient.class } )
3460  public static final String SP_SUBJECT = "subject";
3461 /**
3462   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
3463   * <p>
3464   * Description: <b>Who the study is about</b><br>
3465   * Type: <b>reference</b><br>
3466   * Path: <b>ImagingStudy.subject</b><br>
3467   * </p>
3468   */
3469  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
3470
3471/**
3472   * Constant for fluent queries to be used to add include statements. Specifies
3473   * the path value of "<b>ImagingStudy:subject</b>".
3474   */
3475  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("ImagingStudy:subject").toLocked();
3476
3477 /**
3478   * Search parameter: <b>encounter</b>
3479   * <p>
3480   * Description: <b>Multiple Resources: 
3481
3482* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
3483* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
3484* [ChargeItem](chargeitem.html): Encounter associated with event
3485* [Claim](claim.html): Encounters associated with a billed line item
3486* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
3487* [Communication](communication.html): The Encounter during which this Communication was created
3488* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
3489* [Composition](composition.html): Context of the Composition
3490* [Condition](condition.html): The Encounter during which this Condition was created
3491* [DeviceRequest](devicerequest.html): Encounter during which request was created
3492* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
3493* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
3494* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
3495* [Flag](flag.html): Alert relevant during encounter
3496* [ImagingStudy](imagingstudy.html): The context of the study
3497* [List](list.html): Context in which list created
3498* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
3499* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
3500* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
3501* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
3502* [Observation](observation.html): Encounter related to the observation
3503* [Procedure](procedure.html): The Encounter during which this Procedure was created
3504* [Provenance](provenance.html): Encounter related to the Provenance
3505* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
3506* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
3507* [RiskAssessment](riskassessment.html): Where was assessment performed?
3508* [ServiceRequest](servicerequest.html): An encounter in which this request is made
3509* [Task](task.html): Search by encounter
3510* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
3511</b><br>
3512   * Type: <b>reference</b><br>
3513   * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br>
3514   * </p>
3515   */
3516  @SearchParamDefinition(name="encounter", path="AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter", description="Multiple Resources: \r\n\r\n* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent\r\n* [CarePlan](careplan.html): The Encounter during which this CarePlan was created\r\n* [ChargeItem](chargeitem.html): Encounter associated with event\r\n* [Claim](claim.html): Encounters associated with a billed line item\r\n* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created\r\n* [Communication](communication.html): The Encounter during which this Communication was created\r\n* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created\r\n* [Composition](composition.html): Context of the Composition\r\n* [Condition](condition.html): The Encounter during which this Condition was created\r\n* [DeviceRequest](devicerequest.html): Encounter during which request was created\r\n* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made\r\n* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values\r\n* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item\r\n* [Flag](flag.html): Alert relevant during encounter\r\n* [ImagingStudy](imagingstudy.html): The context of the study\r\n* [List](list.html): Context in which list created\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier\r\n* [Observation](observation.html): Encounter related to the observation\r\n* [Procedure](procedure.html): The Encounter during which this Procedure was created\r\n* [Provenance](provenance.html): Encounter related to the Provenance\r\n* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response\r\n* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to\r\n* [RiskAssessment](riskassessment.html): Where was assessment performed?\r\n* [ServiceRequest](servicerequest.html): An encounter in which this request is made\r\n* [Task](task.html): Search by encounter\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier\r\n", type="reference", target={Encounter.class } )
3517  public static final String SP_ENCOUNTER = "encounter";
3518 /**
3519   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
3520   * <p>
3521   * Description: <b>Multiple Resources: 
3522
3523* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
3524* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
3525* [ChargeItem](chargeitem.html): Encounter associated with event
3526* [Claim](claim.html): Encounters associated with a billed line item
3527* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
3528* [Communication](communication.html): The Encounter during which this Communication was created
3529* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
3530* [Composition](composition.html): Context of the Composition
3531* [Condition](condition.html): The Encounter during which this Condition was created
3532* [DeviceRequest](devicerequest.html): Encounter during which request was created
3533* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
3534* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
3535* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
3536* [Flag](flag.html): Alert relevant during encounter
3537* [ImagingStudy](imagingstudy.html): The context of the study
3538* [List](list.html): Context in which list created
3539* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
3540* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
3541* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
3542* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
3543* [Observation](observation.html): Encounter related to the observation
3544* [Procedure](procedure.html): The Encounter during which this Procedure was created
3545* [Provenance](provenance.html): Encounter related to the Provenance
3546* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
3547* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
3548* [RiskAssessment](riskassessment.html): Where was assessment performed?
3549* [ServiceRequest](servicerequest.html): An encounter in which this request is made
3550* [Task](task.html): Search by encounter
3551* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
3552</b><br>
3553   * Type: <b>reference</b><br>
3554   * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br>
3555   * </p>
3556   */
3557  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
3558
3559/**
3560   * Constant for fluent queries to be used to add include statements. Specifies
3561   * the path value of "<b>ImagingStudy:encounter</b>".
3562   */
3563  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("ImagingStudy:encounter").toLocked();
3564
3565 /**
3566   * Search parameter: <b>identifier</b>
3567   * <p>
3568   * Description: <b>Multiple Resources: 
3569
3570* [Account](account.html): Account number
3571* [AdverseEvent](adverseevent.html): Business identifier for the event
3572* [AllergyIntolerance](allergyintolerance.html): External ids for this item
3573* [Appointment](appointment.html): An Identifier of the Appointment
3574* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
3575* [Basic](basic.html): Business identifier
3576* [BodyStructure](bodystructure.html): Bodystructure identifier
3577* [CarePlan](careplan.html): External Ids for this plan
3578* [CareTeam](careteam.html): External Ids for this team
3579* [ChargeItem](chargeitem.html): Business Identifier for item
3580* [Claim](claim.html): The primary identifier of the financial resource
3581* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
3582* [ClinicalImpression](clinicalimpression.html): Business identifier
3583* [Communication](communication.html): Unique identifier
3584* [CommunicationRequest](communicationrequest.html): Unique identifier
3585* [Composition](composition.html): Version-independent identifier for the Composition
3586* [Condition](condition.html): A unique identifier of the condition record
3587* [Consent](consent.html): Identifier for this record (external references)
3588* [Contract](contract.html): The identity of the contract
3589* [Coverage](coverage.html): The primary identifier of the insured and the coverage
3590* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
3591* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
3592* [DetectedIssue](detectedissue.html): Unique id for the detected issue
3593* [DeviceRequest](devicerequest.html): Business identifier for request/order
3594* [DeviceUsage](deviceusage.html): Search by identifier
3595* [DiagnosticReport](diagnosticreport.html): An identifier for the report
3596* [DocumentReference](documentreference.html): Identifier of the attachment binary
3597* [Encounter](encounter.html): Identifier(s) by which this encounter is known
3598* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
3599* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3600* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
3601* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3602* [Flag](flag.html): Business identifier
3603* [Goal](goal.html): External Ids for this goal
3604* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
3605* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
3606* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
3607* [Immunization](immunization.html): Business identifier
3608* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
3609* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
3610* [Invoice](invoice.html): Business Identifier for item
3611* [List](list.html): Business identifier
3612* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
3613* [Medication](medication.html): Returns medications with this external identifier
3614* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3615* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3616* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3617* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
3618* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
3619* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
3620* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3621* [Observation](observation.html): The unique id for a particular observation
3622* [Person](person.html): A person Identifier
3623* [Procedure](procedure.html): A unique identifier for a procedure
3624* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
3625* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
3626* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
3627* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
3628* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3629* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3630* [Specimen](specimen.html): The unique identifier associated with the specimen
3631* [SupplyDelivery](supplydelivery.html): External identifier
3632* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3633* [Task](task.html): Search for a task instance by its business identifier
3634* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3635</b><br>
3636   * Type: <b>token</b><br>
3637   * 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>
3638   * </p>
3639   */
3640  @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" )
3641  public static final String SP_IDENTIFIER = "identifier";
3642 /**
3643   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3644   * <p>
3645   * Description: <b>Multiple Resources: 
3646
3647* [Account](account.html): Account number
3648* [AdverseEvent](adverseevent.html): Business identifier for the event
3649* [AllergyIntolerance](allergyintolerance.html): External ids for this item
3650* [Appointment](appointment.html): An Identifier of the Appointment
3651* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
3652* [Basic](basic.html): Business identifier
3653* [BodyStructure](bodystructure.html): Bodystructure identifier
3654* [CarePlan](careplan.html): External Ids for this plan
3655* [CareTeam](careteam.html): External Ids for this team
3656* [ChargeItem](chargeitem.html): Business Identifier for item
3657* [Claim](claim.html): The primary identifier of the financial resource
3658* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
3659* [ClinicalImpression](clinicalimpression.html): Business identifier
3660* [Communication](communication.html): Unique identifier
3661* [CommunicationRequest](communicationrequest.html): Unique identifier
3662* [Composition](composition.html): Version-independent identifier for the Composition
3663* [Condition](condition.html): A unique identifier of the condition record
3664* [Consent](consent.html): Identifier for this record (external references)
3665* [Contract](contract.html): The identity of the contract
3666* [Coverage](coverage.html): The primary identifier of the insured and the coverage
3667* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
3668* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
3669* [DetectedIssue](detectedissue.html): Unique id for the detected issue
3670* [DeviceRequest](devicerequest.html): Business identifier for request/order
3671* [DeviceUsage](deviceusage.html): Search by identifier
3672* [DiagnosticReport](diagnosticreport.html): An identifier for the report
3673* [DocumentReference](documentreference.html): Identifier of the attachment binary
3674* [Encounter](encounter.html): Identifier(s) by which this encounter is known
3675* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
3676* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3677* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
3678* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3679* [Flag](flag.html): Business identifier
3680* [Goal](goal.html): External Ids for this goal
3681* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
3682* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
3683* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
3684* [Immunization](immunization.html): Business identifier
3685* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
3686* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
3687* [Invoice](invoice.html): Business Identifier for item
3688* [List](list.html): Business identifier
3689* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
3690* [Medication](medication.html): Returns medications with this external identifier
3691* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3692* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3693* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3694* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
3695* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
3696* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
3697* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3698* [Observation](observation.html): The unique id for a particular observation
3699* [Person](person.html): A person Identifier
3700* [Procedure](procedure.html): A unique identifier for a procedure
3701* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
3702* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
3703* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
3704* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
3705* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3706* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3707* [Specimen](specimen.html): The unique identifier associated with the specimen
3708* [SupplyDelivery](supplydelivery.html): External identifier
3709* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3710* [Task](task.html): Search for a task instance by its business identifier
3711* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3712</b><br>
3713   * Type: <b>token</b><br>
3714   * 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>
3715   * </p>
3716   */
3717  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3718
3719 /**
3720   * Search parameter: <b>patient</b>
3721   * <p>
3722   * Description: <b>Multiple Resources: 
3723
3724* [Account](account.html): The entity that caused the expenses
3725* [AdverseEvent](adverseevent.html): Subject impacted by event
3726* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3727* [Appointment](appointment.html): One of the individuals of the appointment is this patient
3728* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
3729* [AuditEvent](auditevent.html): Where the activity involved patient data
3730* [Basic](basic.html): Identifies the focus of this resource
3731* [BodyStructure](bodystructure.html): Who this is about
3732* [CarePlan](careplan.html): Who the care plan is for
3733* [CareTeam](careteam.html): Who care team is for
3734* [ChargeItem](chargeitem.html): Individual service was done for/to
3735* [Claim](claim.html): Patient receiving the products or services
3736* [ClaimResponse](claimresponse.html): The subject of care
3737* [ClinicalImpression](clinicalimpression.html): Patient assessed
3738* [Communication](communication.html): Focus of message
3739* [CommunicationRequest](communicationrequest.html): Focus of message
3740* [Composition](composition.html): Who and/or what the composition is about
3741* [Condition](condition.html): Who has the condition?
3742* [Consent](consent.html): Who the consent applies to
3743* [Contract](contract.html): The identity of the subject of the contract (if a patient)
3744* [Coverage](coverage.html): Retrieve coverages for a patient
3745* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
3746* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
3747* [DetectedIssue](detectedissue.html): Associated patient
3748* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3749* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
3750* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3751* [DocumentReference](documentreference.html): Who/what is the subject of the document
3752* [Encounter](encounter.html): The patient present at the encounter
3753* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
3754* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3755* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
3756* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3757* [Flag](flag.html): The identity of a subject to list flags for
3758* [Goal](goal.html): Who this goal is intended for
3759* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
3760* [ImagingSelection](imagingselection.html): Who the study is about
3761* [ImagingStudy](imagingstudy.html): Who the study is about
3762* [Immunization](immunization.html): The patient for the vaccination record
3763* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
3764* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
3765* [Invoice](invoice.html): Recipient(s) of goods and services
3766* [List](list.html): If all resources have the same subject
3767* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
3768* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3769* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3770* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3771* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
3772* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
3773* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
3774* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
3775* [Observation](observation.html): The subject that the observation is about (if patient)
3776* [Person](person.html): The Person links to this Patient
3777* [Procedure](procedure.html): Search by subject - a patient
3778* [Provenance](provenance.html): Where the activity involved patient data
3779* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
3780* [RelatedPerson](relatedperson.html): The patient this related person is related to
3781* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
3782* [ResearchSubject](researchsubject.html): Who or what is part of study
3783* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3784* [ServiceRequest](servicerequest.html): Search by subject - a patient
3785* [Specimen](specimen.html): The patient the specimen comes from
3786* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3787* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
3788* [Task](task.html): Search by patient
3789* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3790</b><br>
3791   * Type: <b>reference</b><br>
3792   * 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>
3793   * </p>
3794   */
3795  @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } )
3796  public static final String SP_PATIENT = "patient";
3797 /**
3798   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
3799   * <p>
3800   * Description: <b>Multiple Resources: 
3801
3802* [Account](account.html): The entity that caused the expenses
3803* [AdverseEvent](adverseevent.html): Subject impacted by event
3804* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3805* [Appointment](appointment.html): One of the individuals of the appointment is this patient
3806* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
3807* [AuditEvent](auditevent.html): Where the activity involved patient data
3808* [Basic](basic.html): Identifies the focus of this resource
3809* [BodyStructure](bodystructure.html): Who this is about
3810* [CarePlan](careplan.html): Who the care plan is for
3811* [CareTeam](careteam.html): Who care team is for
3812* [ChargeItem](chargeitem.html): Individual service was done for/to
3813* [Claim](claim.html): Patient receiving the products or services
3814* [ClaimResponse](claimresponse.html): The subject of care
3815* [ClinicalImpression](clinicalimpression.html): Patient assessed
3816* [Communication](communication.html): Focus of message
3817* [CommunicationRequest](communicationrequest.html): Focus of message
3818* [Composition](composition.html): Who and/or what the composition is about
3819* [Condition](condition.html): Who has the condition?
3820* [Consent](consent.html): Who the consent applies to
3821* [Contract](contract.html): The identity of the subject of the contract (if a patient)
3822* [Coverage](coverage.html): Retrieve coverages for a patient
3823* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
3824* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
3825* [DetectedIssue](detectedissue.html): Associated patient
3826* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3827* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
3828* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3829* [DocumentReference](documentreference.html): Who/what is the subject of the document
3830* [Encounter](encounter.html): The patient present at the encounter
3831* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
3832* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3833* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
3834* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3835* [Flag](flag.html): The identity of a subject to list flags for
3836* [Goal](goal.html): Who this goal is intended for
3837* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
3838* [ImagingSelection](imagingselection.html): Who the study is about
3839* [ImagingStudy](imagingstudy.html): Who the study is about
3840* [Immunization](immunization.html): The patient for the vaccination record
3841* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
3842* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
3843* [Invoice](invoice.html): Recipient(s) of goods and services
3844* [List](list.html): If all resources have the same subject
3845* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
3846* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3847* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3848* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3849* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
3850* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
3851* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
3852* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
3853* [Observation](observation.html): The subject that the observation is about (if patient)
3854* [Person](person.html): The Person links to this Patient
3855* [Procedure](procedure.html): Search by subject - a patient
3856* [Provenance](provenance.html): Where the activity involved patient data
3857* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
3858* [RelatedPerson](relatedperson.html): The patient this related person is related to
3859* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
3860* [ResearchSubject](researchsubject.html): Who or what is part of study
3861* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3862* [ServiceRequest](servicerequest.html): Search by subject - a patient
3863* [Specimen](specimen.html): The patient the specimen comes from
3864* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3865* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
3866* [Task](task.html): Search by patient
3867* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3868</b><br>
3869   * Type: <b>reference</b><br>
3870   * 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>
3871   * </p>
3872   */
3873  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
3874
3875/**
3876   * Constant for fluent queries to be used to add include statements. Specifies
3877   * the path value of "<b>ImagingStudy:patient</b>".
3878   */
3879  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ImagingStudy:patient").toLocked();
3880
3881
3882}
3883