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 * An authorization for the provision of glasses and/or contact lenses to a patient.
053 */
054@ResourceDef(name="VisionPrescription", profile="http://hl7.org/fhir/StructureDefinition/VisionPrescription")
055public class VisionPrescription extends DomainResource {
056
057    public enum VisionBase {
058        /**
059         * top.
060         */
061        UP, 
062        /**
063         * bottom.
064         */
065        DOWN, 
066        /**
067         * inner edge.
068         */
069        IN, 
070        /**
071         * outer edge.
072         */
073        OUT, 
074        /**
075         * added to help the parsers with the generic types
076         */
077        NULL;
078        public static VisionBase fromCode(String codeString) throws FHIRException {
079            if (codeString == null || "".equals(codeString))
080                return null;
081        if ("up".equals(codeString))
082          return UP;
083        if ("down".equals(codeString))
084          return DOWN;
085        if ("in".equals(codeString))
086          return IN;
087        if ("out".equals(codeString))
088          return OUT;
089        if (Configuration.isAcceptInvalidEnums())
090          return null;
091        else
092          throw new FHIRException("Unknown VisionBase code '"+codeString+"'");
093        }
094        public String toCode() {
095          switch (this) {
096            case UP: return "up";
097            case DOWN: return "down";
098            case IN: return "in";
099            case OUT: return "out";
100            case NULL: return null;
101            default: return "?";
102          }
103        }
104        public String getSystem() {
105          switch (this) {
106            case UP: return "http://hl7.org/fhir/vision-base-codes";
107            case DOWN: return "http://hl7.org/fhir/vision-base-codes";
108            case IN: return "http://hl7.org/fhir/vision-base-codes";
109            case OUT: return "http://hl7.org/fhir/vision-base-codes";
110            case NULL: return null;
111            default: return "?";
112          }
113        }
114        public String getDefinition() {
115          switch (this) {
116            case UP: return "top.";
117            case DOWN: return "bottom.";
118            case IN: return "inner edge.";
119            case OUT: return "outer edge.";
120            case NULL: return null;
121            default: return "?";
122          }
123        }
124        public String getDisplay() {
125          switch (this) {
126            case UP: return "Up";
127            case DOWN: return "Down";
128            case IN: return "In";
129            case OUT: return "Out";
130            case NULL: return null;
131            default: return "?";
132          }
133        }
134    }
135
136  public static class VisionBaseEnumFactory implements EnumFactory<VisionBase> {
137    public VisionBase fromCode(String codeString) throws IllegalArgumentException {
138      if (codeString == null || "".equals(codeString))
139            if (codeString == null || "".equals(codeString))
140                return null;
141        if ("up".equals(codeString))
142          return VisionBase.UP;
143        if ("down".equals(codeString))
144          return VisionBase.DOWN;
145        if ("in".equals(codeString))
146          return VisionBase.IN;
147        if ("out".equals(codeString))
148          return VisionBase.OUT;
149        throw new IllegalArgumentException("Unknown VisionBase code '"+codeString+"'");
150        }
151        public Enumeration<VisionBase> fromType(PrimitiveType<?> code) throws FHIRException {
152          if (code == null)
153            return null;
154          if (code.isEmpty())
155            return new Enumeration<VisionBase>(this, VisionBase.NULL, code);
156          String codeString = ((PrimitiveType) code).asStringValue();
157          if (codeString == null || "".equals(codeString))
158            return new Enumeration<VisionBase>(this, VisionBase.NULL, code);
159        if ("up".equals(codeString))
160          return new Enumeration<VisionBase>(this, VisionBase.UP, code);
161        if ("down".equals(codeString))
162          return new Enumeration<VisionBase>(this, VisionBase.DOWN, code);
163        if ("in".equals(codeString))
164          return new Enumeration<VisionBase>(this, VisionBase.IN, code);
165        if ("out".equals(codeString))
166          return new Enumeration<VisionBase>(this, VisionBase.OUT, code);
167        throw new FHIRException("Unknown VisionBase code '"+codeString+"'");
168        }
169    public String toCode(VisionBase code) {
170      if (code == VisionBase.UP)
171        return "up";
172      if (code == VisionBase.DOWN)
173        return "down";
174      if (code == VisionBase.IN)
175        return "in";
176      if (code == VisionBase.OUT)
177        return "out";
178      return "?";
179      }
180    public String toSystem(VisionBase code) {
181      return code.getSystem();
182      }
183    }
184
185    public enum VisionEyes {
186        /**
187         * Right Eye.
188         */
189        RIGHT, 
190        /**
191         * Left Eye.
192         */
193        LEFT, 
194        /**
195         * added to help the parsers with the generic types
196         */
197        NULL;
198        public static VisionEyes fromCode(String codeString) throws FHIRException {
199            if (codeString == null || "".equals(codeString))
200                return null;
201        if ("right".equals(codeString))
202          return RIGHT;
203        if ("left".equals(codeString))
204          return LEFT;
205        if (Configuration.isAcceptInvalidEnums())
206          return null;
207        else
208          throw new FHIRException("Unknown VisionEyes code '"+codeString+"'");
209        }
210        public String toCode() {
211          switch (this) {
212            case RIGHT: return "right";
213            case LEFT: return "left";
214            case NULL: return null;
215            default: return "?";
216          }
217        }
218        public String getSystem() {
219          switch (this) {
220            case RIGHT: return "http://hl7.org/fhir/vision-eye-codes";
221            case LEFT: return "http://hl7.org/fhir/vision-eye-codes";
222            case NULL: return null;
223            default: return "?";
224          }
225        }
226        public String getDefinition() {
227          switch (this) {
228            case RIGHT: return "Right Eye.";
229            case LEFT: return "Left Eye.";
230            case NULL: return null;
231            default: return "?";
232          }
233        }
234        public String getDisplay() {
235          switch (this) {
236            case RIGHT: return "Right Eye";
237            case LEFT: return "Left Eye";
238            case NULL: return null;
239            default: return "?";
240          }
241        }
242    }
243
244  public static class VisionEyesEnumFactory implements EnumFactory<VisionEyes> {
245    public VisionEyes fromCode(String codeString) throws IllegalArgumentException {
246      if (codeString == null || "".equals(codeString))
247            if (codeString == null || "".equals(codeString))
248                return null;
249        if ("right".equals(codeString))
250          return VisionEyes.RIGHT;
251        if ("left".equals(codeString))
252          return VisionEyes.LEFT;
253        throw new IllegalArgumentException("Unknown VisionEyes code '"+codeString+"'");
254        }
255        public Enumeration<VisionEyes> fromType(PrimitiveType<?> code) throws FHIRException {
256          if (code == null)
257            return null;
258          if (code.isEmpty())
259            return new Enumeration<VisionEyes>(this, VisionEyes.NULL, code);
260          String codeString = ((PrimitiveType) code).asStringValue();
261          if (codeString == null || "".equals(codeString))
262            return new Enumeration<VisionEyes>(this, VisionEyes.NULL, code);
263        if ("right".equals(codeString))
264          return new Enumeration<VisionEyes>(this, VisionEyes.RIGHT, code);
265        if ("left".equals(codeString))
266          return new Enumeration<VisionEyes>(this, VisionEyes.LEFT, code);
267        throw new FHIRException("Unknown VisionEyes code '"+codeString+"'");
268        }
269    public String toCode(VisionEyes code) {
270      if (code == VisionEyes.RIGHT)
271        return "right";
272      if (code == VisionEyes.LEFT)
273        return "left";
274      return "?";
275      }
276    public String toSystem(VisionEyes code) {
277      return code.getSystem();
278      }
279    }
280
281    @Block()
282    public static class VisionPrescriptionLensSpecificationComponent extends BackboneElement implements IBaseBackboneElement {
283        /**
284         * Identifies the type of vision correction product which is required for the patient.
285         */
286        @Child(name = "product", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true)
287        @Description(shortDefinition="Product to be supplied", formalDefinition="Identifies the type of vision correction product which is required for the patient." )
288        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/vision-product")
289        protected CodeableConcept product;
290
291        /**
292         * The eye for which the lens specification applies.
293         */
294        @Child(name = "eye", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true)
295        @Description(shortDefinition="right | left", formalDefinition="The eye for which the lens specification applies." )
296        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/vision-eye-codes")
297        protected Enumeration<VisionEyes> eye;
298
299        /**
300         * Lens power measured in dioptres (0.25 units).
301         */
302        @Child(name = "sphere", type = {DecimalType.class}, order=3, min=0, max=1, modifier=false, summary=false)
303        @Description(shortDefinition="Power of the lens", formalDefinition="Lens power measured in dioptres (0.25 units)." )
304        protected DecimalType sphere;
305
306        /**
307         * Power adjustment for astigmatism measured in dioptres (0.25 units).
308         */
309        @Child(name = "cylinder", type = {DecimalType.class}, order=4, min=0, max=1, modifier=false, summary=false)
310        @Description(shortDefinition="Lens power for astigmatism", formalDefinition="Power adjustment for astigmatism measured in dioptres (0.25 units)." )
311        protected DecimalType cylinder;
312
313        /**
314         * Adjustment for astigmatism measured in integer degrees.
315         */
316        @Child(name = "axis", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=false)
317        @Description(shortDefinition="Lens meridian which contain no power for astigmatism", formalDefinition="Adjustment for astigmatism measured in integer degrees." )
318        protected IntegerType axis;
319
320        /**
321         * Allows for adjustment on two axis.
322         */
323        @Child(name = "prism", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
324        @Description(shortDefinition="Eye alignment compensation", formalDefinition="Allows for adjustment on two axis." )
325        protected List<PrismComponent> prism;
326
327        /**
328         * Power adjustment for multifocal lenses measured in dioptres (0.25 units).
329         */
330        @Child(name = "add", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=false)
331        @Description(shortDefinition="Added power for multifocal levels", formalDefinition="Power adjustment for multifocal lenses measured in dioptres (0.25 units)." )
332        protected DecimalType add;
333
334        /**
335         * Contact lens power measured in dioptres (0.25 units).
336         */
337        @Child(name = "power", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=false)
338        @Description(shortDefinition="Contact lens power", formalDefinition="Contact lens power measured in dioptres (0.25 units)." )
339        protected DecimalType power;
340
341        /**
342         * Back curvature measured in millimetres.
343         */
344        @Child(name = "backCurve", type = {DecimalType.class}, order=9, min=0, max=1, modifier=false, summary=false)
345        @Description(shortDefinition="Contact lens back curvature", formalDefinition="Back curvature measured in millimetres." )
346        protected DecimalType backCurve;
347
348        /**
349         * Contact lens diameter measured in millimetres.
350         */
351        @Child(name = "diameter", type = {DecimalType.class}, order=10, min=0, max=1, modifier=false, summary=false)
352        @Description(shortDefinition="Contact lens diameter", formalDefinition="Contact lens diameter measured in millimetres." )
353        protected DecimalType diameter;
354
355        /**
356         * The recommended maximum wear period for the lens.
357         */
358        @Child(name = "duration", type = {Quantity.class}, order=11, min=0, max=1, modifier=false, summary=false)
359        @Description(shortDefinition="Lens wear duration", formalDefinition="The recommended maximum wear period for the lens." )
360        protected Quantity duration;
361
362        /**
363         * Special color or pattern.
364         */
365        @Child(name = "color", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false)
366        @Description(shortDefinition="Color required", formalDefinition="Special color or pattern." )
367        protected StringType color;
368
369        /**
370         * Brand recommendations or restrictions.
371         */
372        @Child(name = "brand", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false)
373        @Description(shortDefinition="Brand required", formalDefinition="Brand recommendations or restrictions." )
374        protected StringType brand;
375
376        /**
377         * Notes for special requirements such as coatings and lens materials.
378         */
379        @Child(name = "note", type = {Annotation.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
380        @Description(shortDefinition="Notes for coatings", formalDefinition="Notes for special requirements such as coatings and lens materials." )
381        protected List<Annotation> note;
382
383        private static final long serialVersionUID = 688924460L;
384
385    /**
386     * Constructor
387     */
388      public VisionPrescriptionLensSpecificationComponent() {
389        super();
390      }
391
392    /**
393     * Constructor
394     */
395      public VisionPrescriptionLensSpecificationComponent(CodeableConcept product, VisionEyes eye) {
396        super();
397        this.setProduct(product);
398        this.setEye(eye);
399      }
400
401        /**
402         * @return {@link #product} (Identifies the type of vision correction product which is required for the patient.)
403         */
404        public CodeableConcept getProduct() { 
405          if (this.product == null)
406            if (Configuration.errorOnAutoCreate())
407              throw new Error("Attempt to auto-create VisionPrescriptionLensSpecificationComponent.product");
408            else if (Configuration.doAutoCreate())
409              this.product = new CodeableConcept(); // cc
410          return this.product;
411        }
412
413        public boolean hasProduct() { 
414          return this.product != null && !this.product.isEmpty();
415        }
416
417        /**
418         * @param value {@link #product} (Identifies the type of vision correction product which is required for the patient.)
419         */
420        public VisionPrescriptionLensSpecificationComponent setProduct(CodeableConcept value) { 
421          this.product = value;
422          return this;
423        }
424
425        /**
426         * @return {@link #eye} (The eye for which the lens specification applies.). This is the underlying object with id, value and extensions. The accessor "getEye" gives direct access to the value
427         */
428        public Enumeration<VisionEyes> getEyeElement() { 
429          if (this.eye == null)
430            if (Configuration.errorOnAutoCreate())
431              throw new Error("Attempt to auto-create VisionPrescriptionLensSpecificationComponent.eye");
432            else if (Configuration.doAutoCreate())
433              this.eye = new Enumeration<VisionEyes>(new VisionEyesEnumFactory()); // bb
434          return this.eye;
435        }
436
437        public boolean hasEyeElement() { 
438          return this.eye != null && !this.eye.isEmpty();
439        }
440
441        public boolean hasEye() { 
442          return this.eye != null && !this.eye.isEmpty();
443        }
444
445        /**
446         * @param value {@link #eye} (The eye for which the lens specification applies.). This is the underlying object with id, value and extensions. The accessor "getEye" gives direct access to the value
447         */
448        public VisionPrescriptionLensSpecificationComponent setEyeElement(Enumeration<VisionEyes> value) { 
449          this.eye = value;
450          return this;
451        }
452
453        /**
454         * @return The eye for which the lens specification applies.
455         */
456        public VisionEyes getEye() { 
457          return this.eye == null ? null : this.eye.getValue();
458        }
459
460        /**
461         * @param value The eye for which the lens specification applies.
462         */
463        public VisionPrescriptionLensSpecificationComponent setEye(VisionEyes value) { 
464            if (this.eye == null)
465              this.eye = new Enumeration<VisionEyes>(new VisionEyesEnumFactory());
466            this.eye.setValue(value);
467          return this;
468        }
469
470        /**
471         * @return {@link #sphere} (Lens power measured in dioptres (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getSphere" gives direct access to the value
472         */
473        public DecimalType getSphereElement() { 
474          if (this.sphere == null)
475            if (Configuration.errorOnAutoCreate())
476              throw new Error("Attempt to auto-create VisionPrescriptionLensSpecificationComponent.sphere");
477            else if (Configuration.doAutoCreate())
478              this.sphere = new DecimalType(); // bb
479          return this.sphere;
480        }
481
482        public boolean hasSphereElement() { 
483          return this.sphere != null && !this.sphere.isEmpty();
484        }
485
486        public boolean hasSphere() { 
487          return this.sphere != null && !this.sphere.isEmpty();
488        }
489
490        /**
491         * @param value {@link #sphere} (Lens power measured in dioptres (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getSphere" gives direct access to the value
492         */
493        public VisionPrescriptionLensSpecificationComponent setSphereElement(DecimalType value) { 
494          this.sphere = value;
495          return this;
496        }
497
498        /**
499         * @return Lens power measured in dioptres (0.25 units).
500         */
501        public BigDecimal getSphere() { 
502          return this.sphere == null ? null : this.sphere.getValue();
503        }
504
505        /**
506         * @param value Lens power measured in dioptres (0.25 units).
507         */
508        public VisionPrescriptionLensSpecificationComponent setSphere(BigDecimal value) { 
509          if (value == null)
510            this.sphere = null;
511          else {
512            if (this.sphere == null)
513              this.sphere = new DecimalType();
514            this.sphere.setValue(value);
515          }
516          return this;
517        }
518
519        /**
520         * @param value Lens power measured in dioptres (0.25 units).
521         */
522        public VisionPrescriptionLensSpecificationComponent setSphere(long value) { 
523              this.sphere = new DecimalType();
524            this.sphere.setValue(value);
525          return this;
526        }
527
528        /**
529         * @param value Lens power measured in dioptres (0.25 units).
530         */
531        public VisionPrescriptionLensSpecificationComponent setSphere(double value) { 
532              this.sphere = new DecimalType();
533            this.sphere.setValue(value);
534          return this;
535        }
536
537        /**
538         * @return {@link #cylinder} (Power adjustment for astigmatism measured in dioptres (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getCylinder" gives direct access to the value
539         */
540        public DecimalType getCylinderElement() { 
541          if (this.cylinder == null)
542            if (Configuration.errorOnAutoCreate())
543              throw new Error("Attempt to auto-create VisionPrescriptionLensSpecificationComponent.cylinder");
544            else if (Configuration.doAutoCreate())
545              this.cylinder = new DecimalType(); // bb
546          return this.cylinder;
547        }
548
549        public boolean hasCylinderElement() { 
550          return this.cylinder != null && !this.cylinder.isEmpty();
551        }
552
553        public boolean hasCylinder() { 
554          return this.cylinder != null && !this.cylinder.isEmpty();
555        }
556
557        /**
558         * @param value {@link #cylinder} (Power adjustment for astigmatism measured in dioptres (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getCylinder" gives direct access to the value
559         */
560        public VisionPrescriptionLensSpecificationComponent setCylinderElement(DecimalType value) { 
561          this.cylinder = value;
562          return this;
563        }
564
565        /**
566         * @return Power adjustment for astigmatism measured in dioptres (0.25 units).
567         */
568        public BigDecimal getCylinder() { 
569          return this.cylinder == null ? null : this.cylinder.getValue();
570        }
571
572        /**
573         * @param value Power adjustment for astigmatism measured in dioptres (0.25 units).
574         */
575        public VisionPrescriptionLensSpecificationComponent setCylinder(BigDecimal value) { 
576          if (value == null)
577            this.cylinder = null;
578          else {
579            if (this.cylinder == null)
580              this.cylinder = new DecimalType();
581            this.cylinder.setValue(value);
582          }
583          return this;
584        }
585
586        /**
587         * @param value Power adjustment for astigmatism measured in dioptres (0.25 units).
588         */
589        public VisionPrescriptionLensSpecificationComponent setCylinder(long value) { 
590              this.cylinder = new DecimalType();
591            this.cylinder.setValue(value);
592          return this;
593        }
594
595        /**
596         * @param value Power adjustment for astigmatism measured in dioptres (0.25 units).
597         */
598        public VisionPrescriptionLensSpecificationComponent setCylinder(double value) { 
599              this.cylinder = new DecimalType();
600            this.cylinder.setValue(value);
601          return this;
602        }
603
604        /**
605         * @return {@link #axis} (Adjustment for astigmatism measured in integer degrees.). This is the underlying object with id, value and extensions. The accessor "getAxis" gives direct access to the value
606         */
607        public IntegerType getAxisElement() { 
608          if (this.axis == null)
609            if (Configuration.errorOnAutoCreate())
610              throw new Error("Attempt to auto-create VisionPrescriptionLensSpecificationComponent.axis");
611            else if (Configuration.doAutoCreate())
612              this.axis = new IntegerType(); // bb
613          return this.axis;
614        }
615
616        public boolean hasAxisElement() { 
617          return this.axis != null && !this.axis.isEmpty();
618        }
619
620        public boolean hasAxis() { 
621          return this.axis != null && !this.axis.isEmpty();
622        }
623
624        /**
625         * @param value {@link #axis} (Adjustment for astigmatism measured in integer degrees.). This is the underlying object with id, value and extensions. The accessor "getAxis" gives direct access to the value
626         */
627        public VisionPrescriptionLensSpecificationComponent setAxisElement(IntegerType value) { 
628          this.axis = value;
629          return this;
630        }
631
632        /**
633         * @return Adjustment for astigmatism measured in integer degrees.
634         */
635        public int getAxis() { 
636          return this.axis == null || this.axis.isEmpty() ? 0 : this.axis.getValue();
637        }
638
639        /**
640         * @param value Adjustment for astigmatism measured in integer degrees.
641         */
642        public VisionPrescriptionLensSpecificationComponent setAxis(int value) { 
643            if (this.axis == null)
644              this.axis = new IntegerType();
645            this.axis.setValue(value);
646          return this;
647        }
648
649        /**
650         * @return {@link #prism} (Allows for adjustment on two axis.)
651         */
652        public List<PrismComponent> getPrism() { 
653          if (this.prism == null)
654            this.prism = new ArrayList<PrismComponent>();
655          return this.prism;
656        }
657
658        /**
659         * @return Returns a reference to <code>this</code> for easy method chaining
660         */
661        public VisionPrescriptionLensSpecificationComponent setPrism(List<PrismComponent> thePrism) { 
662          this.prism = thePrism;
663          return this;
664        }
665
666        public boolean hasPrism() { 
667          if (this.prism == null)
668            return false;
669          for (PrismComponent item : this.prism)
670            if (!item.isEmpty())
671              return true;
672          return false;
673        }
674
675        public PrismComponent addPrism() { //3
676          PrismComponent t = new PrismComponent();
677          if (this.prism == null)
678            this.prism = new ArrayList<PrismComponent>();
679          this.prism.add(t);
680          return t;
681        }
682
683        public VisionPrescriptionLensSpecificationComponent addPrism(PrismComponent t) { //3
684          if (t == null)
685            return this;
686          if (this.prism == null)
687            this.prism = new ArrayList<PrismComponent>();
688          this.prism.add(t);
689          return this;
690        }
691
692        /**
693         * @return The first repetition of repeating field {@link #prism}, creating it if it does not already exist {3}
694         */
695        public PrismComponent getPrismFirstRep() { 
696          if (getPrism().isEmpty()) {
697            addPrism();
698          }
699          return getPrism().get(0);
700        }
701
702        /**
703         * @return {@link #add} (Power adjustment for multifocal lenses measured in dioptres (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getAdd" gives direct access to the value
704         */
705        public DecimalType getAddElement() { 
706          if (this.add == null)
707            if (Configuration.errorOnAutoCreate())
708              throw new Error("Attempt to auto-create VisionPrescriptionLensSpecificationComponent.add");
709            else if (Configuration.doAutoCreate())
710              this.add = new DecimalType(); // bb
711          return this.add;
712        }
713
714        public boolean hasAddElement() { 
715          return this.add != null && !this.add.isEmpty();
716        }
717
718        public boolean hasAdd() { 
719          return this.add != null && !this.add.isEmpty();
720        }
721
722        /**
723         * @param value {@link #add} (Power adjustment for multifocal lenses measured in dioptres (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getAdd" gives direct access to the value
724         */
725        public VisionPrescriptionLensSpecificationComponent setAddElement(DecimalType value) { 
726          this.add = value;
727          return this;
728        }
729
730        /**
731         * @return Power adjustment for multifocal lenses measured in dioptres (0.25 units).
732         */
733        public BigDecimal getAdd() { 
734          return this.add == null ? null : this.add.getValue();
735        }
736
737        /**
738         * @param value Power adjustment for multifocal lenses measured in dioptres (0.25 units).
739         */
740        public VisionPrescriptionLensSpecificationComponent setAdd(BigDecimal value) { 
741          if (value == null)
742            this.add = null;
743          else {
744            if (this.add == null)
745              this.add = new DecimalType();
746            this.add.setValue(value);
747          }
748          return this;
749        }
750
751        /**
752         * @param value Power adjustment for multifocal lenses measured in dioptres (0.25 units).
753         */
754        public VisionPrescriptionLensSpecificationComponent setAdd(long value) { 
755              this.add = new DecimalType();
756            this.add.setValue(value);
757          return this;
758        }
759
760        /**
761         * @param value Power adjustment for multifocal lenses measured in dioptres (0.25 units).
762         */
763        public VisionPrescriptionLensSpecificationComponent setAdd(double value) { 
764              this.add = new DecimalType();
765            this.add.setValue(value);
766          return this;
767        }
768
769        /**
770         * @return {@link #power} (Contact lens power measured in dioptres (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getPower" gives direct access to the value
771         */
772        public DecimalType getPowerElement() { 
773          if (this.power == null)
774            if (Configuration.errorOnAutoCreate())
775              throw new Error("Attempt to auto-create VisionPrescriptionLensSpecificationComponent.power");
776            else if (Configuration.doAutoCreate())
777              this.power = new DecimalType(); // bb
778          return this.power;
779        }
780
781        public boolean hasPowerElement() { 
782          return this.power != null && !this.power.isEmpty();
783        }
784
785        public boolean hasPower() { 
786          return this.power != null && !this.power.isEmpty();
787        }
788
789        /**
790         * @param value {@link #power} (Contact lens power measured in dioptres (0.25 units).). This is the underlying object with id, value and extensions. The accessor "getPower" gives direct access to the value
791         */
792        public VisionPrescriptionLensSpecificationComponent setPowerElement(DecimalType value) { 
793          this.power = value;
794          return this;
795        }
796
797        /**
798         * @return Contact lens power measured in dioptres (0.25 units).
799         */
800        public BigDecimal getPower() { 
801          return this.power == null ? null : this.power.getValue();
802        }
803
804        /**
805         * @param value Contact lens power measured in dioptres (0.25 units).
806         */
807        public VisionPrescriptionLensSpecificationComponent setPower(BigDecimal value) { 
808          if (value == null)
809            this.power = null;
810          else {
811            if (this.power == null)
812              this.power = new DecimalType();
813            this.power.setValue(value);
814          }
815          return this;
816        }
817
818        /**
819         * @param value Contact lens power measured in dioptres (0.25 units).
820         */
821        public VisionPrescriptionLensSpecificationComponent setPower(long value) { 
822              this.power = new DecimalType();
823            this.power.setValue(value);
824          return this;
825        }
826
827        /**
828         * @param value Contact lens power measured in dioptres (0.25 units).
829         */
830        public VisionPrescriptionLensSpecificationComponent setPower(double value) { 
831              this.power = new DecimalType();
832            this.power.setValue(value);
833          return this;
834        }
835
836        /**
837         * @return {@link #backCurve} (Back curvature measured in millimetres.). This is the underlying object with id, value and extensions. The accessor "getBackCurve" gives direct access to the value
838         */
839        public DecimalType getBackCurveElement() { 
840          if (this.backCurve == null)
841            if (Configuration.errorOnAutoCreate())
842              throw new Error("Attempt to auto-create VisionPrescriptionLensSpecificationComponent.backCurve");
843            else if (Configuration.doAutoCreate())
844              this.backCurve = new DecimalType(); // bb
845          return this.backCurve;
846        }
847
848        public boolean hasBackCurveElement() { 
849          return this.backCurve != null && !this.backCurve.isEmpty();
850        }
851
852        public boolean hasBackCurve() { 
853          return this.backCurve != null && !this.backCurve.isEmpty();
854        }
855
856        /**
857         * @param value {@link #backCurve} (Back curvature measured in millimetres.). This is the underlying object with id, value and extensions. The accessor "getBackCurve" gives direct access to the value
858         */
859        public VisionPrescriptionLensSpecificationComponent setBackCurveElement(DecimalType value) { 
860          this.backCurve = value;
861          return this;
862        }
863
864        /**
865         * @return Back curvature measured in millimetres.
866         */
867        public BigDecimal getBackCurve() { 
868          return this.backCurve == null ? null : this.backCurve.getValue();
869        }
870
871        /**
872         * @param value Back curvature measured in millimetres.
873         */
874        public VisionPrescriptionLensSpecificationComponent setBackCurve(BigDecimal value) { 
875          if (value == null)
876            this.backCurve = null;
877          else {
878            if (this.backCurve == null)
879              this.backCurve = new DecimalType();
880            this.backCurve.setValue(value);
881          }
882          return this;
883        }
884
885        /**
886         * @param value Back curvature measured in millimetres.
887         */
888        public VisionPrescriptionLensSpecificationComponent setBackCurve(long value) { 
889              this.backCurve = new DecimalType();
890            this.backCurve.setValue(value);
891          return this;
892        }
893
894        /**
895         * @param value Back curvature measured in millimetres.
896         */
897        public VisionPrescriptionLensSpecificationComponent setBackCurve(double value) { 
898              this.backCurve = new DecimalType();
899            this.backCurve.setValue(value);
900          return this;
901        }
902
903        /**
904         * @return {@link #diameter} (Contact lens diameter measured in millimetres.). This is the underlying object with id, value and extensions. The accessor "getDiameter" gives direct access to the value
905         */
906        public DecimalType getDiameterElement() { 
907          if (this.diameter == null)
908            if (Configuration.errorOnAutoCreate())
909              throw new Error("Attempt to auto-create VisionPrescriptionLensSpecificationComponent.diameter");
910            else if (Configuration.doAutoCreate())
911              this.diameter = new DecimalType(); // bb
912          return this.diameter;
913        }
914
915        public boolean hasDiameterElement() { 
916          return this.diameter != null && !this.diameter.isEmpty();
917        }
918
919        public boolean hasDiameter() { 
920          return this.diameter != null && !this.diameter.isEmpty();
921        }
922
923        /**
924         * @param value {@link #diameter} (Contact lens diameter measured in millimetres.). This is the underlying object with id, value and extensions. The accessor "getDiameter" gives direct access to the value
925         */
926        public VisionPrescriptionLensSpecificationComponent setDiameterElement(DecimalType value) { 
927          this.diameter = value;
928          return this;
929        }
930
931        /**
932         * @return Contact lens diameter measured in millimetres.
933         */
934        public BigDecimal getDiameter() { 
935          return this.diameter == null ? null : this.diameter.getValue();
936        }
937
938        /**
939         * @param value Contact lens diameter measured in millimetres.
940         */
941        public VisionPrescriptionLensSpecificationComponent setDiameter(BigDecimal value) { 
942          if (value == null)
943            this.diameter = null;
944          else {
945            if (this.diameter == null)
946              this.diameter = new DecimalType();
947            this.diameter.setValue(value);
948          }
949          return this;
950        }
951
952        /**
953         * @param value Contact lens diameter measured in millimetres.
954         */
955        public VisionPrescriptionLensSpecificationComponent setDiameter(long value) { 
956              this.diameter = new DecimalType();
957            this.diameter.setValue(value);
958          return this;
959        }
960
961        /**
962         * @param value Contact lens diameter measured in millimetres.
963         */
964        public VisionPrescriptionLensSpecificationComponent setDiameter(double value) { 
965              this.diameter = new DecimalType();
966            this.diameter.setValue(value);
967          return this;
968        }
969
970        /**
971         * @return {@link #duration} (The recommended maximum wear period for the lens.)
972         */
973        public Quantity getDuration() { 
974          if (this.duration == null)
975            if (Configuration.errorOnAutoCreate())
976              throw new Error("Attempt to auto-create VisionPrescriptionLensSpecificationComponent.duration");
977            else if (Configuration.doAutoCreate())
978              this.duration = new Quantity(); // cc
979          return this.duration;
980        }
981
982        public boolean hasDuration() { 
983          return this.duration != null && !this.duration.isEmpty();
984        }
985
986        /**
987         * @param value {@link #duration} (The recommended maximum wear period for the lens.)
988         */
989        public VisionPrescriptionLensSpecificationComponent setDuration(Quantity value) { 
990          this.duration = value;
991          return this;
992        }
993
994        /**
995         * @return {@link #color} (Special color or pattern.). This is the underlying object with id, value and extensions. The accessor "getColor" gives direct access to the value
996         */
997        public StringType getColorElement() { 
998          if (this.color == null)
999            if (Configuration.errorOnAutoCreate())
1000              throw new Error("Attempt to auto-create VisionPrescriptionLensSpecificationComponent.color");
1001            else if (Configuration.doAutoCreate())
1002              this.color = new StringType(); // bb
1003          return this.color;
1004        }
1005
1006        public boolean hasColorElement() { 
1007          return this.color != null && !this.color.isEmpty();
1008        }
1009
1010        public boolean hasColor() { 
1011          return this.color != null && !this.color.isEmpty();
1012        }
1013
1014        /**
1015         * @param value {@link #color} (Special color or pattern.). This is the underlying object with id, value and extensions. The accessor "getColor" gives direct access to the value
1016         */
1017        public VisionPrescriptionLensSpecificationComponent setColorElement(StringType value) { 
1018          this.color = value;
1019          return this;
1020        }
1021
1022        /**
1023         * @return Special color or pattern.
1024         */
1025        public String getColor() { 
1026          return this.color == null ? null : this.color.getValue();
1027        }
1028
1029        /**
1030         * @param value Special color or pattern.
1031         */
1032        public VisionPrescriptionLensSpecificationComponent setColor(String value) { 
1033          if (Utilities.noString(value))
1034            this.color = null;
1035          else {
1036            if (this.color == null)
1037              this.color = new StringType();
1038            this.color.setValue(value);
1039          }
1040          return this;
1041        }
1042
1043        /**
1044         * @return {@link #brand} (Brand recommendations or restrictions.). This is the underlying object with id, value and extensions. The accessor "getBrand" gives direct access to the value
1045         */
1046        public StringType getBrandElement() { 
1047          if (this.brand == null)
1048            if (Configuration.errorOnAutoCreate())
1049              throw new Error("Attempt to auto-create VisionPrescriptionLensSpecificationComponent.brand");
1050            else if (Configuration.doAutoCreate())
1051              this.brand = new StringType(); // bb
1052          return this.brand;
1053        }
1054
1055        public boolean hasBrandElement() { 
1056          return this.brand != null && !this.brand.isEmpty();
1057        }
1058
1059        public boolean hasBrand() { 
1060          return this.brand != null && !this.brand.isEmpty();
1061        }
1062
1063        /**
1064         * @param value {@link #brand} (Brand recommendations or restrictions.). This is the underlying object with id, value and extensions. The accessor "getBrand" gives direct access to the value
1065         */
1066        public VisionPrescriptionLensSpecificationComponent setBrandElement(StringType value) { 
1067          this.brand = value;
1068          return this;
1069        }
1070
1071        /**
1072         * @return Brand recommendations or restrictions.
1073         */
1074        public String getBrand() { 
1075          return this.brand == null ? null : this.brand.getValue();
1076        }
1077
1078        /**
1079         * @param value Brand recommendations or restrictions.
1080         */
1081        public VisionPrescriptionLensSpecificationComponent setBrand(String value) { 
1082          if (Utilities.noString(value))
1083            this.brand = null;
1084          else {
1085            if (this.brand == null)
1086              this.brand = new StringType();
1087            this.brand.setValue(value);
1088          }
1089          return this;
1090        }
1091
1092        /**
1093         * @return {@link #note} (Notes for special requirements such as coatings and lens materials.)
1094         */
1095        public List<Annotation> getNote() { 
1096          if (this.note == null)
1097            this.note = new ArrayList<Annotation>();
1098          return this.note;
1099        }
1100
1101        /**
1102         * @return Returns a reference to <code>this</code> for easy method chaining
1103         */
1104        public VisionPrescriptionLensSpecificationComponent setNote(List<Annotation> theNote) { 
1105          this.note = theNote;
1106          return this;
1107        }
1108
1109        public boolean hasNote() { 
1110          if (this.note == null)
1111            return false;
1112          for (Annotation item : this.note)
1113            if (!item.isEmpty())
1114              return true;
1115          return false;
1116        }
1117
1118        public Annotation addNote() { //3
1119          Annotation t = new Annotation();
1120          if (this.note == null)
1121            this.note = new ArrayList<Annotation>();
1122          this.note.add(t);
1123          return t;
1124        }
1125
1126        public VisionPrescriptionLensSpecificationComponent addNote(Annotation t) { //3
1127          if (t == null)
1128            return this;
1129          if (this.note == null)
1130            this.note = new ArrayList<Annotation>();
1131          this.note.add(t);
1132          return this;
1133        }
1134
1135        /**
1136         * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1137         */
1138        public Annotation getNoteFirstRep() { 
1139          if (getNote().isEmpty()) {
1140            addNote();
1141          }
1142          return getNote().get(0);
1143        }
1144
1145        protected void listChildren(List<Property> children) {
1146          super.listChildren(children);
1147          children.add(new Property("product", "CodeableConcept", "Identifies the type of vision correction product which is required for the patient.", 0, 1, product));
1148          children.add(new Property("eye", "code", "The eye for which the lens specification applies.", 0, 1, eye));
1149          children.add(new Property("sphere", "decimal", "Lens power measured in dioptres (0.25 units).", 0, 1, sphere));
1150          children.add(new Property("cylinder", "decimal", "Power adjustment for astigmatism measured in dioptres (0.25 units).", 0, 1, cylinder));
1151          children.add(new Property("axis", "integer", "Adjustment for astigmatism measured in integer degrees.", 0, 1, axis));
1152          children.add(new Property("prism", "", "Allows for adjustment on two axis.", 0, java.lang.Integer.MAX_VALUE, prism));
1153          children.add(new Property("add", "decimal", "Power adjustment for multifocal lenses measured in dioptres (0.25 units).", 0, 1, add));
1154          children.add(new Property("power", "decimal", "Contact lens power measured in dioptres (0.25 units).", 0, 1, power));
1155          children.add(new Property("backCurve", "decimal", "Back curvature measured in millimetres.", 0, 1, backCurve));
1156          children.add(new Property("diameter", "decimal", "Contact lens diameter measured in millimetres.", 0, 1, diameter));
1157          children.add(new Property("duration", "Quantity", "The recommended maximum wear period for the lens.", 0, 1, duration));
1158          children.add(new Property("color", "string", "Special color or pattern.", 0, 1, color));
1159          children.add(new Property("brand", "string", "Brand recommendations or restrictions.", 0, 1, brand));
1160          children.add(new Property("note", "Annotation", "Notes for special requirements such as coatings and lens materials.", 0, java.lang.Integer.MAX_VALUE, note));
1161        }
1162
1163        @Override
1164        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1165          switch (_hash) {
1166          case -309474065: /*product*/  return new Property("product", "CodeableConcept", "Identifies the type of vision correction product which is required for the patient.", 0, 1, product);
1167          case 100913: /*eye*/  return new Property("eye", "code", "The eye for which the lens specification applies.", 0, 1, eye);
1168          case -895981619: /*sphere*/  return new Property("sphere", "decimal", "Lens power measured in dioptres (0.25 units).", 0, 1, sphere);
1169          case -349378602: /*cylinder*/  return new Property("cylinder", "decimal", "Power adjustment for astigmatism measured in dioptres (0.25 units).", 0, 1, cylinder);
1170          case 3008417: /*axis*/  return new Property("axis", "integer", "Adjustment for astigmatism measured in integer degrees.", 0, 1, axis);
1171          case 106935105: /*prism*/  return new Property("prism", "", "Allows for adjustment on two axis.", 0, java.lang.Integer.MAX_VALUE, prism);
1172          case 96417: /*add*/  return new Property("add", "decimal", "Power adjustment for multifocal lenses measured in dioptres (0.25 units).", 0, 1, add);
1173          case 106858757: /*power*/  return new Property("power", "decimal", "Contact lens power measured in dioptres (0.25 units).", 0, 1, power);
1174          case 1309344840: /*backCurve*/  return new Property("backCurve", "decimal", "Back curvature measured in millimetres.", 0, 1, backCurve);
1175          case -233204595: /*diameter*/  return new Property("diameter", "decimal", "Contact lens diameter measured in millimetres.", 0, 1, diameter);
1176          case -1992012396: /*duration*/  return new Property("duration", "Quantity", "The recommended maximum wear period for the lens.", 0, 1, duration);
1177          case 94842723: /*color*/  return new Property("color", "string", "Special color or pattern.", 0, 1, color);
1178          case 93997959: /*brand*/  return new Property("brand", "string", "Brand recommendations or restrictions.", 0, 1, brand);
1179          case 3387378: /*note*/  return new Property("note", "Annotation", "Notes for special requirements such as coatings and lens materials.", 0, java.lang.Integer.MAX_VALUE, note);
1180          default: return super.getNamedProperty(_hash, _name, _checkValid);
1181          }
1182
1183        }
1184
1185      @Override
1186      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1187        switch (hash) {
1188        case -309474065: /*product*/ return this.product == null ? new Base[0] : new Base[] {this.product}; // CodeableConcept
1189        case 100913: /*eye*/ return this.eye == null ? new Base[0] : new Base[] {this.eye}; // Enumeration<VisionEyes>
1190        case -895981619: /*sphere*/ return this.sphere == null ? new Base[0] : new Base[] {this.sphere}; // DecimalType
1191        case -349378602: /*cylinder*/ return this.cylinder == null ? new Base[0] : new Base[] {this.cylinder}; // DecimalType
1192        case 3008417: /*axis*/ return this.axis == null ? new Base[0] : new Base[] {this.axis}; // IntegerType
1193        case 106935105: /*prism*/ return this.prism == null ? new Base[0] : this.prism.toArray(new Base[this.prism.size()]); // PrismComponent
1194        case 96417: /*add*/ return this.add == null ? new Base[0] : new Base[] {this.add}; // DecimalType
1195        case 106858757: /*power*/ return this.power == null ? new Base[0] : new Base[] {this.power}; // DecimalType
1196        case 1309344840: /*backCurve*/ return this.backCurve == null ? new Base[0] : new Base[] {this.backCurve}; // DecimalType
1197        case -233204595: /*diameter*/ return this.diameter == null ? new Base[0] : new Base[] {this.diameter}; // DecimalType
1198        case -1992012396: /*duration*/ return this.duration == null ? new Base[0] : new Base[] {this.duration}; // Quantity
1199        case 94842723: /*color*/ return this.color == null ? new Base[0] : new Base[] {this.color}; // StringType
1200        case 93997959: /*brand*/ return this.brand == null ? new Base[0] : new Base[] {this.brand}; // StringType
1201        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1202        default: return super.getProperty(hash, name, checkValid);
1203        }
1204
1205      }
1206
1207      @Override
1208      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1209        switch (hash) {
1210        case -309474065: // product
1211          this.product = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1212          return value;
1213        case 100913: // eye
1214          value = new VisionEyesEnumFactory().fromType(TypeConvertor.castToCode(value));
1215          this.eye = (Enumeration) value; // Enumeration<VisionEyes>
1216          return value;
1217        case -895981619: // sphere
1218          this.sphere = TypeConvertor.castToDecimal(value); // DecimalType
1219          return value;
1220        case -349378602: // cylinder
1221          this.cylinder = TypeConvertor.castToDecimal(value); // DecimalType
1222          return value;
1223        case 3008417: // axis
1224          this.axis = TypeConvertor.castToInteger(value); // IntegerType
1225          return value;
1226        case 106935105: // prism
1227          this.getPrism().add((PrismComponent) value); // PrismComponent
1228          return value;
1229        case 96417: // add
1230          this.add = TypeConvertor.castToDecimal(value); // DecimalType
1231          return value;
1232        case 106858757: // power
1233          this.power = TypeConvertor.castToDecimal(value); // DecimalType
1234          return value;
1235        case 1309344840: // backCurve
1236          this.backCurve = TypeConvertor.castToDecimal(value); // DecimalType
1237          return value;
1238        case -233204595: // diameter
1239          this.diameter = TypeConvertor.castToDecimal(value); // DecimalType
1240          return value;
1241        case -1992012396: // duration
1242          this.duration = TypeConvertor.castToQuantity(value); // Quantity
1243          return value;
1244        case 94842723: // color
1245          this.color = TypeConvertor.castToString(value); // StringType
1246          return value;
1247        case 93997959: // brand
1248          this.brand = TypeConvertor.castToString(value); // StringType
1249          return value;
1250        case 3387378: // note
1251          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1252          return value;
1253        default: return super.setProperty(hash, name, value);
1254        }
1255
1256      }
1257
1258      @Override
1259      public Base setProperty(String name, Base value) throws FHIRException {
1260        if (name.equals("product")) {
1261          this.product = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1262        } else if (name.equals("eye")) {
1263          value = new VisionEyesEnumFactory().fromType(TypeConvertor.castToCode(value));
1264          this.eye = (Enumeration) value; // Enumeration<VisionEyes>
1265        } else if (name.equals("sphere")) {
1266          this.sphere = TypeConvertor.castToDecimal(value); // DecimalType
1267        } else if (name.equals("cylinder")) {
1268          this.cylinder = TypeConvertor.castToDecimal(value); // DecimalType
1269        } else if (name.equals("axis")) {
1270          this.axis = TypeConvertor.castToInteger(value); // IntegerType
1271        } else if (name.equals("prism")) {
1272          this.getPrism().add((PrismComponent) value);
1273        } else if (name.equals("add")) {
1274          this.add = TypeConvertor.castToDecimal(value); // DecimalType
1275        } else if (name.equals("power")) {
1276          this.power = TypeConvertor.castToDecimal(value); // DecimalType
1277        } else if (name.equals("backCurve")) {
1278          this.backCurve = TypeConvertor.castToDecimal(value); // DecimalType
1279        } else if (name.equals("diameter")) {
1280          this.diameter = TypeConvertor.castToDecimal(value); // DecimalType
1281        } else if (name.equals("duration")) {
1282          this.duration = TypeConvertor.castToQuantity(value); // Quantity
1283        } else if (name.equals("color")) {
1284          this.color = TypeConvertor.castToString(value); // StringType
1285        } else if (name.equals("brand")) {
1286          this.brand = TypeConvertor.castToString(value); // StringType
1287        } else if (name.equals("note")) {
1288          this.getNote().add(TypeConvertor.castToAnnotation(value));
1289        } else
1290          return super.setProperty(name, value);
1291        return value;
1292      }
1293
1294  @Override
1295  public void removeChild(String name, Base value) throws FHIRException {
1296        if (name.equals("product")) {
1297          this.product = null;
1298        } else if (name.equals("eye")) {
1299          value = new VisionEyesEnumFactory().fromType(TypeConvertor.castToCode(value));
1300          this.eye = (Enumeration) value; // Enumeration<VisionEyes>
1301        } else if (name.equals("sphere")) {
1302          this.sphere = null;
1303        } else if (name.equals("cylinder")) {
1304          this.cylinder = null;
1305        } else if (name.equals("axis")) {
1306          this.axis = null;
1307        } else if (name.equals("prism")) {
1308          this.getPrism().remove((PrismComponent) value);
1309        } else if (name.equals("add")) {
1310          this.add = null;
1311        } else if (name.equals("power")) {
1312          this.power = null;
1313        } else if (name.equals("backCurve")) {
1314          this.backCurve = null;
1315        } else if (name.equals("diameter")) {
1316          this.diameter = null;
1317        } else if (name.equals("duration")) {
1318          this.duration = null;
1319        } else if (name.equals("color")) {
1320          this.color = null;
1321        } else if (name.equals("brand")) {
1322          this.brand = null;
1323        } else if (name.equals("note")) {
1324          this.getNote().remove(value);
1325        } else
1326          super.removeChild(name, value);
1327        
1328      }
1329
1330      @Override
1331      public Base makeProperty(int hash, String name) throws FHIRException {
1332        switch (hash) {
1333        case -309474065:  return getProduct();
1334        case 100913:  return getEyeElement();
1335        case -895981619:  return getSphereElement();
1336        case -349378602:  return getCylinderElement();
1337        case 3008417:  return getAxisElement();
1338        case 106935105:  return addPrism(); 
1339        case 96417:  return getAddElement();
1340        case 106858757:  return getPowerElement();
1341        case 1309344840:  return getBackCurveElement();
1342        case -233204595:  return getDiameterElement();
1343        case -1992012396:  return getDuration();
1344        case 94842723:  return getColorElement();
1345        case 93997959:  return getBrandElement();
1346        case 3387378:  return addNote(); 
1347        default: return super.makeProperty(hash, name);
1348        }
1349
1350      }
1351
1352      @Override
1353      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1354        switch (hash) {
1355        case -309474065: /*product*/ return new String[] {"CodeableConcept"};
1356        case 100913: /*eye*/ return new String[] {"code"};
1357        case -895981619: /*sphere*/ return new String[] {"decimal"};
1358        case -349378602: /*cylinder*/ return new String[] {"decimal"};
1359        case 3008417: /*axis*/ return new String[] {"integer"};
1360        case 106935105: /*prism*/ return new String[] {};
1361        case 96417: /*add*/ return new String[] {"decimal"};
1362        case 106858757: /*power*/ return new String[] {"decimal"};
1363        case 1309344840: /*backCurve*/ return new String[] {"decimal"};
1364        case -233204595: /*diameter*/ return new String[] {"decimal"};
1365        case -1992012396: /*duration*/ return new String[] {"Quantity"};
1366        case 94842723: /*color*/ return new String[] {"string"};
1367        case 93997959: /*brand*/ return new String[] {"string"};
1368        case 3387378: /*note*/ return new String[] {"Annotation"};
1369        default: return super.getTypesForProperty(hash, name);
1370        }
1371
1372      }
1373
1374      @Override
1375      public Base addChild(String name) throws FHIRException {
1376        if (name.equals("product")) {
1377          this.product = new CodeableConcept();
1378          return this.product;
1379        }
1380        else if (name.equals("eye")) {
1381          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.lensSpecification.eye");
1382        }
1383        else if (name.equals("sphere")) {
1384          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.lensSpecification.sphere");
1385        }
1386        else if (name.equals("cylinder")) {
1387          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.lensSpecification.cylinder");
1388        }
1389        else if (name.equals("axis")) {
1390          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.lensSpecification.axis");
1391        }
1392        else if (name.equals("prism")) {
1393          return addPrism();
1394        }
1395        else if (name.equals("add")) {
1396          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.lensSpecification.add");
1397        }
1398        else if (name.equals("power")) {
1399          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.lensSpecification.power");
1400        }
1401        else if (name.equals("backCurve")) {
1402          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.lensSpecification.backCurve");
1403        }
1404        else if (name.equals("diameter")) {
1405          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.lensSpecification.diameter");
1406        }
1407        else if (name.equals("duration")) {
1408          this.duration = new Quantity();
1409          return this.duration;
1410        }
1411        else if (name.equals("color")) {
1412          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.lensSpecification.color");
1413        }
1414        else if (name.equals("brand")) {
1415          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.lensSpecification.brand");
1416        }
1417        else if (name.equals("note")) {
1418          return addNote();
1419        }
1420        else
1421          return super.addChild(name);
1422      }
1423
1424      public VisionPrescriptionLensSpecificationComponent copy() {
1425        VisionPrescriptionLensSpecificationComponent dst = new VisionPrescriptionLensSpecificationComponent();
1426        copyValues(dst);
1427        return dst;
1428      }
1429
1430      public void copyValues(VisionPrescriptionLensSpecificationComponent dst) {
1431        super.copyValues(dst);
1432        dst.product = product == null ? null : product.copy();
1433        dst.eye = eye == null ? null : eye.copy();
1434        dst.sphere = sphere == null ? null : sphere.copy();
1435        dst.cylinder = cylinder == null ? null : cylinder.copy();
1436        dst.axis = axis == null ? null : axis.copy();
1437        if (prism != null) {
1438          dst.prism = new ArrayList<PrismComponent>();
1439          for (PrismComponent i : prism)
1440            dst.prism.add(i.copy());
1441        };
1442        dst.add = add == null ? null : add.copy();
1443        dst.power = power == null ? null : power.copy();
1444        dst.backCurve = backCurve == null ? null : backCurve.copy();
1445        dst.diameter = diameter == null ? null : diameter.copy();
1446        dst.duration = duration == null ? null : duration.copy();
1447        dst.color = color == null ? null : color.copy();
1448        dst.brand = brand == null ? null : brand.copy();
1449        if (note != null) {
1450          dst.note = new ArrayList<Annotation>();
1451          for (Annotation i : note)
1452            dst.note.add(i.copy());
1453        };
1454      }
1455
1456      @Override
1457      public boolean equalsDeep(Base other_) {
1458        if (!super.equalsDeep(other_))
1459          return false;
1460        if (!(other_ instanceof VisionPrescriptionLensSpecificationComponent))
1461          return false;
1462        VisionPrescriptionLensSpecificationComponent o = (VisionPrescriptionLensSpecificationComponent) other_;
1463        return compareDeep(product, o.product, true) && compareDeep(eye, o.eye, true) && compareDeep(sphere, o.sphere, true)
1464           && compareDeep(cylinder, o.cylinder, true) && compareDeep(axis, o.axis, true) && compareDeep(prism, o.prism, true)
1465           && compareDeep(add, o.add, true) && compareDeep(power, o.power, true) && compareDeep(backCurve, o.backCurve, true)
1466           && compareDeep(diameter, o.diameter, true) && compareDeep(duration, o.duration, true) && compareDeep(color, o.color, true)
1467           && compareDeep(brand, o.brand, true) && compareDeep(note, o.note, true);
1468      }
1469
1470      @Override
1471      public boolean equalsShallow(Base other_) {
1472        if (!super.equalsShallow(other_))
1473          return false;
1474        if (!(other_ instanceof VisionPrescriptionLensSpecificationComponent))
1475          return false;
1476        VisionPrescriptionLensSpecificationComponent o = (VisionPrescriptionLensSpecificationComponent) other_;
1477        return compareValues(eye, o.eye, true) && compareValues(sphere, o.sphere, true) && compareValues(cylinder, o.cylinder, true)
1478           && compareValues(axis, o.axis, true) && compareValues(add, o.add, true) && compareValues(power, o.power, true)
1479           && compareValues(backCurve, o.backCurve, true) && compareValues(diameter, o.diameter, true) && compareValues(color, o.color, true)
1480           && compareValues(brand, o.brand, true);
1481      }
1482
1483      public boolean isEmpty() {
1484        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(product, eye, sphere, cylinder
1485          , axis, prism, add, power, backCurve, diameter, duration, color, brand, note
1486          );
1487      }
1488
1489  public String fhirType() {
1490    return "VisionPrescription.lensSpecification";
1491
1492  }
1493
1494  }
1495
1496    @Block()
1497    public static class PrismComponent extends BackboneElement implements IBaseBackboneElement {
1498        /**
1499         * Amount of prism to compensate for eye alignment in fractional units.
1500         */
1501        @Child(name = "amount", type = {DecimalType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1502        @Description(shortDefinition="Amount of adjustment", formalDefinition="Amount of prism to compensate for eye alignment in fractional units." )
1503        protected DecimalType amount;
1504
1505        /**
1506         * The relative base, or reference lens edge, for the prism.
1507         */
1508        @Child(name = "base", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false)
1509        @Description(shortDefinition="up | down | in | out", formalDefinition="The relative base, or reference lens edge, for the prism." )
1510        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/vision-base-codes")
1511        protected Enumeration<VisionBase> base;
1512
1513        private static final long serialVersionUID = 1677247628L;
1514
1515    /**
1516     * Constructor
1517     */
1518      public PrismComponent() {
1519        super();
1520      }
1521
1522    /**
1523     * Constructor
1524     */
1525      public PrismComponent(BigDecimal amount, VisionBase base) {
1526        super();
1527        this.setAmount(amount);
1528        this.setBase(base);
1529      }
1530
1531        /**
1532         * @return {@link #amount} (Amount of prism to compensate for eye alignment in fractional units.). This is the underlying object with id, value and extensions. The accessor "getAmount" gives direct access to the value
1533         */
1534        public DecimalType getAmountElement() { 
1535          if (this.amount == null)
1536            if (Configuration.errorOnAutoCreate())
1537              throw new Error("Attempt to auto-create PrismComponent.amount");
1538            else if (Configuration.doAutoCreate())
1539              this.amount = new DecimalType(); // bb
1540          return this.amount;
1541        }
1542
1543        public boolean hasAmountElement() { 
1544          return this.amount != null && !this.amount.isEmpty();
1545        }
1546
1547        public boolean hasAmount() { 
1548          return this.amount != null && !this.amount.isEmpty();
1549        }
1550
1551        /**
1552         * @param value {@link #amount} (Amount of prism to compensate for eye alignment in fractional units.). This is the underlying object with id, value and extensions. The accessor "getAmount" gives direct access to the value
1553         */
1554        public PrismComponent setAmountElement(DecimalType value) { 
1555          this.amount = value;
1556          return this;
1557        }
1558
1559        /**
1560         * @return Amount of prism to compensate for eye alignment in fractional units.
1561         */
1562        public BigDecimal getAmount() { 
1563          return this.amount == null ? null : this.amount.getValue();
1564        }
1565
1566        /**
1567         * @param value Amount of prism to compensate for eye alignment in fractional units.
1568         */
1569        public PrismComponent setAmount(BigDecimal value) { 
1570            if (this.amount == null)
1571              this.amount = new DecimalType();
1572            this.amount.setValue(value);
1573          return this;
1574        }
1575
1576        /**
1577         * @param value Amount of prism to compensate for eye alignment in fractional units.
1578         */
1579        public PrismComponent setAmount(long value) { 
1580              this.amount = new DecimalType();
1581            this.amount.setValue(value);
1582          return this;
1583        }
1584
1585        /**
1586         * @param value Amount of prism to compensate for eye alignment in fractional units.
1587         */
1588        public PrismComponent setAmount(double value) { 
1589              this.amount = new DecimalType();
1590            this.amount.setValue(value);
1591          return this;
1592        }
1593
1594        /**
1595         * @return {@link #base} (The relative base, or reference lens edge, for the prism.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value
1596         */
1597        public Enumeration<VisionBase> getBaseElement() { 
1598          if (this.base == null)
1599            if (Configuration.errorOnAutoCreate())
1600              throw new Error("Attempt to auto-create PrismComponent.base");
1601            else if (Configuration.doAutoCreate())
1602              this.base = new Enumeration<VisionBase>(new VisionBaseEnumFactory()); // bb
1603          return this.base;
1604        }
1605
1606        public boolean hasBaseElement() { 
1607          return this.base != null && !this.base.isEmpty();
1608        }
1609
1610        public boolean hasBase() { 
1611          return this.base != null && !this.base.isEmpty();
1612        }
1613
1614        /**
1615         * @param value {@link #base} (The relative base, or reference lens edge, for the prism.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value
1616         */
1617        public PrismComponent setBaseElement(Enumeration<VisionBase> value) { 
1618          this.base = value;
1619          return this;
1620        }
1621
1622        /**
1623         * @return The relative base, or reference lens edge, for the prism.
1624         */
1625        public VisionBase getBase() { 
1626          return this.base == null ? null : this.base.getValue();
1627        }
1628
1629        /**
1630         * @param value The relative base, or reference lens edge, for the prism.
1631         */
1632        public PrismComponent setBase(VisionBase value) { 
1633            if (this.base == null)
1634              this.base = new Enumeration<VisionBase>(new VisionBaseEnumFactory());
1635            this.base.setValue(value);
1636          return this;
1637        }
1638
1639        protected void listChildren(List<Property> children) {
1640          super.listChildren(children);
1641          children.add(new Property("amount", "decimal", "Amount of prism to compensate for eye alignment in fractional units.", 0, 1, amount));
1642          children.add(new Property("base", "code", "The relative base, or reference lens edge, for the prism.", 0, 1, base));
1643        }
1644
1645        @Override
1646        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1647          switch (_hash) {
1648          case -1413853096: /*amount*/  return new Property("amount", "decimal", "Amount of prism to compensate for eye alignment in fractional units.", 0, 1, amount);
1649          case 3016401: /*base*/  return new Property("base", "code", "The relative base, or reference lens edge, for the prism.", 0, 1, base);
1650          default: return super.getNamedProperty(_hash, _name, _checkValid);
1651          }
1652
1653        }
1654
1655      @Override
1656      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1657        switch (hash) {
1658        case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // DecimalType
1659        case 3016401: /*base*/ return this.base == null ? new Base[0] : new Base[] {this.base}; // Enumeration<VisionBase>
1660        default: return super.getProperty(hash, name, checkValid);
1661        }
1662
1663      }
1664
1665      @Override
1666      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1667        switch (hash) {
1668        case -1413853096: // amount
1669          this.amount = TypeConvertor.castToDecimal(value); // DecimalType
1670          return value;
1671        case 3016401: // base
1672          value = new VisionBaseEnumFactory().fromType(TypeConvertor.castToCode(value));
1673          this.base = (Enumeration) value; // Enumeration<VisionBase>
1674          return value;
1675        default: return super.setProperty(hash, name, value);
1676        }
1677
1678      }
1679
1680      @Override
1681      public Base setProperty(String name, Base value) throws FHIRException {
1682        if (name.equals("amount")) {
1683          this.amount = TypeConvertor.castToDecimal(value); // DecimalType
1684        } else if (name.equals("base")) {
1685          value = new VisionBaseEnumFactory().fromType(TypeConvertor.castToCode(value));
1686          this.base = (Enumeration) value; // Enumeration<VisionBase>
1687        } else
1688          return super.setProperty(name, value);
1689        return value;
1690      }
1691
1692  @Override
1693  public void removeChild(String name, Base value) throws FHIRException {
1694        if (name.equals("amount")) {
1695          this.amount = null;
1696        } else if (name.equals("base")) {
1697          value = new VisionBaseEnumFactory().fromType(TypeConvertor.castToCode(value));
1698          this.base = (Enumeration) value; // Enumeration<VisionBase>
1699        } else
1700          super.removeChild(name, value);
1701        
1702      }
1703
1704      @Override
1705      public Base makeProperty(int hash, String name) throws FHIRException {
1706        switch (hash) {
1707        case -1413853096:  return getAmountElement();
1708        case 3016401:  return getBaseElement();
1709        default: return super.makeProperty(hash, name);
1710        }
1711
1712      }
1713
1714      @Override
1715      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1716        switch (hash) {
1717        case -1413853096: /*amount*/ return new String[] {"decimal"};
1718        case 3016401: /*base*/ return new String[] {"code"};
1719        default: return super.getTypesForProperty(hash, name);
1720        }
1721
1722      }
1723
1724      @Override
1725      public Base addChild(String name) throws FHIRException {
1726        if (name.equals("amount")) {
1727          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.lensSpecification.prism.amount");
1728        }
1729        else if (name.equals("base")) {
1730          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.lensSpecification.prism.base");
1731        }
1732        else
1733          return super.addChild(name);
1734      }
1735
1736      public PrismComponent copy() {
1737        PrismComponent dst = new PrismComponent();
1738        copyValues(dst);
1739        return dst;
1740      }
1741
1742      public void copyValues(PrismComponent dst) {
1743        super.copyValues(dst);
1744        dst.amount = amount == null ? null : amount.copy();
1745        dst.base = base == null ? null : base.copy();
1746      }
1747
1748      @Override
1749      public boolean equalsDeep(Base other_) {
1750        if (!super.equalsDeep(other_))
1751          return false;
1752        if (!(other_ instanceof PrismComponent))
1753          return false;
1754        PrismComponent o = (PrismComponent) other_;
1755        return compareDeep(amount, o.amount, true) && compareDeep(base, o.base, true);
1756      }
1757
1758      @Override
1759      public boolean equalsShallow(Base other_) {
1760        if (!super.equalsShallow(other_))
1761          return false;
1762        if (!(other_ instanceof PrismComponent))
1763          return false;
1764        PrismComponent o = (PrismComponent) other_;
1765        return compareValues(amount, o.amount, true) && compareValues(base, o.base, true);
1766      }
1767
1768      public boolean isEmpty() {
1769        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(amount, base);
1770      }
1771
1772  public String fhirType() {
1773    return "VisionPrescription.lensSpecification.prism";
1774
1775  }
1776
1777  }
1778
1779    /**
1780     * A unique identifier assigned to this vision prescription.
1781     */
1782    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1783    @Description(shortDefinition="Business Identifier for vision prescription", formalDefinition="A unique identifier assigned to this vision prescription." )
1784    protected List<Identifier> identifier;
1785
1786    /**
1787     * The status of the resource instance.
1788     */
1789    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
1790    @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." )
1791    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status")
1792    protected Enumeration<FinancialResourceStatusCodes> status;
1793
1794    /**
1795     * The date this resource was created.
1796     */
1797    @Child(name = "created", type = {DateTimeType.class}, order=2, min=1, max=1, modifier=false, summary=true)
1798    @Description(shortDefinition="Response creation date", formalDefinition="The date this resource was created." )
1799    protected DateTimeType created;
1800
1801    /**
1802     * A resource reference to the person to whom the vision prescription applies.
1803     */
1804    @Child(name = "patient", type = {Patient.class}, order=3, min=1, max=1, modifier=false, summary=true)
1805    @Description(shortDefinition="Who prescription is for", formalDefinition="A resource reference to the person to whom the vision prescription applies." )
1806    protected Reference patient;
1807
1808    /**
1809     * A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued.
1810     */
1811    @Child(name = "encounter", type = {Encounter.class}, order=4, min=0, max=1, modifier=false, summary=false)
1812    @Description(shortDefinition="Created during encounter / admission / stay", formalDefinition="A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued." )
1813    protected Reference encounter;
1814
1815    /**
1816     * The date (and perhaps time) when the prescription was written.
1817     */
1818    @Child(name = "dateWritten", type = {DateTimeType.class}, order=5, min=1, max=1, modifier=false, summary=true)
1819    @Description(shortDefinition="When prescription was authorized", formalDefinition="The date (and perhaps time) when the prescription was written." )
1820    protected DateTimeType dateWritten;
1821
1822    /**
1823     * The healthcare professional responsible for authorizing the prescription.
1824     */
1825    @Child(name = "prescriber", type = {Practitioner.class, PractitionerRole.class}, order=6, min=1, max=1, modifier=false, summary=true)
1826    @Description(shortDefinition="Who authorized the vision prescription", formalDefinition="The healthcare professional responsible for authorizing the prescription." )
1827    protected Reference prescriber;
1828
1829    /**
1830     * Contain the details of  the individual lens specifications and serves as the authorization for the fullfillment by certified professionals.
1831     */
1832    @Child(name = "lensSpecification", type = {}, order=7, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1833    @Description(shortDefinition="Vision lens authorization", formalDefinition="Contain the details of  the individual lens specifications and serves as the authorization for the fullfillment by certified professionals." )
1834    protected List<VisionPrescriptionLensSpecificationComponent> lensSpecification;
1835
1836    private static final long serialVersionUID = -194296688L;
1837
1838  /**
1839   * Constructor
1840   */
1841    public VisionPrescription() {
1842      super();
1843    }
1844
1845  /**
1846   * Constructor
1847   */
1848    public VisionPrescription(FinancialResourceStatusCodes status, Date created, Reference patient, Date dateWritten, Reference prescriber, VisionPrescriptionLensSpecificationComponent lensSpecification) {
1849      super();
1850      this.setStatus(status);
1851      this.setCreated(created);
1852      this.setPatient(patient);
1853      this.setDateWritten(dateWritten);
1854      this.setPrescriber(prescriber);
1855      this.addLensSpecification(lensSpecification);
1856    }
1857
1858    /**
1859     * @return {@link #identifier} (A unique identifier assigned to this vision prescription.)
1860     */
1861    public List<Identifier> getIdentifier() { 
1862      if (this.identifier == null)
1863        this.identifier = new ArrayList<Identifier>();
1864      return this.identifier;
1865    }
1866
1867    /**
1868     * @return Returns a reference to <code>this</code> for easy method chaining
1869     */
1870    public VisionPrescription setIdentifier(List<Identifier> theIdentifier) { 
1871      this.identifier = theIdentifier;
1872      return this;
1873    }
1874
1875    public boolean hasIdentifier() { 
1876      if (this.identifier == null)
1877        return false;
1878      for (Identifier item : this.identifier)
1879        if (!item.isEmpty())
1880          return true;
1881      return false;
1882    }
1883
1884    public Identifier addIdentifier() { //3
1885      Identifier t = new Identifier();
1886      if (this.identifier == null)
1887        this.identifier = new ArrayList<Identifier>();
1888      this.identifier.add(t);
1889      return t;
1890    }
1891
1892    public VisionPrescription addIdentifier(Identifier t) { //3
1893      if (t == null)
1894        return this;
1895      if (this.identifier == null)
1896        this.identifier = new ArrayList<Identifier>();
1897      this.identifier.add(t);
1898      return this;
1899    }
1900
1901    /**
1902     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1903     */
1904    public Identifier getIdentifierFirstRep() { 
1905      if (getIdentifier().isEmpty()) {
1906        addIdentifier();
1907      }
1908      return getIdentifier().get(0);
1909    }
1910
1911    /**
1912     * @return {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1913     */
1914    public Enumeration<FinancialResourceStatusCodes> getStatusElement() { 
1915      if (this.status == null)
1916        if (Configuration.errorOnAutoCreate())
1917          throw new Error("Attempt to auto-create VisionPrescription.status");
1918        else if (Configuration.doAutoCreate())
1919          this.status = new Enumeration<FinancialResourceStatusCodes>(new FinancialResourceStatusCodesEnumFactory()); // bb
1920      return this.status;
1921    }
1922
1923    public boolean hasStatusElement() { 
1924      return this.status != null && !this.status.isEmpty();
1925    }
1926
1927    public boolean hasStatus() { 
1928      return this.status != null && !this.status.isEmpty();
1929    }
1930
1931    /**
1932     * @param value {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1933     */
1934    public VisionPrescription setStatusElement(Enumeration<FinancialResourceStatusCodes> value) { 
1935      this.status = value;
1936      return this;
1937    }
1938
1939    /**
1940     * @return The status of the resource instance.
1941     */
1942    public FinancialResourceStatusCodes getStatus() { 
1943      return this.status == null ? null : this.status.getValue();
1944    }
1945
1946    /**
1947     * @param value The status of the resource instance.
1948     */
1949    public VisionPrescription setStatus(FinancialResourceStatusCodes value) { 
1950        if (this.status == null)
1951          this.status = new Enumeration<FinancialResourceStatusCodes>(new FinancialResourceStatusCodesEnumFactory());
1952        this.status.setValue(value);
1953      return this;
1954    }
1955
1956    /**
1957     * @return {@link #created} (The date this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
1958     */
1959    public DateTimeType getCreatedElement() { 
1960      if (this.created == null)
1961        if (Configuration.errorOnAutoCreate())
1962          throw new Error("Attempt to auto-create VisionPrescription.created");
1963        else if (Configuration.doAutoCreate())
1964          this.created = new DateTimeType(); // bb
1965      return this.created;
1966    }
1967
1968    public boolean hasCreatedElement() { 
1969      return this.created != null && !this.created.isEmpty();
1970    }
1971
1972    public boolean hasCreated() { 
1973      return this.created != null && !this.created.isEmpty();
1974    }
1975
1976    /**
1977     * @param value {@link #created} (The date this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
1978     */
1979    public VisionPrescription setCreatedElement(DateTimeType value) { 
1980      this.created = value;
1981      return this;
1982    }
1983
1984    /**
1985     * @return The date this resource was created.
1986     */
1987    public Date getCreated() { 
1988      return this.created == null ? null : this.created.getValue();
1989    }
1990
1991    /**
1992     * @param value The date this resource was created.
1993     */
1994    public VisionPrescription setCreated(Date value) { 
1995        if (this.created == null)
1996          this.created = new DateTimeType();
1997        this.created.setValue(value);
1998      return this;
1999    }
2000
2001    /**
2002     * @return {@link #patient} (A resource reference to the person to whom the vision prescription applies.)
2003     */
2004    public Reference getPatient() { 
2005      if (this.patient == null)
2006        if (Configuration.errorOnAutoCreate())
2007          throw new Error("Attempt to auto-create VisionPrescription.patient");
2008        else if (Configuration.doAutoCreate())
2009          this.patient = new Reference(); // cc
2010      return this.patient;
2011    }
2012
2013    public boolean hasPatient() { 
2014      return this.patient != null && !this.patient.isEmpty();
2015    }
2016
2017    /**
2018     * @param value {@link #patient} (A resource reference to the person to whom the vision prescription applies.)
2019     */
2020    public VisionPrescription setPatient(Reference value) { 
2021      this.patient = value;
2022      return this;
2023    }
2024
2025    /**
2026     * @return {@link #encounter} (A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued.)
2027     */
2028    public Reference getEncounter() { 
2029      if (this.encounter == null)
2030        if (Configuration.errorOnAutoCreate())
2031          throw new Error("Attempt to auto-create VisionPrescription.encounter");
2032        else if (Configuration.doAutoCreate())
2033          this.encounter = new Reference(); // cc
2034      return this.encounter;
2035    }
2036
2037    public boolean hasEncounter() { 
2038      return this.encounter != null && !this.encounter.isEmpty();
2039    }
2040
2041    /**
2042     * @param value {@link #encounter} (A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued.)
2043     */
2044    public VisionPrescription setEncounter(Reference value) { 
2045      this.encounter = value;
2046      return this;
2047    }
2048
2049    /**
2050     * @return {@link #dateWritten} (The date (and perhaps time) when the prescription was written.). This is the underlying object with id, value and extensions. The accessor "getDateWritten" gives direct access to the value
2051     */
2052    public DateTimeType getDateWrittenElement() { 
2053      if (this.dateWritten == null)
2054        if (Configuration.errorOnAutoCreate())
2055          throw new Error("Attempt to auto-create VisionPrescription.dateWritten");
2056        else if (Configuration.doAutoCreate())
2057          this.dateWritten = new DateTimeType(); // bb
2058      return this.dateWritten;
2059    }
2060
2061    public boolean hasDateWrittenElement() { 
2062      return this.dateWritten != null && !this.dateWritten.isEmpty();
2063    }
2064
2065    public boolean hasDateWritten() { 
2066      return this.dateWritten != null && !this.dateWritten.isEmpty();
2067    }
2068
2069    /**
2070     * @param value {@link #dateWritten} (The date (and perhaps time) when the prescription was written.). This is the underlying object with id, value and extensions. The accessor "getDateWritten" gives direct access to the value
2071     */
2072    public VisionPrescription setDateWrittenElement(DateTimeType value) { 
2073      this.dateWritten = value;
2074      return this;
2075    }
2076
2077    /**
2078     * @return The date (and perhaps time) when the prescription was written.
2079     */
2080    public Date getDateWritten() { 
2081      return this.dateWritten == null ? null : this.dateWritten.getValue();
2082    }
2083
2084    /**
2085     * @param value The date (and perhaps time) when the prescription was written.
2086     */
2087    public VisionPrescription setDateWritten(Date value) { 
2088        if (this.dateWritten == null)
2089          this.dateWritten = new DateTimeType();
2090        this.dateWritten.setValue(value);
2091      return this;
2092    }
2093
2094    /**
2095     * @return {@link #prescriber} (The healthcare professional responsible for authorizing the prescription.)
2096     */
2097    public Reference getPrescriber() { 
2098      if (this.prescriber == null)
2099        if (Configuration.errorOnAutoCreate())
2100          throw new Error("Attempt to auto-create VisionPrescription.prescriber");
2101        else if (Configuration.doAutoCreate())
2102          this.prescriber = new Reference(); // cc
2103      return this.prescriber;
2104    }
2105
2106    public boolean hasPrescriber() { 
2107      return this.prescriber != null && !this.prescriber.isEmpty();
2108    }
2109
2110    /**
2111     * @param value {@link #prescriber} (The healthcare professional responsible for authorizing the prescription.)
2112     */
2113    public VisionPrescription setPrescriber(Reference value) { 
2114      this.prescriber = value;
2115      return this;
2116    }
2117
2118    /**
2119     * @return {@link #lensSpecification} (Contain the details of  the individual lens specifications and serves as the authorization for the fullfillment by certified professionals.)
2120     */
2121    public List<VisionPrescriptionLensSpecificationComponent> getLensSpecification() { 
2122      if (this.lensSpecification == null)
2123        this.lensSpecification = new ArrayList<VisionPrescriptionLensSpecificationComponent>();
2124      return this.lensSpecification;
2125    }
2126
2127    /**
2128     * @return Returns a reference to <code>this</code> for easy method chaining
2129     */
2130    public VisionPrescription setLensSpecification(List<VisionPrescriptionLensSpecificationComponent> theLensSpecification) { 
2131      this.lensSpecification = theLensSpecification;
2132      return this;
2133    }
2134
2135    public boolean hasLensSpecification() { 
2136      if (this.lensSpecification == null)
2137        return false;
2138      for (VisionPrescriptionLensSpecificationComponent item : this.lensSpecification)
2139        if (!item.isEmpty())
2140          return true;
2141      return false;
2142    }
2143
2144    public VisionPrescriptionLensSpecificationComponent addLensSpecification() { //3
2145      VisionPrescriptionLensSpecificationComponent t = new VisionPrescriptionLensSpecificationComponent();
2146      if (this.lensSpecification == null)
2147        this.lensSpecification = new ArrayList<VisionPrescriptionLensSpecificationComponent>();
2148      this.lensSpecification.add(t);
2149      return t;
2150    }
2151
2152    public VisionPrescription addLensSpecification(VisionPrescriptionLensSpecificationComponent t) { //3
2153      if (t == null)
2154        return this;
2155      if (this.lensSpecification == null)
2156        this.lensSpecification = new ArrayList<VisionPrescriptionLensSpecificationComponent>();
2157      this.lensSpecification.add(t);
2158      return this;
2159    }
2160
2161    /**
2162     * @return The first repetition of repeating field {@link #lensSpecification}, creating it if it does not already exist {3}
2163     */
2164    public VisionPrescriptionLensSpecificationComponent getLensSpecificationFirstRep() { 
2165      if (getLensSpecification().isEmpty()) {
2166        addLensSpecification();
2167      }
2168      return getLensSpecification().get(0);
2169    }
2170
2171      protected void listChildren(List<Property> children) {
2172        super.listChildren(children);
2173        children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this vision prescription.", 0, java.lang.Integer.MAX_VALUE, identifier));
2174        children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status));
2175        children.add(new Property("created", "dateTime", "The date this resource was created.", 0, 1, created));
2176        children.add(new Property("patient", "Reference(Patient)", "A resource reference to the person to whom the vision prescription applies.", 0, 1, patient));
2177        children.add(new Property("encounter", "Reference(Encounter)", "A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued.", 0, 1, encounter));
2178        children.add(new Property("dateWritten", "dateTime", "The date (and perhaps time) when the prescription was written.", 0, 1, dateWritten));
2179        children.add(new Property("prescriber", "Reference(Practitioner|PractitionerRole)", "The healthcare professional responsible for authorizing the prescription.", 0, 1, prescriber));
2180        children.add(new Property("lensSpecification", "", "Contain the details of  the individual lens specifications and serves as the authorization for the fullfillment by certified professionals.", 0, java.lang.Integer.MAX_VALUE, lensSpecification));
2181      }
2182
2183      @Override
2184      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2185        switch (_hash) {
2186        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A unique identifier assigned to this vision prescription.", 0, java.lang.Integer.MAX_VALUE, identifier);
2187        case -892481550: /*status*/  return new Property("status", "code", "The status of the resource instance.", 0, 1, status);
2188        case 1028554472: /*created*/  return new Property("created", "dateTime", "The date this resource was created.", 0, 1, created);
2189        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "A resource reference to the person to whom the vision prescription applies.", 0, 1, patient);
2190        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "A reference to a resource that identifies the particular occurrence of contact between patient and health care provider during which the prescription was issued.", 0, 1, encounter);
2191        case -1496880759: /*dateWritten*/  return new Property("dateWritten", "dateTime", "The date (and perhaps time) when the prescription was written.", 0, 1, dateWritten);
2192        case 1430631077: /*prescriber*/  return new Property("prescriber", "Reference(Practitioner|PractitionerRole)", "The healthcare professional responsible for authorizing the prescription.", 0, 1, prescriber);
2193        case -1767318363: /*lensSpecification*/  return new Property("lensSpecification", "", "Contain the details of  the individual lens specifications and serves as the authorization for the fullfillment by certified professionals.", 0, java.lang.Integer.MAX_VALUE, lensSpecification);
2194        default: return super.getNamedProperty(_hash, _name, _checkValid);
2195        }
2196
2197      }
2198
2199      @Override
2200      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2201        switch (hash) {
2202        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2203        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<FinancialResourceStatusCodes>
2204        case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
2205        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
2206        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
2207        case -1496880759: /*dateWritten*/ return this.dateWritten == null ? new Base[0] : new Base[] {this.dateWritten}; // DateTimeType
2208        case 1430631077: /*prescriber*/ return this.prescriber == null ? new Base[0] : new Base[] {this.prescriber}; // Reference
2209        case -1767318363: /*lensSpecification*/ return this.lensSpecification == null ? new Base[0] : this.lensSpecification.toArray(new Base[this.lensSpecification.size()]); // VisionPrescriptionLensSpecificationComponent
2210        default: return super.getProperty(hash, name, checkValid);
2211        }
2212
2213      }
2214
2215      @Override
2216      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2217        switch (hash) {
2218        case -1618432855: // identifier
2219          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
2220          return value;
2221        case -892481550: // status
2222          value = new FinancialResourceStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
2223          this.status = (Enumeration) value; // Enumeration<FinancialResourceStatusCodes>
2224          return value;
2225        case 1028554472: // created
2226          this.created = TypeConvertor.castToDateTime(value); // DateTimeType
2227          return value;
2228        case -791418107: // patient
2229          this.patient = TypeConvertor.castToReference(value); // Reference
2230          return value;
2231        case 1524132147: // encounter
2232          this.encounter = TypeConvertor.castToReference(value); // Reference
2233          return value;
2234        case -1496880759: // dateWritten
2235          this.dateWritten = TypeConvertor.castToDateTime(value); // DateTimeType
2236          return value;
2237        case 1430631077: // prescriber
2238          this.prescriber = TypeConvertor.castToReference(value); // Reference
2239          return value;
2240        case -1767318363: // lensSpecification
2241          this.getLensSpecification().add((VisionPrescriptionLensSpecificationComponent) value); // VisionPrescriptionLensSpecificationComponent
2242          return value;
2243        default: return super.setProperty(hash, name, value);
2244        }
2245
2246      }
2247
2248      @Override
2249      public Base setProperty(String name, Base value) throws FHIRException {
2250        if (name.equals("identifier")) {
2251          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2252        } else if (name.equals("status")) {
2253          value = new FinancialResourceStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
2254          this.status = (Enumeration) value; // Enumeration<FinancialResourceStatusCodes>
2255        } else if (name.equals("created")) {
2256          this.created = TypeConvertor.castToDateTime(value); // DateTimeType
2257        } else if (name.equals("patient")) {
2258          this.patient = TypeConvertor.castToReference(value); // Reference
2259        } else if (name.equals("encounter")) {
2260          this.encounter = TypeConvertor.castToReference(value); // Reference
2261        } else if (name.equals("dateWritten")) {
2262          this.dateWritten = TypeConvertor.castToDateTime(value); // DateTimeType
2263        } else if (name.equals("prescriber")) {
2264          this.prescriber = TypeConvertor.castToReference(value); // Reference
2265        } else if (name.equals("lensSpecification")) {
2266          this.getLensSpecification().add((VisionPrescriptionLensSpecificationComponent) value);
2267        } else
2268          return super.setProperty(name, value);
2269        return value;
2270      }
2271
2272  @Override
2273  public void removeChild(String name, Base value) throws FHIRException {
2274        if (name.equals("identifier")) {
2275          this.getIdentifier().remove(value);
2276        } else if (name.equals("status")) {
2277          value = new FinancialResourceStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
2278          this.status = (Enumeration) value; // Enumeration<FinancialResourceStatusCodes>
2279        } else if (name.equals("created")) {
2280          this.created = null;
2281        } else if (name.equals("patient")) {
2282          this.patient = null;
2283        } else if (name.equals("encounter")) {
2284          this.encounter = null;
2285        } else if (name.equals("dateWritten")) {
2286          this.dateWritten = null;
2287        } else if (name.equals("prescriber")) {
2288          this.prescriber = null;
2289        } else if (name.equals("lensSpecification")) {
2290          this.getLensSpecification().remove((VisionPrescriptionLensSpecificationComponent) value);
2291        } else
2292          super.removeChild(name, value);
2293        
2294      }
2295
2296      @Override
2297      public Base makeProperty(int hash, String name) throws FHIRException {
2298        switch (hash) {
2299        case -1618432855:  return addIdentifier(); 
2300        case -892481550:  return getStatusElement();
2301        case 1028554472:  return getCreatedElement();
2302        case -791418107:  return getPatient();
2303        case 1524132147:  return getEncounter();
2304        case -1496880759:  return getDateWrittenElement();
2305        case 1430631077:  return getPrescriber();
2306        case -1767318363:  return addLensSpecification(); 
2307        default: return super.makeProperty(hash, name);
2308        }
2309
2310      }
2311
2312      @Override
2313      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2314        switch (hash) {
2315        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2316        case -892481550: /*status*/ return new String[] {"code"};
2317        case 1028554472: /*created*/ return new String[] {"dateTime"};
2318        case -791418107: /*patient*/ return new String[] {"Reference"};
2319        case 1524132147: /*encounter*/ return new String[] {"Reference"};
2320        case -1496880759: /*dateWritten*/ return new String[] {"dateTime"};
2321        case 1430631077: /*prescriber*/ return new String[] {"Reference"};
2322        case -1767318363: /*lensSpecification*/ return new String[] {};
2323        default: return super.getTypesForProperty(hash, name);
2324        }
2325
2326      }
2327
2328      @Override
2329      public Base addChild(String name) throws FHIRException {
2330        if (name.equals("identifier")) {
2331          return addIdentifier();
2332        }
2333        else if (name.equals("status")) {
2334          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.status");
2335        }
2336        else if (name.equals("created")) {
2337          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.created");
2338        }
2339        else if (name.equals("patient")) {
2340          this.patient = new Reference();
2341          return this.patient;
2342        }
2343        else if (name.equals("encounter")) {
2344          this.encounter = new Reference();
2345          return this.encounter;
2346        }
2347        else if (name.equals("dateWritten")) {
2348          throw new FHIRException("Cannot call addChild on a singleton property VisionPrescription.dateWritten");
2349        }
2350        else if (name.equals("prescriber")) {
2351          this.prescriber = new Reference();
2352          return this.prescriber;
2353        }
2354        else if (name.equals("lensSpecification")) {
2355          return addLensSpecification();
2356        }
2357        else
2358          return super.addChild(name);
2359      }
2360
2361  public String fhirType() {
2362    return "VisionPrescription";
2363
2364  }
2365
2366      public VisionPrescription copy() {
2367        VisionPrescription dst = new VisionPrescription();
2368        copyValues(dst);
2369        return dst;
2370      }
2371
2372      public void copyValues(VisionPrescription dst) {
2373        super.copyValues(dst);
2374        if (identifier != null) {
2375          dst.identifier = new ArrayList<Identifier>();
2376          for (Identifier i : identifier)
2377            dst.identifier.add(i.copy());
2378        };
2379        dst.status = status == null ? null : status.copy();
2380        dst.created = created == null ? null : created.copy();
2381        dst.patient = patient == null ? null : patient.copy();
2382        dst.encounter = encounter == null ? null : encounter.copy();
2383        dst.dateWritten = dateWritten == null ? null : dateWritten.copy();
2384        dst.prescriber = prescriber == null ? null : prescriber.copy();
2385        if (lensSpecification != null) {
2386          dst.lensSpecification = new ArrayList<VisionPrescriptionLensSpecificationComponent>();
2387          for (VisionPrescriptionLensSpecificationComponent i : lensSpecification)
2388            dst.lensSpecification.add(i.copy());
2389        };
2390      }
2391
2392      protected VisionPrescription typedCopy() {
2393        return copy();
2394      }
2395
2396      @Override
2397      public boolean equalsDeep(Base other_) {
2398        if (!super.equalsDeep(other_))
2399          return false;
2400        if (!(other_ instanceof VisionPrescription))
2401          return false;
2402        VisionPrescription o = (VisionPrescription) other_;
2403        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(created, o.created, true)
2404           && compareDeep(patient, o.patient, true) && compareDeep(encounter, o.encounter, true) && compareDeep(dateWritten, o.dateWritten, true)
2405           && compareDeep(prescriber, o.prescriber, true) && compareDeep(lensSpecification, o.lensSpecification, true)
2406          ;
2407      }
2408
2409      @Override
2410      public boolean equalsShallow(Base other_) {
2411        if (!super.equalsShallow(other_))
2412          return false;
2413        if (!(other_ instanceof VisionPrescription))
2414          return false;
2415        VisionPrescription o = (VisionPrescription) other_;
2416        return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(dateWritten, o.dateWritten, true)
2417          ;
2418      }
2419
2420      public boolean isEmpty() {
2421        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, created
2422          , patient, encounter, dateWritten, prescriber, lensSpecification);
2423      }
2424
2425  @Override
2426  public ResourceType getResourceType() {
2427    return ResourceType.VisionPrescription;
2428   }
2429
2430 /**
2431   * Search parameter: <b>datewritten</b>
2432   * <p>
2433   * Description: <b>Return prescriptions written on this date</b><br>
2434   * Type: <b>date</b><br>
2435   * Path: <b>VisionPrescription.dateWritten</b><br>
2436   * </p>
2437   */
2438  @SearchParamDefinition(name="datewritten", path="VisionPrescription.dateWritten", description="Return prescriptions written on this date", type="date" )
2439  public static final String SP_DATEWRITTEN = "datewritten";
2440 /**
2441   * <b>Fluent Client</b> search parameter constant for <b>datewritten</b>
2442   * <p>
2443   * Description: <b>Return prescriptions written on this date</b><br>
2444   * Type: <b>date</b><br>
2445   * Path: <b>VisionPrescription.dateWritten</b><br>
2446   * </p>
2447   */
2448  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATEWRITTEN = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATEWRITTEN);
2449
2450 /**
2451   * Search parameter: <b>prescriber</b>
2452   * <p>
2453   * Description: <b>Who authorized the vision prescription</b><br>
2454   * Type: <b>reference</b><br>
2455   * Path: <b>VisionPrescription.prescriber</b><br>
2456   * </p>
2457   */
2458  @SearchParamDefinition(name="prescriber", path="VisionPrescription.prescriber", description="Who authorized the vision prescription", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Practitioner.class, PractitionerRole.class } )
2459  public static final String SP_PRESCRIBER = "prescriber";
2460 /**
2461   * <b>Fluent Client</b> search parameter constant for <b>prescriber</b>
2462   * <p>
2463   * Description: <b>Who authorized the vision prescription</b><br>
2464   * Type: <b>reference</b><br>
2465   * Path: <b>VisionPrescription.prescriber</b><br>
2466   * </p>
2467   */
2468  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PRESCRIBER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PRESCRIBER);
2469
2470/**
2471   * Constant for fluent queries to be used to add include statements. Specifies
2472   * the path value of "<b>VisionPrescription:prescriber</b>".
2473   */
2474  public static final ca.uhn.fhir.model.api.Include INCLUDE_PRESCRIBER = new ca.uhn.fhir.model.api.Include("VisionPrescription:prescriber").toLocked();
2475
2476 /**
2477   * Search parameter: <b>status</b>
2478   * <p>
2479   * Description: <b>The status of the vision prescription</b><br>
2480   * Type: <b>token</b><br>
2481   * Path: <b>VisionPrescription.status</b><br>
2482   * </p>
2483   */
2484  @SearchParamDefinition(name="status", path="VisionPrescription.status", description="The status of the vision prescription", type="token" )
2485  public static final String SP_STATUS = "status";
2486 /**
2487   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2488   * <p>
2489   * Description: <b>The status of the vision prescription</b><br>
2490   * Type: <b>token</b><br>
2491   * Path: <b>VisionPrescription.status</b><br>
2492   * </p>
2493   */
2494  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2495
2496 /**
2497   * Search parameter: <b>encounter</b>
2498   * <p>
2499   * Description: <b>Multiple Resources: 
2500
2501* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
2502* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
2503* [ChargeItem](chargeitem.html): Encounter associated with event
2504* [Claim](claim.html): Encounters associated with a billed line item
2505* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
2506* [Communication](communication.html): The Encounter during which this Communication was created
2507* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
2508* [Composition](composition.html): Context of the Composition
2509* [Condition](condition.html): The Encounter during which this Condition was created
2510* [DeviceRequest](devicerequest.html): Encounter during which request was created
2511* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
2512* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
2513* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
2514* [Flag](flag.html): Alert relevant during encounter
2515* [ImagingStudy](imagingstudy.html): The context of the study
2516* [List](list.html): Context in which list created
2517* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
2518* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
2519* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
2520* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
2521* [Observation](observation.html): Encounter related to the observation
2522* [Procedure](procedure.html): The Encounter during which this Procedure was created
2523* [Provenance](provenance.html): Encounter related to the Provenance
2524* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
2525* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
2526* [RiskAssessment](riskassessment.html): Where was assessment performed?
2527* [ServiceRequest](servicerequest.html): An encounter in which this request is made
2528* [Task](task.html): Search by encounter
2529* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
2530</b><br>
2531   * Type: <b>reference</b><br>
2532   * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br>
2533   * </p>
2534   */
2535  @SearchParamDefinition(name="encounter", path="AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter", description="Multiple Resources: \r\n\r\n* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent\r\n* [CarePlan](careplan.html): The Encounter during which this CarePlan was created\r\n* [ChargeItem](chargeitem.html): Encounter associated with event\r\n* [Claim](claim.html): Encounters associated with a billed line item\r\n* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created\r\n* [Communication](communication.html): The Encounter during which this Communication was created\r\n* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created\r\n* [Composition](composition.html): Context of the Composition\r\n* [Condition](condition.html): The Encounter during which this Condition was created\r\n* [DeviceRequest](devicerequest.html): Encounter during which request was created\r\n* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made\r\n* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values\r\n* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item\r\n* [Flag](flag.html): Alert relevant during encounter\r\n* [ImagingStudy](imagingstudy.html): The context of the study\r\n* [List](list.html): Context in which list created\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier\r\n* [Observation](observation.html): Encounter related to the observation\r\n* [Procedure](procedure.html): The Encounter during which this Procedure was created\r\n* [Provenance](provenance.html): Encounter related to the Provenance\r\n* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response\r\n* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to\r\n* [RiskAssessment](riskassessment.html): Where was assessment performed?\r\n* [ServiceRequest](servicerequest.html): An encounter in which this request is made\r\n* [Task](task.html): Search by encounter\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } )
2536  public static final String SP_ENCOUNTER = "encounter";
2537 /**
2538   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
2539   * <p>
2540   * Description: <b>Multiple Resources: 
2541
2542* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
2543* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
2544* [ChargeItem](chargeitem.html): Encounter associated with event
2545* [Claim](claim.html): Encounters associated with a billed line item
2546* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
2547* [Communication](communication.html): The Encounter during which this Communication was created
2548* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
2549* [Composition](composition.html): Context of the Composition
2550* [Condition](condition.html): The Encounter during which this Condition was created
2551* [DeviceRequest](devicerequest.html): Encounter during which request was created
2552* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
2553* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
2554* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
2555* [Flag](flag.html): Alert relevant during encounter
2556* [ImagingStudy](imagingstudy.html): The context of the study
2557* [List](list.html): Context in which list created
2558* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
2559* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
2560* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
2561* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
2562* [Observation](observation.html): Encounter related to the observation
2563* [Procedure](procedure.html): The Encounter during which this Procedure was created
2564* [Provenance](provenance.html): Encounter related to the Provenance
2565* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
2566* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
2567* [RiskAssessment](riskassessment.html): Where was assessment performed?
2568* [ServiceRequest](servicerequest.html): An encounter in which this request is made
2569* [Task](task.html): Search by encounter
2570* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
2571</b><br>
2572   * Type: <b>reference</b><br>
2573   * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br>
2574   * </p>
2575   */
2576  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
2577
2578/**
2579   * Constant for fluent queries to be used to add include statements. Specifies
2580   * the path value of "<b>VisionPrescription:encounter</b>".
2581   */
2582  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("VisionPrescription:encounter").toLocked();
2583
2584 /**
2585   * Search parameter: <b>identifier</b>
2586   * <p>
2587   * Description: <b>Multiple Resources: 
2588
2589* [Account](account.html): Account number
2590* [AdverseEvent](adverseevent.html): Business identifier for the event
2591* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2592* [Appointment](appointment.html): An Identifier of the Appointment
2593* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2594* [Basic](basic.html): Business identifier
2595* [BodyStructure](bodystructure.html): Bodystructure identifier
2596* [CarePlan](careplan.html): External Ids for this plan
2597* [CareTeam](careteam.html): External Ids for this team
2598* [ChargeItem](chargeitem.html): Business Identifier for item
2599* [Claim](claim.html): The primary identifier of the financial resource
2600* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2601* [ClinicalImpression](clinicalimpression.html): Business identifier
2602* [Communication](communication.html): Unique identifier
2603* [CommunicationRequest](communicationrequest.html): Unique identifier
2604* [Composition](composition.html): Version-independent identifier for the Composition
2605* [Condition](condition.html): A unique identifier of the condition record
2606* [Consent](consent.html): Identifier for this record (external references)
2607* [Contract](contract.html): The identity of the contract
2608* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2609* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2610* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2611* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2612* [DeviceRequest](devicerequest.html): Business identifier for request/order
2613* [DeviceUsage](deviceusage.html): Search by identifier
2614* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2615* [DocumentReference](documentreference.html): Identifier of the attachment binary
2616* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2617* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2618* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2619* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2620* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2621* [Flag](flag.html): Business identifier
2622* [Goal](goal.html): External Ids for this goal
2623* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2624* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2625* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2626* [Immunization](immunization.html): Business identifier
2627* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2628* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2629* [Invoice](invoice.html): Business Identifier for item
2630* [List](list.html): Business identifier
2631* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2632* [Medication](medication.html): Returns medications with this external identifier
2633* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2634* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2635* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2636* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2637* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2638* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2639* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2640* [Observation](observation.html): The unique id for a particular observation
2641* [Person](person.html): A person Identifier
2642* [Procedure](procedure.html): A unique identifier for a procedure
2643* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2644* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2645* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2646* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2647* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2648* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2649* [Specimen](specimen.html): The unique identifier associated with the specimen
2650* [SupplyDelivery](supplydelivery.html): External identifier
2651* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2652* [Task](task.html): Search for a task instance by its business identifier
2653* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2654</b><br>
2655   * Type: <b>token</b><br>
2656   * 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>
2657   * </p>
2658   */
2659  @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" )
2660  public static final String SP_IDENTIFIER = "identifier";
2661 /**
2662   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2663   * <p>
2664   * Description: <b>Multiple Resources: 
2665
2666* [Account](account.html): Account number
2667* [AdverseEvent](adverseevent.html): Business identifier for the event
2668* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2669* [Appointment](appointment.html): An Identifier of the Appointment
2670* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2671* [Basic](basic.html): Business identifier
2672* [BodyStructure](bodystructure.html): Bodystructure identifier
2673* [CarePlan](careplan.html): External Ids for this plan
2674* [CareTeam](careteam.html): External Ids for this team
2675* [ChargeItem](chargeitem.html): Business Identifier for item
2676* [Claim](claim.html): The primary identifier of the financial resource
2677* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2678* [ClinicalImpression](clinicalimpression.html): Business identifier
2679* [Communication](communication.html): Unique identifier
2680* [CommunicationRequest](communicationrequest.html): Unique identifier
2681* [Composition](composition.html): Version-independent identifier for the Composition
2682* [Condition](condition.html): A unique identifier of the condition record
2683* [Consent](consent.html): Identifier for this record (external references)
2684* [Contract](contract.html): The identity of the contract
2685* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2686* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2687* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2688* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2689* [DeviceRequest](devicerequest.html): Business identifier for request/order
2690* [DeviceUsage](deviceusage.html): Search by identifier
2691* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2692* [DocumentReference](documentreference.html): Identifier of the attachment binary
2693* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2694* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2695* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2696* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2697* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2698* [Flag](flag.html): Business identifier
2699* [Goal](goal.html): External Ids for this goal
2700* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2701* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2702* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2703* [Immunization](immunization.html): Business identifier
2704* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2705* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2706* [Invoice](invoice.html): Business Identifier for item
2707* [List](list.html): Business identifier
2708* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2709* [Medication](medication.html): Returns medications with this external identifier
2710* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2711* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2712* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2713* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2714* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2715* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2716* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2717* [Observation](observation.html): The unique id for a particular observation
2718* [Person](person.html): A person Identifier
2719* [Procedure](procedure.html): A unique identifier for a procedure
2720* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2721* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2722* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2723* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2724* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2725* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2726* [Specimen](specimen.html): The unique identifier associated with the specimen
2727* [SupplyDelivery](supplydelivery.html): External identifier
2728* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2729* [Task](task.html): Search for a task instance by its business identifier
2730* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2731</b><br>
2732   * Type: <b>token</b><br>
2733   * 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>
2734   * </p>
2735   */
2736  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2737
2738 /**
2739   * Search parameter: <b>patient</b>
2740   * <p>
2741   * Description: <b>Multiple Resources: 
2742
2743* [Account](account.html): The entity that caused the expenses
2744* [AdverseEvent](adverseevent.html): Subject impacted by event
2745* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2746* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2747* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2748* [AuditEvent](auditevent.html): Where the activity involved patient data
2749* [Basic](basic.html): Identifies the focus of this resource
2750* [BodyStructure](bodystructure.html): Who this is about
2751* [CarePlan](careplan.html): Who the care plan is for
2752* [CareTeam](careteam.html): Who care team is for
2753* [ChargeItem](chargeitem.html): Individual service was done for/to
2754* [Claim](claim.html): Patient receiving the products or services
2755* [ClaimResponse](claimresponse.html): The subject of care
2756* [ClinicalImpression](clinicalimpression.html): Patient assessed
2757* [Communication](communication.html): Focus of message
2758* [CommunicationRequest](communicationrequest.html): Focus of message
2759* [Composition](composition.html): Who and/or what the composition is about
2760* [Condition](condition.html): Who has the condition?
2761* [Consent](consent.html): Who the consent applies to
2762* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2763* [Coverage](coverage.html): Retrieve coverages for a patient
2764* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2765* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2766* [DetectedIssue](detectedissue.html): Associated patient
2767* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2768* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2769* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2770* [DocumentReference](documentreference.html): Who/what is the subject of the document
2771* [Encounter](encounter.html): The patient present at the encounter
2772* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2773* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2774* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2775* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2776* [Flag](flag.html): The identity of a subject to list flags for
2777* [Goal](goal.html): Who this goal is intended for
2778* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2779* [ImagingSelection](imagingselection.html): Who the study is about
2780* [ImagingStudy](imagingstudy.html): Who the study is about
2781* [Immunization](immunization.html): The patient for the vaccination record
2782* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2783* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2784* [Invoice](invoice.html): Recipient(s) of goods and services
2785* [List](list.html): If all resources have the same subject
2786* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2787* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2788* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2789* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2790* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2791* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2792* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2793* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2794* [Observation](observation.html): The subject that the observation is about (if patient)
2795* [Person](person.html): The Person links to this Patient
2796* [Procedure](procedure.html): Search by subject - a patient
2797* [Provenance](provenance.html): Where the activity involved patient data
2798* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2799* [RelatedPerson](relatedperson.html): The patient this related person is related to
2800* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2801* [ResearchSubject](researchsubject.html): Who or what is part of study
2802* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2803* [ServiceRequest](servicerequest.html): Search by subject - a patient
2804* [Specimen](specimen.html): The patient the specimen comes from
2805* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2806* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2807* [Task](task.html): Search by patient
2808* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2809</b><br>
2810   * Type: <b>reference</b><br>
2811   * 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>
2812   * </p>
2813   */
2814  @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 } )
2815  public static final String SP_PATIENT = "patient";
2816 /**
2817   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2818   * <p>
2819   * Description: <b>Multiple Resources: 
2820
2821* [Account](account.html): The entity that caused the expenses
2822* [AdverseEvent](adverseevent.html): Subject impacted by event
2823* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2824* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2825* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2826* [AuditEvent](auditevent.html): Where the activity involved patient data
2827* [Basic](basic.html): Identifies the focus of this resource
2828* [BodyStructure](bodystructure.html): Who this is about
2829* [CarePlan](careplan.html): Who the care plan is for
2830* [CareTeam](careteam.html): Who care team is for
2831* [ChargeItem](chargeitem.html): Individual service was done for/to
2832* [Claim](claim.html): Patient receiving the products or services
2833* [ClaimResponse](claimresponse.html): The subject of care
2834* [ClinicalImpression](clinicalimpression.html): Patient assessed
2835* [Communication](communication.html): Focus of message
2836* [CommunicationRequest](communicationrequest.html): Focus of message
2837* [Composition](composition.html): Who and/or what the composition is about
2838* [Condition](condition.html): Who has the condition?
2839* [Consent](consent.html): Who the consent applies to
2840* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2841* [Coverage](coverage.html): Retrieve coverages for a patient
2842* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2843* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2844* [DetectedIssue](detectedissue.html): Associated patient
2845* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2846* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2847* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2848* [DocumentReference](documentreference.html): Who/what is the subject of the document
2849* [Encounter](encounter.html): The patient present at the encounter
2850* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2851* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2852* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2853* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2854* [Flag](flag.html): The identity of a subject to list flags for
2855* [Goal](goal.html): Who this goal is intended for
2856* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2857* [ImagingSelection](imagingselection.html): Who the study is about
2858* [ImagingStudy](imagingstudy.html): Who the study is about
2859* [Immunization](immunization.html): The patient for the vaccination record
2860* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2861* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2862* [Invoice](invoice.html): Recipient(s) of goods and services
2863* [List](list.html): If all resources have the same subject
2864* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2865* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2866* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2867* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2868* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2869* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2870* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2871* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2872* [Observation](observation.html): The subject that the observation is about (if patient)
2873* [Person](person.html): The Person links to this Patient
2874* [Procedure](procedure.html): Search by subject - a patient
2875* [Provenance](provenance.html): Where the activity involved patient data
2876* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2877* [RelatedPerson](relatedperson.html): The patient this related person is related to
2878* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2879* [ResearchSubject](researchsubject.html): Who or what is part of study
2880* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2881* [ServiceRequest](servicerequest.html): Search by subject - a patient
2882* [Specimen](specimen.html): The patient the specimen comes from
2883* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2884* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2885* [Task](task.html): Search by patient
2886* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2887</b><br>
2888   * Type: <b>reference</b><br>
2889   * 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>
2890   * </p>
2891   */
2892  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2893
2894/**
2895   * Constant for fluent queries to be used to add include statements. Specifies
2896   * the path value of "<b>VisionPrescription:patient</b>".
2897   */
2898  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("VisionPrescription:patient").toLocked();
2899
2900
2901}
2902