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