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.r5.model.Enumerations.*;
038import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
039import org.hl7.fhir.exceptions.FHIRException;
040import org.hl7.fhir.instance.model.api.ICompositeType;
041import ca.uhn.fhir.model.api.annotation.ResourceDef;
042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
043import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
044import ca.uhn.fhir.model.api.annotation.Child;
045import ca.uhn.fhir.model.api.annotation.ChildOrder;
046import ca.uhn.fhir.model.api.annotation.Description;
047import ca.uhn.fhir.model.api.annotation.Block;
048
049import org.hl7.fhir.utilities.Utilities;
050/**
051 * Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.
052 */
053@ResourceDef(name="BodyStructure", profile="http://hl7.org/fhir/StructureDefinition/BodyStructure")
054public class BodyStructure extends DomainResource {
055
056    @Block()
057    public static class BodyStructureIncludedStructureComponent extends BackboneElement implements IBaseBackboneElement {
058        /**
059         * Code that represents the included structure.
060         */
061        @Child(name = "structure", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true)
062        @Description(shortDefinition="Code that represents the included structure", formalDefinition="Code that represents the included structure." )
063        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site")
064        protected CodeableConcept structure;
065
066        /**
067         * Code that represents the included structure laterality.
068         */
069        @Child(name = "laterality", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
070        @Description(shortDefinition="Code that represents the included structure laterality", formalDefinition="Code that represents the included structure laterality." )
071        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/bodystructure-relative-location")
072        protected CodeableConcept laterality;
073
074        /**
075         * Body locations in relation to a specific body landmark (tatoo, scar, other body structure).
076         */
077        @Child(name = "bodyLandmarkOrientation", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
078        @Description(shortDefinition="Landmark relative location", formalDefinition="Body locations in relation to a specific body landmark (tatoo, scar, other body structure)." )
079        protected List<BodyStructureIncludedStructureBodyLandmarkOrientationComponent> bodyLandmarkOrientation;
080
081        /**
082         * XY or XYZ-coordinate orientation for structure.
083         */
084        @Child(name = "spatialReference", type = {ImagingSelection.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
085        @Description(shortDefinition="Cartesian reference for structure", formalDefinition="XY or XYZ-coordinate orientation for structure." )
086        protected List<Reference> spatialReference;
087
088        /**
089         * Code that represents the included structure qualifier.
090         */
091        @Child(name = "qualifier", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
092        @Description(shortDefinition="Code that represents the included structure qualifier", formalDefinition="Code that represents the included structure qualifier." )
093        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/bodystructure-relative-location")
094        protected List<CodeableConcept> qualifier;
095
096        private static final long serialVersionUID = -1341852782L;
097
098    /**
099     * Constructor
100     */
101      public BodyStructureIncludedStructureComponent() {
102        super();
103      }
104
105    /**
106     * Constructor
107     */
108      public BodyStructureIncludedStructureComponent(CodeableConcept structure) {
109        super();
110        this.setStructure(structure);
111      }
112
113        /**
114         * @return {@link #structure} (Code that represents the included structure.)
115         */
116        public CodeableConcept getStructure() { 
117          if (this.structure == null)
118            if (Configuration.errorOnAutoCreate())
119              throw new Error("Attempt to auto-create BodyStructureIncludedStructureComponent.structure");
120            else if (Configuration.doAutoCreate())
121              this.structure = new CodeableConcept(); // cc
122          return this.structure;
123        }
124
125        public boolean hasStructure() { 
126          return this.structure != null && !this.structure.isEmpty();
127        }
128
129        /**
130         * @param value {@link #structure} (Code that represents the included structure.)
131         */
132        public BodyStructureIncludedStructureComponent setStructure(CodeableConcept value) { 
133          this.structure = value;
134          return this;
135        }
136
137        /**
138         * @return {@link #laterality} (Code that represents the included structure laterality.)
139         */
140        public CodeableConcept getLaterality() { 
141          if (this.laterality == null)
142            if (Configuration.errorOnAutoCreate())
143              throw new Error("Attempt to auto-create BodyStructureIncludedStructureComponent.laterality");
144            else if (Configuration.doAutoCreate())
145              this.laterality = new CodeableConcept(); // cc
146          return this.laterality;
147        }
148
149        public boolean hasLaterality() { 
150          return this.laterality != null && !this.laterality.isEmpty();
151        }
152
153        /**
154         * @param value {@link #laterality} (Code that represents the included structure laterality.)
155         */
156        public BodyStructureIncludedStructureComponent setLaterality(CodeableConcept value) { 
157          this.laterality = value;
158          return this;
159        }
160
161        /**
162         * @return {@link #bodyLandmarkOrientation} (Body locations in relation to a specific body landmark (tatoo, scar, other body structure).)
163         */
164        public List<BodyStructureIncludedStructureBodyLandmarkOrientationComponent> getBodyLandmarkOrientation() { 
165          if (this.bodyLandmarkOrientation == null)
166            this.bodyLandmarkOrientation = new ArrayList<BodyStructureIncludedStructureBodyLandmarkOrientationComponent>();
167          return this.bodyLandmarkOrientation;
168        }
169
170        /**
171         * @return Returns a reference to <code>this</code> for easy method chaining
172         */
173        public BodyStructureIncludedStructureComponent setBodyLandmarkOrientation(List<BodyStructureIncludedStructureBodyLandmarkOrientationComponent> theBodyLandmarkOrientation) { 
174          this.bodyLandmarkOrientation = theBodyLandmarkOrientation;
175          return this;
176        }
177
178        public boolean hasBodyLandmarkOrientation() { 
179          if (this.bodyLandmarkOrientation == null)
180            return false;
181          for (BodyStructureIncludedStructureBodyLandmarkOrientationComponent item : this.bodyLandmarkOrientation)
182            if (!item.isEmpty())
183              return true;
184          return false;
185        }
186
187        public BodyStructureIncludedStructureBodyLandmarkOrientationComponent addBodyLandmarkOrientation() { //3
188          BodyStructureIncludedStructureBodyLandmarkOrientationComponent t = new BodyStructureIncludedStructureBodyLandmarkOrientationComponent();
189          if (this.bodyLandmarkOrientation == null)
190            this.bodyLandmarkOrientation = new ArrayList<BodyStructureIncludedStructureBodyLandmarkOrientationComponent>();
191          this.bodyLandmarkOrientation.add(t);
192          return t;
193        }
194
195        public BodyStructureIncludedStructureComponent addBodyLandmarkOrientation(BodyStructureIncludedStructureBodyLandmarkOrientationComponent t) { //3
196          if (t == null)
197            return this;
198          if (this.bodyLandmarkOrientation == null)
199            this.bodyLandmarkOrientation = new ArrayList<BodyStructureIncludedStructureBodyLandmarkOrientationComponent>();
200          this.bodyLandmarkOrientation.add(t);
201          return this;
202        }
203
204        /**
205         * @return The first repetition of repeating field {@link #bodyLandmarkOrientation}, creating it if it does not already exist {3}
206         */
207        public BodyStructureIncludedStructureBodyLandmarkOrientationComponent getBodyLandmarkOrientationFirstRep() { 
208          if (getBodyLandmarkOrientation().isEmpty()) {
209            addBodyLandmarkOrientation();
210          }
211          return getBodyLandmarkOrientation().get(0);
212        }
213
214        /**
215         * @return {@link #spatialReference} (XY or XYZ-coordinate orientation for structure.)
216         */
217        public List<Reference> getSpatialReference() { 
218          if (this.spatialReference == null)
219            this.spatialReference = new ArrayList<Reference>();
220          return this.spatialReference;
221        }
222
223        /**
224         * @return Returns a reference to <code>this</code> for easy method chaining
225         */
226        public BodyStructureIncludedStructureComponent setSpatialReference(List<Reference> theSpatialReference) { 
227          this.spatialReference = theSpatialReference;
228          return this;
229        }
230
231        public boolean hasSpatialReference() { 
232          if (this.spatialReference == null)
233            return false;
234          for (Reference item : this.spatialReference)
235            if (!item.isEmpty())
236              return true;
237          return false;
238        }
239
240        public Reference addSpatialReference() { //3
241          Reference t = new Reference();
242          if (this.spatialReference == null)
243            this.spatialReference = new ArrayList<Reference>();
244          this.spatialReference.add(t);
245          return t;
246        }
247
248        public BodyStructureIncludedStructureComponent addSpatialReference(Reference t) { //3
249          if (t == null)
250            return this;
251          if (this.spatialReference == null)
252            this.spatialReference = new ArrayList<Reference>();
253          this.spatialReference.add(t);
254          return this;
255        }
256
257        /**
258         * @return The first repetition of repeating field {@link #spatialReference}, creating it if it does not already exist {3}
259         */
260        public Reference getSpatialReferenceFirstRep() { 
261          if (getSpatialReference().isEmpty()) {
262            addSpatialReference();
263          }
264          return getSpatialReference().get(0);
265        }
266
267        /**
268         * @return {@link #qualifier} (Code that represents the included structure qualifier.)
269         */
270        public List<CodeableConcept> getQualifier() { 
271          if (this.qualifier == null)
272            this.qualifier = new ArrayList<CodeableConcept>();
273          return this.qualifier;
274        }
275
276        /**
277         * @return Returns a reference to <code>this</code> for easy method chaining
278         */
279        public BodyStructureIncludedStructureComponent setQualifier(List<CodeableConcept> theQualifier) { 
280          this.qualifier = theQualifier;
281          return this;
282        }
283
284        public boolean hasQualifier() { 
285          if (this.qualifier == null)
286            return false;
287          for (CodeableConcept item : this.qualifier)
288            if (!item.isEmpty())
289              return true;
290          return false;
291        }
292
293        public CodeableConcept addQualifier() { //3
294          CodeableConcept t = new CodeableConcept();
295          if (this.qualifier == null)
296            this.qualifier = new ArrayList<CodeableConcept>();
297          this.qualifier.add(t);
298          return t;
299        }
300
301        public BodyStructureIncludedStructureComponent addQualifier(CodeableConcept t) { //3
302          if (t == null)
303            return this;
304          if (this.qualifier == null)
305            this.qualifier = new ArrayList<CodeableConcept>();
306          this.qualifier.add(t);
307          return this;
308        }
309
310        /**
311         * @return The first repetition of repeating field {@link #qualifier}, creating it if it does not already exist {3}
312         */
313        public CodeableConcept getQualifierFirstRep() { 
314          if (getQualifier().isEmpty()) {
315            addQualifier();
316          }
317          return getQualifier().get(0);
318        }
319
320        protected void listChildren(List<Property> children) {
321          super.listChildren(children);
322          children.add(new Property("structure", "CodeableConcept", "Code that represents the included structure.", 0, 1, structure));
323          children.add(new Property("laterality", "CodeableConcept", "Code that represents the included structure laterality.", 0, 1, laterality));
324          children.add(new Property("bodyLandmarkOrientation", "", "Body locations in relation to a specific body landmark (tatoo, scar, other body structure).", 0, java.lang.Integer.MAX_VALUE, bodyLandmarkOrientation));
325          children.add(new Property("spatialReference", "Reference(ImagingSelection)", "XY or XYZ-coordinate orientation for structure.", 0, java.lang.Integer.MAX_VALUE, spatialReference));
326          children.add(new Property("qualifier", "CodeableConcept", "Code that represents the included structure qualifier.", 0, java.lang.Integer.MAX_VALUE, qualifier));
327        }
328
329        @Override
330        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
331          switch (_hash) {
332          case 144518515: /*structure*/  return new Property("structure", "CodeableConcept", "Code that represents the included structure.", 0, 1, structure);
333          case -170291817: /*laterality*/  return new Property("laterality", "CodeableConcept", "Code that represents the included structure laterality.", 0, 1, laterality);
334          case -994716042: /*bodyLandmarkOrientation*/  return new Property("bodyLandmarkOrientation", "", "Body locations in relation to a specific body landmark (tatoo, scar, other body structure).", 0, java.lang.Integer.MAX_VALUE, bodyLandmarkOrientation);
335          case 784017063: /*spatialReference*/  return new Property("spatialReference", "Reference(ImagingSelection)", "XY or XYZ-coordinate orientation for structure.", 0, java.lang.Integer.MAX_VALUE, spatialReference);
336          case -1247940438: /*qualifier*/  return new Property("qualifier", "CodeableConcept", "Code that represents the included structure qualifier.", 0, java.lang.Integer.MAX_VALUE, qualifier);
337          default: return super.getNamedProperty(_hash, _name, _checkValid);
338          }
339
340        }
341
342      @Override
343      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
344        switch (hash) {
345        case 144518515: /*structure*/ return this.structure == null ? new Base[0] : new Base[] {this.structure}; // CodeableConcept
346        case -170291817: /*laterality*/ return this.laterality == null ? new Base[0] : new Base[] {this.laterality}; // CodeableConcept
347        case -994716042: /*bodyLandmarkOrientation*/ return this.bodyLandmarkOrientation == null ? new Base[0] : this.bodyLandmarkOrientation.toArray(new Base[this.bodyLandmarkOrientation.size()]); // BodyStructureIncludedStructureBodyLandmarkOrientationComponent
348        case 784017063: /*spatialReference*/ return this.spatialReference == null ? new Base[0] : this.spatialReference.toArray(new Base[this.spatialReference.size()]); // Reference
349        case -1247940438: /*qualifier*/ return this.qualifier == null ? new Base[0] : this.qualifier.toArray(new Base[this.qualifier.size()]); // CodeableConcept
350        default: return super.getProperty(hash, name, checkValid);
351        }
352
353      }
354
355      @Override
356      public Base setProperty(int hash, String name, Base value) throws FHIRException {
357        switch (hash) {
358        case 144518515: // structure
359          this.structure = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
360          return value;
361        case -170291817: // laterality
362          this.laterality = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
363          return value;
364        case -994716042: // bodyLandmarkOrientation
365          this.getBodyLandmarkOrientation().add((BodyStructureIncludedStructureBodyLandmarkOrientationComponent) value); // BodyStructureIncludedStructureBodyLandmarkOrientationComponent
366          return value;
367        case 784017063: // spatialReference
368          this.getSpatialReference().add(TypeConvertor.castToReference(value)); // Reference
369          return value;
370        case -1247940438: // qualifier
371          this.getQualifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
372          return value;
373        default: return super.setProperty(hash, name, value);
374        }
375
376      }
377
378      @Override
379      public Base setProperty(String name, Base value) throws FHIRException {
380        if (name.equals("structure")) {
381          this.structure = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
382        } else if (name.equals("laterality")) {
383          this.laterality = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
384        } else if (name.equals("bodyLandmarkOrientation")) {
385          this.getBodyLandmarkOrientation().add((BodyStructureIncludedStructureBodyLandmarkOrientationComponent) value);
386        } else if (name.equals("spatialReference")) {
387          this.getSpatialReference().add(TypeConvertor.castToReference(value));
388        } else if (name.equals("qualifier")) {
389          this.getQualifier().add(TypeConvertor.castToCodeableConcept(value));
390        } else
391          return super.setProperty(name, value);
392        return value;
393      }
394
395      @Override
396      public Base makeProperty(int hash, String name) throws FHIRException {
397        switch (hash) {
398        case 144518515:  return getStructure();
399        case -170291817:  return getLaterality();
400        case -994716042:  return addBodyLandmarkOrientation(); 
401        case 784017063:  return addSpatialReference(); 
402        case -1247940438:  return addQualifier(); 
403        default: return super.makeProperty(hash, name);
404        }
405
406      }
407
408      @Override
409      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
410        switch (hash) {
411        case 144518515: /*structure*/ return new String[] {"CodeableConcept"};
412        case -170291817: /*laterality*/ return new String[] {"CodeableConcept"};
413        case -994716042: /*bodyLandmarkOrientation*/ return new String[] {};
414        case 784017063: /*spatialReference*/ return new String[] {"Reference"};
415        case -1247940438: /*qualifier*/ return new String[] {"CodeableConcept"};
416        default: return super.getTypesForProperty(hash, name);
417        }
418
419      }
420
421      @Override
422      public Base addChild(String name) throws FHIRException {
423        if (name.equals("structure")) {
424          this.structure = new CodeableConcept();
425          return this.structure;
426        }
427        else if (name.equals("laterality")) {
428          this.laterality = new CodeableConcept();
429          return this.laterality;
430        }
431        else if (name.equals("bodyLandmarkOrientation")) {
432          return addBodyLandmarkOrientation();
433        }
434        else if (name.equals("spatialReference")) {
435          return addSpatialReference();
436        }
437        else if (name.equals("qualifier")) {
438          return addQualifier();
439        }
440        else
441          return super.addChild(name);
442      }
443
444      public BodyStructureIncludedStructureComponent copy() {
445        BodyStructureIncludedStructureComponent dst = new BodyStructureIncludedStructureComponent();
446        copyValues(dst);
447        return dst;
448      }
449
450      public void copyValues(BodyStructureIncludedStructureComponent dst) {
451        super.copyValues(dst);
452        dst.structure = structure == null ? null : structure.copy();
453        dst.laterality = laterality == null ? null : laterality.copy();
454        if (bodyLandmarkOrientation != null) {
455          dst.bodyLandmarkOrientation = new ArrayList<BodyStructureIncludedStructureBodyLandmarkOrientationComponent>();
456          for (BodyStructureIncludedStructureBodyLandmarkOrientationComponent i : bodyLandmarkOrientation)
457            dst.bodyLandmarkOrientation.add(i.copy());
458        };
459        if (spatialReference != null) {
460          dst.spatialReference = new ArrayList<Reference>();
461          for (Reference i : spatialReference)
462            dst.spatialReference.add(i.copy());
463        };
464        if (qualifier != null) {
465          dst.qualifier = new ArrayList<CodeableConcept>();
466          for (CodeableConcept i : qualifier)
467            dst.qualifier.add(i.copy());
468        };
469      }
470
471      @Override
472      public boolean equalsDeep(Base other_) {
473        if (!super.equalsDeep(other_))
474          return false;
475        if (!(other_ instanceof BodyStructureIncludedStructureComponent))
476          return false;
477        BodyStructureIncludedStructureComponent o = (BodyStructureIncludedStructureComponent) other_;
478        return compareDeep(structure, o.structure, true) && compareDeep(laterality, o.laterality, true)
479           && compareDeep(bodyLandmarkOrientation, o.bodyLandmarkOrientation, true) && compareDeep(spatialReference, o.spatialReference, true)
480           && compareDeep(qualifier, o.qualifier, true);
481      }
482
483      @Override
484      public boolean equalsShallow(Base other_) {
485        if (!super.equalsShallow(other_))
486          return false;
487        if (!(other_ instanceof BodyStructureIncludedStructureComponent))
488          return false;
489        BodyStructureIncludedStructureComponent o = (BodyStructureIncludedStructureComponent) other_;
490        return true;
491      }
492
493      public boolean isEmpty() {
494        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(structure, laterality, bodyLandmarkOrientation
495          , spatialReference, qualifier);
496      }
497
498  public String fhirType() {
499    return "BodyStructure.includedStructure";
500
501  }
502
503  }
504
505    @Block()
506    public static class BodyStructureIncludedStructureBodyLandmarkOrientationComponent extends BackboneElement implements IBaseBackboneElement {
507        /**
508         * A description of a landmark on the body used as a reference to locate something else.
509         */
510        @Child(name = "landmarkDescription", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
511        @Description(shortDefinition="Body ]andmark description", formalDefinition="A description of a landmark on the body used as a reference to locate something else." )
512        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site")
513        protected List<CodeableConcept> landmarkDescription;
514
515        /**
516         * An description of the direction away from a landmark something is located based on a radial clock dial.
517         */
518        @Child(name = "clockFacePosition", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
519        @Description(shortDefinition="Clockface orientation", formalDefinition="An description of the direction away from a landmark something is located based on a radial clock dial." )
520        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/bodystructure-bodylandmarkorientation-clockface-position")
521        protected List<CodeableConcept> clockFacePosition;
522
523        /**
524         * The distance in centimeters a certain observation is made from a body landmark.
525         */
526        @Child(name = "distanceFromLandmark", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
527        @Description(shortDefinition="Landmark relative location", formalDefinition="The distance in centimeters a certain observation is made from a body landmark." )
528        protected List<BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent> distanceFromLandmark;
529
530        /**
531         * The surface area a body location is in relation to a landmark.
532         */
533        @Child(name = "surfaceOrientation", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
534        @Description(shortDefinition="Relative landmark surface orientation", formalDefinition="The surface area a body location is in relation to a landmark." )
535        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/bodystructure-relative-location")
536        protected List<CodeableConcept> surfaceOrientation;
537
538        private static final long serialVersionUID = -365770277L;
539
540    /**
541     * Constructor
542     */
543      public BodyStructureIncludedStructureBodyLandmarkOrientationComponent() {
544        super();
545      }
546
547        /**
548         * @return {@link #landmarkDescription} (A description of a landmark on the body used as a reference to locate something else.)
549         */
550        public List<CodeableConcept> getLandmarkDescription() { 
551          if (this.landmarkDescription == null)
552            this.landmarkDescription = new ArrayList<CodeableConcept>();
553          return this.landmarkDescription;
554        }
555
556        /**
557         * @return Returns a reference to <code>this</code> for easy method chaining
558         */
559        public BodyStructureIncludedStructureBodyLandmarkOrientationComponent setLandmarkDescription(List<CodeableConcept> theLandmarkDescription) { 
560          this.landmarkDescription = theLandmarkDescription;
561          return this;
562        }
563
564        public boolean hasLandmarkDescription() { 
565          if (this.landmarkDescription == null)
566            return false;
567          for (CodeableConcept item : this.landmarkDescription)
568            if (!item.isEmpty())
569              return true;
570          return false;
571        }
572
573        public CodeableConcept addLandmarkDescription() { //3
574          CodeableConcept t = new CodeableConcept();
575          if (this.landmarkDescription == null)
576            this.landmarkDescription = new ArrayList<CodeableConcept>();
577          this.landmarkDescription.add(t);
578          return t;
579        }
580
581        public BodyStructureIncludedStructureBodyLandmarkOrientationComponent addLandmarkDescription(CodeableConcept t) { //3
582          if (t == null)
583            return this;
584          if (this.landmarkDescription == null)
585            this.landmarkDescription = new ArrayList<CodeableConcept>();
586          this.landmarkDescription.add(t);
587          return this;
588        }
589
590        /**
591         * @return The first repetition of repeating field {@link #landmarkDescription}, creating it if it does not already exist {3}
592         */
593        public CodeableConcept getLandmarkDescriptionFirstRep() { 
594          if (getLandmarkDescription().isEmpty()) {
595            addLandmarkDescription();
596          }
597          return getLandmarkDescription().get(0);
598        }
599
600        /**
601         * @return {@link #clockFacePosition} (An description of the direction away from a landmark something is located based on a radial clock dial.)
602         */
603        public List<CodeableConcept> getClockFacePosition() { 
604          if (this.clockFacePosition == null)
605            this.clockFacePosition = new ArrayList<CodeableConcept>();
606          return this.clockFacePosition;
607        }
608
609        /**
610         * @return Returns a reference to <code>this</code> for easy method chaining
611         */
612        public BodyStructureIncludedStructureBodyLandmarkOrientationComponent setClockFacePosition(List<CodeableConcept> theClockFacePosition) { 
613          this.clockFacePosition = theClockFacePosition;
614          return this;
615        }
616
617        public boolean hasClockFacePosition() { 
618          if (this.clockFacePosition == null)
619            return false;
620          for (CodeableConcept item : this.clockFacePosition)
621            if (!item.isEmpty())
622              return true;
623          return false;
624        }
625
626        public CodeableConcept addClockFacePosition() { //3
627          CodeableConcept t = new CodeableConcept();
628          if (this.clockFacePosition == null)
629            this.clockFacePosition = new ArrayList<CodeableConcept>();
630          this.clockFacePosition.add(t);
631          return t;
632        }
633
634        public BodyStructureIncludedStructureBodyLandmarkOrientationComponent addClockFacePosition(CodeableConcept t) { //3
635          if (t == null)
636            return this;
637          if (this.clockFacePosition == null)
638            this.clockFacePosition = new ArrayList<CodeableConcept>();
639          this.clockFacePosition.add(t);
640          return this;
641        }
642
643        /**
644         * @return The first repetition of repeating field {@link #clockFacePosition}, creating it if it does not already exist {3}
645         */
646        public CodeableConcept getClockFacePositionFirstRep() { 
647          if (getClockFacePosition().isEmpty()) {
648            addClockFacePosition();
649          }
650          return getClockFacePosition().get(0);
651        }
652
653        /**
654         * @return {@link #distanceFromLandmark} (The distance in centimeters a certain observation is made from a body landmark.)
655         */
656        public List<BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent> getDistanceFromLandmark() { 
657          if (this.distanceFromLandmark == null)
658            this.distanceFromLandmark = new ArrayList<BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent>();
659          return this.distanceFromLandmark;
660        }
661
662        /**
663         * @return Returns a reference to <code>this</code> for easy method chaining
664         */
665        public BodyStructureIncludedStructureBodyLandmarkOrientationComponent setDistanceFromLandmark(List<BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent> theDistanceFromLandmark) { 
666          this.distanceFromLandmark = theDistanceFromLandmark;
667          return this;
668        }
669
670        public boolean hasDistanceFromLandmark() { 
671          if (this.distanceFromLandmark == null)
672            return false;
673          for (BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent item : this.distanceFromLandmark)
674            if (!item.isEmpty())
675              return true;
676          return false;
677        }
678
679        public BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent addDistanceFromLandmark() { //3
680          BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent t = new BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent();
681          if (this.distanceFromLandmark == null)
682            this.distanceFromLandmark = new ArrayList<BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent>();
683          this.distanceFromLandmark.add(t);
684          return t;
685        }
686
687        public BodyStructureIncludedStructureBodyLandmarkOrientationComponent addDistanceFromLandmark(BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent t) { //3
688          if (t == null)
689            return this;
690          if (this.distanceFromLandmark == null)
691            this.distanceFromLandmark = new ArrayList<BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent>();
692          this.distanceFromLandmark.add(t);
693          return this;
694        }
695
696        /**
697         * @return The first repetition of repeating field {@link #distanceFromLandmark}, creating it if it does not already exist {3}
698         */
699        public BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent getDistanceFromLandmarkFirstRep() { 
700          if (getDistanceFromLandmark().isEmpty()) {
701            addDistanceFromLandmark();
702          }
703          return getDistanceFromLandmark().get(0);
704        }
705
706        /**
707         * @return {@link #surfaceOrientation} (The surface area a body location is in relation to a landmark.)
708         */
709        public List<CodeableConcept> getSurfaceOrientation() { 
710          if (this.surfaceOrientation == null)
711            this.surfaceOrientation = new ArrayList<CodeableConcept>();
712          return this.surfaceOrientation;
713        }
714
715        /**
716         * @return Returns a reference to <code>this</code> for easy method chaining
717         */
718        public BodyStructureIncludedStructureBodyLandmarkOrientationComponent setSurfaceOrientation(List<CodeableConcept> theSurfaceOrientation) { 
719          this.surfaceOrientation = theSurfaceOrientation;
720          return this;
721        }
722
723        public boolean hasSurfaceOrientation() { 
724          if (this.surfaceOrientation == null)
725            return false;
726          for (CodeableConcept item : this.surfaceOrientation)
727            if (!item.isEmpty())
728              return true;
729          return false;
730        }
731
732        public CodeableConcept addSurfaceOrientation() { //3
733          CodeableConcept t = new CodeableConcept();
734          if (this.surfaceOrientation == null)
735            this.surfaceOrientation = new ArrayList<CodeableConcept>();
736          this.surfaceOrientation.add(t);
737          return t;
738        }
739
740        public BodyStructureIncludedStructureBodyLandmarkOrientationComponent addSurfaceOrientation(CodeableConcept t) { //3
741          if (t == null)
742            return this;
743          if (this.surfaceOrientation == null)
744            this.surfaceOrientation = new ArrayList<CodeableConcept>();
745          this.surfaceOrientation.add(t);
746          return this;
747        }
748
749        /**
750         * @return The first repetition of repeating field {@link #surfaceOrientation}, creating it if it does not already exist {3}
751         */
752        public CodeableConcept getSurfaceOrientationFirstRep() { 
753          if (getSurfaceOrientation().isEmpty()) {
754            addSurfaceOrientation();
755          }
756          return getSurfaceOrientation().get(0);
757        }
758
759        protected void listChildren(List<Property> children) {
760          super.listChildren(children);
761          children.add(new Property("landmarkDescription", "CodeableConcept", "A description of a landmark on the body used as a reference to locate something else.", 0, java.lang.Integer.MAX_VALUE, landmarkDescription));
762          children.add(new Property("clockFacePosition", "CodeableConcept", "An description of the direction away from a landmark something is located based on a radial clock dial.", 0, java.lang.Integer.MAX_VALUE, clockFacePosition));
763          children.add(new Property("distanceFromLandmark", "", "The distance in centimeters a certain observation is made from a body landmark.", 0, java.lang.Integer.MAX_VALUE, distanceFromLandmark));
764          children.add(new Property("surfaceOrientation", "CodeableConcept", "The surface area a body location is in relation to a landmark.", 0, java.lang.Integer.MAX_VALUE, surfaceOrientation));
765        }
766
767        @Override
768        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
769          switch (_hash) {
770          case 1187892644: /*landmarkDescription*/  return new Property("landmarkDescription", "CodeableConcept", "A description of a landmark on the body used as a reference to locate something else.", 0, java.lang.Integer.MAX_VALUE, landmarkDescription);
771          case 133476820: /*clockFacePosition*/  return new Property("clockFacePosition", "CodeableConcept", "An description of the direction away from a landmark something is located based on a radial clock dial.", 0, java.lang.Integer.MAX_VALUE, clockFacePosition);
772          case 1350792599: /*distanceFromLandmark*/  return new Property("distanceFromLandmark", "", "The distance in centimeters a certain observation is made from a body landmark.", 0, java.lang.Integer.MAX_VALUE, distanceFromLandmark);
773          case 1408496355: /*surfaceOrientation*/  return new Property("surfaceOrientation", "CodeableConcept", "The surface area a body location is in relation to a landmark.", 0, java.lang.Integer.MAX_VALUE, surfaceOrientation);
774          default: return super.getNamedProperty(_hash, _name, _checkValid);
775          }
776
777        }
778
779      @Override
780      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
781        switch (hash) {
782        case 1187892644: /*landmarkDescription*/ return this.landmarkDescription == null ? new Base[0] : this.landmarkDescription.toArray(new Base[this.landmarkDescription.size()]); // CodeableConcept
783        case 133476820: /*clockFacePosition*/ return this.clockFacePosition == null ? new Base[0] : this.clockFacePosition.toArray(new Base[this.clockFacePosition.size()]); // CodeableConcept
784        case 1350792599: /*distanceFromLandmark*/ return this.distanceFromLandmark == null ? new Base[0] : this.distanceFromLandmark.toArray(new Base[this.distanceFromLandmark.size()]); // BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent
785        case 1408496355: /*surfaceOrientation*/ return this.surfaceOrientation == null ? new Base[0] : this.surfaceOrientation.toArray(new Base[this.surfaceOrientation.size()]); // CodeableConcept
786        default: return super.getProperty(hash, name, checkValid);
787        }
788
789      }
790
791      @Override
792      public Base setProperty(int hash, String name, Base value) throws FHIRException {
793        switch (hash) {
794        case 1187892644: // landmarkDescription
795          this.getLandmarkDescription().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
796          return value;
797        case 133476820: // clockFacePosition
798          this.getClockFacePosition().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
799          return value;
800        case 1350792599: // distanceFromLandmark
801          this.getDistanceFromLandmark().add((BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent) value); // BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent
802          return value;
803        case 1408496355: // surfaceOrientation
804          this.getSurfaceOrientation().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
805          return value;
806        default: return super.setProperty(hash, name, value);
807        }
808
809      }
810
811      @Override
812      public Base setProperty(String name, Base value) throws FHIRException {
813        if (name.equals("landmarkDescription")) {
814          this.getLandmarkDescription().add(TypeConvertor.castToCodeableConcept(value));
815        } else if (name.equals("clockFacePosition")) {
816          this.getClockFacePosition().add(TypeConvertor.castToCodeableConcept(value));
817        } else if (name.equals("distanceFromLandmark")) {
818          this.getDistanceFromLandmark().add((BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent) value);
819        } else if (name.equals("surfaceOrientation")) {
820          this.getSurfaceOrientation().add(TypeConvertor.castToCodeableConcept(value));
821        } else
822          return super.setProperty(name, value);
823        return value;
824      }
825
826      @Override
827      public Base makeProperty(int hash, String name) throws FHIRException {
828        switch (hash) {
829        case 1187892644:  return addLandmarkDescription(); 
830        case 133476820:  return addClockFacePosition(); 
831        case 1350792599:  return addDistanceFromLandmark(); 
832        case 1408496355:  return addSurfaceOrientation(); 
833        default: return super.makeProperty(hash, name);
834        }
835
836      }
837
838      @Override
839      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
840        switch (hash) {
841        case 1187892644: /*landmarkDescription*/ return new String[] {"CodeableConcept"};
842        case 133476820: /*clockFacePosition*/ return new String[] {"CodeableConcept"};
843        case 1350792599: /*distanceFromLandmark*/ return new String[] {};
844        case 1408496355: /*surfaceOrientation*/ return new String[] {"CodeableConcept"};
845        default: return super.getTypesForProperty(hash, name);
846        }
847
848      }
849
850      @Override
851      public Base addChild(String name) throws FHIRException {
852        if (name.equals("landmarkDescription")) {
853          return addLandmarkDescription();
854        }
855        else if (name.equals("clockFacePosition")) {
856          return addClockFacePosition();
857        }
858        else if (name.equals("distanceFromLandmark")) {
859          return addDistanceFromLandmark();
860        }
861        else if (name.equals("surfaceOrientation")) {
862          return addSurfaceOrientation();
863        }
864        else
865          return super.addChild(name);
866      }
867
868      public BodyStructureIncludedStructureBodyLandmarkOrientationComponent copy() {
869        BodyStructureIncludedStructureBodyLandmarkOrientationComponent dst = new BodyStructureIncludedStructureBodyLandmarkOrientationComponent();
870        copyValues(dst);
871        return dst;
872      }
873
874      public void copyValues(BodyStructureIncludedStructureBodyLandmarkOrientationComponent dst) {
875        super.copyValues(dst);
876        if (landmarkDescription != null) {
877          dst.landmarkDescription = new ArrayList<CodeableConcept>();
878          for (CodeableConcept i : landmarkDescription)
879            dst.landmarkDescription.add(i.copy());
880        };
881        if (clockFacePosition != null) {
882          dst.clockFacePosition = new ArrayList<CodeableConcept>();
883          for (CodeableConcept i : clockFacePosition)
884            dst.clockFacePosition.add(i.copy());
885        };
886        if (distanceFromLandmark != null) {
887          dst.distanceFromLandmark = new ArrayList<BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent>();
888          for (BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent i : distanceFromLandmark)
889            dst.distanceFromLandmark.add(i.copy());
890        };
891        if (surfaceOrientation != null) {
892          dst.surfaceOrientation = new ArrayList<CodeableConcept>();
893          for (CodeableConcept i : surfaceOrientation)
894            dst.surfaceOrientation.add(i.copy());
895        };
896      }
897
898      @Override
899      public boolean equalsDeep(Base other_) {
900        if (!super.equalsDeep(other_))
901          return false;
902        if (!(other_ instanceof BodyStructureIncludedStructureBodyLandmarkOrientationComponent))
903          return false;
904        BodyStructureIncludedStructureBodyLandmarkOrientationComponent o = (BodyStructureIncludedStructureBodyLandmarkOrientationComponent) other_;
905        return compareDeep(landmarkDescription, o.landmarkDescription, true) && compareDeep(clockFacePosition, o.clockFacePosition, true)
906           && compareDeep(distanceFromLandmark, o.distanceFromLandmark, true) && compareDeep(surfaceOrientation, o.surfaceOrientation, true)
907          ;
908      }
909
910      @Override
911      public boolean equalsShallow(Base other_) {
912        if (!super.equalsShallow(other_))
913          return false;
914        if (!(other_ instanceof BodyStructureIncludedStructureBodyLandmarkOrientationComponent))
915          return false;
916        BodyStructureIncludedStructureBodyLandmarkOrientationComponent o = (BodyStructureIncludedStructureBodyLandmarkOrientationComponent) other_;
917        return true;
918      }
919
920      public boolean isEmpty() {
921        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(landmarkDescription, clockFacePosition
922          , distanceFromLandmark, surfaceOrientation);
923      }
924
925  public String fhirType() {
926    return "BodyStructure.includedStructure.bodyLandmarkOrientation";
927
928  }
929
930  }
931
932    @Block()
933    public static class BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent extends BackboneElement implements IBaseBackboneElement {
934        /**
935         * An instrument, tool, analyzer, etc. used in the measurement.
936         */
937        @Child(name = "device", type = {CodeableReference.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
938        @Description(shortDefinition="Measurement device", formalDefinition="An instrument, tool, analyzer, etc. used in the measurement." )
939        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/device-type")
940        protected List<CodeableReference> device;
941
942        /**
943         * The measured distance (e.g., in cm) from a body landmark.
944         */
945        @Child(name = "value", type = {Quantity.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
946        @Description(shortDefinition="Measured distance from body landmark", formalDefinition="The measured distance (e.g., in cm) from a body landmark." )
947        protected List<Quantity> value;
948
949        private static final long serialVersionUID = 1883586968L;
950
951    /**
952     * Constructor
953     */
954      public BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent() {
955        super();
956      }
957
958        /**
959         * @return {@link #device} (An instrument, tool, analyzer, etc. used in the measurement.)
960         */
961        public List<CodeableReference> getDevice() { 
962          if (this.device == null)
963            this.device = new ArrayList<CodeableReference>();
964          return this.device;
965        }
966
967        /**
968         * @return Returns a reference to <code>this</code> for easy method chaining
969         */
970        public BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent setDevice(List<CodeableReference> theDevice) { 
971          this.device = theDevice;
972          return this;
973        }
974
975        public boolean hasDevice() { 
976          if (this.device == null)
977            return false;
978          for (CodeableReference item : this.device)
979            if (!item.isEmpty())
980              return true;
981          return false;
982        }
983
984        public CodeableReference addDevice() { //3
985          CodeableReference t = new CodeableReference();
986          if (this.device == null)
987            this.device = new ArrayList<CodeableReference>();
988          this.device.add(t);
989          return t;
990        }
991
992        public BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent addDevice(CodeableReference t) { //3
993          if (t == null)
994            return this;
995          if (this.device == null)
996            this.device = new ArrayList<CodeableReference>();
997          this.device.add(t);
998          return this;
999        }
1000
1001        /**
1002         * @return The first repetition of repeating field {@link #device}, creating it if it does not already exist {3}
1003         */
1004        public CodeableReference getDeviceFirstRep() { 
1005          if (getDevice().isEmpty()) {
1006            addDevice();
1007          }
1008          return getDevice().get(0);
1009        }
1010
1011        /**
1012         * @return {@link #value} (The measured distance (e.g., in cm) from a body landmark.)
1013         */
1014        public List<Quantity> getValue() { 
1015          if (this.value == null)
1016            this.value = new ArrayList<Quantity>();
1017          return this.value;
1018        }
1019
1020        /**
1021         * @return Returns a reference to <code>this</code> for easy method chaining
1022         */
1023        public BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent setValue(List<Quantity> theValue) { 
1024          this.value = theValue;
1025          return this;
1026        }
1027
1028        public boolean hasValue() { 
1029          if (this.value == null)
1030            return false;
1031          for (Quantity item : this.value)
1032            if (!item.isEmpty())
1033              return true;
1034          return false;
1035        }
1036
1037        public Quantity addValue() { //3
1038          Quantity t = new Quantity();
1039          if (this.value == null)
1040            this.value = new ArrayList<Quantity>();
1041          this.value.add(t);
1042          return t;
1043        }
1044
1045        public BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent addValue(Quantity t) { //3
1046          if (t == null)
1047            return this;
1048          if (this.value == null)
1049            this.value = new ArrayList<Quantity>();
1050          this.value.add(t);
1051          return this;
1052        }
1053
1054        /**
1055         * @return The first repetition of repeating field {@link #value}, creating it if it does not already exist {3}
1056         */
1057        public Quantity getValueFirstRep() { 
1058          if (getValue().isEmpty()) {
1059            addValue();
1060          }
1061          return getValue().get(0);
1062        }
1063
1064        protected void listChildren(List<Property> children) {
1065          super.listChildren(children);
1066          children.add(new Property("device", "CodeableReference(Device)", "An instrument, tool, analyzer, etc. used in the measurement.", 0, java.lang.Integer.MAX_VALUE, device));
1067          children.add(new Property("value", "Quantity", "The measured distance (e.g., in cm) from a body landmark.", 0, java.lang.Integer.MAX_VALUE, value));
1068        }
1069
1070        @Override
1071        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1072          switch (_hash) {
1073          case -1335157162: /*device*/  return new Property("device", "CodeableReference(Device)", "An instrument, tool, analyzer, etc. used in the measurement.", 0, java.lang.Integer.MAX_VALUE, device);
1074          case 111972721: /*value*/  return new Property("value", "Quantity", "The measured distance (e.g., in cm) from a body landmark.", 0, java.lang.Integer.MAX_VALUE, value);
1075          default: return super.getNamedProperty(_hash, _name, _checkValid);
1076          }
1077
1078        }
1079
1080      @Override
1081      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1082        switch (hash) {
1083        case -1335157162: /*device*/ return this.device == null ? new Base[0] : this.device.toArray(new Base[this.device.size()]); // CodeableReference
1084        case 111972721: /*value*/ return this.value == null ? new Base[0] : this.value.toArray(new Base[this.value.size()]); // Quantity
1085        default: return super.getProperty(hash, name, checkValid);
1086        }
1087
1088      }
1089
1090      @Override
1091      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1092        switch (hash) {
1093        case -1335157162: // device
1094          this.getDevice().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
1095          return value;
1096        case 111972721: // value
1097          this.getValue().add(TypeConvertor.castToQuantity(value)); // Quantity
1098          return value;
1099        default: return super.setProperty(hash, name, value);
1100        }
1101
1102      }
1103
1104      @Override
1105      public Base setProperty(String name, Base value) throws FHIRException {
1106        if (name.equals("device")) {
1107          this.getDevice().add(TypeConvertor.castToCodeableReference(value));
1108        } else if (name.equals("value")) {
1109          this.getValue().add(TypeConvertor.castToQuantity(value));
1110        } else
1111          return super.setProperty(name, value);
1112        return value;
1113      }
1114
1115      @Override
1116      public Base makeProperty(int hash, String name) throws FHIRException {
1117        switch (hash) {
1118        case -1335157162:  return addDevice(); 
1119        case 111972721:  return addValue(); 
1120        default: return super.makeProperty(hash, name);
1121        }
1122
1123      }
1124
1125      @Override
1126      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1127        switch (hash) {
1128        case -1335157162: /*device*/ return new String[] {"CodeableReference"};
1129        case 111972721: /*value*/ return new String[] {"Quantity"};
1130        default: return super.getTypesForProperty(hash, name);
1131        }
1132
1133      }
1134
1135      @Override
1136      public Base addChild(String name) throws FHIRException {
1137        if (name.equals("device")) {
1138          return addDevice();
1139        }
1140        else if (name.equals("value")) {
1141          return addValue();
1142        }
1143        else
1144          return super.addChild(name);
1145      }
1146
1147      public BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent copy() {
1148        BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent dst = new BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent();
1149        copyValues(dst);
1150        return dst;
1151      }
1152
1153      public void copyValues(BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent dst) {
1154        super.copyValues(dst);
1155        if (device != null) {
1156          dst.device = new ArrayList<CodeableReference>();
1157          for (CodeableReference i : device)
1158            dst.device.add(i.copy());
1159        };
1160        if (value != null) {
1161          dst.value = new ArrayList<Quantity>();
1162          for (Quantity i : value)
1163            dst.value.add(i.copy());
1164        };
1165      }
1166
1167      @Override
1168      public boolean equalsDeep(Base other_) {
1169        if (!super.equalsDeep(other_))
1170          return false;
1171        if (!(other_ instanceof BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent))
1172          return false;
1173        BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent o = (BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent) other_;
1174        return compareDeep(device, o.device, true) && compareDeep(value, o.value, true);
1175      }
1176
1177      @Override
1178      public boolean equalsShallow(Base other_) {
1179        if (!super.equalsShallow(other_))
1180          return false;
1181        if (!(other_ instanceof BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent))
1182          return false;
1183        BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent o = (BodyStructureIncludedStructureBodyLandmarkOrientationDistanceFromLandmarkComponent) other_;
1184        return true;
1185      }
1186
1187      public boolean isEmpty() {
1188        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(device, value);
1189      }
1190
1191  public String fhirType() {
1192    return "BodyStructure.includedStructure.bodyLandmarkOrientation.distanceFromLandmark";
1193
1194  }
1195
1196  }
1197
1198    /**
1199     * Identifier for this instance of the anatomical structure.
1200     */
1201    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1202    @Description(shortDefinition="Bodystructure identifier", formalDefinition="Identifier for this instance of the anatomical structure." )
1203    protected List<Identifier> identifier;
1204
1205    /**
1206     * Whether this body site is in active use.
1207     */
1208    @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=true, summary=true)
1209    @Description(shortDefinition="Whether this record is in active use", formalDefinition="Whether this body site is in active use." )
1210    protected BooleanType active;
1211
1212    /**
1213     * The kind of structure being represented by the body structure at `BodyStructure.location`.  This can define both normal and abnormal morphologies.
1214     */
1215    @Child(name = "morphology", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
1216    @Description(shortDefinition="Kind of Structure", formalDefinition="The kind of structure being represented by the body structure at `BodyStructure.location`.  This can define both normal and abnormal morphologies." )
1217    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/bodystructure-code")
1218    protected CodeableConcept morphology;
1219
1220    /**
1221     * The anatomical location(s) or region(s) of the specimen, lesion, or body structure.
1222     */
1223    @Child(name = "includedStructure", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1224    @Description(shortDefinition="Included anatomic location(s)", formalDefinition="The anatomical location(s) or region(s) of the specimen, lesion, or body structure." )
1225    protected List<BodyStructureIncludedStructureComponent> includedStructure;
1226
1227    /**
1228     * The anatomical location(s) or region(s) not occupied or represented by the specimen, lesion, or body structure.
1229     */
1230    @Child(name = "excludedStructure", type = {BodyStructureIncludedStructureComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1231    @Description(shortDefinition="Excluded anatomic locations(s)", formalDefinition="The anatomical location(s) or region(s) not occupied or represented by the specimen, lesion, or body structure." )
1232    protected List<BodyStructureIncludedStructureComponent> excludedStructure;
1233
1234    /**
1235     * A summary, characterization or explanation of the body structure.
1236     */
1237    @Child(name = "description", type = {MarkdownType.class}, order=5, min=0, max=1, modifier=false, summary=true)
1238    @Description(shortDefinition="Text description", formalDefinition="A summary, characterization or explanation of the body structure." )
1239    protected MarkdownType description;
1240
1241    /**
1242     * Image or images used to identify a location.
1243     */
1244    @Child(name = "image", type = {Attachment.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1245    @Description(shortDefinition="Attached images", formalDefinition="Image or images used to identify a location." )
1246    protected List<Attachment> image;
1247
1248    /**
1249     * The person to which the body site belongs.
1250     */
1251    @Child(name = "patient", type = {Patient.class}, order=7, min=1, max=1, modifier=false, summary=true)
1252    @Description(shortDefinition="Who this is about", formalDefinition="The person to which the body site belongs." )
1253    protected Reference patient;
1254
1255    private static final long serialVersionUID = -1014863022L;
1256
1257  /**
1258   * Constructor
1259   */
1260    public BodyStructure() {
1261      super();
1262    }
1263
1264  /**
1265   * Constructor
1266   */
1267    public BodyStructure(BodyStructureIncludedStructureComponent includedStructure, Reference patient) {
1268      super();
1269      this.addIncludedStructure(includedStructure);
1270      this.setPatient(patient);
1271    }
1272
1273    /**
1274     * @return {@link #identifier} (Identifier for this instance of the anatomical structure.)
1275     */
1276    public List<Identifier> getIdentifier() { 
1277      if (this.identifier == null)
1278        this.identifier = new ArrayList<Identifier>();
1279      return this.identifier;
1280    }
1281
1282    /**
1283     * @return Returns a reference to <code>this</code> for easy method chaining
1284     */
1285    public BodyStructure setIdentifier(List<Identifier> theIdentifier) { 
1286      this.identifier = theIdentifier;
1287      return this;
1288    }
1289
1290    public boolean hasIdentifier() { 
1291      if (this.identifier == null)
1292        return false;
1293      for (Identifier item : this.identifier)
1294        if (!item.isEmpty())
1295          return true;
1296      return false;
1297    }
1298
1299    public Identifier addIdentifier() { //3
1300      Identifier t = new Identifier();
1301      if (this.identifier == null)
1302        this.identifier = new ArrayList<Identifier>();
1303      this.identifier.add(t);
1304      return t;
1305    }
1306
1307    public BodyStructure addIdentifier(Identifier t) { //3
1308      if (t == null)
1309        return this;
1310      if (this.identifier == null)
1311        this.identifier = new ArrayList<Identifier>();
1312      this.identifier.add(t);
1313      return this;
1314    }
1315
1316    /**
1317     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1318     */
1319    public Identifier getIdentifierFirstRep() { 
1320      if (getIdentifier().isEmpty()) {
1321        addIdentifier();
1322      }
1323      return getIdentifier().get(0);
1324    }
1325
1326    /**
1327     * @return {@link #active} (Whether this body site is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
1328     */
1329    public BooleanType getActiveElement() { 
1330      if (this.active == null)
1331        if (Configuration.errorOnAutoCreate())
1332          throw new Error("Attempt to auto-create BodyStructure.active");
1333        else if (Configuration.doAutoCreate())
1334          this.active = new BooleanType(); // bb
1335      return this.active;
1336    }
1337
1338    public boolean hasActiveElement() { 
1339      return this.active != null && !this.active.isEmpty();
1340    }
1341
1342    public boolean hasActive() { 
1343      return this.active != null && !this.active.isEmpty();
1344    }
1345
1346    /**
1347     * @param value {@link #active} (Whether this body site is in active use.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
1348     */
1349    public BodyStructure setActiveElement(BooleanType value) { 
1350      this.active = value;
1351      return this;
1352    }
1353
1354    /**
1355     * @return Whether this body site is in active use.
1356     */
1357    public boolean getActive() { 
1358      return this.active == null || this.active.isEmpty() ? false : this.active.getValue();
1359    }
1360
1361    /**
1362     * @param value Whether this body site is in active use.
1363     */
1364    public BodyStructure setActive(boolean value) { 
1365        if (this.active == null)
1366          this.active = new BooleanType();
1367        this.active.setValue(value);
1368      return this;
1369    }
1370
1371    /**
1372     * @return {@link #morphology} (The kind of structure being represented by the body structure at `BodyStructure.location`.  This can define both normal and abnormal morphologies.)
1373     */
1374    public CodeableConcept getMorphology() { 
1375      if (this.morphology == null)
1376        if (Configuration.errorOnAutoCreate())
1377          throw new Error("Attempt to auto-create BodyStructure.morphology");
1378        else if (Configuration.doAutoCreate())
1379          this.morphology = new CodeableConcept(); // cc
1380      return this.morphology;
1381    }
1382
1383    public boolean hasMorphology() { 
1384      return this.morphology != null && !this.morphology.isEmpty();
1385    }
1386
1387    /**
1388     * @param value {@link #morphology} (The kind of structure being represented by the body structure at `BodyStructure.location`.  This can define both normal and abnormal morphologies.)
1389     */
1390    public BodyStructure setMorphology(CodeableConcept value) { 
1391      this.morphology = value;
1392      return this;
1393    }
1394
1395    /**
1396     * @return {@link #includedStructure} (The anatomical location(s) or region(s) of the specimen, lesion, or body structure.)
1397     */
1398    public List<BodyStructureIncludedStructureComponent> getIncludedStructure() { 
1399      if (this.includedStructure == null)
1400        this.includedStructure = new ArrayList<BodyStructureIncludedStructureComponent>();
1401      return this.includedStructure;
1402    }
1403
1404    /**
1405     * @return Returns a reference to <code>this</code> for easy method chaining
1406     */
1407    public BodyStructure setIncludedStructure(List<BodyStructureIncludedStructureComponent> theIncludedStructure) { 
1408      this.includedStructure = theIncludedStructure;
1409      return this;
1410    }
1411
1412    public boolean hasIncludedStructure() { 
1413      if (this.includedStructure == null)
1414        return false;
1415      for (BodyStructureIncludedStructureComponent item : this.includedStructure)
1416        if (!item.isEmpty())
1417          return true;
1418      return false;
1419    }
1420
1421    public BodyStructureIncludedStructureComponent addIncludedStructure() { //3
1422      BodyStructureIncludedStructureComponent t = new BodyStructureIncludedStructureComponent();
1423      if (this.includedStructure == null)
1424        this.includedStructure = new ArrayList<BodyStructureIncludedStructureComponent>();
1425      this.includedStructure.add(t);
1426      return t;
1427    }
1428
1429    public BodyStructure addIncludedStructure(BodyStructureIncludedStructureComponent t) { //3
1430      if (t == null)
1431        return this;
1432      if (this.includedStructure == null)
1433        this.includedStructure = new ArrayList<BodyStructureIncludedStructureComponent>();
1434      this.includedStructure.add(t);
1435      return this;
1436    }
1437
1438    /**
1439     * @return The first repetition of repeating field {@link #includedStructure}, creating it if it does not already exist {3}
1440     */
1441    public BodyStructureIncludedStructureComponent getIncludedStructureFirstRep() { 
1442      if (getIncludedStructure().isEmpty()) {
1443        addIncludedStructure();
1444      }
1445      return getIncludedStructure().get(0);
1446    }
1447
1448    /**
1449     * @return {@link #excludedStructure} (The anatomical location(s) or region(s) not occupied or represented by the specimen, lesion, or body structure.)
1450     */
1451    public List<BodyStructureIncludedStructureComponent> getExcludedStructure() { 
1452      if (this.excludedStructure == null)
1453        this.excludedStructure = new ArrayList<BodyStructureIncludedStructureComponent>();
1454      return this.excludedStructure;
1455    }
1456
1457    /**
1458     * @return Returns a reference to <code>this</code> for easy method chaining
1459     */
1460    public BodyStructure setExcludedStructure(List<BodyStructureIncludedStructureComponent> theExcludedStructure) { 
1461      this.excludedStructure = theExcludedStructure;
1462      return this;
1463    }
1464
1465    public boolean hasExcludedStructure() { 
1466      if (this.excludedStructure == null)
1467        return false;
1468      for (BodyStructureIncludedStructureComponent item : this.excludedStructure)
1469        if (!item.isEmpty())
1470          return true;
1471      return false;
1472    }
1473
1474    public BodyStructureIncludedStructureComponent addExcludedStructure() { //3
1475      BodyStructureIncludedStructureComponent t = new BodyStructureIncludedStructureComponent();
1476      if (this.excludedStructure == null)
1477        this.excludedStructure = new ArrayList<BodyStructureIncludedStructureComponent>();
1478      this.excludedStructure.add(t);
1479      return t;
1480    }
1481
1482    public BodyStructure addExcludedStructure(BodyStructureIncludedStructureComponent t) { //3
1483      if (t == null)
1484        return this;
1485      if (this.excludedStructure == null)
1486        this.excludedStructure = new ArrayList<BodyStructureIncludedStructureComponent>();
1487      this.excludedStructure.add(t);
1488      return this;
1489    }
1490
1491    /**
1492     * @return The first repetition of repeating field {@link #excludedStructure}, creating it if it does not already exist {3}
1493     */
1494    public BodyStructureIncludedStructureComponent getExcludedStructureFirstRep() { 
1495      if (getExcludedStructure().isEmpty()) {
1496        addExcludedStructure();
1497      }
1498      return getExcludedStructure().get(0);
1499    }
1500
1501    /**
1502     * @return {@link #description} (A summary, characterization or explanation of the body structure.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1503     */
1504    public MarkdownType getDescriptionElement() { 
1505      if (this.description == null)
1506        if (Configuration.errorOnAutoCreate())
1507          throw new Error("Attempt to auto-create BodyStructure.description");
1508        else if (Configuration.doAutoCreate())
1509          this.description = new MarkdownType(); // bb
1510      return this.description;
1511    }
1512
1513    public boolean hasDescriptionElement() { 
1514      return this.description != null && !this.description.isEmpty();
1515    }
1516
1517    public boolean hasDescription() { 
1518      return this.description != null && !this.description.isEmpty();
1519    }
1520
1521    /**
1522     * @param value {@link #description} (A summary, characterization or explanation of the body structure.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1523     */
1524    public BodyStructure setDescriptionElement(MarkdownType value) { 
1525      this.description = value;
1526      return this;
1527    }
1528
1529    /**
1530     * @return A summary, characterization or explanation of the body structure.
1531     */
1532    public String getDescription() { 
1533      return this.description == null ? null : this.description.getValue();
1534    }
1535
1536    /**
1537     * @param value A summary, characterization or explanation of the body structure.
1538     */
1539    public BodyStructure setDescription(String value) { 
1540      if (Utilities.noString(value))
1541        this.description = null;
1542      else {
1543        if (this.description == null)
1544          this.description = new MarkdownType();
1545        this.description.setValue(value);
1546      }
1547      return this;
1548    }
1549
1550    /**
1551     * @return {@link #image} (Image or images used to identify a location.)
1552     */
1553    public List<Attachment> getImage() { 
1554      if (this.image == null)
1555        this.image = new ArrayList<Attachment>();
1556      return this.image;
1557    }
1558
1559    /**
1560     * @return Returns a reference to <code>this</code> for easy method chaining
1561     */
1562    public BodyStructure setImage(List<Attachment> theImage) { 
1563      this.image = theImage;
1564      return this;
1565    }
1566
1567    public boolean hasImage() { 
1568      if (this.image == null)
1569        return false;
1570      for (Attachment item : this.image)
1571        if (!item.isEmpty())
1572          return true;
1573      return false;
1574    }
1575
1576    public Attachment addImage() { //3
1577      Attachment t = new Attachment();
1578      if (this.image == null)
1579        this.image = new ArrayList<Attachment>();
1580      this.image.add(t);
1581      return t;
1582    }
1583
1584    public BodyStructure addImage(Attachment t) { //3
1585      if (t == null)
1586        return this;
1587      if (this.image == null)
1588        this.image = new ArrayList<Attachment>();
1589      this.image.add(t);
1590      return this;
1591    }
1592
1593    /**
1594     * @return The first repetition of repeating field {@link #image}, creating it if it does not already exist {3}
1595     */
1596    public Attachment getImageFirstRep() { 
1597      if (getImage().isEmpty()) {
1598        addImage();
1599      }
1600      return getImage().get(0);
1601    }
1602
1603    /**
1604     * @return {@link #patient} (The person to which the body site belongs.)
1605     */
1606    public Reference getPatient() { 
1607      if (this.patient == null)
1608        if (Configuration.errorOnAutoCreate())
1609          throw new Error("Attempt to auto-create BodyStructure.patient");
1610        else if (Configuration.doAutoCreate())
1611          this.patient = new Reference(); // cc
1612      return this.patient;
1613    }
1614
1615    public boolean hasPatient() { 
1616      return this.patient != null && !this.patient.isEmpty();
1617    }
1618
1619    /**
1620     * @param value {@link #patient} (The person to which the body site belongs.)
1621     */
1622    public BodyStructure setPatient(Reference value) { 
1623      this.patient = value;
1624      return this;
1625    }
1626
1627      protected void listChildren(List<Property> children) {
1628        super.listChildren(children);
1629        children.add(new Property("identifier", "Identifier", "Identifier for this instance of the anatomical structure.", 0, java.lang.Integer.MAX_VALUE, identifier));
1630        children.add(new Property("active", "boolean", "Whether this body site is in active use.", 0, 1, active));
1631        children.add(new Property("morphology", "CodeableConcept", "The kind of structure being represented by the body structure at `BodyStructure.location`.  This can define both normal and abnormal morphologies.", 0, 1, morphology));
1632        children.add(new Property("includedStructure", "", "The anatomical location(s) or region(s) of the specimen, lesion, or body structure.", 0, java.lang.Integer.MAX_VALUE, includedStructure));
1633        children.add(new Property("excludedStructure", "@BodyStructure.includedStructure", "The anatomical location(s) or region(s) not occupied or represented by the specimen, lesion, or body structure.", 0, java.lang.Integer.MAX_VALUE, excludedStructure));
1634        children.add(new Property("description", "markdown", "A summary, characterization or explanation of the body structure.", 0, 1, description));
1635        children.add(new Property("image", "Attachment", "Image or images used to identify a location.", 0, java.lang.Integer.MAX_VALUE, image));
1636        children.add(new Property("patient", "Reference(Patient)", "The person to which the body site belongs.", 0, 1, patient));
1637      }
1638
1639      @Override
1640      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1641        switch (_hash) {
1642        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Identifier for this instance of the anatomical structure.", 0, java.lang.Integer.MAX_VALUE, identifier);
1643        case -1422950650: /*active*/  return new Property("active", "boolean", "Whether this body site is in active use.", 0, 1, active);
1644        case 1807231644: /*morphology*/  return new Property("morphology", "CodeableConcept", "The kind of structure being represented by the body structure at `BodyStructure.location`.  This can define both normal and abnormal morphologies.", 0, 1, morphology);
1645        case -1174069225: /*includedStructure*/  return new Property("includedStructure", "", "The anatomical location(s) or region(s) of the specimen, lesion, or body structure.", 0, java.lang.Integer.MAX_VALUE, includedStructure);
1646        case 1192252105: /*excludedStructure*/  return new Property("excludedStructure", "@BodyStructure.includedStructure", "The anatomical location(s) or region(s) not occupied or represented by the specimen, lesion, or body structure.", 0, java.lang.Integer.MAX_VALUE, excludedStructure);
1647        case -1724546052: /*description*/  return new Property("description", "markdown", "A summary, characterization or explanation of the body structure.", 0, 1, description);
1648        case 100313435: /*image*/  return new Property("image", "Attachment", "Image or images used to identify a location.", 0, java.lang.Integer.MAX_VALUE, image);
1649        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "The person to which the body site belongs.", 0, 1, patient);
1650        default: return super.getNamedProperty(_hash, _name, _checkValid);
1651        }
1652
1653      }
1654
1655      @Override
1656      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1657        switch (hash) {
1658        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1659        case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType
1660        case 1807231644: /*morphology*/ return this.morphology == null ? new Base[0] : new Base[] {this.morphology}; // CodeableConcept
1661        case -1174069225: /*includedStructure*/ return this.includedStructure == null ? new Base[0] : this.includedStructure.toArray(new Base[this.includedStructure.size()]); // BodyStructureIncludedStructureComponent
1662        case 1192252105: /*excludedStructure*/ return this.excludedStructure == null ? new Base[0] : this.excludedStructure.toArray(new Base[this.excludedStructure.size()]); // BodyStructureIncludedStructureComponent
1663        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
1664        case 100313435: /*image*/ return this.image == null ? new Base[0] : this.image.toArray(new Base[this.image.size()]); // Attachment
1665        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
1666        default: return super.getProperty(hash, name, checkValid);
1667        }
1668
1669      }
1670
1671      @Override
1672      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1673        switch (hash) {
1674        case -1618432855: // identifier
1675          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1676          return value;
1677        case -1422950650: // active
1678          this.active = TypeConvertor.castToBoolean(value); // BooleanType
1679          return value;
1680        case 1807231644: // morphology
1681          this.morphology = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1682          return value;
1683        case -1174069225: // includedStructure
1684          this.getIncludedStructure().add((BodyStructureIncludedStructureComponent) value); // BodyStructureIncludedStructureComponent
1685          return value;
1686        case 1192252105: // excludedStructure
1687          this.getExcludedStructure().add((BodyStructureIncludedStructureComponent) value); // BodyStructureIncludedStructureComponent
1688          return value;
1689        case -1724546052: // description
1690          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
1691          return value;
1692        case 100313435: // image
1693          this.getImage().add(TypeConvertor.castToAttachment(value)); // Attachment
1694          return value;
1695        case -791418107: // patient
1696          this.patient = TypeConvertor.castToReference(value); // Reference
1697          return value;
1698        default: return super.setProperty(hash, name, value);
1699        }
1700
1701      }
1702
1703      @Override
1704      public Base setProperty(String name, Base value) throws FHIRException {
1705        if (name.equals("identifier")) {
1706          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1707        } else if (name.equals("active")) {
1708          this.active = TypeConvertor.castToBoolean(value); // BooleanType
1709        } else if (name.equals("morphology")) {
1710          this.morphology = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1711        } else if (name.equals("includedStructure")) {
1712          this.getIncludedStructure().add((BodyStructureIncludedStructureComponent) value);
1713        } else if (name.equals("excludedStructure")) {
1714          this.getExcludedStructure().add((BodyStructureIncludedStructureComponent) value);
1715        } else if (name.equals("description")) {
1716          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
1717        } else if (name.equals("image")) {
1718          this.getImage().add(TypeConvertor.castToAttachment(value));
1719        } else if (name.equals("patient")) {
1720          this.patient = TypeConvertor.castToReference(value); // Reference
1721        } else
1722          return super.setProperty(name, value);
1723        return value;
1724      }
1725
1726      @Override
1727      public Base makeProperty(int hash, String name) throws FHIRException {
1728        switch (hash) {
1729        case -1618432855:  return addIdentifier(); 
1730        case -1422950650:  return getActiveElement();
1731        case 1807231644:  return getMorphology();
1732        case -1174069225:  return addIncludedStructure(); 
1733        case 1192252105:  return addExcludedStructure(); 
1734        case -1724546052:  return getDescriptionElement();
1735        case 100313435:  return addImage(); 
1736        case -791418107:  return getPatient();
1737        default: return super.makeProperty(hash, name);
1738        }
1739
1740      }
1741
1742      @Override
1743      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1744        switch (hash) {
1745        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1746        case -1422950650: /*active*/ return new String[] {"boolean"};
1747        case 1807231644: /*morphology*/ return new String[] {"CodeableConcept"};
1748        case -1174069225: /*includedStructure*/ return new String[] {};
1749        case 1192252105: /*excludedStructure*/ return new String[] {"@BodyStructure.includedStructure"};
1750        case -1724546052: /*description*/ return new String[] {"markdown"};
1751        case 100313435: /*image*/ return new String[] {"Attachment"};
1752        case -791418107: /*patient*/ return new String[] {"Reference"};
1753        default: return super.getTypesForProperty(hash, name);
1754        }
1755
1756      }
1757
1758      @Override
1759      public Base addChild(String name) throws FHIRException {
1760        if (name.equals("identifier")) {
1761          return addIdentifier();
1762        }
1763        else if (name.equals("active")) {
1764          throw new FHIRException("Cannot call addChild on a singleton property BodyStructure.active");
1765        }
1766        else if (name.equals("morphology")) {
1767          this.morphology = new CodeableConcept();
1768          return this.morphology;
1769        }
1770        else if (name.equals("includedStructure")) {
1771          return addIncludedStructure();
1772        }
1773        else if (name.equals("excludedStructure")) {
1774          return addExcludedStructure();
1775        }
1776        else if (name.equals("description")) {
1777          throw new FHIRException("Cannot call addChild on a singleton property BodyStructure.description");
1778        }
1779        else if (name.equals("image")) {
1780          return addImage();
1781        }
1782        else if (name.equals("patient")) {
1783          this.patient = new Reference();
1784          return this.patient;
1785        }
1786        else
1787          return super.addChild(name);
1788      }
1789
1790  public String fhirType() {
1791    return "BodyStructure";
1792
1793  }
1794
1795      public BodyStructure copy() {
1796        BodyStructure dst = new BodyStructure();
1797        copyValues(dst);
1798        return dst;
1799      }
1800
1801      public void copyValues(BodyStructure dst) {
1802        super.copyValues(dst);
1803        if (identifier != null) {
1804          dst.identifier = new ArrayList<Identifier>();
1805          for (Identifier i : identifier)
1806            dst.identifier.add(i.copy());
1807        };
1808        dst.active = active == null ? null : active.copy();
1809        dst.morphology = morphology == null ? null : morphology.copy();
1810        if (includedStructure != null) {
1811          dst.includedStructure = new ArrayList<BodyStructureIncludedStructureComponent>();
1812          for (BodyStructureIncludedStructureComponent i : includedStructure)
1813            dst.includedStructure.add(i.copy());
1814        };
1815        if (excludedStructure != null) {
1816          dst.excludedStructure = new ArrayList<BodyStructureIncludedStructureComponent>();
1817          for (BodyStructureIncludedStructureComponent i : excludedStructure)
1818            dst.excludedStructure.add(i.copy());
1819        };
1820        dst.description = description == null ? null : description.copy();
1821        if (image != null) {
1822          dst.image = new ArrayList<Attachment>();
1823          for (Attachment i : image)
1824            dst.image.add(i.copy());
1825        };
1826        dst.patient = patient == null ? null : patient.copy();
1827      }
1828
1829      protected BodyStructure typedCopy() {
1830        return copy();
1831      }
1832
1833      @Override
1834      public boolean equalsDeep(Base other_) {
1835        if (!super.equalsDeep(other_))
1836          return false;
1837        if (!(other_ instanceof BodyStructure))
1838          return false;
1839        BodyStructure o = (BodyStructure) other_;
1840        return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(morphology, o.morphology, true)
1841           && compareDeep(includedStructure, o.includedStructure, true) && compareDeep(excludedStructure, o.excludedStructure, true)
1842           && compareDeep(description, o.description, true) && compareDeep(image, o.image, true) && compareDeep(patient, o.patient, true)
1843          ;
1844      }
1845
1846      @Override
1847      public boolean equalsShallow(Base other_) {
1848        if (!super.equalsShallow(other_))
1849          return false;
1850        if (!(other_ instanceof BodyStructure))
1851          return false;
1852        BodyStructure o = (BodyStructure) other_;
1853        return compareValues(active, o.active, true) && compareValues(description, o.description, true);
1854      }
1855
1856      public boolean isEmpty() {
1857        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, active, morphology
1858          , includedStructure, excludedStructure, description, image, patient);
1859      }
1860
1861  @Override
1862  public ResourceType getResourceType() {
1863    return ResourceType.BodyStructure;
1864   }
1865
1866 /**
1867   * Search parameter: <b>excluded_structure</b>
1868   * <p>
1869   * Description: <b>Body site excludedStructure structure</b><br>
1870   * Type: <b>token</b><br>
1871   * Path: <b>BodyStructure.excludedStructure.structure</b><br>
1872   * </p>
1873   */
1874  @SearchParamDefinition(name="excluded_structure", path="BodyStructure.excludedStructure.structure", description="Body site excludedStructure structure", type="token" )
1875  public static final String SP_EXCLUDEDSTRUCTURE = "excluded_structure";
1876 /**
1877   * <b>Fluent Client</b> search parameter constant for <b>excluded_structure</b>
1878   * <p>
1879   * Description: <b>Body site excludedStructure structure</b><br>
1880   * Type: <b>token</b><br>
1881   * Path: <b>BodyStructure.excludedStructure.structure</b><br>
1882   * </p>
1883   */
1884  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EXCLUDEDSTRUCTURE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EXCLUDEDSTRUCTURE);
1885
1886 /**
1887   * Search parameter: <b>included_structure</b>
1888   * <p>
1889   * Description: <b>Body site includedStructure structure</b><br>
1890   * Type: <b>token</b><br>
1891   * Path: <b>BodyStructure.includedStructure.structure</b><br>
1892   * </p>
1893   */
1894  @SearchParamDefinition(name="included_structure", path="BodyStructure.includedStructure.structure", description="Body site includedStructure structure", type="token" )
1895  public static final String SP_INCLUDEDSTRUCTURE = "included_structure";
1896 /**
1897   * <b>Fluent Client</b> search parameter constant for <b>included_structure</b>
1898   * <p>
1899   * Description: <b>Body site includedStructure structure</b><br>
1900   * Type: <b>token</b><br>
1901   * Path: <b>BodyStructure.includedStructure.structure</b><br>
1902   * </p>
1903   */
1904  public static final ca.uhn.fhir.rest.gclient.TokenClientParam INCLUDEDSTRUCTURE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INCLUDEDSTRUCTURE);
1905
1906 /**
1907   * Search parameter: <b>morphology</b>
1908   * <p>
1909   * Description: <b>Kind of Structure</b><br>
1910   * Type: <b>token</b><br>
1911   * Path: <b>BodyStructure.morphology</b><br>
1912   * </p>
1913   */
1914  @SearchParamDefinition(name="morphology", path="BodyStructure.morphology", description="Kind of Structure", type="token" )
1915  public static final String SP_MORPHOLOGY = "morphology";
1916 /**
1917   * <b>Fluent Client</b> search parameter constant for <b>morphology</b>
1918   * <p>
1919   * Description: <b>Kind of Structure</b><br>
1920   * Type: <b>token</b><br>
1921   * Path: <b>BodyStructure.morphology</b><br>
1922   * </p>
1923   */
1924  public static final ca.uhn.fhir.rest.gclient.TokenClientParam MORPHOLOGY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_MORPHOLOGY);
1925
1926 /**
1927   * Search parameter: <b>identifier</b>
1928   * <p>
1929   * Description: <b>Multiple Resources: 
1930
1931* [Account](account.html): Account number
1932* [AdverseEvent](adverseevent.html): Business identifier for the event
1933* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1934* [Appointment](appointment.html): An Identifier of the Appointment
1935* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
1936* [Basic](basic.html): Business identifier
1937* [BodyStructure](bodystructure.html): Bodystructure identifier
1938* [CarePlan](careplan.html): External Ids for this plan
1939* [CareTeam](careteam.html): External Ids for this team
1940* [ChargeItem](chargeitem.html): Business Identifier for item
1941* [Claim](claim.html): The primary identifier of the financial resource
1942* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
1943* [ClinicalImpression](clinicalimpression.html): Business identifier
1944* [Communication](communication.html): Unique identifier
1945* [CommunicationRequest](communicationrequest.html): Unique identifier
1946* [Composition](composition.html): Version-independent identifier for the Composition
1947* [Condition](condition.html): A unique identifier of the condition record
1948* [Consent](consent.html): Identifier for this record (external references)
1949* [Contract](contract.html): The identity of the contract
1950* [Coverage](coverage.html): The primary identifier of the insured and the coverage
1951* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
1952* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
1953* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1954* [DeviceRequest](devicerequest.html): Business identifier for request/order
1955* [DeviceUsage](deviceusage.html): Search by identifier
1956* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1957* [DocumentReference](documentreference.html): Identifier of the attachment binary
1958* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1959* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
1960* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1961* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
1962* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1963* [Flag](flag.html): Business identifier
1964* [Goal](goal.html): External Ids for this goal
1965* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
1966* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
1967* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
1968* [Immunization](immunization.html): Business identifier
1969* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
1970* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
1971* [Invoice](invoice.html): Business Identifier for item
1972* [List](list.html): Business identifier
1973* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
1974* [Medication](medication.html): Returns medications with this external identifier
1975* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1976* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1977* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1978* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
1979* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
1980* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
1981* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
1982* [Observation](observation.html): The unique id for a particular observation
1983* [Person](person.html): A person Identifier
1984* [Procedure](procedure.html): A unique identifier for a procedure
1985* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
1986* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
1987* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
1988* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
1989* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1990* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1991* [Specimen](specimen.html): The unique identifier associated with the specimen
1992* [SupplyDelivery](supplydelivery.html): External identifier
1993* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1994* [Task](task.html): Search for a task instance by its business identifier
1995* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1996</b><br>
1997   * Type: <b>token</b><br>
1998   * 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>
1999   * </p>
2000   */
2001  @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" )
2002  public static final String SP_IDENTIFIER = "identifier";
2003 /**
2004   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2005   * <p>
2006   * Description: <b>Multiple Resources: 
2007
2008* [Account](account.html): Account number
2009* [AdverseEvent](adverseevent.html): Business identifier for the event
2010* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2011* [Appointment](appointment.html): An Identifier of the Appointment
2012* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2013* [Basic](basic.html): Business identifier
2014* [BodyStructure](bodystructure.html): Bodystructure identifier
2015* [CarePlan](careplan.html): External Ids for this plan
2016* [CareTeam](careteam.html): External Ids for this team
2017* [ChargeItem](chargeitem.html): Business Identifier for item
2018* [Claim](claim.html): The primary identifier of the financial resource
2019* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2020* [ClinicalImpression](clinicalimpression.html): Business identifier
2021* [Communication](communication.html): Unique identifier
2022* [CommunicationRequest](communicationrequest.html): Unique identifier
2023* [Composition](composition.html): Version-independent identifier for the Composition
2024* [Condition](condition.html): A unique identifier of the condition record
2025* [Consent](consent.html): Identifier for this record (external references)
2026* [Contract](contract.html): The identity of the contract
2027* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2028* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2029* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2030* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2031* [DeviceRequest](devicerequest.html): Business identifier for request/order
2032* [DeviceUsage](deviceusage.html): Search by identifier
2033* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2034* [DocumentReference](documentreference.html): Identifier of the attachment binary
2035* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2036* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2037* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2038* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2039* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2040* [Flag](flag.html): Business identifier
2041* [Goal](goal.html): External Ids for this goal
2042* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2043* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2044* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2045* [Immunization](immunization.html): Business identifier
2046* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2047* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2048* [Invoice](invoice.html): Business Identifier for item
2049* [List](list.html): Business identifier
2050* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2051* [Medication](medication.html): Returns medications with this external identifier
2052* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2053* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2054* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2055* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2056* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2057* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2058* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2059* [Observation](observation.html): The unique id for a particular observation
2060* [Person](person.html): A person Identifier
2061* [Procedure](procedure.html): A unique identifier for a procedure
2062* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2063* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2064* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2065* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2066* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2067* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2068* [Specimen](specimen.html): The unique identifier associated with the specimen
2069* [SupplyDelivery](supplydelivery.html): External identifier
2070* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2071* [Task](task.html): Search for a task instance by its business identifier
2072* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2073</b><br>
2074   * Type: <b>token</b><br>
2075   * 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>
2076   * </p>
2077   */
2078  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2079
2080 /**
2081   * Search parameter: <b>patient</b>
2082   * <p>
2083   * Description: <b>Multiple Resources: 
2084
2085* [Account](account.html): The entity that caused the expenses
2086* [AdverseEvent](adverseevent.html): Subject impacted by event
2087* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2088* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2089* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2090* [AuditEvent](auditevent.html): Where the activity involved patient data
2091* [Basic](basic.html): Identifies the focus of this resource
2092* [BodyStructure](bodystructure.html): Who this is about
2093* [CarePlan](careplan.html): Who the care plan is for
2094* [CareTeam](careteam.html): Who care team is for
2095* [ChargeItem](chargeitem.html): Individual service was done for/to
2096* [Claim](claim.html): Patient receiving the products or services
2097* [ClaimResponse](claimresponse.html): The subject of care
2098* [ClinicalImpression](clinicalimpression.html): Patient assessed
2099* [Communication](communication.html): Focus of message
2100* [CommunicationRequest](communicationrequest.html): Focus of message
2101* [Composition](composition.html): Who and/or what the composition is about
2102* [Condition](condition.html): Who has the condition?
2103* [Consent](consent.html): Who the consent applies to
2104* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2105* [Coverage](coverage.html): Retrieve coverages for a patient
2106* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2107* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2108* [DetectedIssue](detectedissue.html): Associated patient
2109* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2110* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2111* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2112* [DocumentReference](documentreference.html): Who/what is the subject of the document
2113* [Encounter](encounter.html): The patient present at the encounter
2114* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2115* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2116* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2117* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2118* [Flag](flag.html): The identity of a subject to list flags for
2119* [Goal](goal.html): Who this goal is intended for
2120* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2121* [ImagingSelection](imagingselection.html): Who the study is about
2122* [ImagingStudy](imagingstudy.html): Who the study is about
2123* [Immunization](immunization.html): The patient for the vaccination record
2124* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2125* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2126* [Invoice](invoice.html): Recipient(s) of goods and services
2127* [List](list.html): If all resources have the same subject
2128* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2129* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2130* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2131* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2132* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2133* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2134* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2135* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2136* [Observation](observation.html): The subject that the observation is about (if patient)
2137* [Person](person.html): The Person links to this Patient
2138* [Procedure](procedure.html): Search by subject - a patient
2139* [Provenance](provenance.html): Where the activity involved patient data
2140* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2141* [RelatedPerson](relatedperson.html): The patient this related person is related to
2142* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2143* [ResearchSubject](researchsubject.html): Who or what is part of study
2144* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2145* [ServiceRequest](servicerequest.html): Search by subject - a patient
2146* [Specimen](specimen.html): The patient the specimen comes from
2147* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2148* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2149* [Task](task.html): Search by patient
2150* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2151</b><br>
2152   * Type: <b>reference</b><br>
2153   * 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>
2154   * </p>
2155   */
2156  @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 } )
2157  public static final String SP_PATIENT = "patient";
2158 /**
2159   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2160   * <p>
2161   * Description: <b>Multiple Resources: 
2162
2163* [Account](account.html): The entity that caused the expenses
2164* [AdverseEvent](adverseevent.html): Subject impacted by event
2165* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2166* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2167* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2168* [AuditEvent](auditevent.html): Where the activity involved patient data
2169* [Basic](basic.html): Identifies the focus of this resource
2170* [BodyStructure](bodystructure.html): Who this is about
2171* [CarePlan](careplan.html): Who the care plan is for
2172* [CareTeam](careteam.html): Who care team is for
2173* [ChargeItem](chargeitem.html): Individual service was done for/to
2174* [Claim](claim.html): Patient receiving the products or services
2175* [ClaimResponse](claimresponse.html): The subject of care
2176* [ClinicalImpression](clinicalimpression.html): Patient assessed
2177* [Communication](communication.html): Focus of message
2178* [CommunicationRequest](communicationrequest.html): Focus of message
2179* [Composition](composition.html): Who and/or what the composition is about
2180* [Condition](condition.html): Who has the condition?
2181* [Consent](consent.html): Who the consent applies to
2182* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2183* [Coverage](coverage.html): Retrieve coverages for a patient
2184* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2185* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2186* [DetectedIssue](detectedissue.html): Associated patient
2187* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2188* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2189* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2190* [DocumentReference](documentreference.html): Who/what is the subject of the document
2191* [Encounter](encounter.html): The patient present at the encounter
2192* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2193* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2194* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2195* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2196* [Flag](flag.html): The identity of a subject to list flags for
2197* [Goal](goal.html): Who this goal is intended for
2198* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2199* [ImagingSelection](imagingselection.html): Who the study is about
2200* [ImagingStudy](imagingstudy.html): Who the study is about
2201* [Immunization](immunization.html): The patient for the vaccination record
2202* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2203* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2204* [Invoice](invoice.html): Recipient(s) of goods and services
2205* [List](list.html): If all resources have the same subject
2206* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2207* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2208* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2209* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2210* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2211* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2212* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2213* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2214* [Observation](observation.html): The subject that the observation is about (if patient)
2215* [Person](person.html): The Person links to this Patient
2216* [Procedure](procedure.html): Search by subject - a patient
2217* [Provenance](provenance.html): Where the activity involved patient data
2218* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2219* [RelatedPerson](relatedperson.html): The patient this related person is related to
2220* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2221* [ResearchSubject](researchsubject.html): Who or what is part of study
2222* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2223* [ServiceRequest](servicerequest.html): Search by subject - a patient
2224* [Specimen](specimen.html): The patient the specimen comes from
2225* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2226* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2227* [Task](task.html): Search by patient
2228* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2229</b><br>
2230   * Type: <b>reference</b><br>
2231   * 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>
2232   * </p>
2233   */
2234  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2235
2236/**
2237   * Constant for fluent queries to be used to add include statements. Specifies
2238   * the path value of "<b>BodyStructure:patient</b>".
2239   */
2240  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("BodyStructure:patient").toLocked();
2241
2242
2243}
2244