001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * A record of a device being used by a patient where the record is the result of a report from the patient or a clinician.
052 */
053@ResourceDef(name="DeviceUsage", profile="http://hl7.org/fhir/StructureDefinition/DeviceUsage")
054public class DeviceUsage extends DomainResource {
055
056    public enum DeviceUsageStatus {
057        /**
058         * The device is still being used.
059         */
060        ACTIVE, 
061        /**
062         * The device is no longer being used.
063         */
064        COMPLETED, 
065        /**
066         * The device was not used.
067         */
068        NOTDONE, 
069        /**
070         * The statement was recorded incorrectly.
071         */
072        ENTEREDINERROR, 
073        /**
074         * The device may be used at some time in the future.
075         */
076        INTENDED, 
077        /**
078         * Actions implied by the statement have been permanently halted, before all of them occurred.
079         */
080        STOPPED, 
081        /**
082         * Actions implied by the statement have been temporarily halted, but are expected to continue later. May also be called \"suspended\".
083         */
084        ONHOLD, 
085        /**
086         * added to help the parsers with the generic types
087         */
088        NULL;
089        public static DeviceUsageStatus fromCode(String codeString) throws FHIRException {
090            if (codeString == null || "".equals(codeString))
091                return null;
092        if ("active".equals(codeString))
093          return ACTIVE;
094        if ("completed".equals(codeString))
095          return COMPLETED;
096        if ("not-done".equals(codeString))
097          return NOTDONE;
098        if ("entered-in-error".equals(codeString))
099          return ENTEREDINERROR;
100        if ("intended".equals(codeString))
101          return INTENDED;
102        if ("stopped".equals(codeString))
103          return STOPPED;
104        if ("on-hold".equals(codeString))
105          return ONHOLD;
106        if (Configuration.isAcceptInvalidEnums())
107          return null;
108        else
109          throw new FHIRException("Unknown DeviceUsageStatus code '"+codeString+"'");
110        }
111        public String toCode() {
112          switch (this) {
113            case ACTIVE: return "active";
114            case COMPLETED: return "completed";
115            case NOTDONE: return "not-done";
116            case ENTEREDINERROR: return "entered-in-error";
117            case INTENDED: return "intended";
118            case STOPPED: return "stopped";
119            case ONHOLD: return "on-hold";
120            case NULL: return null;
121            default: return "?";
122          }
123        }
124        public String getSystem() {
125          switch (this) {
126            case ACTIVE: return "http://hl7.org/fhir/deviceusage-status";
127            case COMPLETED: return "http://hl7.org/fhir/deviceusage-status";
128            case NOTDONE: return "http://hl7.org/fhir/deviceusage-status";
129            case ENTEREDINERROR: return "http://hl7.org/fhir/deviceusage-status";
130            case INTENDED: return "http://hl7.org/fhir/deviceusage-status";
131            case STOPPED: return "http://hl7.org/fhir/deviceusage-status";
132            case ONHOLD: return "http://hl7.org/fhir/deviceusage-status";
133            case NULL: return null;
134            default: return "?";
135          }
136        }
137        public String getDefinition() {
138          switch (this) {
139            case ACTIVE: return "The device is still being used.";
140            case COMPLETED: return "The device is no longer being used.";
141            case NOTDONE: return "The device was not used.";
142            case ENTEREDINERROR: return "The statement was recorded incorrectly.";
143            case INTENDED: return "The device may be used at some time in the future.";
144            case STOPPED: return "Actions implied by the statement have been permanently halted, before all of them occurred.";
145            case ONHOLD: return "Actions implied by the statement have been temporarily halted, but are expected to continue later. May also be called \"suspended\".";
146            case NULL: return null;
147            default: return "?";
148          }
149        }
150        public String getDisplay() {
151          switch (this) {
152            case ACTIVE: return "Active";
153            case COMPLETED: return "Completed";
154            case NOTDONE: return "Not done";
155            case ENTEREDINERROR: return "Entered in Error";
156            case INTENDED: return "Intended";
157            case STOPPED: return "Stopped";
158            case ONHOLD: return "On Hold";
159            case NULL: return null;
160            default: return "?";
161          }
162        }
163    }
164
165  public static class DeviceUsageStatusEnumFactory implements EnumFactory<DeviceUsageStatus> {
166    public DeviceUsageStatus fromCode(String codeString) throws IllegalArgumentException {
167      if (codeString == null || "".equals(codeString))
168            if (codeString == null || "".equals(codeString))
169                return null;
170        if ("active".equals(codeString))
171          return DeviceUsageStatus.ACTIVE;
172        if ("completed".equals(codeString))
173          return DeviceUsageStatus.COMPLETED;
174        if ("not-done".equals(codeString))
175          return DeviceUsageStatus.NOTDONE;
176        if ("entered-in-error".equals(codeString))
177          return DeviceUsageStatus.ENTEREDINERROR;
178        if ("intended".equals(codeString))
179          return DeviceUsageStatus.INTENDED;
180        if ("stopped".equals(codeString))
181          return DeviceUsageStatus.STOPPED;
182        if ("on-hold".equals(codeString))
183          return DeviceUsageStatus.ONHOLD;
184        throw new IllegalArgumentException("Unknown DeviceUsageStatus code '"+codeString+"'");
185        }
186        public Enumeration<DeviceUsageStatus> fromType(PrimitiveType<?> code) throws FHIRException {
187          if (code == null)
188            return null;
189          if (code.isEmpty())
190            return new Enumeration<DeviceUsageStatus>(this, DeviceUsageStatus.NULL, code);
191          String codeString = ((PrimitiveType) code).asStringValue();
192          if (codeString == null || "".equals(codeString))
193            return new Enumeration<DeviceUsageStatus>(this, DeviceUsageStatus.NULL, code);
194        if ("active".equals(codeString))
195          return new Enumeration<DeviceUsageStatus>(this, DeviceUsageStatus.ACTIVE, code);
196        if ("completed".equals(codeString))
197          return new Enumeration<DeviceUsageStatus>(this, DeviceUsageStatus.COMPLETED, code);
198        if ("not-done".equals(codeString))
199          return new Enumeration<DeviceUsageStatus>(this, DeviceUsageStatus.NOTDONE, code);
200        if ("entered-in-error".equals(codeString))
201          return new Enumeration<DeviceUsageStatus>(this, DeviceUsageStatus.ENTEREDINERROR, code);
202        if ("intended".equals(codeString))
203          return new Enumeration<DeviceUsageStatus>(this, DeviceUsageStatus.INTENDED, code);
204        if ("stopped".equals(codeString))
205          return new Enumeration<DeviceUsageStatus>(this, DeviceUsageStatus.STOPPED, code);
206        if ("on-hold".equals(codeString))
207          return new Enumeration<DeviceUsageStatus>(this, DeviceUsageStatus.ONHOLD, code);
208        throw new FHIRException("Unknown DeviceUsageStatus code '"+codeString+"'");
209        }
210    public String toCode(DeviceUsageStatus code) {
211      if (code == DeviceUsageStatus.ACTIVE)
212        return "active";
213      if (code == DeviceUsageStatus.COMPLETED)
214        return "completed";
215      if (code == DeviceUsageStatus.NOTDONE)
216        return "not-done";
217      if (code == DeviceUsageStatus.ENTEREDINERROR)
218        return "entered-in-error";
219      if (code == DeviceUsageStatus.INTENDED)
220        return "intended";
221      if (code == DeviceUsageStatus.STOPPED)
222        return "stopped";
223      if (code == DeviceUsageStatus.ONHOLD)
224        return "on-hold";
225      return "?";
226      }
227    public String toSystem(DeviceUsageStatus code) {
228      return code.getSystem();
229      }
230    }
231
232    @Block()
233    public static class DeviceUsageAdherenceComponent extends BackboneElement implements IBaseBackboneElement {
234        /**
235         * Type of adherence.
236         */
237        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
238        @Description(shortDefinition="always | never | sometimes", formalDefinition="Type of adherence." )
239        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/deviceusage-adherence-code")
240        protected CodeableConcept code;
241
242        /**
243         * Reason for adherence type.
244         */
245        @Child(name = "reason", type = {CodeableConcept.class}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
246        @Description(shortDefinition="lost | stolen | prescribed | broken | burned | forgot", formalDefinition="Reason for adherence type." )
247        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/deviceusage-adherence-reason")
248        protected List<CodeableConcept> reason;
249
250        private static final long serialVersionUID = -1932336797L;
251
252    /**
253     * Constructor
254     */
255      public DeviceUsageAdherenceComponent() {
256        super();
257      }
258
259    /**
260     * Constructor
261     */
262      public DeviceUsageAdherenceComponent(CodeableConcept code, CodeableConcept reason) {
263        super();
264        this.setCode(code);
265        this.addReason(reason);
266      }
267
268        /**
269         * @return {@link #code} (Type of adherence.)
270         */
271        public CodeableConcept getCode() { 
272          if (this.code == null)
273            if (Configuration.errorOnAutoCreate())
274              throw new Error("Attempt to auto-create DeviceUsageAdherenceComponent.code");
275            else if (Configuration.doAutoCreate())
276              this.code = new CodeableConcept(); // cc
277          return this.code;
278        }
279
280        public boolean hasCode() { 
281          return this.code != null && !this.code.isEmpty();
282        }
283
284        /**
285         * @param value {@link #code} (Type of adherence.)
286         */
287        public DeviceUsageAdherenceComponent setCode(CodeableConcept value) { 
288          this.code = value;
289          return this;
290        }
291
292        /**
293         * @return {@link #reason} (Reason for adherence type.)
294         */
295        public List<CodeableConcept> getReason() { 
296          if (this.reason == null)
297            this.reason = new ArrayList<CodeableConcept>();
298          return this.reason;
299        }
300
301        /**
302         * @return Returns a reference to <code>this</code> for easy method chaining
303         */
304        public DeviceUsageAdherenceComponent setReason(List<CodeableConcept> theReason) { 
305          this.reason = theReason;
306          return this;
307        }
308
309        public boolean hasReason() { 
310          if (this.reason == null)
311            return false;
312          for (CodeableConcept item : this.reason)
313            if (!item.isEmpty())
314              return true;
315          return false;
316        }
317
318        public CodeableConcept addReason() { //3
319          CodeableConcept t = new CodeableConcept();
320          if (this.reason == null)
321            this.reason = new ArrayList<CodeableConcept>();
322          this.reason.add(t);
323          return t;
324        }
325
326        public DeviceUsageAdherenceComponent addReason(CodeableConcept t) { //3
327          if (t == null)
328            return this;
329          if (this.reason == null)
330            this.reason = new ArrayList<CodeableConcept>();
331          this.reason.add(t);
332          return this;
333        }
334
335        /**
336         * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3}
337         */
338        public CodeableConcept getReasonFirstRep() { 
339          if (getReason().isEmpty()) {
340            addReason();
341          }
342          return getReason().get(0);
343        }
344
345        protected void listChildren(List<Property> children) {
346          super.listChildren(children);
347          children.add(new Property("code", "CodeableConcept", "Type of adherence.", 0, 1, code));
348          children.add(new Property("reason", "CodeableConcept", "Reason for adherence type.", 0, java.lang.Integer.MAX_VALUE, reason));
349        }
350
351        @Override
352        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
353          switch (_hash) {
354          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Type of adherence.", 0, 1, code);
355          case -934964668: /*reason*/  return new Property("reason", "CodeableConcept", "Reason for adherence type.", 0, java.lang.Integer.MAX_VALUE, reason);
356          default: return super.getNamedProperty(_hash, _name, _checkValid);
357          }
358
359        }
360
361      @Override
362      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
363        switch (hash) {
364        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
365        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept
366        default: return super.getProperty(hash, name, checkValid);
367        }
368
369      }
370
371      @Override
372      public Base setProperty(int hash, String name, Base value) throws FHIRException {
373        switch (hash) {
374        case 3059181: // code
375          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
376          return value;
377        case -934964668: // reason
378          this.getReason().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
379          return value;
380        default: return super.setProperty(hash, name, value);
381        }
382
383      }
384
385      @Override
386      public Base setProperty(String name, Base value) throws FHIRException {
387        if (name.equals("code")) {
388          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
389        } else if (name.equals("reason")) {
390          this.getReason().add(TypeConvertor.castToCodeableConcept(value));
391        } else
392          return super.setProperty(name, value);
393        return value;
394      }
395
396  @Override
397  public void removeChild(String name, Base value) throws FHIRException {
398        if (name.equals("code")) {
399          this.code = null;
400        } else if (name.equals("reason")) {
401          this.getReason().remove(value);
402        } else
403          super.removeChild(name, value);
404        
405      }
406
407      @Override
408      public Base makeProperty(int hash, String name) throws FHIRException {
409        switch (hash) {
410        case 3059181:  return getCode();
411        case -934964668:  return addReason(); 
412        default: return super.makeProperty(hash, name);
413        }
414
415      }
416
417      @Override
418      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
419        switch (hash) {
420        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
421        case -934964668: /*reason*/ return new String[] {"CodeableConcept"};
422        default: return super.getTypesForProperty(hash, name);
423        }
424
425      }
426
427      @Override
428      public Base addChild(String name) throws FHIRException {
429        if (name.equals("code")) {
430          this.code = new CodeableConcept();
431          return this.code;
432        }
433        else if (name.equals("reason")) {
434          return addReason();
435        }
436        else
437          return super.addChild(name);
438      }
439
440      public DeviceUsageAdherenceComponent copy() {
441        DeviceUsageAdherenceComponent dst = new DeviceUsageAdherenceComponent();
442        copyValues(dst);
443        return dst;
444      }
445
446      public void copyValues(DeviceUsageAdherenceComponent dst) {
447        super.copyValues(dst);
448        dst.code = code == null ? null : code.copy();
449        if (reason != null) {
450          dst.reason = new ArrayList<CodeableConcept>();
451          for (CodeableConcept i : reason)
452            dst.reason.add(i.copy());
453        };
454      }
455
456      @Override
457      public boolean equalsDeep(Base other_) {
458        if (!super.equalsDeep(other_))
459          return false;
460        if (!(other_ instanceof DeviceUsageAdherenceComponent))
461          return false;
462        DeviceUsageAdherenceComponent o = (DeviceUsageAdherenceComponent) other_;
463        return compareDeep(code, o.code, true) && compareDeep(reason, o.reason, true);
464      }
465
466      @Override
467      public boolean equalsShallow(Base other_) {
468        if (!super.equalsShallow(other_))
469          return false;
470        if (!(other_ instanceof DeviceUsageAdherenceComponent))
471          return false;
472        DeviceUsageAdherenceComponent o = (DeviceUsageAdherenceComponent) other_;
473        return true;
474      }
475
476      public boolean isEmpty() {
477        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, reason);
478      }
479
480  public String fhirType() {
481    return "DeviceUsage.adherence";
482
483  }
484
485  }
486
487    /**
488     * An external identifier for this statement such as an IRI.
489     */
490    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
491    @Description(shortDefinition="External identifier for this record", formalDefinition="An external identifier for this statement such as an IRI." )
492    protected List<Identifier> identifier;
493
494    /**
495     * A plan, proposal or order that is fulfilled in whole or in part by this DeviceUsage.
496     */
497    @Child(name = "basedOn", type = {ServiceRequest.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
498    @Description(shortDefinition="Fulfills plan, proposal or order", formalDefinition="A plan, proposal or order that is fulfilled in whole or in part by this DeviceUsage." )
499    protected List<Reference> basedOn;
500
501    /**
502     * A code representing the patient or other source's judgment about the state of the device used that this statement is about.  Generally this will be active or completed.
503     */
504    @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true)
505    @Description(shortDefinition="active | completed | not-done | entered-in-error +", formalDefinition="A code representing the patient or other source's judgment about the state of the device used that this statement is about.  Generally this will be active or completed." )
506    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/deviceusage-status")
507    protected Enumeration<DeviceUsageStatus> status;
508
509    /**
510     * This attribute indicates a category for the statement - The device statement may be made in an inpatient or outpatient settting (inpatient | outpatient | community | patientspecified).
511     */
512    @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
513    @Description(shortDefinition="The category of the statement - classifying how the statement is made", formalDefinition="This attribute indicates a category for the statement - The device statement may be made in an inpatient or outpatient settting (inpatient | outpatient | community | patientspecified)." )
514    protected List<CodeableConcept> category;
515
516    /**
517     * The patient who used the device.
518     */
519    @Child(name = "patient", type = {Patient.class}, order=4, min=1, max=1, modifier=false, summary=true)
520    @Description(shortDefinition="Patient using device", formalDefinition="The patient who used the device." )
521    protected Reference patient;
522
523    /**
524     * Allows linking the DeviceUsage to the underlying Request, or to other information that supports or is used to derive the DeviceUsage.
525     */
526    @Child(name = "derivedFrom", type = {ServiceRequest.class, Procedure.class, Claim.class, Observation.class, QuestionnaireResponse.class, DocumentReference.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
527    @Description(shortDefinition="Supporting information", formalDefinition="Allows linking the DeviceUsage to the underlying Request, or to other information that supports or is used to derive the DeviceUsage." )
528    protected List<Reference> derivedFrom;
529
530    /**
531     * The encounter or episode of care that establishes the context for this device use statement.
532     */
533    @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=6, min=0, max=1, modifier=false, summary=true)
534    @Description(shortDefinition="The encounter or episode of care that establishes the context for this device use statement", formalDefinition="The encounter or episode of care that establishes the context for this device use statement." )
535    protected Reference context;
536
537    /**
538     * How often the device was used.
539     */
540    @Child(name = "timing", type = {Timing.class, Period.class, DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=true)
541    @Description(shortDefinition="How often  the device was used", formalDefinition="How often the device was used." )
542    protected DataType timing;
543
544    /**
545     * The time at which the statement was recorded by informationSource.
546     */
547    @Child(name = "dateAsserted", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true)
548    @Description(shortDefinition="When the statement was made (and recorded)", formalDefinition="The time at which the statement was recorded by informationSource." )
549    protected DateTimeType dateAsserted;
550
551    /**
552     * The status of the device usage, for example always, sometimes, never. This is not the same as the status of the statement.
553     */
554    @Child(name = "usageStatus", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=false)
555    @Description(shortDefinition="The status of the device usage, for example always, sometimes, never. This is not the same as the status of the statement", formalDefinition="The status of the device usage, for example always, sometimes, never. This is not the same as the status of the statement." )
556    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/deviceusage-status")
557    protected CodeableConcept usageStatus;
558
559    /**
560     * The reason for asserting the usage status - for example forgot, lost, stolen, broken.
561     */
562    @Child(name = "usageReason", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
563    @Description(shortDefinition="The reason for asserting the usage status - for example forgot, lost, stolen, broken", formalDefinition="The reason for asserting the usage status - for example forgot, lost, stolen, broken." )
564    protected List<CodeableConcept> usageReason;
565
566    /**
567     * This indicates how or if the device is being used.
568     */
569    @Child(name = "adherence", type = {}, order=11, min=0, max=1, modifier=false, summary=false)
570    @Description(shortDefinition="How device is being used", formalDefinition="This indicates how or if the device is being used." )
571    protected DeviceUsageAdherenceComponent adherence;
572
573    /**
574     * Who reported the device was being used by the patient.
575     */
576    @Child(name = "informationSource", type = {Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Organization.class}, order=12, min=0, max=1, modifier=false, summary=true)
577    @Description(shortDefinition="Who made the statement", formalDefinition="Who reported the device was being used by the patient." )
578    protected Reference informationSource;
579
580    /**
581     * Code or Reference to device used.
582     */
583    @Child(name = "device", type = {CodeableReference.class}, order=13, min=1, max=1, modifier=false, summary=true)
584    @Description(shortDefinition="Code or Reference to device used", formalDefinition="Code or Reference to device used." )
585    protected CodeableReference device;
586
587    /**
588     * Reason or justification for the use of the device. A coded concept, or another resource whose existence justifies this DeviceUsage.
589     */
590    @Child(name = "reason", type = {CodeableReference.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
591    @Description(shortDefinition="Why device was used", formalDefinition="Reason or justification for the use of the device. A coded concept, or another resource whose existence justifies this DeviceUsage." )
592    protected List<CodeableReference> reason;
593
594    /**
595     * Indicates the anotomic location on the subject's body where the device was used ( i.e. the target).
596     */
597    @Child(name = "bodySite", type = {CodeableReference.class}, order=15, min=0, max=1, modifier=false, summary=true)
598    @Description(shortDefinition="Target body site", formalDefinition="Indicates the anotomic location on the subject's body where the device was used ( i.e. the target)." )
599    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site")
600    protected CodeableReference bodySite;
601
602    /**
603     * Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.
604     */
605    @Child(name = "note", type = {Annotation.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
606    @Description(shortDefinition="Addition details (comments, instructions)", formalDefinition="Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement." )
607    protected List<Annotation> note;
608
609    private static final long serialVersionUID = -10803928L;
610
611  /**
612   * Constructor
613   */
614    public DeviceUsage() {
615      super();
616    }
617
618  /**
619   * Constructor
620   */
621    public DeviceUsage(DeviceUsageStatus status, Reference patient, CodeableReference device) {
622      super();
623      this.setStatus(status);
624      this.setPatient(patient);
625      this.setDevice(device);
626    }
627
628    /**
629     * @return {@link #identifier} (An external identifier for this statement such as an IRI.)
630     */
631    public List<Identifier> getIdentifier() { 
632      if (this.identifier == null)
633        this.identifier = new ArrayList<Identifier>();
634      return this.identifier;
635    }
636
637    /**
638     * @return Returns a reference to <code>this</code> for easy method chaining
639     */
640    public DeviceUsage setIdentifier(List<Identifier> theIdentifier) { 
641      this.identifier = theIdentifier;
642      return this;
643    }
644
645    public boolean hasIdentifier() { 
646      if (this.identifier == null)
647        return false;
648      for (Identifier item : this.identifier)
649        if (!item.isEmpty())
650          return true;
651      return false;
652    }
653
654    public Identifier addIdentifier() { //3
655      Identifier t = new Identifier();
656      if (this.identifier == null)
657        this.identifier = new ArrayList<Identifier>();
658      this.identifier.add(t);
659      return t;
660    }
661
662    public DeviceUsage addIdentifier(Identifier t) { //3
663      if (t == null)
664        return this;
665      if (this.identifier == null)
666        this.identifier = new ArrayList<Identifier>();
667      this.identifier.add(t);
668      return this;
669    }
670
671    /**
672     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
673     */
674    public Identifier getIdentifierFirstRep() { 
675      if (getIdentifier().isEmpty()) {
676        addIdentifier();
677      }
678      return getIdentifier().get(0);
679    }
680
681    /**
682     * @return {@link #basedOn} (A plan, proposal or order that is fulfilled in whole or in part by this DeviceUsage.)
683     */
684    public List<Reference> getBasedOn() { 
685      if (this.basedOn == null)
686        this.basedOn = new ArrayList<Reference>();
687      return this.basedOn;
688    }
689
690    /**
691     * @return Returns a reference to <code>this</code> for easy method chaining
692     */
693    public DeviceUsage setBasedOn(List<Reference> theBasedOn) { 
694      this.basedOn = theBasedOn;
695      return this;
696    }
697
698    public boolean hasBasedOn() { 
699      if (this.basedOn == null)
700        return false;
701      for (Reference item : this.basedOn)
702        if (!item.isEmpty())
703          return true;
704      return false;
705    }
706
707    public Reference addBasedOn() { //3
708      Reference t = new Reference();
709      if (this.basedOn == null)
710        this.basedOn = new ArrayList<Reference>();
711      this.basedOn.add(t);
712      return t;
713    }
714
715    public DeviceUsage addBasedOn(Reference t) { //3
716      if (t == null)
717        return this;
718      if (this.basedOn == null)
719        this.basedOn = new ArrayList<Reference>();
720      this.basedOn.add(t);
721      return this;
722    }
723
724    /**
725     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
726     */
727    public Reference getBasedOnFirstRep() { 
728      if (getBasedOn().isEmpty()) {
729        addBasedOn();
730      }
731      return getBasedOn().get(0);
732    }
733
734    /**
735     * @return {@link #status} (A code representing the patient or other source's judgment about the state of the device used that this statement is about.  Generally this will be active or completed.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
736     */
737    public Enumeration<DeviceUsageStatus> getStatusElement() { 
738      if (this.status == null)
739        if (Configuration.errorOnAutoCreate())
740          throw new Error("Attempt to auto-create DeviceUsage.status");
741        else if (Configuration.doAutoCreate())
742          this.status = new Enumeration<DeviceUsageStatus>(new DeviceUsageStatusEnumFactory()); // bb
743      return this.status;
744    }
745
746    public boolean hasStatusElement() { 
747      return this.status != null && !this.status.isEmpty();
748    }
749
750    public boolean hasStatus() { 
751      return this.status != null && !this.status.isEmpty();
752    }
753
754    /**
755     * @param value {@link #status} (A code representing the patient or other source's judgment about the state of the device used that this statement is about.  Generally this will be active or completed.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
756     */
757    public DeviceUsage setStatusElement(Enumeration<DeviceUsageStatus> value) { 
758      this.status = value;
759      return this;
760    }
761
762    /**
763     * @return A code representing the patient or other source's judgment about the state of the device used that this statement is about.  Generally this will be active or completed.
764     */
765    public DeviceUsageStatus getStatus() { 
766      return this.status == null ? null : this.status.getValue();
767    }
768
769    /**
770     * @param value A code representing the patient or other source's judgment about the state of the device used that this statement is about.  Generally this will be active or completed.
771     */
772    public DeviceUsage setStatus(DeviceUsageStatus value) { 
773        if (this.status == null)
774          this.status = new Enumeration<DeviceUsageStatus>(new DeviceUsageStatusEnumFactory());
775        this.status.setValue(value);
776      return this;
777    }
778
779    /**
780     * @return {@link #category} (This attribute indicates a category for the statement - The device statement may be made in an inpatient or outpatient settting (inpatient | outpatient | community | patientspecified).)
781     */
782    public List<CodeableConcept> getCategory() { 
783      if (this.category == null)
784        this.category = new ArrayList<CodeableConcept>();
785      return this.category;
786    }
787
788    /**
789     * @return Returns a reference to <code>this</code> for easy method chaining
790     */
791    public DeviceUsage setCategory(List<CodeableConcept> theCategory) { 
792      this.category = theCategory;
793      return this;
794    }
795
796    public boolean hasCategory() { 
797      if (this.category == null)
798        return false;
799      for (CodeableConcept item : this.category)
800        if (!item.isEmpty())
801          return true;
802      return false;
803    }
804
805    public CodeableConcept addCategory() { //3
806      CodeableConcept t = new CodeableConcept();
807      if (this.category == null)
808        this.category = new ArrayList<CodeableConcept>();
809      this.category.add(t);
810      return t;
811    }
812
813    public DeviceUsage addCategory(CodeableConcept t) { //3
814      if (t == null)
815        return this;
816      if (this.category == null)
817        this.category = new ArrayList<CodeableConcept>();
818      this.category.add(t);
819      return this;
820    }
821
822    /**
823     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3}
824     */
825    public CodeableConcept getCategoryFirstRep() { 
826      if (getCategory().isEmpty()) {
827        addCategory();
828      }
829      return getCategory().get(0);
830    }
831
832    /**
833     * @return {@link #patient} (The patient who used the device.)
834     */
835    public Reference getPatient() { 
836      if (this.patient == null)
837        if (Configuration.errorOnAutoCreate())
838          throw new Error("Attempt to auto-create DeviceUsage.patient");
839        else if (Configuration.doAutoCreate())
840          this.patient = new Reference(); // cc
841      return this.patient;
842    }
843
844    public boolean hasPatient() { 
845      return this.patient != null && !this.patient.isEmpty();
846    }
847
848    /**
849     * @param value {@link #patient} (The patient who used the device.)
850     */
851    public DeviceUsage setPatient(Reference value) { 
852      this.patient = value;
853      return this;
854    }
855
856    /**
857     * @return {@link #derivedFrom} (Allows linking the DeviceUsage to the underlying Request, or to other information that supports or is used to derive the DeviceUsage.)
858     */
859    public List<Reference> getDerivedFrom() { 
860      if (this.derivedFrom == null)
861        this.derivedFrom = new ArrayList<Reference>();
862      return this.derivedFrom;
863    }
864
865    /**
866     * @return Returns a reference to <code>this</code> for easy method chaining
867     */
868    public DeviceUsage setDerivedFrom(List<Reference> theDerivedFrom) { 
869      this.derivedFrom = theDerivedFrom;
870      return this;
871    }
872
873    public boolean hasDerivedFrom() { 
874      if (this.derivedFrom == null)
875        return false;
876      for (Reference item : this.derivedFrom)
877        if (!item.isEmpty())
878          return true;
879      return false;
880    }
881
882    public Reference addDerivedFrom() { //3
883      Reference t = new Reference();
884      if (this.derivedFrom == null)
885        this.derivedFrom = new ArrayList<Reference>();
886      this.derivedFrom.add(t);
887      return t;
888    }
889
890    public DeviceUsage addDerivedFrom(Reference t) { //3
891      if (t == null)
892        return this;
893      if (this.derivedFrom == null)
894        this.derivedFrom = new ArrayList<Reference>();
895      this.derivedFrom.add(t);
896      return this;
897    }
898
899    /**
900     * @return The first repetition of repeating field {@link #derivedFrom}, creating it if it does not already exist {3}
901     */
902    public Reference getDerivedFromFirstRep() { 
903      if (getDerivedFrom().isEmpty()) {
904        addDerivedFrom();
905      }
906      return getDerivedFrom().get(0);
907    }
908
909    /**
910     * @return {@link #context} (The encounter or episode of care that establishes the context for this device use statement.)
911     */
912    public Reference getContext() { 
913      if (this.context == null)
914        if (Configuration.errorOnAutoCreate())
915          throw new Error("Attempt to auto-create DeviceUsage.context");
916        else if (Configuration.doAutoCreate())
917          this.context = new Reference(); // cc
918      return this.context;
919    }
920
921    public boolean hasContext() { 
922      return this.context != null && !this.context.isEmpty();
923    }
924
925    /**
926     * @param value {@link #context} (The encounter or episode of care that establishes the context for this device use statement.)
927     */
928    public DeviceUsage setContext(Reference value) { 
929      this.context = value;
930      return this;
931    }
932
933    /**
934     * @return {@link #timing} (How often the device was used.)
935     */
936    public DataType getTiming() { 
937      return this.timing;
938    }
939
940    /**
941     * @return {@link #timing} (How often the device was used.)
942     */
943    public Timing getTimingTiming() throws FHIRException { 
944      if (this.timing == null)
945        this.timing = new Timing();
946      if (!(this.timing instanceof Timing))
947        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.timing.getClass().getName()+" was encountered");
948      return (Timing) this.timing;
949    }
950
951    public boolean hasTimingTiming() { 
952      return this != null && this.timing instanceof Timing;
953    }
954
955    /**
956     * @return {@link #timing} (How often the device was used.)
957     */
958    public Period getTimingPeriod() throws FHIRException { 
959      if (this.timing == null)
960        this.timing = new Period();
961      if (!(this.timing instanceof Period))
962        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.timing.getClass().getName()+" was encountered");
963      return (Period) this.timing;
964    }
965
966    public boolean hasTimingPeriod() { 
967      return this != null && this.timing instanceof Period;
968    }
969
970    /**
971     * @return {@link #timing} (How often the device was used.)
972     */
973    public DateTimeType getTimingDateTimeType() throws FHIRException { 
974      if (this.timing == null)
975        this.timing = new DateTimeType();
976      if (!(this.timing instanceof DateTimeType))
977        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.timing.getClass().getName()+" was encountered");
978      return (DateTimeType) this.timing;
979    }
980
981    public boolean hasTimingDateTimeType() { 
982      return this != null && this.timing instanceof DateTimeType;
983    }
984
985    public boolean hasTiming() { 
986      return this.timing != null && !this.timing.isEmpty();
987    }
988
989    /**
990     * @param value {@link #timing} (How often the device was used.)
991     */
992    public DeviceUsage setTiming(DataType value) { 
993      if (value != null && !(value instanceof Timing || value instanceof Period || value instanceof DateTimeType))
994        throw new FHIRException("Not the right type for DeviceUsage.timing[x]: "+value.fhirType());
995      this.timing = value;
996      return this;
997    }
998
999    /**
1000     * @return {@link #dateAsserted} (The time at which the statement was recorded by informationSource.). This is the underlying object with id, value and extensions. The accessor "getDateAsserted" gives direct access to the value
1001     */
1002    public DateTimeType getDateAssertedElement() { 
1003      if (this.dateAsserted == null)
1004        if (Configuration.errorOnAutoCreate())
1005          throw new Error("Attempt to auto-create DeviceUsage.dateAsserted");
1006        else if (Configuration.doAutoCreate())
1007          this.dateAsserted = new DateTimeType(); // bb
1008      return this.dateAsserted;
1009    }
1010
1011    public boolean hasDateAssertedElement() { 
1012      return this.dateAsserted != null && !this.dateAsserted.isEmpty();
1013    }
1014
1015    public boolean hasDateAsserted() { 
1016      return this.dateAsserted != null && !this.dateAsserted.isEmpty();
1017    }
1018
1019    /**
1020     * @param value {@link #dateAsserted} (The time at which the statement was recorded by informationSource.). This is the underlying object with id, value and extensions. The accessor "getDateAsserted" gives direct access to the value
1021     */
1022    public DeviceUsage setDateAssertedElement(DateTimeType value) { 
1023      this.dateAsserted = value;
1024      return this;
1025    }
1026
1027    /**
1028     * @return The time at which the statement was recorded by informationSource.
1029     */
1030    public Date getDateAsserted() { 
1031      return this.dateAsserted == null ? null : this.dateAsserted.getValue();
1032    }
1033
1034    /**
1035     * @param value The time at which the statement was recorded by informationSource.
1036     */
1037    public DeviceUsage setDateAsserted(Date value) { 
1038      if (value == null)
1039        this.dateAsserted = null;
1040      else {
1041        if (this.dateAsserted == null)
1042          this.dateAsserted = new DateTimeType();
1043        this.dateAsserted.setValue(value);
1044      }
1045      return this;
1046    }
1047
1048    /**
1049     * @return {@link #usageStatus} (The status of the device usage, for example always, sometimes, never. This is not the same as the status of the statement.)
1050     */
1051    public CodeableConcept getUsageStatus() { 
1052      if (this.usageStatus == null)
1053        if (Configuration.errorOnAutoCreate())
1054          throw new Error("Attempt to auto-create DeviceUsage.usageStatus");
1055        else if (Configuration.doAutoCreate())
1056          this.usageStatus = new CodeableConcept(); // cc
1057      return this.usageStatus;
1058    }
1059
1060    public boolean hasUsageStatus() { 
1061      return this.usageStatus != null && !this.usageStatus.isEmpty();
1062    }
1063
1064    /**
1065     * @param value {@link #usageStatus} (The status of the device usage, for example always, sometimes, never. This is not the same as the status of the statement.)
1066     */
1067    public DeviceUsage setUsageStatus(CodeableConcept value) { 
1068      this.usageStatus = value;
1069      return this;
1070    }
1071
1072    /**
1073     * @return {@link #usageReason} (The reason for asserting the usage status - for example forgot, lost, stolen, broken.)
1074     */
1075    public List<CodeableConcept> getUsageReason() { 
1076      if (this.usageReason == null)
1077        this.usageReason = new ArrayList<CodeableConcept>();
1078      return this.usageReason;
1079    }
1080
1081    /**
1082     * @return Returns a reference to <code>this</code> for easy method chaining
1083     */
1084    public DeviceUsage setUsageReason(List<CodeableConcept> theUsageReason) { 
1085      this.usageReason = theUsageReason;
1086      return this;
1087    }
1088
1089    public boolean hasUsageReason() { 
1090      if (this.usageReason == null)
1091        return false;
1092      for (CodeableConcept item : this.usageReason)
1093        if (!item.isEmpty())
1094          return true;
1095      return false;
1096    }
1097
1098    public CodeableConcept addUsageReason() { //3
1099      CodeableConcept t = new CodeableConcept();
1100      if (this.usageReason == null)
1101        this.usageReason = new ArrayList<CodeableConcept>();
1102      this.usageReason.add(t);
1103      return t;
1104    }
1105
1106    public DeviceUsage addUsageReason(CodeableConcept t) { //3
1107      if (t == null)
1108        return this;
1109      if (this.usageReason == null)
1110        this.usageReason = new ArrayList<CodeableConcept>();
1111      this.usageReason.add(t);
1112      return this;
1113    }
1114
1115    /**
1116     * @return The first repetition of repeating field {@link #usageReason}, creating it if it does not already exist {3}
1117     */
1118    public CodeableConcept getUsageReasonFirstRep() { 
1119      if (getUsageReason().isEmpty()) {
1120        addUsageReason();
1121      }
1122      return getUsageReason().get(0);
1123    }
1124
1125    /**
1126     * @return {@link #adherence} (This indicates how or if the device is being used.)
1127     */
1128    public DeviceUsageAdherenceComponent getAdherence() { 
1129      if (this.adherence == null)
1130        if (Configuration.errorOnAutoCreate())
1131          throw new Error("Attempt to auto-create DeviceUsage.adherence");
1132        else if (Configuration.doAutoCreate())
1133          this.adherence = new DeviceUsageAdherenceComponent(); // cc
1134      return this.adherence;
1135    }
1136
1137    public boolean hasAdherence() { 
1138      return this.adherence != null && !this.adherence.isEmpty();
1139    }
1140
1141    /**
1142     * @param value {@link #adherence} (This indicates how or if the device is being used.)
1143     */
1144    public DeviceUsage setAdherence(DeviceUsageAdherenceComponent value) { 
1145      this.adherence = value;
1146      return this;
1147    }
1148
1149    /**
1150     * @return {@link #informationSource} (Who reported the device was being used by the patient.)
1151     */
1152    public Reference getInformationSource() { 
1153      if (this.informationSource == null)
1154        if (Configuration.errorOnAutoCreate())
1155          throw new Error("Attempt to auto-create DeviceUsage.informationSource");
1156        else if (Configuration.doAutoCreate())
1157          this.informationSource = new Reference(); // cc
1158      return this.informationSource;
1159    }
1160
1161    public boolean hasInformationSource() { 
1162      return this.informationSource != null && !this.informationSource.isEmpty();
1163    }
1164
1165    /**
1166     * @param value {@link #informationSource} (Who reported the device was being used by the patient.)
1167     */
1168    public DeviceUsage setInformationSource(Reference value) { 
1169      this.informationSource = value;
1170      return this;
1171    }
1172
1173    /**
1174     * @return {@link #device} (Code or Reference to device used.)
1175     */
1176    public CodeableReference getDevice() { 
1177      if (this.device == null)
1178        if (Configuration.errorOnAutoCreate())
1179          throw new Error("Attempt to auto-create DeviceUsage.device");
1180        else if (Configuration.doAutoCreate())
1181          this.device = new CodeableReference(); // cc
1182      return this.device;
1183    }
1184
1185    public boolean hasDevice() { 
1186      return this.device != null && !this.device.isEmpty();
1187    }
1188
1189    /**
1190     * @param value {@link #device} (Code or Reference to device used.)
1191     */
1192    public DeviceUsage setDevice(CodeableReference value) { 
1193      this.device = value;
1194      return this;
1195    }
1196
1197    /**
1198     * @return {@link #reason} (Reason or justification for the use of the device. A coded concept, or another resource whose existence justifies this DeviceUsage.)
1199     */
1200    public List<CodeableReference> getReason() { 
1201      if (this.reason == null)
1202        this.reason = new ArrayList<CodeableReference>();
1203      return this.reason;
1204    }
1205
1206    /**
1207     * @return Returns a reference to <code>this</code> for easy method chaining
1208     */
1209    public DeviceUsage setReason(List<CodeableReference> theReason) { 
1210      this.reason = theReason;
1211      return this;
1212    }
1213
1214    public boolean hasReason() { 
1215      if (this.reason == null)
1216        return false;
1217      for (CodeableReference item : this.reason)
1218        if (!item.isEmpty())
1219          return true;
1220      return false;
1221    }
1222
1223    public CodeableReference addReason() { //3
1224      CodeableReference t = new CodeableReference();
1225      if (this.reason == null)
1226        this.reason = new ArrayList<CodeableReference>();
1227      this.reason.add(t);
1228      return t;
1229    }
1230
1231    public DeviceUsage addReason(CodeableReference t) { //3
1232      if (t == null)
1233        return this;
1234      if (this.reason == null)
1235        this.reason = new ArrayList<CodeableReference>();
1236      this.reason.add(t);
1237      return this;
1238    }
1239
1240    /**
1241     * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3}
1242     */
1243    public CodeableReference getReasonFirstRep() { 
1244      if (getReason().isEmpty()) {
1245        addReason();
1246      }
1247      return getReason().get(0);
1248    }
1249
1250    /**
1251     * @return {@link #bodySite} (Indicates the anotomic location on the subject's body where the device was used ( i.e. the target).)
1252     */
1253    public CodeableReference getBodySite() { 
1254      if (this.bodySite == null)
1255        if (Configuration.errorOnAutoCreate())
1256          throw new Error("Attempt to auto-create DeviceUsage.bodySite");
1257        else if (Configuration.doAutoCreate())
1258          this.bodySite = new CodeableReference(); // cc
1259      return this.bodySite;
1260    }
1261
1262    public boolean hasBodySite() { 
1263      return this.bodySite != null && !this.bodySite.isEmpty();
1264    }
1265
1266    /**
1267     * @param value {@link #bodySite} (Indicates the anotomic location on the subject's body where the device was used ( i.e. the target).)
1268     */
1269    public DeviceUsage setBodySite(CodeableReference value) { 
1270      this.bodySite = value;
1271      return this;
1272    }
1273
1274    /**
1275     * @return {@link #note} (Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.)
1276     */
1277    public List<Annotation> getNote() { 
1278      if (this.note == null)
1279        this.note = new ArrayList<Annotation>();
1280      return this.note;
1281    }
1282
1283    /**
1284     * @return Returns a reference to <code>this</code> for easy method chaining
1285     */
1286    public DeviceUsage setNote(List<Annotation> theNote) { 
1287      this.note = theNote;
1288      return this;
1289    }
1290
1291    public boolean hasNote() { 
1292      if (this.note == null)
1293        return false;
1294      for (Annotation item : this.note)
1295        if (!item.isEmpty())
1296          return true;
1297      return false;
1298    }
1299
1300    public Annotation addNote() { //3
1301      Annotation t = new Annotation();
1302      if (this.note == null)
1303        this.note = new ArrayList<Annotation>();
1304      this.note.add(t);
1305      return t;
1306    }
1307
1308    public DeviceUsage addNote(Annotation t) { //3
1309      if (t == null)
1310        return this;
1311      if (this.note == null)
1312        this.note = new ArrayList<Annotation>();
1313      this.note.add(t);
1314      return this;
1315    }
1316
1317    /**
1318     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1319     */
1320    public Annotation getNoteFirstRep() { 
1321      if (getNote().isEmpty()) {
1322        addNote();
1323      }
1324      return getNote().get(0);
1325    }
1326
1327      protected void listChildren(List<Property> children) {
1328        super.listChildren(children);
1329        children.add(new Property("identifier", "Identifier", "An external identifier for this statement such as an IRI.", 0, java.lang.Integer.MAX_VALUE, identifier));
1330        children.add(new Property("basedOn", "Reference(ServiceRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this DeviceUsage.", 0, java.lang.Integer.MAX_VALUE, basedOn));
1331        children.add(new Property("status", "code", "A code representing the patient or other source's judgment about the state of the device used that this statement is about.  Generally this will be active or completed.", 0, 1, status));
1332        children.add(new Property("category", "CodeableConcept", "This attribute indicates a category for the statement - The device statement may be made in an inpatient or outpatient settting (inpatient | outpatient | community | patientspecified).", 0, java.lang.Integer.MAX_VALUE, category));
1333        children.add(new Property("patient", "Reference(Patient)", "The patient who used the device.", 0, 1, patient));
1334        children.add(new Property("derivedFrom", "Reference(ServiceRequest|Procedure|Claim|Observation|QuestionnaireResponse|DocumentReference)", "Allows linking the DeviceUsage to the underlying Request, or to other information that supports or is used to derive the DeviceUsage.", 0, java.lang.Integer.MAX_VALUE, derivedFrom));
1335        children.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter or episode of care that establishes the context for this device use statement.", 0, 1, context));
1336        children.add(new Property("timing[x]", "Timing|Period|dateTime", "How often the device was used.", 0, 1, timing));
1337        children.add(new Property("dateAsserted", "dateTime", "The time at which the statement was recorded by informationSource.", 0, 1, dateAsserted));
1338        children.add(new Property("usageStatus", "CodeableConcept", "The status of the device usage, for example always, sometimes, never. This is not the same as the status of the statement.", 0, 1, usageStatus));
1339        children.add(new Property("usageReason", "CodeableConcept", "The reason for asserting the usage status - for example forgot, lost, stolen, broken.", 0, java.lang.Integer.MAX_VALUE, usageReason));
1340        children.add(new Property("adherence", "", "This indicates how or if the device is being used.", 0, 1, adherence));
1341        children.add(new Property("informationSource", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Organization)", "Who reported the device was being used by the patient.", 0, 1, informationSource));
1342        children.add(new Property("device", "CodeableReference(Device|DeviceDefinition)", "Code or Reference to device used.", 0, 1, device));
1343        children.add(new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport|DocumentReference|Procedure)", "Reason or justification for the use of the device. A coded concept, or another resource whose existence justifies this DeviceUsage.", 0, java.lang.Integer.MAX_VALUE, reason));
1344        children.add(new Property("bodySite", "CodeableReference(BodyStructure)", "Indicates the anotomic location on the subject's body where the device was used ( i.e. the target).", 0, 1, bodySite));
1345        children.add(new Property("note", "Annotation", "Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.", 0, java.lang.Integer.MAX_VALUE, note));
1346      }
1347
1348      @Override
1349      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1350        switch (_hash) {
1351        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "An external identifier for this statement such as an IRI.", 0, java.lang.Integer.MAX_VALUE, identifier);
1352        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(ServiceRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this DeviceUsage.", 0, java.lang.Integer.MAX_VALUE, basedOn);
1353        case -892481550: /*status*/  return new Property("status", "code", "A code representing the patient or other source's judgment about the state of the device used that this statement is about.  Generally this will be active or completed.", 0, 1, status);
1354        case 50511102: /*category*/  return new Property("category", "CodeableConcept", "This attribute indicates a category for the statement - The device statement may be made in an inpatient or outpatient settting (inpatient | outpatient | community | patientspecified).", 0, java.lang.Integer.MAX_VALUE, category);
1355        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "The patient who used the device.", 0, 1, patient);
1356        case 1077922663: /*derivedFrom*/  return new Property("derivedFrom", "Reference(ServiceRequest|Procedure|Claim|Observation|QuestionnaireResponse|DocumentReference)", "Allows linking the DeviceUsage to the underlying Request, or to other information that supports or is used to derive the DeviceUsage.", 0, java.lang.Integer.MAX_VALUE, derivedFrom);
1357        case 951530927: /*context*/  return new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter or episode of care that establishes the context for this device use statement.", 0, 1, context);
1358        case 164632566: /*timing[x]*/  return new Property("timing[x]", "Timing|Period|dateTime", "How often the device was used.", 0, 1, timing);
1359        case -873664438: /*timing*/  return new Property("timing[x]", "Timing|Period|dateTime", "How often the device was used.", 0, 1, timing);
1360        case -497554124: /*timingTiming*/  return new Property("timing[x]", "Timing", "How often the device was used.", 0, 1, timing);
1361        case -615615829: /*timingPeriod*/  return new Property("timing[x]", "Period", "How often the device was used.", 0, 1, timing);
1362        case -1837458939: /*timingDateTime*/  return new Property("timing[x]", "dateTime", "How often the device was used.", 0, 1, timing);
1363        case -1980855245: /*dateAsserted*/  return new Property("dateAsserted", "dateTime", "The time at which the statement was recorded by informationSource.", 0, 1, dateAsserted);
1364        case 907197683: /*usageStatus*/  return new Property("usageStatus", "CodeableConcept", "The status of the device usage, for example always, sometimes, never. This is not the same as the status of the statement.", 0, 1, usageStatus);
1365        case 864714565: /*usageReason*/  return new Property("usageReason", "CodeableConcept", "The reason for asserting the usage status - for example forgot, lost, stolen, broken.", 0, java.lang.Integer.MAX_VALUE, usageReason);
1366        case -231003683: /*adherence*/  return new Property("adherence", "", "This indicates how or if the device is being used.", 0, 1, adherence);
1367        case -2123220889: /*informationSource*/  return new Property("informationSource", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Organization)", "Who reported the device was being used by the patient.", 0, 1, informationSource);
1368        case -1335157162: /*device*/  return new Property("device", "CodeableReference(Device|DeviceDefinition)", "Code or Reference to device used.", 0, 1, device);
1369        case -934964668: /*reason*/  return new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport|DocumentReference|Procedure)", "Reason or justification for the use of the device. A coded concept, or another resource whose existence justifies this DeviceUsage.", 0, java.lang.Integer.MAX_VALUE, reason);
1370        case 1702620169: /*bodySite*/  return new Property("bodySite", "CodeableReference(BodyStructure)", "Indicates the anotomic location on the subject's body where the device was used ( i.e. the target).", 0, 1, bodySite);
1371        case 3387378: /*note*/  return new Property("note", "Annotation", "Details about the device statement that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.", 0, java.lang.Integer.MAX_VALUE, note);
1372        default: return super.getNamedProperty(_hash, _name, _checkValid);
1373        }
1374
1375      }
1376
1377      @Override
1378      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1379        switch (hash) {
1380        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1381        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
1382        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DeviceUsageStatus>
1383        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
1384        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
1385        case 1077922663: /*derivedFrom*/ return this.derivedFrom == null ? new Base[0] : this.derivedFrom.toArray(new Base[this.derivedFrom.size()]); // Reference
1386        case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // Reference
1387        case -873664438: /*timing*/ return this.timing == null ? new Base[0] : new Base[] {this.timing}; // DataType
1388        case -1980855245: /*dateAsserted*/ return this.dateAsserted == null ? new Base[0] : new Base[] {this.dateAsserted}; // DateTimeType
1389        case 907197683: /*usageStatus*/ return this.usageStatus == null ? new Base[0] : new Base[] {this.usageStatus}; // CodeableConcept
1390        case 864714565: /*usageReason*/ return this.usageReason == null ? new Base[0] : this.usageReason.toArray(new Base[this.usageReason.size()]); // CodeableConcept
1391        case -231003683: /*adherence*/ return this.adherence == null ? new Base[0] : new Base[] {this.adherence}; // DeviceUsageAdherenceComponent
1392        case -2123220889: /*informationSource*/ return this.informationSource == null ? new Base[0] : new Base[] {this.informationSource}; // Reference
1393        case -1335157162: /*device*/ return this.device == null ? new Base[0] : new Base[] {this.device}; // CodeableReference
1394        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference
1395        case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : new Base[] {this.bodySite}; // CodeableReference
1396        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1397        default: return super.getProperty(hash, name, checkValid);
1398        }
1399
1400      }
1401
1402      @Override
1403      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1404        switch (hash) {
1405        case -1618432855: // identifier
1406          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1407          return value;
1408        case -332612366: // basedOn
1409          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
1410          return value;
1411        case -892481550: // status
1412          value = new DeviceUsageStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1413          this.status = (Enumeration) value; // Enumeration<DeviceUsageStatus>
1414          return value;
1415        case 50511102: // category
1416          this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1417          return value;
1418        case -791418107: // patient
1419          this.patient = TypeConvertor.castToReference(value); // Reference
1420          return value;
1421        case 1077922663: // derivedFrom
1422          this.getDerivedFrom().add(TypeConvertor.castToReference(value)); // Reference
1423          return value;
1424        case 951530927: // context
1425          this.context = TypeConvertor.castToReference(value); // Reference
1426          return value;
1427        case -873664438: // timing
1428          this.timing = TypeConvertor.castToType(value); // DataType
1429          return value;
1430        case -1980855245: // dateAsserted
1431          this.dateAsserted = TypeConvertor.castToDateTime(value); // DateTimeType
1432          return value;
1433        case 907197683: // usageStatus
1434          this.usageStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1435          return value;
1436        case 864714565: // usageReason
1437          this.getUsageReason().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1438          return value;
1439        case -231003683: // adherence
1440          this.adherence = (DeviceUsageAdherenceComponent) value; // DeviceUsageAdherenceComponent
1441          return value;
1442        case -2123220889: // informationSource
1443          this.informationSource = TypeConvertor.castToReference(value); // Reference
1444          return value;
1445        case -1335157162: // device
1446          this.device = TypeConvertor.castToCodeableReference(value); // CodeableReference
1447          return value;
1448        case -934964668: // reason
1449          this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
1450          return value;
1451        case 1702620169: // bodySite
1452          this.bodySite = TypeConvertor.castToCodeableReference(value); // CodeableReference
1453          return value;
1454        case 3387378: // note
1455          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1456          return value;
1457        default: return super.setProperty(hash, name, value);
1458        }
1459
1460      }
1461
1462      @Override
1463      public Base setProperty(String name, Base value) throws FHIRException {
1464        if (name.equals("identifier")) {
1465          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1466        } else if (name.equals("basedOn")) {
1467          this.getBasedOn().add(TypeConvertor.castToReference(value));
1468        } else if (name.equals("status")) {
1469          value = new DeviceUsageStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1470          this.status = (Enumeration) value; // Enumeration<DeviceUsageStatus>
1471        } else if (name.equals("category")) {
1472          this.getCategory().add(TypeConvertor.castToCodeableConcept(value));
1473        } else if (name.equals("patient")) {
1474          this.patient = TypeConvertor.castToReference(value); // Reference
1475        } else if (name.equals("derivedFrom")) {
1476          this.getDerivedFrom().add(TypeConvertor.castToReference(value));
1477        } else if (name.equals("context")) {
1478          this.context = TypeConvertor.castToReference(value); // Reference
1479        } else if (name.equals("timing[x]")) {
1480          this.timing = TypeConvertor.castToType(value); // DataType
1481        } else if (name.equals("dateAsserted")) {
1482          this.dateAsserted = TypeConvertor.castToDateTime(value); // DateTimeType
1483        } else if (name.equals("usageStatus")) {
1484          this.usageStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1485        } else if (name.equals("usageReason")) {
1486          this.getUsageReason().add(TypeConvertor.castToCodeableConcept(value));
1487        } else if (name.equals("adherence")) {
1488          this.adherence = (DeviceUsageAdherenceComponent) value; // DeviceUsageAdherenceComponent
1489        } else if (name.equals("informationSource")) {
1490          this.informationSource = TypeConvertor.castToReference(value); // Reference
1491        } else if (name.equals("device")) {
1492          this.device = TypeConvertor.castToCodeableReference(value); // CodeableReference
1493        } else if (name.equals("reason")) {
1494          this.getReason().add(TypeConvertor.castToCodeableReference(value));
1495        } else if (name.equals("bodySite")) {
1496          this.bodySite = TypeConvertor.castToCodeableReference(value); // CodeableReference
1497        } else if (name.equals("note")) {
1498          this.getNote().add(TypeConvertor.castToAnnotation(value));
1499        } else
1500          return super.setProperty(name, value);
1501        return value;
1502      }
1503
1504  @Override
1505  public void removeChild(String name, Base value) throws FHIRException {
1506        if (name.equals("identifier")) {
1507          this.getIdentifier().remove(value);
1508        } else if (name.equals("basedOn")) {
1509          this.getBasedOn().remove(value);
1510        } else if (name.equals("status")) {
1511          value = new DeviceUsageStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1512          this.status = (Enumeration) value; // Enumeration<DeviceUsageStatus>
1513        } else if (name.equals("category")) {
1514          this.getCategory().remove(value);
1515        } else if (name.equals("patient")) {
1516          this.patient = null;
1517        } else if (name.equals("derivedFrom")) {
1518          this.getDerivedFrom().remove(value);
1519        } else if (name.equals("context")) {
1520          this.context = null;
1521        } else if (name.equals("timing[x]")) {
1522          this.timing = null;
1523        } else if (name.equals("dateAsserted")) {
1524          this.dateAsserted = null;
1525        } else if (name.equals("usageStatus")) {
1526          this.usageStatus = null;
1527        } else if (name.equals("usageReason")) {
1528          this.getUsageReason().remove(value);
1529        } else if (name.equals("adherence")) {
1530          this.adherence = (DeviceUsageAdherenceComponent) value; // DeviceUsageAdherenceComponent
1531        } else if (name.equals("informationSource")) {
1532          this.informationSource = null;
1533        } else if (name.equals("device")) {
1534          this.device = null;
1535        } else if (name.equals("reason")) {
1536          this.getReason().remove(value);
1537        } else if (name.equals("bodySite")) {
1538          this.bodySite = null;
1539        } else if (name.equals("note")) {
1540          this.getNote().remove(value);
1541        } else
1542          super.removeChild(name, value);
1543        
1544      }
1545
1546      @Override
1547      public Base makeProperty(int hash, String name) throws FHIRException {
1548        switch (hash) {
1549        case -1618432855:  return addIdentifier(); 
1550        case -332612366:  return addBasedOn(); 
1551        case -892481550:  return getStatusElement();
1552        case 50511102:  return addCategory(); 
1553        case -791418107:  return getPatient();
1554        case 1077922663:  return addDerivedFrom(); 
1555        case 951530927:  return getContext();
1556        case 164632566:  return getTiming();
1557        case -873664438:  return getTiming();
1558        case -1980855245:  return getDateAssertedElement();
1559        case 907197683:  return getUsageStatus();
1560        case 864714565:  return addUsageReason(); 
1561        case -231003683:  return getAdherence();
1562        case -2123220889:  return getInformationSource();
1563        case -1335157162:  return getDevice();
1564        case -934964668:  return addReason(); 
1565        case 1702620169:  return getBodySite();
1566        case 3387378:  return addNote(); 
1567        default: return super.makeProperty(hash, name);
1568        }
1569
1570      }
1571
1572      @Override
1573      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1574        switch (hash) {
1575        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1576        case -332612366: /*basedOn*/ return new String[] {"Reference"};
1577        case -892481550: /*status*/ return new String[] {"code"};
1578        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
1579        case -791418107: /*patient*/ return new String[] {"Reference"};
1580        case 1077922663: /*derivedFrom*/ return new String[] {"Reference"};
1581        case 951530927: /*context*/ return new String[] {"Reference"};
1582        case -873664438: /*timing*/ return new String[] {"Timing", "Period", "dateTime"};
1583        case -1980855245: /*dateAsserted*/ return new String[] {"dateTime"};
1584        case 907197683: /*usageStatus*/ return new String[] {"CodeableConcept"};
1585        case 864714565: /*usageReason*/ return new String[] {"CodeableConcept"};
1586        case -231003683: /*adherence*/ return new String[] {};
1587        case -2123220889: /*informationSource*/ return new String[] {"Reference"};
1588        case -1335157162: /*device*/ return new String[] {"CodeableReference"};
1589        case -934964668: /*reason*/ return new String[] {"CodeableReference"};
1590        case 1702620169: /*bodySite*/ return new String[] {"CodeableReference"};
1591        case 3387378: /*note*/ return new String[] {"Annotation"};
1592        default: return super.getTypesForProperty(hash, name);
1593        }
1594
1595      }
1596
1597      @Override
1598      public Base addChild(String name) throws FHIRException {
1599        if (name.equals("identifier")) {
1600          return addIdentifier();
1601        }
1602        else if (name.equals("basedOn")) {
1603          return addBasedOn();
1604        }
1605        else if (name.equals("status")) {
1606          throw new FHIRException("Cannot call addChild on a singleton property DeviceUsage.status");
1607        }
1608        else if (name.equals("category")) {
1609          return addCategory();
1610        }
1611        else if (name.equals("patient")) {
1612          this.patient = new Reference();
1613          return this.patient;
1614        }
1615        else if (name.equals("derivedFrom")) {
1616          return addDerivedFrom();
1617        }
1618        else if (name.equals("context")) {
1619          this.context = new Reference();
1620          return this.context;
1621        }
1622        else if (name.equals("timingTiming")) {
1623          this.timing = new Timing();
1624          return this.timing;
1625        }
1626        else if (name.equals("timingPeriod")) {
1627          this.timing = new Period();
1628          return this.timing;
1629        }
1630        else if (name.equals("timingDateTime")) {
1631          this.timing = new DateTimeType();
1632          return this.timing;
1633        }
1634        else if (name.equals("dateAsserted")) {
1635          throw new FHIRException("Cannot call addChild on a singleton property DeviceUsage.dateAsserted");
1636        }
1637        else if (name.equals("usageStatus")) {
1638          this.usageStatus = new CodeableConcept();
1639          return this.usageStatus;
1640        }
1641        else if (name.equals("usageReason")) {
1642          return addUsageReason();
1643        }
1644        else if (name.equals("adherence")) {
1645          this.adherence = new DeviceUsageAdherenceComponent();
1646          return this.adherence;
1647        }
1648        else if (name.equals("informationSource")) {
1649          this.informationSource = new Reference();
1650          return this.informationSource;
1651        }
1652        else if (name.equals("device")) {
1653          this.device = new CodeableReference();
1654          return this.device;
1655        }
1656        else if (name.equals("reason")) {
1657          return addReason();
1658        }
1659        else if (name.equals("bodySite")) {
1660          this.bodySite = new CodeableReference();
1661          return this.bodySite;
1662        }
1663        else if (name.equals("note")) {
1664          return addNote();
1665        }
1666        else
1667          return super.addChild(name);
1668      }
1669
1670  public String fhirType() {
1671    return "DeviceUsage";
1672
1673  }
1674
1675      public DeviceUsage copy() {
1676        DeviceUsage dst = new DeviceUsage();
1677        copyValues(dst);
1678        return dst;
1679      }
1680
1681      public void copyValues(DeviceUsage dst) {
1682        super.copyValues(dst);
1683        if (identifier != null) {
1684          dst.identifier = new ArrayList<Identifier>();
1685          for (Identifier i : identifier)
1686            dst.identifier.add(i.copy());
1687        };
1688        if (basedOn != null) {
1689          dst.basedOn = new ArrayList<Reference>();
1690          for (Reference i : basedOn)
1691            dst.basedOn.add(i.copy());
1692        };
1693        dst.status = status == null ? null : status.copy();
1694        if (category != null) {
1695          dst.category = new ArrayList<CodeableConcept>();
1696          for (CodeableConcept i : category)
1697            dst.category.add(i.copy());
1698        };
1699        dst.patient = patient == null ? null : patient.copy();
1700        if (derivedFrom != null) {
1701          dst.derivedFrom = new ArrayList<Reference>();
1702          for (Reference i : derivedFrom)
1703            dst.derivedFrom.add(i.copy());
1704        };
1705        dst.context = context == null ? null : context.copy();
1706        dst.timing = timing == null ? null : timing.copy();
1707        dst.dateAsserted = dateAsserted == null ? null : dateAsserted.copy();
1708        dst.usageStatus = usageStatus == null ? null : usageStatus.copy();
1709        if (usageReason != null) {
1710          dst.usageReason = new ArrayList<CodeableConcept>();
1711          for (CodeableConcept i : usageReason)
1712            dst.usageReason.add(i.copy());
1713        };
1714        dst.adherence = adherence == null ? null : adherence.copy();
1715        dst.informationSource = informationSource == null ? null : informationSource.copy();
1716        dst.device = device == null ? null : device.copy();
1717        if (reason != null) {
1718          dst.reason = new ArrayList<CodeableReference>();
1719          for (CodeableReference i : reason)
1720            dst.reason.add(i.copy());
1721        };
1722        dst.bodySite = bodySite == null ? null : bodySite.copy();
1723        if (note != null) {
1724          dst.note = new ArrayList<Annotation>();
1725          for (Annotation i : note)
1726            dst.note.add(i.copy());
1727        };
1728      }
1729
1730      protected DeviceUsage typedCopy() {
1731        return copy();
1732      }
1733
1734      @Override
1735      public boolean equalsDeep(Base other_) {
1736        if (!super.equalsDeep(other_))
1737          return false;
1738        if (!(other_ instanceof DeviceUsage))
1739          return false;
1740        DeviceUsage o = (DeviceUsage) other_;
1741        return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(status, o.status, true)
1742           && compareDeep(category, o.category, true) && compareDeep(patient, o.patient, true) && compareDeep(derivedFrom, o.derivedFrom, true)
1743           && compareDeep(context, o.context, true) && compareDeep(timing, o.timing, true) && compareDeep(dateAsserted, o.dateAsserted, true)
1744           && compareDeep(usageStatus, o.usageStatus, true) && compareDeep(usageReason, o.usageReason, true)
1745           && compareDeep(adherence, o.adherence, true) && compareDeep(informationSource, o.informationSource, true)
1746           && compareDeep(device, o.device, true) && compareDeep(reason, o.reason, true) && compareDeep(bodySite, o.bodySite, true)
1747           && compareDeep(note, o.note, true);
1748      }
1749
1750      @Override
1751      public boolean equalsShallow(Base other_) {
1752        if (!super.equalsShallow(other_))
1753          return false;
1754        if (!(other_ instanceof DeviceUsage))
1755          return false;
1756        DeviceUsage o = (DeviceUsage) other_;
1757        return compareValues(status, o.status, true) && compareValues(dateAsserted, o.dateAsserted, true);
1758      }
1759
1760      public boolean isEmpty() {
1761        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, status
1762          , category, patient, derivedFrom, context, timing, dateAsserted, usageStatus, usageReason
1763          , adherence, informationSource, device, reason, bodySite, note);
1764      }
1765
1766  @Override
1767  public ResourceType getResourceType() {
1768    return ResourceType.DeviceUsage;
1769   }
1770
1771 /**
1772   * Search parameter: <b>device</b>
1773   * <p>
1774   * Description: <b>Search by device</b><br>
1775   * Type: <b>token</b><br>
1776   * Path: <b>DeviceUsage.device.concept</b><br>
1777   * </p>
1778   */
1779  @SearchParamDefinition(name="device", path="DeviceUsage.device.concept", description="Search by device", type="token" )
1780  public static final String SP_DEVICE = "device";
1781 /**
1782   * <b>Fluent Client</b> search parameter constant for <b>device</b>
1783   * <p>
1784   * Description: <b>Search by device</b><br>
1785   * Type: <b>token</b><br>
1786   * Path: <b>DeviceUsage.device.concept</b><br>
1787   * </p>
1788   */
1789  public static final ca.uhn.fhir.rest.gclient.TokenClientParam DEVICE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DEVICE);
1790
1791 /**
1792   * Search parameter: <b>status</b>
1793   * <p>
1794   * Description: <b>The status of the device usage</b><br>
1795   * Type: <b>token</b><br>
1796   * Path: <b>DeviceUsage.status</b><br>
1797   * </p>
1798   */
1799  @SearchParamDefinition(name="status", path="DeviceUsage.status", description="The status of the device usage", type="token" )
1800  public static final String SP_STATUS = "status";
1801 /**
1802   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1803   * <p>
1804   * Description: <b>The status of the device usage</b><br>
1805   * Type: <b>token</b><br>
1806   * Path: <b>DeviceUsage.status</b><br>
1807   * </p>
1808   */
1809  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1810
1811 /**
1812   * Search parameter: <b>identifier</b>
1813   * <p>
1814   * Description: <b>Multiple Resources: 
1815
1816* [Account](account.html): Account number
1817* [AdverseEvent](adverseevent.html): Business identifier for the event
1818* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1819* [Appointment](appointment.html): An Identifier of the Appointment
1820* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
1821* [Basic](basic.html): Business identifier
1822* [BodyStructure](bodystructure.html): Bodystructure identifier
1823* [CarePlan](careplan.html): External Ids for this plan
1824* [CareTeam](careteam.html): External Ids for this team
1825* [ChargeItem](chargeitem.html): Business Identifier for item
1826* [Claim](claim.html): The primary identifier of the financial resource
1827* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
1828* [ClinicalImpression](clinicalimpression.html): Business identifier
1829* [Communication](communication.html): Unique identifier
1830* [CommunicationRequest](communicationrequest.html): Unique identifier
1831* [Composition](composition.html): Version-independent identifier for the Composition
1832* [Condition](condition.html): A unique identifier of the condition record
1833* [Consent](consent.html): Identifier for this record (external references)
1834* [Contract](contract.html): The identity of the contract
1835* [Coverage](coverage.html): The primary identifier of the insured and the coverage
1836* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
1837* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
1838* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1839* [DeviceRequest](devicerequest.html): Business identifier for request/order
1840* [DeviceUsage](deviceusage.html): Search by identifier
1841* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1842* [DocumentReference](documentreference.html): Identifier of the attachment binary
1843* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1844* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
1845* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1846* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
1847* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1848* [Flag](flag.html): Business identifier
1849* [Goal](goal.html): External Ids for this goal
1850* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
1851* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
1852* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
1853* [Immunization](immunization.html): Business identifier
1854* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
1855* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
1856* [Invoice](invoice.html): Business Identifier for item
1857* [List](list.html): Business identifier
1858* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
1859* [Medication](medication.html): Returns medications with this external identifier
1860* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1861* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1862* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1863* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
1864* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
1865* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
1866* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
1867* [Observation](observation.html): The unique id for a particular observation
1868* [Person](person.html): A person Identifier
1869* [Procedure](procedure.html): A unique identifier for a procedure
1870* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
1871* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
1872* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
1873* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
1874* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1875* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1876* [Specimen](specimen.html): The unique identifier associated with the specimen
1877* [SupplyDelivery](supplydelivery.html): External identifier
1878* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1879* [Task](task.html): Search for a task instance by its business identifier
1880* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1881</b><br>
1882   * Type: <b>token</b><br>
1883   * 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>
1884   * </p>
1885   */
1886  @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" )
1887  public static final String SP_IDENTIFIER = "identifier";
1888 /**
1889   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1890   * <p>
1891   * Description: <b>Multiple Resources: 
1892
1893* [Account](account.html): Account number
1894* [AdverseEvent](adverseevent.html): Business identifier for the event
1895* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1896* [Appointment](appointment.html): An Identifier of the Appointment
1897* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
1898* [Basic](basic.html): Business identifier
1899* [BodyStructure](bodystructure.html): Bodystructure identifier
1900* [CarePlan](careplan.html): External Ids for this plan
1901* [CareTeam](careteam.html): External Ids for this team
1902* [ChargeItem](chargeitem.html): Business Identifier for item
1903* [Claim](claim.html): The primary identifier of the financial resource
1904* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
1905* [ClinicalImpression](clinicalimpression.html): Business identifier
1906* [Communication](communication.html): Unique identifier
1907* [CommunicationRequest](communicationrequest.html): Unique identifier
1908* [Composition](composition.html): Version-independent identifier for the Composition
1909* [Condition](condition.html): A unique identifier of the condition record
1910* [Consent](consent.html): Identifier for this record (external references)
1911* [Contract](contract.html): The identity of the contract
1912* [Coverage](coverage.html): The primary identifier of the insured and the coverage
1913* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
1914* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
1915* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1916* [DeviceRequest](devicerequest.html): Business identifier for request/order
1917* [DeviceUsage](deviceusage.html): Search by identifier
1918* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1919* [DocumentReference](documentreference.html): Identifier of the attachment binary
1920* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1921* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
1922* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1923* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
1924* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1925* [Flag](flag.html): Business identifier
1926* [Goal](goal.html): External Ids for this goal
1927* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
1928* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
1929* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
1930* [Immunization](immunization.html): Business identifier
1931* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
1932* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
1933* [Invoice](invoice.html): Business Identifier for item
1934* [List](list.html): Business identifier
1935* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
1936* [Medication](medication.html): Returns medications with this external identifier
1937* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1938* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1939* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1940* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
1941* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
1942* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
1943* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
1944* [Observation](observation.html): The unique id for a particular observation
1945* [Person](person.html): A person Identifier
1946* [Procedure](procedure.html): A unique identifier for a procedure
1947* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
1948* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
1949* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
1950* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
1951* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1952* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1953* [Specimen](specimen.html): The unique identifier associated with the specimen
1954* [SupplyDelivery](supplydelivery.html): External identifier
1955* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1956* [Task](task.html): Search for a task instance by its business identifier
1957* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1958</b><br>
1959   * Type: <b>token</b><br>
1960   * 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>
1961   * </p>
1962   */
1963  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1964
1965 /**
1966   * Search parameter: <b>patient</b>
1967   * <p>
1968   * Description: <b>Multiple Resources: 
1969
1970* [Account](account.html): The entity that caused the expenses
1971* [AdverseEvent](adverseevent.html): Subject impacted by event
1972* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
1973* [Appointment](appointment.html): One of the individuals of the appointment is this patient
1974* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
1975* [AuditEvent](auditevent.html): Where the activity involved patient data
1976* [Basic](basic.html): Identifies the focus of this resource
1977* [BodyStructure](bodystructure.html): Who this is about
1978* [CarePlan](careplan.html): Who the care plan is for
1979* [CareTeam](careteam.html): Who care team is for
1980* [ChargeItem](chargeitem.html): Individual service was done for/to
1981* [Claim](claim.html): Patient receiving the products or services
1982* [ClaimResponse](claimresponse.html): The subject of care
1983* [ClinicalImpression](clinicalimpression.html): Patient assessed
1984* [Communication](communication.html): Focus of message
1985* [CommunicationRequest](communicationrequest.html): Focus of message
1986* [Composition](composition.html): Who and/or what the composition is about
1987* [Condition](condition.html): Who has the condition?
1988* [Consent](consent.html): Who the consent applies to
1989* [Contract](contract.html): The identity of the subject of the contract (if a patient)
1990* [Coverage](coverage.html): Retrieve coverages for a patient
1991* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
1992* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
1993* [DetectedIssue](detectedissue.html): Associated patient
1994* [DeviceRequest](devicerequest.html): Individual the service is ordered for
1995* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
1996* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
1997* [DocumentReference](documentreference.html): Who/what is the subject of the document
1998* [Encounter](encounter.html): The patient present at the encounter
1999* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2000* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2001* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2002* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2003* [Flag](flag.html): The identity of a subject to list flags for
2004* [Goal](goal.html): Who this goal is intended for
2005* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2006* [ImagingSelection](imagingselection.html): Who the study is about
2007* [ImagingStudy](imagingstudy.html): Who the study is about
2008* [Immunization](immunization.html): The patient for the vaccination record
2009* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2010* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2011* [Invoice](invoice.html): Recipient(s) of goods and services
2012* [List](list.html): If all resources have the same subject
2013* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2014* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2015* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2016* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2017* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2018* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2019* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2020* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2021* [Observation](observation.html): The subject that the observation is about (if patient)
2022* [Person](person.html): The Person links to this Patient
2023* [Procedure](procedure.html): Search by subject - a patient
2024* [Provenance](provenance.html): Where the activity involved patient data
2025* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2026* [RelatedPerson](relatedperson.html): The patient this related person is related to
2027* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2028* [ResearchSubject](researchsubject.html): Who or what is part of study
2029* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2030* [ServiceRequest](servicerequest.html): Search by subject - a patient
2031* [Specimen](specimen.html): The patient the specimen comes from
2032* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2033* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2034* [Task](task.html): Search by patient
2035* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2036</b><br>
2037   * Type: <b>reference</b><br>
2038   * 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>
2039   * </p>
2040   */
2041  @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 } )
2042  public static final String SP_PATIENT = "patient";
2043 /**
2044   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2045   * <p>
2046   * Description: <b>Multiple Resources: 
2047
2048* [Account](account.html): The entity that caused the expenses
2049* [AdverseEvent](adverseevent.html): Subject impacted by event
2050* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2051* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2052* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2053* [AuditEvent](auditevent.html): Where the activity involved patient data
2054* [Basic](basic.html): Identifies the focus of this resource
2055* [BodyStructure](bodystructure.html): Who this is about
2056* [CarePlan](careplan.html): Who the care plan is for
2057* [CareTeam](careteam.html): Who care team is for
2058* [ChargeItem](chargeitem.html): Individual service was done for/to
2059* [Claim](claim.html): Patient receiving the products or services
2060* [ClaimResponse](claimresponse.html): The subject of care
2061* [ClinicalImpression](clinicalimpression.html): Patient assessed
2062* [Communication](communication.html): Focus of message
2063* [CommunicationRequest](communicationrequest.html): Focus of message
2064* [Composition](composition.html): Who and/or what the composition is about
2065* [Condition](condition.html): Who has the condition?
2066* [Consent](consent.html): Who the consent applies to
2067* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2068* [Coverage](coverage.html): Retrieve coverages for a patient
2069* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2070* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2071* [DetectedIssue](detectedissue.html): Associated patient
2072* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2073* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2074* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2075* [DocumentReference](documentreference.html): Who/what is the subject of the document
2076* [Encounter](encounter.html): The patient present at the encounter
2077* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2078* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2079* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2080* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2081* [Flag](flag.html): The identity of a subject to list flags for
2082* [Goal](goal.html): Who this goal is intended for
2083* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2084* [ImagingSelection](imagingselection.html): Who the study is about
2085* [ImagingStudy](imagingstudy.html): Who the study is about
2086* [Immunization](immunization.html): The patient for the vaccination record
2087* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2088* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2089* [Invoice](invoice.html): Recipient(s) of goods and services
2090* [List](list.html): If all resources have the same subject
2091* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2092* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2093* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2094* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2095* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2096* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2097* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2098* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2099* [Observation](observation.html): The subject that the observation is about (if patient)
2100* [Person](person.html): The Person links to this Patient
2101* [Procedure](procedure.html): Search by subject - a patient
2102* [Provenance](provenance.html): Where the activity involved patient data
2103* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2104* [RelatedPerson](relatedperson.html): The patient this related person is related to
2105* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2106* [ResearchSubject](researchsubject.html): Who or what is part of study
2107* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2108* [ServiceRequest](servicerequest.html): Search by subject - a patient
2109* [Specimen](specimen.html): The patient the specimen comes from
2110* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2111* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2112* [Task](task.html): Search by patient
2113* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2114</b><br>
2115   * Type: <b>reference</b><br>
2116   * 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>
2117   * </p>
2118   */
2119  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2120
2121/**
2122   * Constant for fluent queries to be used to add include statements. Specifies
2123   * the path value of "<b>DeviceUsage:patient</b>".
2124   */
2125  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("DeviceUsage:patient").toLocked();
2126
2127
2128}
2129