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