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