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 Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.0-snapshot1
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 list is a curated collection of resources.
052 */
053@ResourceDef(name="List", profile="http://hl7.org/fhir/StructureDefinition/List")
054public class ListResource extends DomainResource {
055
056    public enum ListStatus {
057        /**
058         * The list is considered to be an active part of the patient's record.
059         */
060        CURRENT, 
061        /**
062         * The list is \"old\" and should no longer be considered accurate or relevant.
063         */
064        RETIRED, 
065        /**
066         * The list was never accurate.  It is retained for medico-legal purposes only.
067         */
068        ENTEREDINERROR, 
069        /**
070         * added to help the parsers with the generic types
071         */
072        NULL;
073        public static ListStatus fromCode(String codeString) throws FHIRException {
074            if (codeString == null || "".equals(codeString))
075                return null;
076        if ("current".equals(codeString))
077          return CURRENT;
078        if ("retired".equals(codeString))
079          return RETIRED;
080        if ("entered-in-error".equals(codeString))
081          return ENTEREDINERROR;
082        if (Configuration.isAcceptInvalidEnums())
083          return null;
084        else
085          throw new FHIRException("Unknown ListStatus code '"+codeString+"'");
086        }
087        public String toCode() {
088          switch (this) {
089            case CURRENT: return "current";
090            case RETIRED: return "retired";
091            case ENTEREDINERROR: return "entered-in-error";
092            default: return "?";
093          }
094        }
095        public String getSystem() {
096          switch (this) {
097            case CURRENT: return "http://hl7.org/fhir/list-status";
098            case RETIRED: return "http://hl7.org/fhir/list-status";
099            case ENTEREDINERROR: return "http://hl7.org/fhir/list-status";
100            default: return "?";
101          }
102        }
103        public String getDefinition() {
104          switch (this) {
105            case CURRENT: return "The list is considered to be an active part of the patient's record.";
106            case RETIRED: return "The list is \"old\" and should no longer be considered accurate or relevant.";
107            case ENTEREDINERROR: return "The list was never accurate.  It is retained for medico-legal purposes only.";
108            default: return "?";
109          }
110        }
111        public String getDisplay() {
112          switch (this) {
113            case CURRENT: return "Current";
114            case RETIRED: return "Retired";
115            case ENTEREDINERROR: return "Entered In Error";
116            default: return "?";
117          }
118        }
119    }
120
121  public static class ListStatusEnumFactory implements EnumFactory<ListStatus> {
122    public ListStatus fromCode(String codeString) throws IllegalArgumentException {
123      if (codeString == null || "".equals(codeString))
124            if (codeString == null || "".equals(codeString))
125                return null;
126        if ("current".equals(codeString))
127          return ListStatus.CURRENT;
128        if ("retired".equals(codeString))
129          return ListStatus.RETIRED;
130        if ("entered-in-error".equals(codeString))
131          return ListStatus.ENTEREDINERROR;
132        throw new IllegalArgumentException("Unknown ListStatus code '"+codeString+"'");
133        }
134        public Enumeration<ListStatus> fromType(Base code) throws FHIRException {
135          if (code == null)
136            return null;
137          if (code.isEmpty())
138            return new Enumeration<ListStatus>(this);
139          String codeString = ((PrimitiveType) code).asStringValue();
140          if (codeString == null || "".equals(codeString))
141            return null;
142        if ("current".equals(codeString))
143          return new Enumeration<ListStatus>(this, ListStatus.CURRENT);
144        if ("retired".equals(codeString))
145          return new Enumeration<ListStatus>(this, ListStatus.RETIRED);
146        if ("entered-in-error".equals(codeString))
147          return new Enumeration<ListStatus>(this, ListStatus.ENTEREDINERROR);
148        throw new FHIRException("Unknown ListStatus code '"+codeString+"'");
149        }
150    public String toCode(ListStatus code) {
151      if (code == ListStatus.CURRENT)
152        return "current";
153      if (code == ListStatus.RETIRED)
154        return "retired";
155      if (code == ListStatus.ENTEREDINERROR)
156        return "entered-in-error";
157      return "?";
158      }
159    public String toSystem(ListStatus code) {
160      return code.getSystem();
161      }
162    }
163
164    @Block()
165    public static class ListResourceEntryComponent extends BackboneElement implements IBaseBackboneElement {
166        /**
167         * The flag allows the system constructing the list to indicate the role and significance of the item in the list.
168         */
169        @Child(name = "flag", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
170        @Description(shortDefinition="Status/Workflow information about this item", formalDefinition="The flag allows the system constructing the list to indicate the role and significance of the item in the list." )
171        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-item-flag")
172        protected CodeableConcept flag;
173
174        /**
175         * True if this item is marked as deleted in the list.
176         */
177        @Child(name = "deleted", type = {BooleanType.class}, order=2, min=0, max=1, modifier=true, summary=false)
178        @Description(shortDefinition="If this item is actually marked as deleted", formalDefinition="True if this item is marked as deleted in the list." )
179        protected BooleanType deleted;
180
181        /**
182         * When this item was added to the list.
183         */
184        @Child(name = "date", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false)
185        @Description(shortDefinition="When item added to list", formalDefinition="When this item was added to the list." )
186        protected DateTimeType date;
187
188        /**
189         * A reference to the actual resource from which data was derived.
190         */
191        @Child(name = "item", type = {Reference.class}, order=4, min=1, max=1, modifier=false, summary=false)
192        @Description(shortDefinition="Actual entry", formalDefinition="A reference to the actual resource from which data was derived." )
193        protected Reference item;
194
195        private static final long serialVersionUID = -872672029L;
196
197    /**
198     * Constructor
199     */
200      public ListResourceEntryComponent() {
201        super();
202      }
203
204    /**
205     * Constructor
206     */
207      public ListResourceEntryComponent(Reference item) {
208        super();
209        this.setItem(item);
210      }
211
212        /**
213         * @return {@link #flag} (The flag allows the system constructing the list to indicate the role and significance of the item in the list.)
214         */
215        public CodeableConcept getFlag() { 
216          if (this.flag == null)
217            if (Configuration.errorOnAutoCreate())
218              throw new Error("Attempt to auto-create ListResourceEntryComponent.flag");
219            else if (Configuration.doAutoCreate())
220              this.flag = new CodeableConcept(); // cc
221          return this.flag;
222        }
223
224        public boolean hasFlag() { 
225          return this.flag != null && !this.flag.isEmpty();
226        }
227
228        /**
229         * @param value {@link #flag} (The flag allows the system constructing the list to indicate the role and significance of the item in the list.)
230         */
231        public ListResourceEntryComponent setFlag(CodeableConcept value) { 
232          this.flag = value;
233          return this;
234        }
235
236        /**
237         * @return {@link #deleted} (True if this item is marked as deleted in the list.). This is the underlying object with id, value and extensions. The accessor "getDeleted" gives direct access to the value
238         */
239        public BooleanType getDeletedElement() { 
240          if (this.deleted == null)
241            if (Configuration.errorOnAutoCreate())
242              throw new Error("Attempt to auto-create ListResourceEntryComponent.deleted");
243            else if (Configuration.doAutoCreate())
244              this.deleted = new BooleanType(); // bb
245          return this.deleted;
246        }
247
248        public boolean hasDeletedElement() { 
249          return this.deleted != null && !this.deleted.isEmpty();
250        }
251
252        public boolean hasDeleted() { 
253          return this.deleted != null && !this.deleted.isEmpty();
254        }
255
256        /**
257         * @param value {@link #deleted} (True if this item is marked as deleted in the list.). This is the underlying object with id, value and extensions. The accessor "getDeleted" gives direct access to the value
258         */
259        public ListResourceEntryComponent setDeletedElement(BooleanType value) { 
260          this.deleted = value;
261          return this;
262        }
263
264        /**
265         * @return True if this item is marked as deleted in the list.
266         */
267        public boolean getDeleted() { 
268          return this.deleted == null || this.deleted.isEmpty() ? false : this.deleted.getValue();
269        }
270
271        /**
272         * @param value True if this item is marked as deleted in the list.
273         */
274        public ListResourceEntryComponent setDeleted(boolean value) { 
275            if (this.deleted == null)
276              this.deleted = new BooleanType();
277            this.deleted.setValue(value);
278          return this;
279        }
280
281        /**
282         * @return {@link #date} (When this item was added to the list.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
283         */
284        public DateTimeType getDateElement() { 
285          if (this.date == null)
286            if (Configuration.errorOnAutoCreate())
287              throw new Error("Attempt to auto-create ListResourceEntryComponent.date");
288            else if (Configuration.doAutoCreate())
289              this.date = new DateTimeType(); // bb
290          return this.date;
291        }
292
293        public boolean hasDateElement() { 
294          return this.date != null && !this.date.isEmpty();
295        }
296
297        public boolean hasDate() { 
298          return this.date != null && !this.date.isEmpty();
299        }
300
301        /**
302         * @param value {@link #date} (When this item was added to the list.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
303         */
304        public ListResourceEntryComponent setDateElement(DateTimeType value) { 
305          this.date = value;
306          return this;
307        }
308
309        /**
310         * @return When this item was added to the list.
311         */
312        public Date getDate() { 
313          return this.date == null ? null : this.date.getValue();
314        }
315
316        /**
317         * @param value When this item was added to the list.
318         */
319        public ListResourceEntryComponent setDate(Date value) { 
320          if (value == null)
321            this.date = null;
322          else {
323            if (this.date == null)
324              this.date = new DateTimeType();
325            this.date.setValue(value);
326          }
327          return this;
328        }
329
330        /**
331         * @return {@link #item} (A reference to the actual resource from which data was derived.)
332         */
333        public Reference getItem() { 
334          if (this.item == null)
335            if (Configuration.errorOnAutoCreate())
336              throw new Error("Attempt to auto-create ListResourceEntryComponent.item");
337            else if (Configuration.doAutoCreate())
338              this.item = new Reference(); // cc
339          return this.item;
340        }
341
342        public boolean hasItem() { 
343          return this.item != null && !this.item.isEmpty();
344        }
345
346        /**
347         * @param value {@link #item} (A reference to the actual resource from which data was derived.)
348         */
349        public ListResourceEntryComponent setItem(Reference value) { 
350          this.item = value;
351          return this;
352        }
353
354        protected void listChildren(List<Property> children) {
355          super.listChildren(children);
356          children.add(new Property("flag", "CodeableConcept", "The flag allows the system constructing the list to indicate the role and significance of the item in the list.", 0, 1, flag));
357          children.add(new Property("deleted", "boolean", "True if this item is marked as deleted in the list.", 0, 1, deleted));
358          children.add(new Property("date", "dateTime", "When this item was added to the list.", 0, 1, date));
359          children.add(new Property("item", "Reference(Any)", "A reference to the actual resource from which data was derived.", 0, 1, item));
360        }
361
362        @Override
363        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
364          switch (_hash) {
365          case 3145580: /*flag*/  return new Property("flag", "CodeableConcept", "The flag allows the system constructing the list to indicate the role and significance of the item in the list.", 0, 1, flag);
366          case 1550463001: /*deleted*/  return new Property("deleted", "boolean", "True if this item is marked as deleted in the list.", 0, 1, deleted);
367          case 3076014: /*date*/  return new Property("date", "dateTime", "When this item was added to the list.", 0, 1, date);
368          case 3242771: /*item*/  return new Property("item", "Reference(Any)", "A reference to the actual resource from which data was derived.", 0, 1, item);
369          default: return super.getNamedProperty(_hash, _name, _checkValid);
370          }
371
372        }
373
374      @Override
375      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
376        switch (hash) {
377        case 3145580: /*flag*/ return this.flag == null ? new Base[0] : new Base[] {this.flag}; // CodeableConcept
378        case 1550463001: /*deleted*/ return this.deleted == null ? new Base[0] : new Base[] {this.deleted}; // BooleanType
379        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
380        case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // Reference
381        default: return super.getProperty(hash, name, checkValid);
382        }
383
384      }
385
386      @Override
387      public Base setProperty(int hash, String name, Base value) throws FHIRException {
388        switch (hash) {
389        case 3145580: // flag
390          this.flag = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
391          return value;
392        case 1550463001: // deleted
393          this.deleted = TypeConvertor.castToBoolean(value); // BooleanType
394          return value;
395        case 3076014: // date
396          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
397          return value;
398        case 3242771: // item
399          this.item = TypeConvertor.castToReference(value); // Reference
400          return value;
401        default: return super.setProperty(hash, name, value);
402        }
403
404      }
405
406      @Override
407      public Base setProperty(String name, Base value) throws FHIRException {
408        if (name.equals("flag")) {
409          this.flag = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
410        } else if (name.equals("deleted")) {
411          this.deleted = TypeConvertor.castToBoolean(value); // BooleanType
412        } else if (name.equals("date")) {
413          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
414        } else if (name.equals("item")) {
415          this.item = TypeConvertor.castToReference(value); // Reference
416        } else
417          return super.setProperty(name, value);
418        return value;
419      }
420
421      @Override
422      public Base makeProperty(int hash, String name) throws FHIRException {
423        switch (hash) {
424        case 3145580:  return getFlag();
425        case 1550463001:  return getDeletedElement();
426        case 3076014:  return getDateElement();
427        case 3242771:  return getItem();
428        default: return super.makeProperty(hash, name);
429        }
430
431      }
432
433      @Override
434      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
435        switch (hash) {
436        case 3145580: /*flag*/ return new String[] {"CodeableConcept"};
437        case 1550463001: /*deleted*/ return new String[] {"boolean"};
438        case 3076014: /*date*/ return new String[] {"dateTime"};
439        case 3242771: /*item*/ return new String[] {"Reference"};
440        default: return super.getTypesForProperty(hash, name);
441        }
442
443      }
444
445      @Override
446      public Base addChild(String name) throws FHIRException {
447        if (name.equals("flag")) {
448          this.flag = new CodeableConcept();
449          return this.flag;
450        }
451        else if (name.equals("deleted")) {
452          throw new FHIRException("Cannot call addChild on a primitive type List.entry.deleted");
453        }
454        else if (name.equals("date")) {
455          throw new FHIRException("Cannot call addChild on a primitive type List.entry.date");
456        }
457        else if (name.equals("item")) {
458          this.item = new Reference();
459          return this.item;
460        }
461        else
462          return super.addChild(name);
463      }
464
465      public ListResourceEntryComponent copy() {
466        ListResourceEntryComponent dst = new ListResourceEntryComponent();
467        copyValues(dst);
468        return dst;
469      }
470
471      public void copyValues(ListResourceEntryComponent dst) {
472        super.copyValues(dst);
473        dst.flag = flag == null ? null : flag.copy();
474        dst.deleted = deleted == null ? null : deleted.copy();
475        dst.date = date == null ? null : date.copy();
476        dst.item = item == null ? null : item.copy();
477      }
478
479      @Override
480      public boolean equalsDeep(Base other_) {
481        if (!super.equalsDeep(other_))
482          return false;
483        if (!(other_ instanceof ListResourceEntryComponent))
484          return false;
485        ListResourceEntryComponent o = (ListResourceEntryComponent) other_;
486        return compareDeep(flag, o.flag, true) && compareDeep(deleted, o.deleted, true) && compareDeep(date, o.date, true)
487           && compareDeep(item, o.item, true);
488      }
489
490      @Override
491      public boolean equalsShallow(Base other_) {
492        if (!super.equalsShallow(other_))
493          return false;
494        if (!(other_ instanceof ListResourceEntryComponent))
495          return false;
496        ListResourceEntryComponent o = (ListResourceEntryComponent) other_;
497        return compareValues(deleted, o.deleted, true) && compareValues(date, o.date, true);
498      }
499
500      public boolean isEmpty() {
501        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(flag, deleted, date, item
502          );
503      }
504
505  public String fhirType() {
506    return "List.entry";
507
508  }
509
510  }
511
512    /**
513     * Identifier for the List assigned for business purposes outside the context of FHIR.
514     */
515    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
516    @Description(shortDefinition="Business identifier", formalDefinition="Identifier for the List assigned for business purposes outside the context of FHIR." )
517    protected List<Identifier> identifier;
518
519    /**
520     * Indicates the current state of this list.
521     */
522    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
523    @Description(shortDefinition="current | retired | entered-in-error", formalDefinition="Indicates the current state of this list." )
524    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-status")
525    protected Enumeration<ListStatus> status;
526
527    /**
528     * How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.
529     */
530    @Child(name = "mode", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true)
531    @Description(shortDefinition="working | snapshot | changes", formalDefinition="How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted." )
532    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-mode")
533    protected Enumeration<ListMode> mode;
534
535    /**
536     * A label for the list assigned by the author.
537     */
538    @Child(name = "title", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
539    @Description(shortDefinition="Descriptive name for the list", formalDefinition="A label for the list assigned by the author." )
540    protected StringType title;
541
542    /**
543     * This code defines the purpose of the list - why it was created.
544     */
545    @Child(name = "code", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true)
546    @Description(shortDefinition="What the purpose of this list is", formalDefinition="This code defines the purpose of the list - why it was created." )
547    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-example-codes")
548    protected CodeableConcept code;
549
550    /**
551     * The common subject (or patient) of the resources that are in the list if there is one.
552     */
553    @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Location.class}, order=5, min=0, max=1, modifier=false, summary=true)
554    @Description(shortDefinition="If all resources have the same subject", formalDefinition="The common subject (or patient) of the resources that are in the list if there is one." )
555    protected Reference subject;
556
557    /**
558     * The encounter that is the context in which this list was created.
559     */
560    @Child(name = "encounter", type = {Encounter.class}, order=6, min=0, max=1, modifier=false, summary=false)
561    @Description(shortDefinition="Context in which list created", formalDefinition="The encounter that is the context in which this list was created." )
562    protected Reference encounter;
563
564    /**
565     * The date that the list was prepared.
566     */
567    @Child(name = "date", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=true)
568    @Description(shortDefinition="When the list was prepared", formalDefinition="The date that the list was prepared." )
569    protected DateTimeType date;
570
571    /**
572     * The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.
573     */
574    @Child(name = "source", type = {Practitioner.class, PractitionerRole.class, Patient.class, Device.class}, order=8, min=0, max=1, modifier=false, summary=true)
575    @Description(shortDefinition="Who and/or what defined the list contents (aka Author)", formalDefinition="The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list." )
576    protected Reference source;
577
578    /**
579     * What order applies to the items in the list.
580     */
581    @Child(name = "orderedBy", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=false)
582    @Description(shortDefinition="What order the list has", formalDefinition="What order applies to the items in the list." )
583    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-order")
584    protected CodeableConcept orderedBy;
585
586    /**
587     * Comments that apply to the overall list.
588     */
589    @Child(name = "note", type = {Annotation.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
590    @Description(shortDefinition="Comments about the list", formalDefinition="Comments that apply to the overall list." )
591    protected List<Annotation> note;
592
593    /**
594     * Entries in this list.
595     */
596    @Child(name = "entry", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
597    @Description(shortDefinition="Entries in the list", formalDefinition="Entries in this list." )
598    protected List<ListResourceEntryComponent> entry;
599
600    /**
601     * If the list is empty, why the list is empty.
602     */
603    @Child(name = "emptyReason", type = {CodeableConcept.class}, order=12, min=0, max=1, modifier=false, summary=false)
604    @Description(shortDefinition="Why list is empty", formalDefinition="If the list is empty, why the list is empty." )
605    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-empty-reason")
606    protected CodeableConcept emptyReason;
607
608    private static final long serialVersionUID = 1429954620L;
609
610  /**
611   * Constructor
612   */
613    public ListResource() {
614      super();
615    }
616
617  /**
618   * Constructor
619   */
620    public ListResource(ListStatus status, ListMode mode) {
621      super();
622      this.setStatus(status);
623      this.setMode(mode);
624    }
625
626    /**
627     * @return {@link #identifier} (Identifier for the List assigned for business purposes outside the context of FHIR.)
628     */
629    public List<Identifier> getIdentifier() { 
630      if (this.identifier == null)
631        this.identifier = new ArrayList<Identifier>();
632      return this.identifier;
633    }
634
635    /**
636     * @return Returns a reference to <code>this</code> for easy method chaining
637     */
638    public ListResource setIdentifier(List<Identifier> theIdentifier) { 
639      this.identifier = theIdentifier;
640      return this;
641    }
642
643    public boolean hasIdentifier() { 
644      if (this.identifier == null)
645        return false;
646      for (Identifier item : this.identifier)
647        if (!item.isEmpty())
648          return true;
649      return false;
650    }
651
652    public Identifier addIdentifier() { //3
653      Identifier t = new Identifier();
654      if (this.identifier == null)
655        this.identifier = new ArrayList<Identifier>();
656      this.identifier.add(t);
657      return t;
658    }
659
660    public ListResource addIdentifier(Identifier t) { //3
661      if (t == null)
662        return this;
663      if (this.identifier == null)
664        this.identifier = new ArrayList<Identifier>();
665      this.identifier.add(t);
666      return this;
667    }
668
669    /**
670     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
671     */
672    public Identifier getIdentifierFirstRep() { 
673      if (getIdentifier().isEmpty()) {
674        addIdentifier();
675      }
676      return getIdentifier().get(0);
677    }
678
679    /**
680     * @return {@link #status} (Indicates the current state of this list.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
681     */
682    public Enumeration<ListStatus> getStatusElement() { 
683      if (this.status == null)
684        if (Configuration.errorOnAutoCreate())
685          throw new Error("Attempt to auto-create List.status");
686        else if (Configuration.doAutoCreate())
687          this.status = new Enumeration<ListStatus>(new ListStatusEnumFactory()); // bb
688      return this.status;
689    }
690
691    public boolean hasStatusElement() { 
692      return this.status != null && !this.status.isEmpty();
693    }
694
695    public boolean hasStatus() { 
696      return this.status != null && !this.status.isEmpty();
697    }
698
699    /**
700     * @param value {@link #status} (Indicates the current state of this list.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
701     */
702    public ListResource setStatusElement(Enumeration<ListStatus> value) { 
703      this.status = value;
704      return this;
705    }
706
707    /**
708     * @return Indicates the current state of this list.
709     */
710    public ListStatus getStatus() { 
711      return this.status == null ? null : this.status.getValue();
712    }
713
714    /**
715     * @param value Indicates the current state of this list.
716     */
717    public ListResource setStatus(ListStatus value) { 
718        if (this.status == null)
719          this.status = new Enumeration<ListStatus>(new ListStatusEnumFactory());
720        this.status.setValue(value);
721      return this;
722    }
723
724    /**
725     * @return {@link #mode} (How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
726     */
727    public Enumeration<ListMode> getModeElement() { 
728      if (this.mode == null)
729        if (Configuration.errorOnAutoCreate())
730          throw new Error("Attempt to auto-create List.mode");
731        else if (Configuration.doAutoCreate())
732          this.mode = new Enumeration<ListMode>(new ListModeEnumFactory()); // bb
733      return this.mode;
734    }
735
736    public boolean hasModeElement() { 
737      return this.mode != null && !this.mode.isEmpty();
738    }
739
740    public boolean hasMode() { 
741      return this.mode != null && !this.mode.isEmpty();
742    }
743
744    /**
745     * @param value {@link #mode} (How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
746     */
747    public ListResource setModeElement(Enumeration<ListMode> value) { 
748      this.mode = value;
749      return this;
750    }
751
752    /**
753     * @return How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.
754     */
755    public ListMode getMode() { 
756      return this.mode == null ? null : this.mode.getValue();
757    }
758
759    /**
760     * @param value How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.
761     */
762    public ListResource setMode(ListMode value) { 
763        if (this.mode == null)
764          this.mode = new Enumeration<ListMode>(new ListModeEnumFactory());
765        this.mode.setValue(value);
766      return this;
767    }
768
769    /**
770     * @return {@link #title} (A label for the list assigned by the author.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
771     */
772    public StringType getTitleElement() { 
773      if (this.title == null)
774        if (Configuration.errorOnAutoCreate())
775          throw new Error("Attempt to auto-create List.title");
776        else if (Configuration.doAutoCreate())
777          this.title = new StringType(); // bb
778      return this.title;
779    }
780
781    public boolean hasTitleElement() { 
782      return this.title != null && !this.title.isEmpty();
783    }
784
785    public boolean hasTitle() { 
786      return this.title != null && !this.title.isEmpty();
787    }
788
789    /**
790     * @param value {@link #title} (A label for the list assigned by the author.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
791     */
792    public ListResource setTitleElement(StringType value) { 
793      this.title = value;
794      return this;
795    }
796
797    /**
798     * @return A label for the list assigned by the author.
799     */
800    public String getTitle() { 
801      return this.title == null ? null : this.title.getValue();
802    }
803
804    /**
805     * @param value A label for the list assigned by the author.
806     */
807    public ListResource setTitle(String value) { 
808      if (Utilities.noString(value))
809        this.title = null;
810      else {
811        if (this.title == null)
812          this.title = new StringType();
813        this.title.setValue(value);
814      }
815      return this;
816    }
817
818    /**
819     * @return {@link #code} (This code defines the purpose of the list - why it was created.)
820     */
821    public CodeableConcept getCode() { 
822      if (this.code == null)
823        if (Configuration.errorOnAutoCreate())
824          throw new Error("Attempt to auto-create List.code");
825        else if (Configuration.doAutoCreate())
826          this.code = new CodeableConcept(); // cc
827      return this.code;
828    }
829
830    public boolean hasCode() { 
831      return this.code != null && !this.code.isEmpty();
832    }
833
834    /**
835     * @param value {@link #code} (This code defines the purpose of the list - why it was created.)
836     */
837    public ListResource setCode(CodeableConcept value) { 
838      this.code = value;
839      return this;
840    }
841
842    /**
843     * @return {@link #subject} (The common subject (or patient) of the resources that are in the list if there is one.)
844     */
845    public Reference getSubject() { 
846      if (this.subject == null)
847        if (Configuration.errorOnAutoCreate())
848          throw new Error("Attempt to auto-create List.subject");
849        else if (Configuration.doAutoCreate())
850          this.subject = new Reference(); // cc
851      return this.subject;
852    }
853
854    public boolean hasSubject() { 
855      return this.subject != null && !this.subject.isEmpty();
856    }
857
858    /**
859     * @param value {@link #subject} (The common subject (or patient) of the resources that are in the list if there is one.)
860     */
861    public ListResource setSubject(Reference value) { 
862      this.subject = value;
863      return this;
864    }
865
866    /**
867     * @return {@link #encounter} (The encounter that is the context in which this list was created.)
868     */
869    public Reference getEncounter() { 
870      if (this.encounter == null)
871        if (Configuration.errorOnAutoCreate())
872          throw new Error("Attempt to auto-create List.encounter");
873        else if (Configuration.doAutoCreate())
874          this.encounter = new Reference(); // cc
875      return this.encounter;
876    }
877
878    public boolean hasEncounter() { 
879      return this.encounter != null && !this.encounter.isEmpty();
880    }
881
882    /**
883     * @param value {@link #encounter} (The encounter that is the context in which this list was created.)
884     */
885    public ListResource setEncounter(Reference value) { 
886      this.encounter = value;
887      return this;
888    }
889
890    /**
891     * @return {@link #date} (The date that the list was prepared.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
892     */
893    public DateTimeType getDateElement() { 
894      if (this.date == null)
895        if (Configuration.errorOnAutoCreate())
896          throw new Error("Attempt to auto-create List.date");
897        else if (Configuration.doAutoCreate())
898          this.date = new DateTimeType(); // bb
899      return this.date;
900    }
901
902    public boolean hasDateElement() { 
903      return this.date != null && !this.date.isEmpty();
904    }
905
906    public boolean hasDate() { 
907      return this.date != null && !this.date.isEmpty();
908    }
909
910    /**
911     * @param value {@link #date} (The date that the list was prepared.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
912     */
913    public ListResource setDateElement(DateTimeType value) { 
914      this.date = value;
915      return this;
916    }
917
918    /**
919     * @return The date that the list was prepared.
920     */
921    public Date getDate() { 
922      return this.date == null ? null : this.date.getValue();
923    }
924
925    /**
926     * @param value The date that the list was prepared.
927     */
928    public ListResource setDate(Date value) { 
929      if (value == null)
930        this.date = null;
931      else {
932        if (this.date == null)
933          this.date = new DateTimeType();
934        this.date.setValue(value);
935      }
936      return this;
937    }
938
939    /**
940     * @return {@link #source} (The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.)
941     */
942    public Reference getSource() { 
943      if (this.source == null)
944        if (Configuration.errorOnAutoCreate())
945          throw new Error("Attempt to auto-create List.source");
946        else if (Configuration.doAutoCreate())
947          this.source = new Reference(); // cc
948      return this.source;
949    }
950
951    public boolean hasSource() { 
952      return this.source != null && !this.source.isEmpty();
953    }
954
955    /**
956     * @param value {@link #source} (The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.)
957     */
958    public ListResource setSource(Reference value) { 
959      this.source = value;
960      return this;
961    }
962
963    /**
964     * @return {@link #orderedBy} (What order applies to the items in the list.)
965     */
966    public CodeableConcept getOrderedBy() { 
967      if (this.orderedBy == null)
968        if (Configuration.errorOnAutoCreate())
969          throw new Error("Attempt to auto-create List.orderedBy");
970        else if (Configuration.doAutoCreate())
971          this.orderedBy = new CodeableConcept(); // cc
972      return this.orderedBy;
973    }
974
975    public boolean hasOrderedBy() { 
976      return this.orderedBy != null && !this.orderedBy.isEmpty();
977    }
978
979    /**
980     * @param value {@link #orderedBy} (What order applies to the items in the list.)
981     */
982    public ListResource setOrderedBy(CodeableConcept value) { 
983      this.orderedBy = value;
984      return this;
985    }
986
987    /**
988     * @return {@link #note} (Comments that apply to the overall list.)
989     */
990    public List<Annotation> getNote() { 
991      if (this.note == null)
992        this.note = new ArrayList<Annotation>();
993      return this.note;
994    }
995
996    /**
997     * @return Returns a reference to <code>this</code> for easy method chaining
998     */
999    public ListResource setNote(List<Annotation> theNote) { 
1000      this.note = theNote;
1001      return this;
1002    }
1003
1004    public boolean hasNote() { 
1005      if (this.note == null)
1006        return false;
1007      for (Annotation item : this.note)
1008        if (!item.isEmpty())
1009          return true;
1010      return false;
1011    }
1012
1013    public Annotation addNote() { //3
1014      Annotation t = new Annotation();
1015      if (this.note == null)
1016        this.note = new ArrayList<Annotation>();
1017      this.note.add(t);
1018      return t;
1019    }
1020
1021    public ListResource addNote(Annotation t) { //3
1022      if (t == null)
1023        return this;
1024      if (this.note == null)
1025        this.note = new ArrayList<Annotation>();
1026      this.note.add(t);
1027      return this;
1028    }
1029
1030    /**
1031     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1032     */
1033    public Annotation getNoteFirstRep() { 
1034      if (getNote().isEmpty()) {
1035        addNote();
1036      }
1037      return getNote().get(0);
1038    }
1039
1040    /**
1041     * @return {@link #entry} (Entries in this list.)
1042     */
1043    public List<ListResourceEntryComponent> getEntry() { 
1044      if (this.entry == null)
1045        this.entry = new ArrayList<ListResourceEntryComponent>();
1046      return this.entry;
1047    }
1048
1049    /**
1050     * @return Returns a reference to <code>this</code> for easy method chaining
1051     */
1052    public ListResource setEntry(List<ListResourceEntryComponent> theEntry) { 
1053      this.entry = theEntry;
1054      return this;
1055    }
1056
1057    public boolean hasEntry() { 
1058      if (this.entry == null)
1059        return false;
1060      for (ListResourceEntryComponent item : this.entry)
1061        if (!item.isEmpty())
1062          return true;
1063      return false;
1064    }
1065
1066    public ListResourceEntryComponent addEntry() { //3
1067      ListResourceEntryComponent t = new ListResourceEntryComponent();
1068      if (this.entry == null)
1069        this.entry = new ArrayList<ListResourceEntryComponent>();
1070      this.entry.add(t);
1071      return t;
1072    }
1073
1074    public ListResource addEntry(ListResourceEntryComponent t) { //3
1075      if (t == null)
1076        return this;
1077      if (this.entry == null)
1078        this.entry = new ArrayList<ListResourceEntryComponent>();
1079      this.entry.add(t);
1080      return this;
1081    }
1082
1083    /**
1084     * @return The first repetition of repeating field {@link #entry}, creating it if it does not already exist {3}
1085     */
1086    public ListResourceEntryComponent getEntryFirstRep() { 
1087      if (getEntry().isEmpty()) {
1088        addEntry();
1089      }
1090      return getEntry().get(0);
1091    }
1092
1093    /**
1094     * @return {@link #emptyReason} (If the list is empty, why the list is empty.)
1095     */
1096    public CodeableConcept getEmptyReason() { 
1097      if (this.emptyReason == null)
1098        if (Configuration.errorOnAutoCreate())
1099          throw new Error("Attempt to auto-create List.emptyReason");
1100        else if (Configuration.doAutoCreate())
1101          this.emptyReason = new CodeableConcept(); // cc
1102      return this.emptyReason;
1103    }
1104
1105    public boolean hasEmptyReason() { 
1106      return this.emptyReason != null && !this.emptyReason.isEmpty();
1107    }
1108
1109    /**
1110     * @param value {@link #emptyReason} (If the list is empty, why the list is empty.)
1111     */
1112    public ListResource setEmptyReason(CodeableConcept value) { 
1113      this.emptyReason = value;
1114      return this;
1115    }
1116
1117      protected void listChildren(List<Property> children) {
1118        super.listChildren(children);
1119        children.add(new Property("identifier", "Identifier", "Identifier for the List assigned for business purposes outside the context of FHIR.", 0, java.lang.Integer.MAX_VALUE, identifier));
1120        children.add(new Property("status", "code", "Indicates the current state of this list.", 0, 1, status));
1121        children.add(new Property("mode", "code", "How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.", 0, 1, mode));
1122        children.add(new Property("title", "string", "A label for the list assigned by the author.", 0, 1, title));
1123        children.add(new Property("code", "CodeableConcept", "This code defines the purpose of the list - why it was created.", 0, 1, code));
1124        children.add(new Property("subject", "Reference(Patient|Group|Device|Location)", "The common subject (or patient) of the resources that are in the list if there is one.", 0, 1, subject));
1125        children.add(new Property("encounter", "Reference(Encounter)", "The encounter that is the context in which this list was created.", 0, 1, encounter));
1126        children.add(new Property("date", "dateTime", "The date that the list was prepared.", 0, 1, date));
1127        children.add(new Property("source", "Reference(Practitioner|PractitionerRole|Patient|Device)", "The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.", 0, 1, source));
1128        children.add(new Property("orderedBy", "CodeableConcept", "What order applies to the items in the list.", 0, 1, orderedBy));
1129        children.add(new Property("note", "Annotation", "Comments that apply to the overall list.", 0, java.lang.Integer.MAX_VALUE, note));
1130        children.add(new Property("entry", "", "Entries in this list.", 0, java.lang.Integer.MAX_VALUE, entry));
1131        children.add(new Property("emptyReason", "CodeableConcept", "If the list is empty, why the list is empty.", 0, 1, emptyReason));
1132      }
1133
1134      @Override
1135      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1136        switch (_hash) {
1137        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Identifier for the List assigned for business purposes outside the context of FHIR.", 0, java.lang.Integer.MAX_VALUE, identifier);
1138        case -892481550: /*status*/  return new Property("status", "code", "Indicates the current state of this list.", 0, 1, status);
1139        case 3357091: /*mode*/  return new Property("mode", "code", "How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.", 0, 1, mode);
1140        case 110371416: /*title*/  return new Property("title", "string", "A label for the list assigned by the author.", 0, 1, title);
1141        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "This code defines the purpose of the list - why it was created.", 0, 1, code);
1142        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group|Device|Location)", "The common subject (or patient) of the resources that are in the list if there is one.", 0, 1, subject);
1143        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The encounter that is the context in which this list was created.", 0, 1, encounter);
1144        case 3076014: /*date*/  return new Property("date", "dateTime", "The date that the list was prepared.", 0, 1, date);
1145        case -896505829: /*source*/  return new Property("source", "Reference(Practitioner|PractitionerRole|Patient|Device)", "The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.", 0, 1, source);
1146        case -391079516: /*orderedBy*/  return new Property("orderedBy", "CodeableConcept", "What order applies to the items in the list.", 0, 1, orderedBy);
1147        case 3387378: /*note*/  return new Property("note", "Annotation", "Comments that apply to the overall list.", 0, java.lang.Integer.MAX_VALUE, note);
1148        case 96667762: /*entry*/  return new Property("entry", "", "Entries in this list.", 0, java.lang.Integer.MAX_VALUE, entry);
1149        case 1140135409: /*emptyReason*/  return new Property("emptyReason", "CodeableConcept", "If the list is empty, why the list is empty.", 0, 1, emptyReason);
1150        default: return super.getNamedProperty(_hash, _name, _checkValid);
1151        }
1152
1153      }
1154
1155      @Override
1156      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1157        switch (hash) {
1158        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1159        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ListStatus>
1160        case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<ListMode>
1161        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
1162        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1163        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1164        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
1165        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
1166        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Reference
1167        case -391079516: /*orderedBy*/ return this.orderedBy == null ? new Base[0] : new Base[] {this.orderedBy}; // CodeableConcept
1168        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1169        case 96667762: /*entry*/ return this.entry == null ? new Base[0] : this.entry.toArray(new Base[this.entry.size()]); // ListResourceEntryComponent
1170        case 1140135409: /*emptyReason*/ return this.emptyReason == null ? new Base[0] : new Base[] {this.emptyReason}; // CodeableConcept
1171        default: return super.getProperty(hash, name, checkValid);
1172        }
1173
1174      }
1175
1176      @Override
1177      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1178        switch (hash) {
1179        case -1618432855: // identifier
1180          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1181          return value;
1182        case -892481550: // status
1183          value = new ListStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1184          this.status = (Enumeration) value; // Enumeration<ListStatus>
1185          return value;
1186        case 3357091: // mode
1187          value = new ListModeEnumFactory().fromType(TypeConvertor.castToCode(value));
1188          this.mode = (Enumeration) value; // Enumeration<ListMode>
1189          return value;
1190        case 110371416: // title
1191          this.title = TypeConvertor.castToString(value); // StringType
1192          return value;
1193        case 3059181: // code
1194          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1195          return value;
1196        case -1867885268: // subject
1197          this.subject = TypeConvertor.castToReference(value); // Reference
1198          return value;
1199        case 1524132147: // encounter
1200          this.encounter = TypeConvertor.castToReference(value); // Reference
1201          return value;
1202        case 3076014: // date
1203          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
1204          return value;
1205        case -896505829: // source
1206          this.source = TypeConvertor.castToReference(value); // Reference
1207          return value;
1208        case -391079516: // orderedBy
1209          this.orderedBy = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1210          return value;
1211        case 3387378: // note
1212          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1213          return value;
1214        case 96667762: // entry
1215          this.getEntry().add((ListResourceEntryComponent) value); // ListResourceEntryComponent
1216          return value;
1217        case 1140135409: // emptyReason
1218          this.emptyReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1219          return value;
1220        default: return super.setProperty(hash, name, value);
1221        }
1222
1223      }
1224
1225      @Override
1226      public Base setProperty(String name, Base value) throws FHIRException {
1227        if (name.equals("identifier")) {
1228          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1229        } else if (name.equals("status")) {
1230          value = new ListStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1231          this.status = (Enumeration) value; // Enumeration<ListStatus>
1232        } else if (name.equals("mode")) {
1233          value = new ListModeEnumFactory().fromType(TypeConvertor.castToCode(value));
1234          this.mode = (Enumeration) value; // Enumeration<ListMode>
1235        } else if (name.equals("title")) {
1236          this.title = TypeConvertor.castToString(value); // StringType
1237        } else if (name.equals("code")) {
1238          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1239        } else if (name.equals("subject")) {
1240          this.subject = TypeConvertor.castToReference(value); // Reference
1241        } else if (name.equals("encounter")) {
1242          this.encounter = TypeConvertor.castToReference(value); // Reference
1243        } else if (name.equals("date")) {
1244          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
1245        } else if (name.equals("source")) {
1246          this.source = TypeConvertor.castToReference(value); // Reference
1247        } else if (name.equals("orderedBy")) {
1248          this.orderedBy = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1249        } else if (name.equals("note")) {
1250          this.getNote().add(TypeConvertor.castToAnnotation(value));
1251        } else if (name.equals("entry")) {
1252          this.getEntry().add((ListResourceEntryComponent) value);
1253        } else if (name.equals("emptyReason")) {
1254          this.emptyReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1255        } else
1256          return super.setProperty(name, value);
1257        return value;
1258      }
1259
1260      @Override
1261      public Base makeProperty(int hash, String name) throws FHIRException {
1262        switch (hash) {
1263        case -1618432855:  return addIdentifier(); 
1264        case -892481550:  return getStatusElement();
1265        case 3357091:  return getModeElement();
1266        case 110371416:  return getTitleElement();
1267        case 3059181:  return getCode();
1268        case -1867885268:  return getSubject();
1269        case 1524132147:  return getEncounter();
1270        case 3076014:  return getDateElement();
1271        case -896505829:  return getSource();
1272        case -391079516:  return getOrderedBy();
1273        case 3387378:  return addNote(); 
1274        case 96667762:  return addEntry(); 
1275        case 1140135409:  return getEmptyReason();
1276        default: return super.makeProperty(hash, name);
1277        }
1278
1279      }
1280
1281      @Override
1282      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1283        switch (hash) {
1284        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1285        case -892481550: /*status*/ return new String[] {"code"};
1286        case 3357091: /*mode*/ return new String[] {"code"};
1287        case 110371416: /*title*/ return new String[] {"string"};
1288        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1289        case -1867885268: /*subject*/ return new String[] {"Reference"};
1290        case 1524132147: /*encounter*/ return new String[] {"Reference"};
1291        case 3076014: /*date*/ return new String[] {"dateTime"};
1292        case -896505829: /*source*/ return new String[] {"Reference"};
1293        case -391079516: /*orderedBy*/ return new String[] {"CodeableConcept"};
1294        case 3387378: /*note*/ return new String[] {"Annotation"};
1295        case 96667762: /*entry*/ return new String[] {};
1296        case 1140135409: /*emptyReason*/ return new String[] {"CodeableConcept"};
1297        default: return super.getTypesForProperty(hash, name);
1298        }
1299
1300      }
1301
1302      @Override
1303      public Base addChild(String name) throws FHIRException {
1304        if (name.equals("identifier")) {
1305          return addIdentifier();
1306        }
1307        else if (name.equals("status")) {
1308          throw new FHIRException("Cannot call addChild on a primitive type List.status");
1309        }
1310        else if (name.equals("mode")) {
1311          throw new FHIRException("Cannot call addChild on a primitive type List.mode");
1312        }
1313        else if (name.equals("title")) {
1314          throw new FHIRException("Cannot call addChild on a primitive type List.title");
1315        }
1316        else if (name.equals("code")) {
1317          this.code = new CodeableConcept();
1318          return this.code;
1319        }
1320        else if (name.equals("subject")) {
1321          this.subject = new Reference();
1322          return this.subject;
1323        }
1324        else if (name.equals("encounter")) {
1325          this.encounter = new Reference();
1326          return this.encounter;
1327        }
1328        else if (name.equals("date")) {
1329          throw new FHIRException("Cannot call addChild on a primitive type List.date");
1330        }
1331        else if (name.equals("source")) {
1332          this.source = new Reference();
1333          return this.source;
1334        }
1335        else if (name.equals("orderedBy")) {
1336          this.orderedBy = new CodeableConcept();
1337          return this.orderedBy;
1338        }
1339        else if (name.equals("note")) {
1340          return addNote();
1341        }
1342        else if (name.equals("entry")) {
1343          return addEntry();
1344        }
1345        else if (name.equals("emptyReason")) {
1346          this.emptyReason = new CodeableConcept();
1347          return this.emptyReason;
1348        }
1349        else
1350          return super.addChild(name);
1351      }
1352
1353  public String fhirType() {
1354    return "List";
1355
1356  }
1357
1358      public ListResource copy() {
1359        ListResource dst = new ListResource();
1360        copyValues(dst);
1361        return dst;
1362      }
1363
1364      public void copyValues(ListResource dst) {
1365        super.copyValues(dst);
1366        if (identifier != null) {
1367          dst.identifier = new ArrayList<Identifier>();
1368          for (Identifier i : identifier)
1369            dst.identifier.add(i.copy());
1370        };
1371        dst.status = status == null ? null : status.copy();
1372        dst.mode = mode == null ? null : mode.copy();
1373        dst.title = title == null ? null : title.copy();
1374        dst.code = code == null ? null : code.copy();
1375        dst.subject = subject == null ? null : subject.copy();
1376        dst.encounter = encounter == null ? null : encounter.copy();
1377        dst.date = date == null ? null : date.copy();
1378        dst.source = source == null ? null : source.copy();
1379        dst.orderedBy = orderedBy == null ? null : orderedBy.copy();
1380        if (note != null) {
1381          dst.note = new ArrayList<Annotation>();
1382          for (Annotation i : note)
1383            dst.note.add(i.copy());
1384        };
1385        if (entry != null) {
1386          dst.entry = new ArrayList<ListResourceEntryComponent>();
1387          for (ListResourceEntryComponent i : entry)
1388            dst.entry.add(i.copy());
1389        };
1390        dst.emptyReason = emptyReason == null ? null : emptyReason.copy();
1391      }
1392
1393      protected ListResource typedCopy() {
1394        return copy();
1395      }
1396
1397      @Override
1398      public boolean equalsDeep(Base other_) {
1399        if (!super.equalsDeep(other_))
1400          return false;
1401        if (!(other_ instanceof ListResource))
1402          return false;
1403        ListResource o = (ListResource) other_;
1404        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(mode, o.mode, true)
1405           && compareDeep(title, o.title, true) && compareDeep(code, o.code, true) && compareDeep(subject, o.subject, true)
1406           && compareDeep(encounter, o.encounter, true) && compareDeep(date, o.date, true) && compareDeep(source, o.source, true)
1407           && compareDeep(orderedBy, o.orderedBy, true) && compareDeep(note, o.note, true) && compareDeep(entry, o.entry, true)
1408           && compareDeep(emptyReason, o.emptyReason, true);
1409      }
1410
1411      @Override
1412      public boolean equalsShallow(Base other_) {
1413        if (!super.equalsShallow(other_))
1414          return false;
1415        if (!(other_ instanceof ListResource))
1416          return false;
1417        ListResource o = (ListResource) other_;
1418        return compareValues(status, o.status, true) && compareValues(mode, o.mode, true) && compareValues(title, o.title, true)
1419           && compareValues(date, o.date, true);
1420      }
1421
1422      public boolean isEmpty() {
1423        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, mode
1424          , title, code, subject, encounter, date, source, orderedBy, note, entry, emptyReason
1425          );
1426      }
1427
1428  @Override
1429  public ResourceType getResourceType() {
1430    return ResourceType.List;
1431   }
1432
1433 /**
1434   * Search parameter: <b>empty-reason</b>
1435   * <p>
1436   * Description: <b>Why list is empty</b><br>
1437   * Type: <b>token</b><br>
1438   * Path: <b>List.emptyReason</b><br>
1439   * </p>
1440   */
1441  @SearchParamDefinition(name="empty-reason", path="List.emptyReason", description="Why list is empty", type="token" )
1442  public static final String SP_EMPTY_REASON = "empty-reason";
1443 /**
1444   * <b>Fluent Client</b> search parameter constant for <b>empty-reason</b>
1445   * <p>
1446   * Description: <b>Why list is empty</b><br>
1447   * Type: <b>token</b><br>
1448   * Path: <b>List.emptyReason</b><br>
1449   * </p>
1450   */
1451  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EMPTY_REASON = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EMPTY_REASON);
1452
1453 /**
1454   * Search parameter: <b>item</b>
1455   * <p>
1456   * Description: <b>Actual entry</b><br>
1457   * Type: <b>reference</b><br>
1458   * Path: <b>List.entry.item</b><br>
1459   * </p>
1460   */
1461  @SearchParamDefinition(name="item", path="List.entry.item", description="Actual entry", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, ConceptMap2.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
1462  public static final String SP_ITEM = "item";
1463 /**
1464   * <b>Fluent Client</b> search parameter constant for <b>item</b>
1465   * <p>
1466   * Description: <b>Actual entry</b><br>
1467   * Type: <b>reference</b><br>
1468   * Path: <b>List.entry.item</b><br>
1469   * </p>
1470   */
1471  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ITEM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ITEM);
1472
1473/**
1474   * Constant for fluent queries to be used to add include statements. Specifies
1475   * the path value of "<b>List:item</b>".
1476   */
1477  public static final ca.uhn.fhir.model.api.Include INCLUDE_ITEM = new ca.uhn.fhir.model.api.Include("List:item").toLocked();
1478
1479 /**
1480   * Search parameter: <b>notes</b>
1481   * <p>
1482   * Description: <b>The annotation  - text content (as markdown)</b><br>
1483   * Type: <b>string</b><br>
1484   * Path: <b>List.note.text</b><br>
1485   * </p>
1486   */
1487  @SearchParamDefinition(name="notes", path="List.note.text", description="The annotation  - text content (as markdown)", type="string" )
1488  public static final String SP_NOTES = "notes";
1489 /**
1490   * <b>Fluent Client</b> search parameter constant for <b>notes</b>
1491   * <p>
1492   * Description: <b>The annotation  - text content (as markdown)</b><br>
1493   * Type: <b>string</b><br>
1494   * Path: <b>List.note.text</b><br>
1495   * </p>
1496   */
1497  public static final ca.uhn.fhir.rest.gclient.StringClientParam NOTES = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NOTES);
1498
1499 /**
1500   * Search parameter: <b>source</b>
1501   * <p>
1502   * Description: <b>Who and/or what defined the list contents (aka Author)</b><br>
1503   * Type: <b>reference</b><br>
1504   * Path: <b>List.source</b><br>
1505   * </p>
1506   */
1507  @SearchParamDefinition(name="source", path="List.source", description="Who and/or what defined the list contents (aka Author)", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Device.class, Patient.class, Practitioner.class, PractitionerRole.class } )
1508  public static final String SP_SOURCE = "source";
1509 /**
1510   * <b>Fluent Client</b> search parameter constant for <b>source</b>
1511   * <p>
1512   * Description: <b>Who and/or what defined the list contents (aka Author)</b><br>
1513   * Type: <b>reference</b><br>
1514   * Path: <b>List.source</b><br>
1515   * </p>
1516   */
1517  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SOURCE);
1518
1519/**
1520   * Constant for fluent queries to be used to add include statements. Specifies
1521   * the path value of "<b>List:source</b>".
1522   */
1523  public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("List:source").toLocked();
1524
1525 /**
1526   * Search parameter: <b>status</b>
1527   * <p>
1528   * Description: <b>current | retired | entered-in-error</b><br>
1529   * Type: <b>token</b><br>
1530   * Path: <b>List.status</b><br>
1531   * </p>
1532   */
1533  @SearchParamDefinition(name="status", path="List.status", description="current | retired | entered-in-error", type="token" )
1534  public static final String SP_STATUS = "status";
1535 /**
1536   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1537   * <p>
1538   * Description: <b>current | retired | entered-in-error</b><br>
1539   * Type: <b>token</b><br>
1540   * Path: <b>List.status</b><br>
1541   * </p>
1542   */
1543  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1544
1545 /**
1546   * Search parameter: <b>subject</b>
1547   * <p>
1548   * Description: <b>If all resources have the same subject</b><br>
1549   * Type: <b>reference</b><br>
1550   * Path: <b>List.subject</b><br>
1551   * </p>
1552   */
1553  @SearchParamDefinition(name="subject", path="List.subject", description="If all resources have the same subject", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Device.class, Group.class, Location.class, Patient.class } )
1554  public static final String SP_SUBJECT = "subject";
1555 /**
1556   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
1557   * <p>
1558   * Description: <b>If all resources have the same subject</b><br>
1559   * Type: <b>reference</b><br>
1560   * Path: <b>List.subject</b><br>
1561   * </p>
1562   */
1563  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
1564
1565/**
1566   * Constant for fluent queries to be used to add include statements. Specifies
1567   * the path value of "<b>List:subject</b>".
1568   */
1569  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("List:subject").toLocked();
1570
1571 /**
1572   * Search parameter: <b>title</b>
1573   * <p>
1574   * Description: <b>Descriptive name for the list</b><br>
1575   * Type: <b>string</b><br>
1576   * Path: <b>List.title</b><br>
1577   * </p>
1578   */
1579  @SearchParamDefinition(name="title", path="List.title", description="Descriptive name for the list", type="string" )
1580  public static final String SP_TITLE = "title";
1581 /**
1582   * <b>Fluent Client</b> search parameter constant for <b>title</b>
1583   * <p>
1584   * Description: <b>Descriptive name for the list</b><br>
1585   * Type: <b>string</b><br>
1586   * Path: <b>List.title</b><br>
1587   * </p>
1588   */
1589  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
1590
1591 /**
1592   * Search parameter: <b>code</b>
1593   * <p>
1594   * Description: <b>Multiple Resources: 
1595
1596* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
1597* [Condition](condition.html): Code for the condition
1598* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
1599* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result
1600* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
1601* [List](list.html): What the purpose of this list is
1602* [Medication](medication.html): Returns medications for a specific code
1603* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
1604* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
1605* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
1606* [MedicationUsage](medicationusage.html): Return statements of this medication code
1607* [Observation](observation.html): The code of the observation type
1608* [Procedure](procedure.html): A code to identify a  procedure
1609* [ServiceRequest](servicerequest.html): What is being requested/ordered
1610</b><br>
1611   * Type: <b>token</b><br>
1612   * Path: <b>AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationUsage.medication.concept | Observation.code | Procedure.code | ServiceRequest.code</b><br>
1613   * </p>
1614   */
1615  @SearchParamDefinition(name="code", path="AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationUsage.medication.concept | Observation.code | Procedure.code | ServiceRequest.code", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance\r\n* [Condition](condition.html): Code for the condition\r\n* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered\r\n* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code\r\n* [List](list.html): What the purpose of this list is\r\n* [Medication](medication.html): Returns medications for a specific code\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code\r\n* [MedicationUsage](medicationusage.html): Return statements of this medication code\r\n* [Observation](observation.html): The code of the observation type\r\n* [Procedure](procedure.html): A code to identify a  procedure\r\n* [ServiceRequest](servicerequest.html): What is being requested/ordered\r\n", type="token" )
1616  public static final String SP_CODE = "code";
1617 /**
1618   * <b>Fluent Client</b> search parameter constant for <b>code</b>
1619   * <p>
1620   * Description: <b>Multiple Resources: 
1621
1622* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
1623* [Condition](condition.html): Code for the condition
1624* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
1625* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result
1626* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
1627* [List](list.html): What the purpose of this list is
1628* [Medication](medication.html): Returns medications for a specific code
1629* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
1630* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
1631* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
1632* [MedicationUsage](medicationusage.html): Return statements of this medication code
1633* [Observation](observation.html): The code of the observation type
1634* [Procedure](procedure.html): A code to identify a  procedure
1635* [ServiceRequest](servicerequest.html): What is being requested/ordered
1636</b><br>
1637   * Type: <b>token</b><br>
1638   * Path: <b>AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationUsage.medication.concept | Observation.code | Procedure.code | ServiceRequest.code</b><br>
1639   * </p>
1640   */
1641  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
1642
1643 /**
1644   * Search parameter: <b>date</b>
1645   * <p>
1646   * Description: <b>Multiple Resources: 
1647
1648* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
1649* [CarePlan](careplan.html): Time period plan covers
1650* [CareTeam](careteam.html): A date within the coverage time period.
1651* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
1652* [Composition](composition.html): Composition editing time
1653* [Consent](consent.html): When consent was agreed to
1654* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
1655* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
1656* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
1657* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
1658* [Flag](flag.html): Time period when flag is active
1659* [Immunization](immunization.html): Vaccination  (non)-Administration Date
1660* [List](list.html): When the list was prepared
1661* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period
1662* [Procedure](procedure.html): When the procedure occurred or is occurring
1663* [RiskAssessment](riskassessment.html): When was assessment made?
1664* [SupplyRequest](supplyrequest.html): When the request was made
1665</b><br>
1666   * Type: <b>date</b><br>
1667   * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective | Procedure.occurrence | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br>
1668   * </p>
1669   */
1670  @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective | Procedure.occurrence | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination  (non)-Administration Date\r\n* [List](list.html): When the list was prepared\r\n* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" )
1671  public static final String SP_DATE = "date";
1672 /**
1673   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1674   * <p>
1675   * Description: <b>Multiple Resources: 
1676
1677* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
1678* [CarePlan](careplan.html): Time period plan covers
1679* [CareTeam](careteam.html): A date within the coverage time period.
1680* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
1681* [Composition](composition.html): Composition editing time
1682* [Consent](consent.html): When consent was agreed to
1683* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
1684* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
1685* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
1686* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
1687* [Flag](flag.html): Time period when flag is active
1688* [Immunization](immunization.html): Vaccination  (non)-Administration Date
1689* [List](list.html): When the list was prepared
1690* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period
1691* [Procedure](procedure.html): When the procedure occurred or is occurring
1692* [RiskAssessment](riskassessment.html): When was assessment made?
1693* [SupplyRequest](supplyrequest.html): When the request was made
1694</b><br>
1695   * Type: <b>date</b><br>
1696   * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective | Procedure.occurrence | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br>
1697   * </p>
1698   */
1699  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1700
1701 /**
1702   * Search parameter: <b>encounter</b>
1703   * <p>
1704   * Description: <b>Multiple Resources: 
1705
1706* [Composition](composition.html): Context of the Composition
1707* [DeviceRequest](devicerequest.html): Encounter during which request was created
1708* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
1709* [DocumentReference](documentreference.html): Context of the document  content
1710* [Flag](flag.html): Alert relevant during encounter
1711* [List](list.html): Context in which list created
1712* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
1713* [Observation](observation.html): Encounter related to the observation
1714* [Procedure](procedure.html): The Encounter during which this Procedure was created
1715* [RiskAssessment](riskassessment.html): Where was assessment performed?
1716* [ServiceRequest](servicerequest.html): An encounter in which this request is made
1717* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
1718</b><br>
1719   * Type: <b>reference</b><br>
1720   * Path: <b>Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter</b><br>
1721   * </p>
1722   */
1723  @SearchParamDefinition(name="encounter", path="Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter", description="Multiple Resources: \r\n\r\n* [Composition](composition.html): Context of the Composition\r\n* [DeviceRequest](devicerequest.html): Encounter during which request was created\r\n* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made\r\n* [DocumentReference](documentreference.html): Context of the document  content\r\n* [Flag](flag.html): Alert relevant during encounter\r\n* [List](list.html): Context in which list created\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier\r\n* [Observation](observation.html): Encounter related to the observation\r\n* [Procedure](procedure.html): The Encounter during which this Procedure was created\r\n* [RiskAssessment](riskassessment.html): Where was assessment performed?\r\n* [ServiceRequest](servicerequest.html): An encounter in which this request is made\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier\r\n", type="reference", target={Encounter.class } )
1724  public static final String SP_ENCOUNTER = "encounter";
1725 /**
1726   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
1727   * <p>
1728   * Description: <b>Multiple Resources: 
1729
1730* [Composition](composition.html): Context of the Composition
1731* [DeviceRequest](devicerequest.html): Encounter during which request was created
1732* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
1733* [DocumentReference](documentreference.html): Context of the document  content
1734* [Flag](flag.html): Alert relevant during encounter
1735* [List](list.html): Context in which list created
1736* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
1737* [Observation](observation.html): Encounter related to the observation
1738* [Procedure](procedure.html): The Encounter during which this Procedure was created
1739* [RiskAssessment](riskassessment.html): Where was assessment performed?
1740* [ServiceRequest](servicerequest.html): An encounter in which this request is made
1741* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
1742</b><br>
1743   * Type: <b>reference</b><br>
1744   * Path: <b>Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter</b><br>
1745   * </p>
1746   */
1747  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
1748
1749/**
1750   * Constant for fluent queries to be used to add include statements. Specifies
1751   * the path value of "<b>List:encounter</b>".
1752   */
1753  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("List:encounter").toLocked();
1754
1755 /**
1756   * Search parameter: <b>identifier</b>
1757   * <p>
1758   * Description: <b>Multiple Resources: 
1759
1760* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1761* [CarePlan](careplan.html): External Ids for this plan
1762* [CareTeam](careteam.html): External Ids for this team
1763* [Composition](composition.html): Version-independent identifier for the Composition
1764* [Condition](condition.html): A unique identifier of the condition record
1765* [Consent](consent.html): Identifier for this record (external references)
1766* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1767* [DeviceRequest](devicerequest.html): Business identifier for request/order
1768* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1769* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents
1770* [DocumentReference](documentreference.html): Identifier of the attachment binary
1771* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1772* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1773* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1774* [Goal](goal.html): External Ids for this goal
1775* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
1776* [Immunization](immunization.html): Business identifier
1777* [List](list.html): Business identifier
1778* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1779* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1780* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1781* [MedicationUsage](medicationusage.html): Return statements with this external identifier
1782* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
1783* [Observation](observation.html): The unique id for a particular observation
1784* [Procedure](procedure.html): A unique identifier for a procedure
1785* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1786* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1787* [SupplyDelivery](supplydelivery.html): External identifier
1788* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1789* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1790</b><br>
1791   * Type: <b>token</b><br>
1792   * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.content.identifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br>
1793   * </p>
1794   */
1795  @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.content.identifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\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* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\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* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business 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* [MedicationUsage](medicationusage.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* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
1796  public static final String SP_IDENTIFIER = "identifier";
1797 /**
1798   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1799   * <p>
1800   * Description: <b>Multiple Resources: 
1801
1802* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1803* [CarePlan](careplan.html): External Ids for this plan
1804* [CareTeam](careteam.html): External Ids for this team
1805* [Composition](composition.html): Version-independent identifier for the Composition
1806* [Condition](condition.html): A unique identifier of the condition record
1807* [Consent](consent.html): Identifier for this record (external references)
1808* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1809* [DeviceRequest](devicerequest.html): Business identifier for request/order
1810* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1811* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents
1812* [DocumentReference](documentreference.html): Identifier of the attachment binary
1813* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1814* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1815* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1816* [Goal](goal.html): External Ids for this goal
1817* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
1818* [Immunization](immunization.html): Business identifier
1819* [List](list.html): Business identifier
1820* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1821* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1822* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1823* [MedicationUsage](medicationusage.html): Return statements with this external identifier
1824* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
1825* [Observation](observation.html): The unique id for a particular observation
1826* [Procedure](procedure.html): A unique identifier for a procedure
1827* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1828* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1829* [SupplyDelivery](supplydelivery.html): External identifier
1830* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1831* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1832</b><br>
1833   * Type: <b>token</b><br>
1834   * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.content.identifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br>
1835   * </p>
1836   */
1837  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1838
1839 /**
1840   * Search parameter: <b>patient</b>
1841   * <p>
1842   * Description: <b>Multiple Resources: 
1843
1844* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
1845* [CarePlan](careplan.html): Who the care plan is for
1846* [CareTeam](careteam.html): Who care team is for
1847* [ClinicalImpression](clinicalimpression.html): Patient assessed
1848* [Composition](composition.html): Who and/or what the composition is about
1849* [Condition](condition.html): Who has the condition?
1850* [Consent](consent.html): Who the consent applies to
1851* [DetectedIssue](detectedissue.html): Associated patient
1852* [DeviceRequest](devicerequest.html): Individual the service is ordered for
1853* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
1854* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
1855* [DocumentManifest](documentmanifest.html): The subject of the set of documents
1856* [DocumentReference](documentreference.html): Who/what is the subject of the document
1857* [Encounter](encounter.html): The patient present at the encounter
1858* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
1859* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
1860* [Flag](flag.html): The identity of a subject to list flags for
1861* [Goal](goal.html): Who this goal is intended for
1862* [ImagingStudy](imagingstudy.html): Who the study is about
1863* [Immunization](immunization.html): The patient for the vaccination record
1864* [List](list.html): If all resources have the same subject
1865* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
1866* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
1867* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
1868* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.
1869* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement
1870* [Observation](observation.html): The subject that the observation is about (if patient)
1871* [Procedure](procedure.html): Search by subject - a patient
1872* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
1873* [ServiceRequest](servicerequest.html): Search by subject - a patient
1874* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
1875* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
1876</b><br>
1877   * Type: <b>reference</b><br>
1878   * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br>
1879   * </p>
1880   */
1881  @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\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* [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* [DocumentManifest](documentmanifest.html): The subject of the set of documents\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* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\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* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\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* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, ConceptMap2.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
1882  public static final String SP_PATIENT = "patient";
1883 /**
1884   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1885   * <p>
1886   * Description: <b>Multiple Resources: 
1887
1888* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
1889* [CarePlan](careplan.html): Who the care plan is for
1890* [CareTeam](careteam.html): Who care team is for
1891* [ClinicalImpression](clinicalimpression.html): Patient assessed
1892* [Composition](composition.html): Who and/or what the composition is about
1893* [Condition](condition.html): Who has the condition?
1894* [Consent](consent.html): Who the consent applies to
1895* [DetectedIssue](detectedissue.html): Associated patient
1896* [DeviceRequest](devicerequest.html): Individual the service is ordered for
1897* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
1898* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
1899* [DocumentManifest](documentmanifest.html): The subject of the set of documents
1900* [DocumentReference](documentreference.html): Who/what is the subject of the document
1901* [Encounter](encounter.html): The patient present at the encounter
1902* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
1903* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
1904* [Flag](flag.html): The identity of a subject to list flags for
1905* [Goal](goal.html): Who this goal is intended for
1906* [ImagingStudy](imagingstudy.html): Who the study is about
1907* [Immunization](immunization.html): The patient for the vaccination record
1908* [List](list.html): If all resources have the same subject
1909* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
1910* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
1911* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
1912* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.
1913* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement
1914* [Observation](observation.html): The subject that the observation is about (if patient)
1915* [Procedure](procedure.html): Search by subject - a patient
1916* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
1917* [ServiceRequest](servicerequest.html): Search by subject - a patient
1918* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
1919* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
1920</b><br>
1921   * Type: <b>reference</b><br>
1922   * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br>
1923   * </p>
1924   */
1925  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1926
1927/**
1928   * Constant for fluent queries to be used to add include statements. Specifies
1929   * the path value of "<b>List:patient</b>".
1930   */
1931  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("List:patient").toLocked();
1932
1933
1934}
1935