001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Tue, Dec 13, 2022 17:53+1100 for FHIR vcurrent
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).
052 */
053@ResourceDef(name="Composition", profile="http://hl7.org/fhir/StructureDefinition/Composition")
054public class Composition extends DomainResource {
055
056    @Block()
057    public static class CompositionAttesterComponent extends BackboneElement implements IBaseBackboneElement {
058        /**
059         * The type of attestation the authenticator offers.
060         */
061        @Child(name = "mode", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
062        @Description(shortDefinition="personal | professional | legal | official", formalDefinition="The type of attestation the authenticator offers." )
063        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/composition-attestation-mode")
064        protected CodeableConcept mode;
065
066        /**
067         * When the composition was attested by the party.
068         */
069        @Child(name = "time", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=false)
070        @Description(shortDefinition="When the composition was attested", formalDefinition="When the composition was attested by the party." )
071        protected DateTimeType time;
072
073        /**
074         * Who attested the composition in the specified way.
075         */
076        @Child(name = "party", type = {Patient.class, RelatedPerson.class, Practitioner.class, PractitionerRole.class, Organization.class}, order=3, min=0, max=1, modifier=false, summary=false)
077        @Description(shortDefinition="Who attested the composition", formalDefinition="Who attested the composition in the specified way." )
078        protected Reference party;
079
080        private static final long serialVersionUID = 545132751L;
081
082    /**
083     * Constructor
084     */
085      public CompositionAttesterComponent() {
086        super();
087      }
088
089    /**
090     * Constructor
091     */
092      public CompositionAttesterComponent(CodeableConcept mode) {
093        super();
094        this.setMode(mode);
095      }
096
097        /**
098         * @return {@link #mode} (The type of attestation the authenticator offers.)
099         */
100        public CodeableConcept getMode() { 
101          if (this.mode == null)
102            if (Configuration.errorOnAutoCreate())
103              throw new Error("Attempt to auto-create CompositionAttesterComponent.mode");
104            else if (Configuration.doAutoCreate())
105              this.mode = new CodeableConcept(); // cc
106          return this.mode;
107        }
108
109        public boolean hasMode() { 
110          return this.mode != null && !this.mode.isEmpty();
111        }
112
113        /**
114         * @param value {@link #mode} (The type of attestation the authenticator offers.)
115         */
116        public CompositionAttesterComponent setMode(CodeableConcept value) { 
117          this.mode = value;
118          return this;
119        }
120
121        /**
122         * @return {@link #time} (When the composition was attested by the party.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value
123         */
124        public DateTimeType getTimeElement() { 
125          if (this.time == null)
126            if (Configuration.errorOnAutoCreate())
127              throw new Error("Attempt to auto-create CompositionAttesterComponent.time");
128            else if (Configuration.doAutoCreate())
129              this.time = new DateTimeType(); // bb
130          return this.time;
131        }
132
133        public boolean hasTimeElement() { 
134          return this.time != null && !this.time.isEmpty();
135        }
136
137        public boolean hasTime() { 
138          return this.time != null && !this.time.isEmpty();
139        }
140
141        /**
142         * @param value {@link #time} (When the composition was attested by the party.). This is the underlying object with id, value and extensions. The accessor "getTime" gives direct access to the value
143         */
144        public CompositionAttesterComponent setTimeElement(DateTimeType value) { 
145          this.time = value;
146          return this;
147        }
148
149        /**
150         * @return When the composition was attested by the party.
151         */
152        public Date getTime() { 
153          return this.time == null ? null : this.time.getValue();
154        }
155
156        /**
157         * @param value When the composition was attested by the party.
158         */
159        public CompositionAttesterComponent setTime(Date value) { 
160          if (value == null)
161            this.time = null;
162          else {
163            if (this.time == null)
164              this.time = new DateTimeType();
165            this.time.setValue(value);
166          }
167          return this;
168        }
169
170        /**
171         * @return {@link #party} (Who attested the composition in the specified way.)
172         */
173        public Reference getParty() { 
174          if (this.party == null)
175            if (Configuration.errorOnAutoCreate())
176              throw new Error("Attempt to auto-create CompositionAttesterComponent.party");
177            else if (Configuration.doAutoCreate())
178              this.party = new Reference(); // cc
179          return this.party;
180        }
181
182        public boolean hasParty() { 
183          return this.party != null && !this.party.isEmpty();
184        }
185
186        /**
187         * @param value {@link #party} (Who attested the composition in the specified way.)
188         */
189        public CompositionAttesterComponent setParty(Reference value) { 
190          this.party = value;
191          return this;
192        }
193
194        protected void listChildren(List<Property> children) {
195          super.listChildren(children);
196          children.add(new Property("mode", "CodeableConcept", "The type of attestation the authenticator offers.", 0, 1, mode));
197          children.add(new Property("time", "dateTime", "When the composition was attested by the party.", 0, 1, time));
198          children.add(new Property("party", "Reference(Patient|RelatedPerson|Practitioner|PractitionerRole|Organization)", "Who attested the composition in the specified way.", 0, 1, party));
199        }
200
201        @Override
202        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
203          switch (_hash) {
204          case 3357091: /*mode*/  return new Property("mode", "CodeableConcept", "The type of attestation the authenticator offers.", 0, 1, mode);
205          case 3560141: /*time*/  return new Property("time", "dateTime", "When the composition was attested by the party.", 0, 1, time);
206          case 106437350: /*party*/  return new Property("party", "Reference(Patient|RelatedPerson|Practitioner|PractitionerRole|Organization)", "Who attested the composition in the specified way.", 0, 1, party);
207          default: return super.getNamedProperty(_hash, _name, _checkValid);
208          }
209
210        }
211
212      @Override
213      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
214        switch (hash) {
215        case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // CodeableConcept
216        case 3560141: /*time*/ return this.time == null ? new Base[0] : new Base[] {this.time}; // DateTimeType
217        case 106437350: /*party*/ return this.party == null ? new Base[0] : new Base[] {this.party}; // Reference
218        default: return super.getProperty(hash, name, checkValid);
219        }
220
221      }
222
223      @Override
224      public Base setProperty(int hash, String name, Base value) throws FHIRException {
225        switch (hash) {
226        case 3357091: // mode
227          this.mode = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
228          return value;
229        case 3560141: // time
230          this.time = TypeConvertor.castToDateTime(value); // DateTimeType
231          return value;
232        case 106437350: // party
233          this.party = TypeConvertor.castToReference(value); // Reference
234          return value;
235        default: return super.setProperty(hash, name, value);
236        }
237
238      }
239
240      @Override
241      public Base setProperty(String name, Base value) throws FHIRException {
242        if (name.equals("mode")) {
243          this.mode = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
244        } else if (name.equals("time")) {
245          this.time = TypeConvertor.castToDateTime(value); // DateTimeType
246        } else if (name.equals("party")) {
247          this.party = TypeConvertor.castToReference(value); // Reference
248        } else
249          return super.setProperty(name, value);
250        return value;
251      }
252
253      @Override
254      public Base makeProperty(int hash, String name) throws FHIRException {
255        switch (hash) {
256        case 3357091:  return getMode();
257        case 3560141:  return getTimeElement();
258        case 106437350:  return getParty();
259        default: return super.makeProperty(hash, name);
260        }
261
262      }
263
264      @Override
265      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
266        switch (hash) {
267        case 3357091: /*mode*/ return new String[] {"CodeableConcept"};
268        case 3560141: /*time*/ return new String[] {"dateTime"};
269        case 106437350: /*party*/ return new String[] {"Reference"};
270        default: return super.getTypesForProperty(hash, name);
271        }
272
273      }
274
275      @Override
276      public Base addChild(String name) throws FHIRException {
277        if (name.equals("mode")) {
278          this.mode = new CodeableConcept();
279          return this.mode;
280        }
281        else if (name.equals("time")) {
282          throw new FHIRException("Cannot call addChild on a primitive type Composition.attester.time");
283        }
284        else if (name.equals("party")) {
285          this.party = new Reference();
286          return this.party;
287        }
288        else
289          return super.addChild(name);
290      }
291
292      public CompositionAttesterComponent copy() {
293        CompositionAttesterComponent dst = new CompositionAttesterComponent();
294        copyValues(dst);
295        return dst;
296      }
297
298      public void copyValues(CompositionAttesterComponent dst) {
299        super.copyValues(dst);
300        dst.mode = mode == null ? null : mode.copy();
301        dst.time = time == null ? null : time.copy();
302        dst.party = party == null ? null : party.copy();
303      }
304
305      @Override
306      public boolean equalsDeep(Base other_) {
307        if (!super.equalsDeep(other_))
308          return false;
309        if (!(other_ instanceof CompositionAttesterComponent))
310          return false;
311        CompositionAttesterComponent o = (CompositionAttesterComponent) other_;
312        return compareDeep(mode, o.mode, true) && compareDeep(time, o.time, true) && compareDeep(party, o.party, true)
313          ;
314      }
315
316      @Override
317      public boolean equalsShallow(Base other_) {
318        if (!super.equalsShallow(other_))
319          return false;
320        if (!(other_ instanceof CompositionAttesterComponent))
321          return false;
322        CompositionAttesterComponent o = (CompositionAttesterComponent) other_;
323        return compareValues(time, o.time, true);
324      }
325
326      public boolean isEmpty() {
327        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, time, party);
328      }
329
330  public String fhirType() {
331    return "Composition.attester";
332
333  }
334
335  }
336
337    @Block()
338    public static class CompositionEventComponent extends BackboneElement implements IBaseBackboneElement {
339        /**
340         * This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.
341         */
342        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
343        @Description(shortDefinition="Code(s) that apply to the event being documented", formalDefinition="This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act." )
344        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ActCode")
345        protected List<CodeableConcept> code;
346
347        /**
348         * The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.
349         */
350        @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true)
351        @Description(shortDefinition="The period covered by the documentation", formalDefinition="The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time." )
352        protected Period period;
353
354        /**
355         * The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.
356         */
357        @Child(name = "detail", type = {Reference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
358        @Description(shortDefinition="The event(s) being documented", formalDefinition="The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy." )
359        protected List<Reference> detail;
360
361        private static final long serialVersionUID = 1593079240L;
362
363    /**
364     * Constructor
365     */
366      public CompositionEventComponent() {
367        super();
368      }
369
370        /**
371         * @return {@link #code} (This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a "History and Physical Report" in which the procedure being documented is necessarily a "History and Physical" act.)
372         */
373        public List<CodeableConcept> getCode() { 
374          if (this.code == null)
375            this.code = new ArrayList<CodeableConcept>();
376          return this.code;
377        }
378
379        /**
380         * @return Returns a reference to <code>this</code> for easy method chaining
381         */
382        public CompositionEventComponent setCode(List<CodeableConcept> theCode) { 
383          this.code = theCode;
384          return this;
385        }
386
387        public boolean hasCode() { 
388          if (this.code == null)
389            return false;
390          for (CodeableConcept item : this.code)
391            if (!item.isEmpty())
392              return true;
393          return false;
394        }
395
396        public CodeableConcept addCode() { //3
397          CodeableConcept t = new CodeableConcept();
398          if (this.code == null)
399            this.code = new ArrayList<CodeableConcept>();
400          this.code.add(t);
401          return t;
402        }
403
404        public CompositionEventComponent addCode(CodeableConcept t) { //3
405          if (t == null)
406            return this;
407          if (this.code == null)
408            this.code = new ArrayList<CodeableConcept>();
409          this.code.add(t);
410          return this;
411        }
412
413        /**
414         * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist {3}
415         */
416        public CodeableConcept getCodeFirstRep() { 
417          if (getCode().isEmpty()) {
418            addCode();
419          }
420          return getCode().get(0);
421        }
422
423        /**
424         * @return {@link #period} (The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.)
425         */
426        public Period getPeriod() { 
427          if (this.period == null)
428            if (Configuration.errorOnAutoCreate())
429              throw new Error("Attempt to auto-create CompositionEventComponent.period");
430            else if (Configuration.doAutoCreate())
431              this.period = new Period(); // cc
432          return this.period;
433        }
434
435        public boolean hasPeriod() { 
436          return this.period != null && !this.period.isEmpty();
437        }
438
439        /**
440         * @param value {@link #period} (The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.)
441         */
442        public CompositionEventComponent setPeriod(Period value) { 
443          this.period = value;
444          return this;
445        }
446
447        /**
448         * @return {@link #detail} (The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.)
449         */
450        public List<Reference> getDetail() { 
451          if (this.detail == null)
452            this.detail = new ArrayList<Reference>();
453          return this.detail;
454        }
455
456        /**
457         * @return Returns a reference to <code>this</code> for easy method chaining
458         */
459        public CompositionEventComponent setDetail(List<Reference> theDetail) { 
460          this.detail = theDetail;
461          return this;
462        }
463
464        public boolean hasDetail() { 
465          if (this.detail == null)
466            return false;
467          for (Reference item : this.detail)
468            if (!item.isEmpty())
469              return true;
470          return false;
471        }
472
473        public Reference addDetail() { //3
474          Reference t = new Reference();
475          if (this.detail == null)
476            this.detail = new ArrayList<Reference>();
477          this.detail.add(t);
478          return t;
479        }
480
481        public CompositionEventComponent addDetail(Reference t) { //3
482          if (t == null)
483            return this;
484          if (this.detail == null)
485            this.detail = new ArrayList<Reference>();
486          this.detail.add(t);
487          return this;
488        }
489
490        /**
491         * @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist {3}
492         */
493        public Reference getDetailFirstRep() { 
494          if (getDetail().isEmpty()) {
495            addDetail();
496          }
497          return getDetail().get(0);
498        }
499
500        protected void listChildren(List<Property> children) {
501          super.listChildren(children);
502          children.add(new Property("code", "CodeableConcept", "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act.", 0, java.lang.Integer.MAX_VALUE, code));
503          children.add(new Property("period", "Period", "The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.", 0, 1, period));
504          children.add(new Property("detail", "Reference(Any)", "The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.", 0, java.lang.Integer.MAX_VALUE, detail));
505        }
506
507        @Override
508        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
509          switch (_hash) {
510          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act.", 0, java.lang.Integer.MAX_VALUE, code);
511          case -991726143: /*period*/  return new Property("period", "Period", "The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time.", 0, 1, period);
512          case -1335224239: /*detail*/  return new Property("detail", "Reference(Any)", "The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy.", 0, java.lang.Integer.MAX_VALUE, detail);
513          default: return super.getNamedProperty(_hash, _name, _checkValid);
514          }
515
516        }
517
518      @Override
519      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
520        switch (hash) {
521        case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept
522        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
523        case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // Reference
524        default: return super.getProperty(hash, name, checkValid);
525        }
526
527      }
528
529      @Override
530      public Base setProperty(int hash, String name, Base value) throws FHIRException {
531        switch (hash) {
532        case 3059181: // code
533          this.getCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
534          return value;
535        case -991726143: // period
536          this.period = TypeConvertor.castToPeriod(value); // Period
537          return value;
538        case -1335224239: // detail
539          this.getDetail().add(TypeConvertor.castToReference(value)); // Reference
540          return value;
541        default: return super.setProperty(hash, name, value);
542        }
543
544      }
545
546      @Override
547      public Base setProperty(String name, Base value) throws FHIRException {
548        if (name.equals("code")) {
549          this.getCode().add(TypeConvertor.castToCodeableConcept(value));
550        } else if (name.equals("period")) {
551          this.period = TypeConvertor.castToPeriod(value); // Period
552        } else if (name.equals("detail")) {
553          this.getDetail().add(TypeConvertor.castToReference(value));
554        } else
555          return super.setProperty(name, value);
556        return value;
557      }
558
559      @Override
560      public Base makeProperty(int hash, String name) throws FHIRException {
561        switch (hash) {
562        case 3059181:  return addCode(); 
563        case -991726143:  return getPeriod();
564        case -1335224239:  return addDetail(); 
565        default: return super.makeProperty(hash, name);
566        }
567
568      }
569
570      @Override
571      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
572        switch (hash) {
573        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
574        case -991726143: /*period*/ return new String[] {"Period"};
575        case -1335224239: /*detail*/ return new String[] {"Reference"};
576        default: return super.getTypesForProperty(hash, name);
577        }
578
579      }
580
581      @Override
582      public Base addChild(String name) throws FHIRException {
583        if (name.equals("code")) {
584          return addCode();
585        }
586        else if (name.equals("period")) {
587          this.period = new Period();
588          return this.period;
589        }
590        else if (name.equals("detail")) {
591          return addDetail();
592        }
593        else
594          return super.addChild(name);
595      }
596
597      public CompositionEventComponent copy() {
598        CompositionEventComponent dst = new CompositionEventComponent();
599        copyValues(dst);
600        return dst;
601      }
602
603      public void copyValues(CompositionEventComponent dst) {
604        super.copyValues(dst);
605        if (code != null) {
606          dst.code = new ArrayList<CodeableConcept>();
607          for (CodeableConcept i : code)
608            dst.code.add(i.copy());
609        };
610        dst.period = period == null ? null : period.copy();
611        if (detail != null) {
612          dst.detail = new ArrayList<Reference>();
613          for (Reference i : detail)
614            dst.detail.add(i.copy());
615        };
616      }
617
618      @Override
619      public boolean equalsDeep(Base other_) {
620        if (!super.equalsDeep(other_))
621          return false;
622        if (!(other_ instanceof CompositionEventComponent))
623          return false;
624        CompositionEventComponent o = (CompositionEventComponent) other_;
625        return compareDeep(code, o.code, true) && compareDeep(period, o.period, true) && compareDeep(detail, o.detail, true)
626          ;
627      }
628
629      @Override
630      public boolean equalsShallow(Base other_) {
631        if (!super.equalsShallow(other_))
632          return false;
633        if (!(other_ instanceof CompositionEventComponent))
634          return false;
635        CompositionEventComponent o = (CompositionEventComponent) other_;
636        return true;
637      }
638
639      public boolean isEmpty() {
640        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, period, detail);
641      }
642
643  public String fhirType() {
644    return "Composition.event";
645
646  }
647
648  }
649
650    @Block()
651    public static class SectionComponent extends BackboneElement implements IBaseBackboneElement {
652        /**
653         * The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents.
654         */
655        @Child(name = "title", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
656        @Description(shortDefinition="Label for section (e.g. for ToC)", formalDefinition="The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents." )
657        protected StringType title;
658
659        /**
660         * A code identifying the kind of content contained within the section. This must be consistent with the section title.
661         */
662        @Child(name = "code", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
663        @Description(shortDefinition="Classification of section (recommended)", formalDefinition="A code identifying the kind of content contained within the section. This must be consistent with the section title." )
664        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/doc-section-codes")
665        protected CodeableConcept code;
666
667        /**
668         * Identifies who is responsible for the information in this section, not necessarily who typed it in.
669         */
670        @Child(name = "author", type = {Practitioner.class, PractitionerRole.class, Device.class, Patient.class, RelatedPerson.class, Organization.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
671        @Description(shortDefinition="Who and/or what authored the section", formalDefinition="Identifies who is responsible for the information in this section, not necessarily who typed it in." )
672        protected List<Reference> author;
673
674        /**
675         * The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources).
676         */
677        @Child(name = "focus", type = {Reference.class}, order=4, min=0, max=1, modifier=false, summary=false)
678        @Description(shortDefinition="Who/what the section is about, when it is not about the subject of composition", formalDefinition="The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources)." )
679        protected Reference focus;
680
681        /**
682         * A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.
683         */
684        @Child(name = "text", type = {Narrative.class}, order=5, min=0, max=1, modifier=false, summary=false)
685        @Description(shortDefinition="Text summary of the section, for human interpretation", formalDefinition="A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative." )
686        protected Narrative text;
687
688        /**
689         * How the entry 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.
690         */
691        @Child(name = "mode", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false)
692        @Description(shortDefinition="working | snapshot | changes", formalDefinition="How the entry 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." )
693        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-mode")
694        protected Enumeration<ListMode> mode;
695
696        /**
697         * Specifies the order applied to the items in the section entries.
698         */
699        @Child(name = "orderedBy", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false)
700        @Description(shortDefinition="Order of section entries", formalDefinition="Specifies the order applied to the items in the section entries." )
701        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-order")
702        protected CodeableConcept orderedBy;
703
704        /**
705         * A reference to the actual resource from which the narrative in the section is derived.
706         */
707        @Child(name = "entry", type = {Reference.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
708        @Description(shortDefinition="A reference to data that supports this section", formalDefinition="A reference to the actual resource from which the narrative in the section is derived." )
709        protected List<Reference> entry;
710
711        /**
712         * If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.
713         */
714        @Child(name = "emptyReason", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=false)
715        @Description(shortDefinition="Why the section is empty", formalDefinition="If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason." )
716        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-empty-reason")
717        protected CodeableConcept emptyReason;
718
719        /**
720         * A nested sub-section within this section.
721         */
722        @Child(name = "section", type = {SectionComponent.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
723        @Description(shortDefinition="Nested Section", formalDefinition="A nested sub-section within this section." )
724        protected List<SectionComponent> section;
725
726        private static final long serialVersionUID = 911563193L;
727
728    /**
729     * Constructor
730     */
731      public SectionComponent() {
732        super();
733      }
734
735        /**
736         * @return {@link #title} (The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
737         */
738        public StringType getTitleElement() { 
739          if (this.title == null)
740            if (Configuration.errorOnAutoCreate())
741              throw new Error("Attempt to auto-create SectionComponent.title");
742            else if (Configuration.doAutoCreate())
743              this.title = new StringType(); // bb
744          return this.title;
745        }
746
747        public boolean hasTitleElement() { 
748          return this.title != null && !this.title.isEmpty();
749        }
750
751        public boolean hasTitle() { 
752          return this.title != null && !this.title.isEmpty();
753        }
754
755        /**
756         * @param value {@link #title} (The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
757         */
758        public SectionComponent setTitleElement(StringType value) { 
759          this.title = value;
760          return this;
761        }
762
763        /**
764         * @return The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents.
765         */
766        public String getTitle() { 
767          return this.title == null ? null : this.title.getValue();
768        }
769
770        /**
771         * @param value The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents.
772         */
773        public SectionComponent setTitle(String value) { 
774          if (Utilities.noString(value))
775            this.title = null;
776          else {
777            if (this.title == null)
778              this.title = new StringType();
779            this.title.setValue(value);
780          }
781          return this;
782        }
783
784        /**
785         * @return {@link #code} (A code identifying the kind of content contained within the section. This must be consistent with the section title.)
786         */
787        public CodeableConcept getCode() { 
788          if (this.code == null)
789            if (Configuration.errorOnAutoCreate())
790              throw new Error("Attempt to auto-create SectionComponent.code");
791            else if (Configuration.doAutoCreate())
792              this.code = new CodeableConcept(); // cc
793          return this.code;
794        }
795
796        public boolean hasCode() { 
797          return this.code != null && !this.code.isEmpty();
798        }
799
800        /**
801         * @param value {@link #code} (A code identifying the kind of content contained within the section. This must be consistent with the section title.)
802         */
803        public SectionComponent setCode(CodeableConcept value) { 
804          this.code = value;
805          return this;
806        }
807
808        /**
809         * @return {@link #author} (Identifies who is responsible for the information in this section, not necessarily who typed it in.)
810         */
811        public List<Reference> getAuthor() { 
812          if (this.author == null)
813            this.author = new ArrayList<Reference>();
814          return this.author;
815        }
816
817        /**
818         * @return Returns a reference to <code>this</code> for easy method chaining
819         */
820        public SectionComponent setAuthor(List<Reference> theAuthor) { 
821          this.author = theAuthor;
822          return this;
823        }
824
825        public boolean hasAuthor() { 
826          if (this.author == null)
827            return false;
828          for (Reference item : this.author)
829            if (!item.isEmpty())
830              return true;
831          return false;
832        }
833
834        public Reference addAuthor() { //3
835          Reference t = new Reference();
836          if (this.author == null)
837            this.author = new ArrayList<Reference>();
838          this.author.add(t);
839          return t;
840        }
841
842        public SectionComponent addAuthor(Reference t) { //3
843          if (t == null)
844            return this;
845          if (this.author == null)
846            this.author = new ArrayList<Reference>();
847          this.author.add(t);
848          return this;
849        }
850
851        /**
852         * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist {3}
853         */
854        public Reference getAuthorFirstRep() { 
855          if (getAuthor().isEmpty()) {
856            addAuthor();
857          }
858          return getAuthor().get(0);
859        }
860
861        /**
862         * @return {@link #focus} (The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources).)
863         */
864        public Reference getFocus() { 
865          if (this.focus == null)
866            if (Configuration.errorOnAutoCreate())
867              throw new Error("Attempt to auto-create SectionComponent.focus");
868            else if (Configuration.doAutoCreate())
869              this.focus = new Reference(); // cc
870          return this.focus;
871        }
872
873        public boolean hasFocus() { 
874          return this.focus != null && !this.focus.isEmpty();
875        }
876
877        /**
878         * @param value {@link #focus} (The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources).)
879         */
880        public SectionComponent setFocus(Reference value) { 
881          this.focus = value;
882          return this;
883        }
884
885        /**
886         * @return {@link #text} (A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.)
887         */
888        public Narrative getText() { 
889          if (this.text == null)
890            if (Configuration.errorOnAutoCreate())
891              throw new Error("Attempt to auto-create SectionComponent.text");
892            else if (Configuration.doAutoCreate())
893              this.text = new Narrative(); // cc
894          return this.text;
895        }
896
897        public boolean hasText() { 
898          return this.text != null && !this.text.isEmpty();
899        }
900
901        /**
902         * @param value {@link #text} (A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative.)
903         */
904        public SectionComponent setText(Narrative value) { 
905          this.text = value;
906          return this;
907        }
908
909        /**
910         * @return {@link #mode} (How the entry 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
911         */
912        public Enumeration<ListMode> getModeElement() { 
913          if (this.mode == null)
914            if (Configuration.errorOnAutoCreate())
915              throw new Error("Attempt to auto-create SectionComponent.mode");
916            else if (Configuration.doAutoCreate())
917              this.mode = new Enumeration<ListMode>(new ListModeEnumFactory()); // bb
918          return this.mode;
919        }
920
921        public boolean hasModeElement() { 
922          return this.mode != null && !this.mode.isEmpty();
923        }
924
925        public boolean hasMode() { 
926          return this.mode != null && !this.mode.isEmpty();
927        }
928
929        /**
930         * @param value {@link #mode} (How the entry 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
931         */
932        public SectionComponent setModeElement(Enumeration<ListMode> value) { 
933          this.mode = value;
934          return this;
935        }
936
937        /**
938         * @return How the entry 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.
939         */
940        public ListMode getMode() { 
941          return this.mode == null ? null : this.mode.getValue();
942        }
943
944        /**
945         * @param value How the entry 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.
946         */
947        public SectionComponent setMode(ListMode value) { 
948          if (value == null)
949            this.mode = null;
950          else {
951            if (this.mode == null)
952              this.mode = new Enumeration<ListMode>(new ListModeEnumFactory());
953            this.mode.setValue(value);
954          }
955          return this;
956        }
957
958        /**
959         * @return {@link #orderedBy} (Specifies the order applied to the items in the section entries.)
960         */
961        public CodeableConcept getOrderedBy() { 
962          if (this.orderedBy == null)
963            if (Configuration.errorOnAutoCreate())
964              throw new Error("Attempt to auto-create SectionComponent.orderedBy");
965            else if (Configuration.doAutoCreate())
966              this.orderedBy = new CodeableConcept(); // cc
967          return this.orderedBy;
968        }
969
970        public boolean hasOrderedBy() { 
971          return this.orderedBy != null && !this.orderedBy.isEmpty();
972        }
973
974        /**
975         * @param value {@link #orderedBy} (Specifies the order applied to the items in the section entries.)
976         */
977        public SectionComponent setOrderedBy(CodeableConcept value) { 
978          this.orderedBy = value;
979          return this;
980        }
981
982        /**
983         * @return {@link #entry} (A reference to the actual resource from which the narrative in the section is derived.)
984         */
985        public List<Reference> getEntry() { 
986          if (this.entry == null)
987            this.entry = new ArrayList<Reference>();
988          return this.entry;
989        }
990
991        /**
992         * @return Returns a reference to <code>this</code> for easy method chaining
993         */
994        public SectionComponent setEntry(List<Reference> theEntry) { 
995          this.entry = theEntry;
996          return this;
997        }
998
999        public boolean hasEntry() { 
1000          if (this.entry == null)
1001            return false;
1002          for (Reference item : this.entry)
1003            if (!item.isEmpty())
1004              return true;
1005          return false;
1006        }
1007
1008        public Reference addEntry() { //3
1009          Reference t = new Reference();
1010          if (this.entry == null)
1011            this.entry = new ArrayList<Reference>();
1012          this.entry.add(t);
1013          return t;
1014        }
1015
1016        public SectionComponent addEntry(Reference t) { //3
1017          if (t == null)
1018            return this;
1019          if (this.entry == null)
1020            this.entry = new ArrayList<Reference>();
1021          this.entry.add(t);
1022          return this;
1023        }
1024
1025        /**
1026         * @return The first repetition of repeating field {@link #entry}, creating it if it does not already exist {3}
1027         */
1028        public Reference getEntryFirstRep() { 
1029          if (getEntry().isEmpty()) {
1030            addEntry();
1031          }
1032          return getEntry().get(0);
1033        }
1034
1035        /**
1036         * @return {@link #emptyReason} (If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.)
1037         */
1038        public CodeableConcept getEmptyReason() { 
1039          if (this.emptyReason == null)
1040            if (Configuration.errorOnAutoCreate())
1041              throw new Error("Attempt to auto-create SectionComponent.emptyReason");
1042            else if (Configuration.doAutoCreate())
1043              this.emptyReason = new CodeableConcept(); // cc
1044          return this.emptyReason;
1045        }
1046
1047        public boolean hasEmptyReason() { 
1048          return this.emptyReason != null && !this.emptyReason.isEmpty();
1049        }
1050
1051        /**
1052         * @param value {@link #emptyReason} (If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.)
1053         */
1054        public SectionComponent setEmptyReason(CodeableConcept value) { 
1055          this.emptyReason = value;
1056          return this;
1057        }
1058
1059        /**
1060         * @return {@link #section} (A nested sub-section within this section.)
1061         */
1062        public List<SectionComponent> getSection() { 
1063          if (this.section == null)
1064            this.section = new ArrayList<SectionComponent>();
1065          return this.section;
1066        }
1067
1068        /**
1069         * @return Returns a reference to <code>this</code> for easy method chaining
1070         */
1071        public SectionComponent setSection(List<SectionComponent> theSection) { 
1072          this.section = theSection;
1073          return this;
1074        }
1075
1076        public boolean hasSection() { 
1077          if (this.section == null)
1078            return false;
1079          for (SectionComponent item : this.section)
1080            if (!item.isEmpty())
1081              return true;
1082          return false;
1083        }
1084
1085        public SectionComponent addSection() { //3
1086          SectionComponent t = new SectionComponent();
1087          if (this.section == null)
1088            this.section = new ArrayList<SectionComponent>();
1089          this.section.add(t);
1090          return t;
1091        }
1092
1093        public SectionComponent addSection(SectionComponent t) { //3
1094          if (t == null)
1095            return this;
1096          if (this.section == null)
1097            this.section = new ArrayList<SectionComponent>();
1098          this.section.add(t);
1099          return this;
1100        }
1101
1102        /**
1103         * @return The first repetition of repeating field {@link #section}, creating it if it does not already exist {3}
1104         */
1105        public SectionComponent getSectionFirstRep() { 
1106          if (getSection().isEmpty()) {
1107            addSection();
1108          }
1109          return getSection().get(0);
1110        }
1111
1112        protected void listChildren(List<Property> children) {
1113          super.listChildren(children);
1114          children.add(new Property("title", "string", "The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents.", 0, 1, title));
1115          children.add(new Property("code", "CodeableConcept", "A code identifying the kind of content contained within the section. This must be consistent with the section title.", 0, 1, code));
1116          children.add(new Property("author", "Reference(Practitioner|PractitionerRole|Device|Patient|RelatedPerson|Organization)", "Identifies who is responsible for the information in this section, not necessarily who typed it in.", 0, java.lang.Integer.MAX_VALUE, author));
1117          children.add(new Property("focus", "Reference(Any)", "The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources).", 0, 1, focus));
1118          children.add(new Property("text", "Narrative", "A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative.", 0, 1, text));
1119          children.add(new Property("mode", "code", "How the entry 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));
1120          children.add(new Property("orderedBy", "CodeableConcept", "Specifies the order applied to the items in the section entries.", 0, 1, orderedBy));
1121          children.add(new Property("entry", "Reference(Any)", "A reference to the actual resource from which the narrative in the section is derived.", 0, java.lang.Integer.MAX_VALUE, entry));
1122          children.add(new Property("emptyReason", "CodeableConcept", "If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.", 0, 1, emptyReason));
1123          children.add(new Property("section", "@Composition.section", "A nested sub-section within this section.", 0, java.lang.Integer.MAX_VALUE, section));
1124        }
1125
1126        @Override
1127        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1128          switch (_hash) {
1129          case 110371416: /*title*/  return new Property("title", "string", "The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents.", 0, 1, title);
1130          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A code identifying the kind of content contained within the section. This must be consistent with the section title.", 0, 1, code);
1131          case -1406328437: /*author*/  return new Property("author", "Reference(Practitioner|PractitionerRole|Device|Patient|RelatedPerson|Organization)", "Identifies who is responsible for the information in this section, not necessarily who typed it in.", 0, java.lang.Integer.MAX_VALUE, author);
1132          case 97604824: /*focus*/  return new Property("focus", "Reference(Any)", "The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources).", 0, 1, focus);
1133          case 3556653: /*text*/  return new Property("text", "Narrative", "A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative.", 0, 1, text);
1134          case 3357091: /*mode*/  return new Property("mode", "code", "How the entry 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);
1135          case -391079516: /*orderedBy*/  return new Property("orderedBy", "CodeableConcept", "Specifies the order applied to the items in the section entries.", 0, 1, orderedBy);
1136          case 96667762: /*entry*/  return new Property("entry", "Reference(Any)", "A reference to the actual resource from which the narrative in the section is derived.", 0, java.lang.Integer.MAX_VALUE, entry);
1137          case 1140135409: /*emptyReason*/  return new Property("emptyReason", "CodeableConcept", "If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.", 0, 1, emptyReason);
1138          case 1970241253: /*section*/  return new Property("section", "@Composition.section", "A nested sub-section within this section.", 0, java.lang.Integer.MAX_VALUE, section);
1139          default: return super.getNamedProperty(_hash, _name, _checkValid);
1140          }
1141
1142        }
1143
1144      @Override
1145      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1146        switch (hash) {
1147        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
1148        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1149        case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // Reference
1150        case 97604824: /*focus*/ return this.focus == null ? new Base[0] : new Base[] {this.focus}; // Reference
1151        case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // Narrative
1152        case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<ListMode>
1153        case -391079516: /*orderedBy*/ return this.orderedBy == null ? new Base[0] : new Base[] {this.orderedBy}; // CodeableConcept
1154        case 96667762: /*entry*/ return this.entry == null ? new Base[0] : this.entry.toArray(new Base[this.entry.size()]); // Reference
1155        case 1140135409: /*emptyReason*/ return this.emptyReason == null ? new Base[0] : new Base[] {this.emptyReason}; // CodeableConcept
1156        case 1970241253: /*section*/ return this.section == null ? new Base[0] : this.section.toArray(new Base[this.section.size()]); // SectionComponent
1157        default: return super.getProperty(hash, name, checkValid);
1158        }
1159
1160      }
1161
1162      @Override
1163      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1164        switch (hash) {
1165        case 110371416: // title
1166          this.title = TypeConvertor.castToString(value); // StringType
1167          return value;
1168        case 3059181: // code
1169          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1170          return value;
1171        case -1406328437: // author
1172          this.getAuthor().add(TypeConvertor.castToReference(value)); // Reference
1173          return value;
1174        case 97604824: // focus
1175          this.focus = TypeConvertor.castToReference(value); // Reference
1176          return value;
1177        case 3556653: // text
1178          this.text = TypeConvertor.castToNarrative(value); // Narrative
1179          return value;
1180        case 3357091: // mode
1181          value = new ListModeEnumFactory().fromType(TypeConvertor.castToCode(value));
1182          this.mode = (Enumeration) value; // Enumeration<ListMode>
1183          return value;
1184        case -391079516: // orderedBy
1185          this.orderedBy = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1186          return value;
1187        case 96667762: // entry
1188          this.getEntry().add(TypeConvertor.castToReference(value)); // Reference
1189          return value;
1190        case 1140135409: // emptyReason
1191          this.emptyReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1192          return value;
1193        case 1970241253: // section
1194          this.getSection().add((SectionComponent) value); // SectionComponent
1195          return value;
1196        default: return super.setProperty(hash, name, value);
1197        }
1198
1199      }
1200
1201      @Override
1202      public Base setProperty(String name, Base value) throws FHIRException {
1203        if (name.equals("title")) {
1204          this.title = TypeConvertor.castToString(value); // StringType
1205        } else if (name.equals("code")) {
1206          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1207        } else if (name.equals("author")) {
1208          this.getAuthor().add(TypeConvertor.castToReference(value));
1209        } else if (name.equals("focus")) {
1210          this.focus = TypeConvertor.castToReference(value); // Reference
1211        } else if (name.equals("text")) {
1212          this.text = TypeConvertor.castToNarrative(value); // Narrative
1213        } else if (name.equals("mode")) {
1214          value = new ListModeEnumFactory().fromType(TypeConvertor.castToCode(value));
1215          this.mode = (Enumeration) value; // Enumeration<ListMode>
1216        } else if (name.equals("orderedBy")) {
1217          this.orderedBy = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1218        } else if (name.equals("entry")) {
1219          this.getEntry().add(TypeConvertor.castToReference(value));
1220        } else if (name.equals("emptyReason")) {
1221          this.emptyReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1222        } else if (name.equals("section")) {
1223          this.getSection().add((SectionComponent) value);
1224        } else
1225          return super.setProperty(name, value);
1226        return value;
1227      }
1228
1229      @Override
1230      public Base makeProperty(int hash, String name) throws FHIRException {
1231        switch (hash) {
1232        case 110371416:  return getTitleElement();
1233        case 3059181:  return getCode();
1234        case -1406328437:  return addAuthor(); 
1235        case 97604824:  return getFocus();
1236        case 3556653:  return getText();
1237        case 3357091:  return getModeElement();
1238        case -391079516:  return getOrderedBy();
1239        case 96667762:  return addEntry(); 
1240        case 1140135409:  return getEmptyReason();
1241        case 1970241253:  return addSection(); 
1242        default: return super.makeProperty(hash, name);
1243        }
1244
1245      }
1246
1247      @Override
1248      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1249        switch (hash) {
1250        case 110371416: /*title*/ return new String[] {"string"};
1251        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1252        case -1406328437: /*author*/ return new String[] {"Reference"};
1253        case 97604824: /*focus*/ return new String[] {"Reference"};
1254        case 3556653: /*text*/ return new String[] {"Narrative"};
1255        case 3357091: /*mode*/ return new String[] {"code"};
1256        case -391079516: /*orderedBy*/ return new String[] {"CodeableConcept"};
1257        case 96667762: /*entry*/ return new String[] {"Reference"};
1258        case 1140135409: /*emptyReason*/ return new String[] {"CodeableConcept"};
1259        case 1970241253: /*section*/ return new String[] {"@Composition.section"};
1260        default: return super.getTypesForProperty(hash, name);
1261        }
1262
1263      }
1264
1265      @Override
1266      public Base addChild(String name) throws FHIRException {
1267        if (name.equals("title")) {
1268          throw new FHIRException("Cannot call addChild on a primitive type Composition.section.title");
1269        }
1270        else if (name.equals("code")) {
1271          this.code = new CodeableConcept();
1272          return this.code;
1273        }
1274        else if (name.equals("author")) {
1275          return addAuthor();
1276        }
1277        else if (name.equals("focus")) {
1278          this.focus = new Reference();
1279          return this.focus;
1280        }
1281        else if (name.equals("text")) {
1282          this.text = new Narrative();
1283          return this.text;
1284        }
1285        else if (name.equals("mode")) {
1286          throw new FHIRException("Cannot call addChild on a primitive type Composition.section.mode");
1287        }
1288        else if (name.equals("orderedBy")) {
1289          this.orderedBy = new CodeableConcept();
1290          return this.orderedBy;
1291        }
1292        else if (name.equals("entry")) {
1293          return addEntry();
1294        }
1295        else if (name.equals("emptyReason")) {
1296          this.emptyReason = new CodeableConcept();
1297          return this.emptyReason;
1298        }
1299        else if (name.equals("section")) {
1300          return addSection();
1301        }
1302        else
1303          return super.addChild(name);
1304      }
1305
1306      public SectionComponent copy() {
1307        SectionComponent dst = new SectionComponent();
1308        copyValues(dst);
1309        return dst;
1310      }
1311
1312      public void copyValues(SectionComponent dst) {
1313        super.copyValues(dst);
1314        dst.title = title == null ? null : title.copy();
1315        dst.code = code == null ? null : code.copy();
1316        if (author != null) {
1317          dst.author = new ArrayList<Reference>();
1318          for (Reference i : author)
1319            dst.author.add(i.copy());
1320        };
1321        dst.focus = focus == null ? null : focus.copy();
1322        dst.text = text == null ? null : text.copy();
1323        dst.mode = mode == null ? null : mode.copy();
1324        dst.orderedBy = orderedBy == null ? null : orderedBy.copy();
1325        if (entry != null) {
1326          dst.entry = new ArrayList<Reference>();
1327          for (Reference i : entry)
1328            dst.entry.add(i.copy());
1329        };
1330        dst.emptyReason = emptyReason == null ? null : emptyReason.copy();
1331        if (section != null) {
1332          dst.section = new ArrayList<SectionComponent>();
1333          for (SectionComponent i : section)
1334            dst.section.add(i.copy());
1335        };
1336      }
1337
1338      @Override
1339      public boolean equalsDeep(Base other_) {
1340        if (!super.equalsDeep(other_))
1341          return false;
1342        if (!(other_ instanceof SectionComponent))
1343          return false;
1344        SectionComponent o = (SectionComponent) other_;
1345        return compareDeep(title, o.title, true) && compareDeep(code, o.code, true) && compareDeep(author, o.author, true)
1346           && compareDeep(focus, o.focus, true) && compareDeep(text, o.text, true) && compareDeep(mode, o.mode, true)
1347           && compareDeep(orderedBy, o.orderedBy, true) && compareDeep(entry, o.entry, true) && compareDeep(emptyReason, o.emptyReason, true)
1348           && compareDeep(section, o.section, true);
1349      }
1350
1351      @Override
1352      public boolean equalsShallow(Base other_) {
1353        if (!super.equalsShallow(other_))
1354          return false;
1355        if (!(other_ instanceof SectionComponent))
1356          return false;
1357        SectionComponent o = (SectionComponent) other_;
1358        return compareValues(title, o.title, true) && compareValues(mode, o.mode, true);
1359      }
1360
1361      public boolean isEmpty() {
1362        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(title, code, author, focus
1363          , text, mode, orderedBy, entry, emptyReason, section);
1364      }
1365
1366  public String fhirType() {
1367    return "Composition.section";
1368
1369  }
1370
1371  }
1372
1373    /**
1374     * An absolute URI that is used to identify this Composition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this Composition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the Composition is stored on different servers.
1375     */
1376    @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true)
1377    @Description(shortDefinition="Canonical identifier for this Composition, represented as a URI (globally unique)", formalDefinition="An absolute URI that is used to identify this Composition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this Composition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the Composition is stored on different servers." )
1378    protected UriType url;
1379
1380    /**
1381     * A version-independent identifier for the Composition. This identifier stays constant as the composition is changed over time.
1382     */
1383    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1384    @Description(shortDefinition="Version-independent identifier for the Composition", formalDefinition="A version-independent identifier for the Composition. This identifier stays constant as the composition is changed over time." )
1385    protected List<Identifier> identifier;
1386
1387    /**
1388     * An explicitly assigned identifer of a variation of the content in the Composition.
1389     */
1390    @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1391    @Description(shortDefinition="An explicitly assigned identifer of a variation of the content in the Composition", formalDefinition="An explicitly assigned identifer of a variation of the content in the Composition." )
1392    protected StringType version;
1393
1394    /**
1395     * The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.
1396     */
1397    @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true)
1398    @Description(shortDefinition="registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown", formalDefinition="The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document." )
1399    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/composition-status")
1400    protected Enumeration<CompositionStatus> status;
1401
1402    /**
1403     * Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.
1404     */
1405    @Child(name = "type", type = {CodeableConcept.class}, order=4, min=1, max=1, modifier=false, summary=true)
1406    @Description(shortDefinition="Kind of composition (LOINC if possible)", formalDefinition="Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition." )
1407    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/doc-typecodes")
1408    protected CodeableConcept type;
1409
1410    /**
1411     * A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.
1412     */
1413    @Child(name = "category", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1414    @Description(shortDefinition="Categorization of Composition", formalDefinition="A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type." )
1415    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/referenced-item-category")
1416    protected List<CodeableConcept> category;
1417
1418    /**
1419     * Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).
1420     */
1421    @Child(name = "subject", type = {Reference.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1422    @Description(shortDefinition="Who and/or what the composition is about", formalDefinition="Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure)." )
1423    protected List<Reference> subject;
1424
1425    /**
1426     * Describes the clinical encounter or type of care this documentation is associated with.
1427     */
1428    @Child(name = "encounter", type = {Encounter.class}, order=7, min=0, max=1, modifier=false, summary=true)
1429    @Description(shortDefinition="Context of the Composition", formalDefinition="Describes the clinical encounter or type of care this documentation is associated with." )
1430    protected Reference encounter;
1431
1432    /**
1433     * The composition editing time, when the composition was last logically changed by the author.
1434     */
1435    @Child(name = "date", type = {DateTimeType.class}, order=8, min=1, max=1, modifier=false, summary=true)
1436    @Description(shortDefinition="Composition editing time", formalDefinition="The composition editing time, when the composition was last logically changed by the author." )
1437    protected DateTimeType date;
1438
1439    /**
1440     * The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate Composition instances.
1441     */
1442    @Child(name = "useContext", type = {UsageContext.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1443    @Description(shortDefinition="The context that the content is intended to support", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate Composition instances." )
1444    protected List<UsageContext> useContext;
1445
1446    /**
1447     * Identifies who is responsible for the information in the composition, not necessarily who typed it in.
1448     */
1449    @Child(name = "author", type = {Practitioner.class, PractitionerRole.class, Device.class, Patient.class, RelatedPerson.class, Organization.class}, order=10, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1450    @Description(shortDefinition="Who and/or what authored the composition", formalDefinition="Identifies who is responsible for the information in the composition, not necessarily who typed it in." )
1451    protected List<Reference> author;
1452
1453    /**
1454     * A natural language name identifying the composition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1455     */
1456    @Child(name = "name", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=true)
1457    @Description(shortDefinition="Name for this Composition (computer friendly)", formalDefinition="A natural language name identifying the composition. This name should be usable as an identifier for the module by machine processing applications such as code generation." )
1458    protected StringType name;
1459
1460    /**
1461     * Official human-readable label for the composition.
1462     */
1463    @Child(name = "title", type = {StringType.class}, order=12, min=1, max=1, modifier=false, summary=true)
1464    @Description(shortDefinition="Human Readable name/title", formalDefinition="Official human-readable label for the composition." )
1465    protected StringType title;
1466
1467    /**
1468     * For any additional notes.
1469     */
1470    @Child(name = "note", type = {Annotation.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1471    @Description(shortDefinition="For any additional notes", formalDefinition="For any additional notes." )
1472    protected List<Annotation> note;
1473
1474    /**
1475     * A participant who has attested to the accuracy of the composition/document.
1476     */
1477    @Child(name = "attester", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1478    @Description(shortDefinition="Attests to accuracy of composition", formalDefinition="A participant who has attested to the accuracy of the composition/document." )
1479    protected List<CompositionAttesterComponent> attester;
1480
1481    /**
1482     * Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.
1483     */
1484    @Child(name = "custodian", type = {Organization.class}, order=15, min=0, max=1, modifier=false, summary=true)
1485    @Description(shortDefinition="Organization which maintains the composition", formalDefinition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information." )
1486    protected Reference custodian;
1487
1488    /**
1489     * Relationships that this composition has with other compositions or documents that already exist.
1490     */
1491    @Child(name = "relatesTo", type = {RelatedArtifact.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1492    @Description(shortDefinition="Relationships to other compositions/documents", formalDefinition="Relationships that this composition has with other compositions or documents that already exist." )
1493    protected List<RelatedArtifact> relatesTo;
1494
1495    /**
1496     * The clinical service, such as a colonoscopy or an appendectomy, being documented.
1497     */
1498    @Child(name = "event", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1499    @Description(shortDefinition="The clinical service(s) being documented", formalDefinition="The clinical service, such as a colonoscopy or an appendectomy, being documented." )
1500    protected List<CompositionEventComponent> event;
1501
1502    /**
1503     * The root of the sections that make up the composition.
1504     */
1505    @Child(name = "section", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1506    @Description(shortDefinition="Composition is broken into sections", formalDefinition="The root of the sections that make up the composition." )
1507    protected List<SectionComponent> section;
1508
1509    private static final long serialVersionUID = 2030933035L;
1510
1511  /**
1512   * Constructor
1513   */
1514    public Composition() {
1515      super();
1516    }
1517
1518  /**
1519   * Constructor
1520   */
1521    public Composition(CompositionStatus status, CodeableConcept type, Date date, Reference author, String title) {
1522      super();
1523      this.setStatus(status);
1524      this.setType(type);
1525      this.setDate(date);
1526      this.addAuthor(author);
1527      this.setTitle(title);
1528    }
1529
1530    /**
1531     * @return {@link #url} (An absolute URI that is used to identify this Composition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this Composition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the Composition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1532     */
1533    public UriType getUrlElement() { 
1534      if (this.url == null)
1535        if (Configuration.errorOnAutoCreate())
1536          throw new Error("Attempt to auto-create Composition.url");
1537        else if (Configuration.doAutoCreate())
1538          this.url = new UriType(); // bb
1539      return this.url;
1540    }
1541
1542    public boolean hasUrlElement() { 
1543      return this.url != null && !this.url.isEmpty();
1544    }
1545
1546    public boolean hasUrl() { 
1547      return this.url != null && !this.url.isEmpty();
1548    }
1549
1550    /**
1551     * @param value {@link #url} (An absolute URI that is used to identify this Composition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this Composition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the Composition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1552     */
1553    public Composition setUrlElement(UriType value) { 
1554      this.url = value;
1555      return this;
1556    }
1557
1558    /**
1559     * @return An absolute URI that is used to identify this Composition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this Composition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the Composition is stored on different servers.
1560     */
1561    public String getUrl() { 
1562      return this.url == null ? null : this.url.getValue();
1563    }
1564
1565    /**
1566     * @param value An absolute URI that is used to identify this Composition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this Composition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the Composition is stored on different servers.
1567     */
1568    public Composition setUrl(String value) { 
1569      if (Utilities.noString(value))
1570        this.url = null;
1571      else {
1572        if (this.url == null)
1573          this.url = new UriType();
1574        this.url.setValue(value);
1575      }
1576      return this;
1577    }
1578
1579    /**
1580     * @return {@link #identifier} (A version-independent identifier for the Composition. This identifier stays constant as the composition is changed over time.)
1581     */
1582    public List<Identifier> getIdentifier() { 
1583      if (this.identifier == null)
1584        this.identifier = new ArrayList<Identifier>();
1585      return this.identifier;
1586    }
1587
1588    /**
1589     * @return Returns a reference to <code>this</code> for easy method chaining
1590     */
1591    public Composition setIdentifier(List<Identifier> theIdentifier) { 
1592      this.identifier = theIdentifier;
1593      return this;
1594    }
1595
1596    public boolean hasIdentifier() { 
1597      if (this.identifier == null)
1598        return false;
1599      for (Identifier item : this.identifier)
1600        if (!item.isEmpty())
1601          return true;
1602      return false;
1603    }
1604
1605    public Identifier addIdentifier() { //3
1606      Identifier t = new Identifier();
1607      if (this.identifier == null)
1608        this.identifier = new ArrayList<Identifier>();
1609      this.identifier.add(t);
1610      return t;
1611    }
1612
1613    public Composition addIdentifier(Identifier t) { //3
1614      if (t == null)
1615        return this;
1616      if (this.identifier == null)
1617        this.identifier = new ArrayList<Identifier>();
1618      this.identifier.add(t);
1619      return this;
1620    }
1621
1622    /**
1623     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1624     */
1625    public Identifier getIdentifierFirstRep() { 
1626      if (getIdentifier().isEmpty()) {
1627        addIdentifier();
1628      }
1629      return getIdentifier().get(0);
1630    }
1631
1632    /**
1633     * @return {@link #version} (An explicitly assigned identifer of a variation of the content in the Composition.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1634     */
1635    public StringType getVersionElement() { 
1636      if (this.version == null)
1637        if (Configuration.errorOnAutoCreate())
1638          throw new Error("Attempt to auto-create Composition.version");
1639        else if (Configuration.doAutoCreate())
1640          this.version = new StringType(); // bb
1641      return this.version;
1642    }
1643
1644    public boolean hasVersionElement() { 
1645      return this.version != null && !this.version.isEmpty();
1646    }
1647
1648    public boolean hasVersion() { 
1649      return this.version != null && !this.version.isEmpty();
1650    }
1651
1652    /**
1653     * @param value {@link #version} (An explicitly assigned identifer of a variation of the content in the Composition.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1654     */
1655    public Composition setVersionElement(StringType value) { 
1656      this.version = value;
1657      return this;
1658    }
1659
1660    /**
1661     * @return An explicitly assigned identifer of a variation of the content in the Composition.
1662     */
1663    public String getVersion() { 
1664      return this.version == null ? null : this.version.getValue();
1665    }
1666
1667    /**
1668     * @param value An explicitly assigned identifer of a variation of the content in the Composition.
1669     */
1670    public Composition setVersion(String value) { 
1671      if (Utilities.noString(value))
1672        this.version = null;
1673      else {
1674        if (this.version == null)
1675          this.version = new StringType();
1676        this.version.setValue(value);
1677      }
1678      return this;
1679    }
1680
1681    /**
1682     * @return {@link #status} (The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1683     */
1684    public Enumeration<CompositionStatus> getStatusElement() { 
1685      if (this.status == null)
1686        if (Configuration.errorOnAutoCreate())
1687          throw new Error("Attempt to auto-create Composition.status");
1688        else if (Configuration.doAutoCreate())
1689          this.status = new Enumeration<CompositionStatus>(new CompositionStatusEnumFactory()); // bb
1690      return this.status;
1691    }
1692
1693    public boolean hasStatusElement() { 
1694      return this.status != null && !this.status.isEmpty();
1695    }
1696
1697    public boolean hasStatus() { 
1698      return this.status != null && !this.status.isEmpty();
1699    }
1700
1701    /**
1702     * @param value {@link #status} (The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1703     */
1704    public Composition setStatusElement(Enumeration<CompositionStatus> value) { 
1705      this.status = value;
1706      return this;
1707    }
1708
1709    /**
1710     * @return The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.
1711     */
1712    public CompositionStatus getStatus() { 
1713      return this.status == null ? null : this.status.getValue();
1714    }
1715
1716    /**
1717     * @param value The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.
1718     */
1719    public Composition setStatus(CompositionStatus value) { 
1720        if (this.status == null)
1721          this.status = new Enumeration<CompositionStatus>(new CompositionStatusEnumFactory());
1722        this.status.setValue(value);
1723      return this;
1724    }
1725
1726    /**
1727     * @return {@link #type} (Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.)
1728     */
1729    public CodeableConcept getType() { 
1730      if (this.type == null)
1731        if (Configuration.errorOnAutoCreate())
1732          throw new Error("Attempt to auto-create Composition.type");
1733        else if (Configuration.doAutoCreate())
1734          this.type = new CodeableConcept(); // cc
1735      return this.type;
1736    }
1737
1738    public boolean hasType() { 
1739      return this.type != null && !this.type.isEmpty();
1740    }
1741
1742    /**
1743     * @param value {@link #type} (Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.)
1744     */
1745    public Composition setType(CodeableConcept value) { 
1746      this.type = value;
1747      return this;
1748    }
1749
1750    /**
1751     * @return {@link #category} (A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.)
1752     */
1753    public List<CodeableConcept> getCategory() { 
1754      if (this.category == null)
1755        this.category = new ArrayList<CodeableConcept>();
1756      return this.category;
1757    }
1758
1759    /**
1760     * @return Returns a reference to <code>this</code> for easy method chaining
1761     */
1762    public Composition setCategory(List<CodeableConcept> theCategory) { 
1763      this.category = theCategory;
1764      return this;
1765    }
1766
1767    public boolean hasCategory() { 
1768      if (this.category == null)
1769        return false;
1770      for (CodeableConcept item : this.category)
1771        if (!item.isEmpty())
1772          return true;
1773      return false;
1774    }
1775
1776    public CodeableConcept addCategory() { //3
1777      CodeableConcept t = new CodeableConcept();
1778      if (this.category == null)
1779        this.category = new ArrayList<CodeableConcept>();
1780      this.category.add(t);
1781      return t;
1782    }
1783
1784    public Composition addCategory(CodeableConcept t) { //3
1785      if (t == null)
1786        return this;
1787      if (this.category == null)
1788        this.category = new ArrayList<CodeableConcept>();
1789      this.category.add(t);
1790      return this;
1791    }
1792
1793    /**
1794     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3}
1795     */
1796    public CodeableConcept getCategoryFirstRep() { 
1797      if (getCategory().isEmpty()) {
1798        addCategory();
1799      }
1800      return getCategory().get(0);
1801    }
1802
1803    /**
1804     * @return {@link #subject} (Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).)
1805     */
1806    public List<Reference> getSubject() { 
1807      if (this.subject == null)
1808        this.subject = new ArrayList<Reference>();
1809      return this.subject;
1810    }
1811
1812    /**
1813     * @return Returns a reference to <code>this</code> for easy method chaining
1814     */
1815    public Composition setSubject(List<Reference> theSubject) { 
1816      this.subject = theSubject;
1817      return this;
1818    }
1819
1820    public boolean hasSubject() { 
1821      if (this.subject == null)
1822        return false;
1823      for (Reference item : this.subject)
1824        if (!item.isEmpty())
1825          return true;
1826      return false;
1827    }
1828
1829    public Reference addSubject() { //3
1830      Reference t = new Reference();
1831      if (this.subject == null)
1832        this.subject = new ArrayList<Reference>();
1833      this.subject.add(t);
1834      return t;
1835    }
1836
1837    public Composition addSubject(Reference t) { //3
1838      if (t == null)
1839        return this;
1840      if (this.subject == null)
1841        this.subject = new ArrayList<Reference>();
1842      this.subject.add(t);
1843      return this;
1844    }
1845
1846    /**
1847     * @return The first repetition of repeating field {@link #subject}, creating it if it does not already exist {3}
1848     */
1849    public Reference getSubjectFirstRep() { 
1850      if (getSubject().isEmpty()) {
1851        addSubject();
1852      }
1853      return getSubject().get(0);
1854    }
1855
1856    /**
1857     * @return {@link #encounter} (Describes the clinical encounter or type of care this documentation is associated with.)
1858     */
1859    public Reference getEncounter() { 
1860      if (this.encounter == null)
1861        if (Configuration.errorOnAutoCreate())
1862          throw new Error("Attempt to auto-create Composition.encounter");
1863        else if (Configuration.doAutoCreate())
1864          this.encounter = new Reference(); // cc
1865      return this.encounter;
1866    }
1867
1868    public boolean hasEncounter() { 
1869      return this.encounter != null && !this.encounter.isEmpty();
1870    }
1871
1872    /**
1873     * @param value {@link #encounter} (Describes the clinical encounter or type of care this documentation is associated with.)
1874     */
1875    public Composition setEncounter(Reference value) { 
1876      this.encounter = value;
1877      return this;
1878    }
1879
1880    /**
1881     * @return {@link #date} (The composition editing time, when the composition was last logically changed by the author.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1882     */
1883    public DateTimeType getDateElement() { 
1884      if (this.date == null)
1885        if (Configuration.errorOnAutoCreate())
1886          throw new Error("Attempt to auto-create Composition.date");
1887        else if (Configuration.doAutoCreate())
1888          this.date = new DateTimeType(); // bb
1889      return this.date;
1890    }
1891
1892    public boolean hasDateElement() { 
1893      return this.date != null && !this.date.isEmpty();
1894    }
1895
1896    public boolean hasDate() { 
1897      return this.date != null && !this.date.isEmpty();
1898    }
1899
1900    /**
1901     * @param value {@link #date} (The composition editing time, when the composition was last logically changed by the author.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1902     */
1903    public Composition setDateElement(DateTimeType value) { 
1904      this.date = value;
1905      return this;
1906    }
1907
1908    /**
1909     * @return The composition editing time, when the composition was last logically changed by the author.
1910     */
1911    public Date getDate() { 
1912      return this.date == null ? null : this.date.getValue();
1913    }
1914
1915    /**
1916     * @param value The composition editing time, when the composition was last logically changed by the author.
1917     */
1918    public Composition setDate(Date value) { 
1919        if (this.date == null)
1920          this.date = new DateTimeType();
1921        this.date.setValue(value);
1922      return this;
1923    }
1924
1925    /**
1926     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate Composition instances.)
1927     */
1928    public List<UsageContext> getUseContext() { 
1929      if (this.useContext == null)
1930        this.useContext = new ArrayList<UsageContext>();
1931      return this.useContext;
1932    }
1933
1934    /**
1935     * @return Returns a reference to <code>this</code> for easy method chaining
1936     */
1937    public Composition setUseContext(List<UsageContext> theUseContext) { 
1938      this.useContext = theUseContext;
1939      return this;
1940    }
1941
1942    public boolean hasUseContext() { 
1943      if (this.useContext == null)
1944        return false;
1945      for (UsageContext item : this.useContext)
1946        if (!item.isEmpty())
1947          return true;
1948      return false;
1949    }
1950
1951    public UsageContext addUseContext() { //3
1952      UsageContext t = new UsageContext();
1953      if (this.useContext == null)
1954        this.useContext = new ArrayList<UsageContext>();
1955      this.useContext.add(t);
1956      return t;
1957    }
1958
1959    public Composition addUseContext(UsageContext t) { //3
1960      if (t == null)
1961        return this;
1962      if (this.useContext == null)
1963        this.useContext = new ArrayList<UsageContext>();
1964      this.useContext.add(t);
1965      return this;
1966    }
1967
1968    /**
1969     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3}
1970     */
1971    public UsageContext getUseContextFirstRep() { 
1972      if (getUseContext().isEmpty()) {
1973        addUseContext();
1974      }
1975      return getUseContext().get(0);
1976    }
1977
1978    /**
1979     * @return {@link #author} (Identifies who is responsible for the information in the composition, not necessarily who typed it in.)
1980     */
1981    public List<Reference> getAuthor() { 
1982      if (this.author == null)
1983        this.author = new ArrayList<Reference>();
1984      return this.author;
1985    }
1986
1987    /**
1988     * @return Returns a reference to <code>this</code> for easy method chaining
1989     */
1990    public Composition setAuthor(List<Reference> theAuthor) { 
1991      this.author = theAuthor;
1992      return this;
1993    }
1994
1995    public boolean hasAuthor() { 
1996      if (this.author == null)
1997        return false;
1998      for (Reference item : this.author)
1999        if (!item.isEmpty())
2000          return true;
2001      return false;
2002    }
2003
2004    public Reference addAuthor() { //3
2005      Reference t = new Reference();
2006      if (this.author == null)
2007        this.author = new ArrayList<Reference>();
2008      this.author.add(t);
2009      return t;
2010    }
2011
2012    public Composition addAuthor(Reference t) { //3
2013      if (t == null)
2014        return this;
2015      if (this.author == null)
2016        this.author = new ArrayList<Reference>();
2017      this.author.add(t);
2018      return this;
2019    }
2020
2021    /**
2022     * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist {3}
2023     */
2024    public Reference getAuthorFirstRep() { 
2025      if (getAuthor().isEmpty()) {
2026        addAuthor();
2027      }
2028      return getAuthor().get(0);
2029    }
2030
2031    /**
2032     * @return {@link #name} (A natural language name identifying the composition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2033     */
2034    public StringType getNameElement() { 
2035      if (this.name == null)
2036        if (Configuration.errorOnAutoCreate())
2037          throw new Error("Attempt to auto-create Composition.name");
2038        else if (Configuration.doAutoCreate())
2039          this.name = new StringType(); // bb
2040      return this.name;
2041    }
2042
2043    public boolean hasNameElement() { 
2044      return this.name != null && !this.name.isEmpty();
2045    }
2046
2047    public boolean hasName() { 
2048      return this.name != null && !this.name.isEmpty();
2049    }
2050
2051    /**
2052     * @param value {@link #name} (A natural language name identifying the composition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2053     */
2054    public Composition setNameElement(StringType value) { 
2055      this.name = value;
2056      return this;
2057    }
2058
2059    /**
2060     * @return A natural language name identifying the composition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
2061     */
2062    public String getName() { 
2063      return this.name == null ? null : this.name.getValue();
2064    }
2065
2066    /**
2067     * @param value A natural language name identifying the composition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
2068     */
2069    public Composition setName(String value) { 
2070      if (Utilities.noString(value))
2071        this.name = null;
2072      else {
2073        if (this.name == null)
2074          this.name = new StringType();
2075        this.name.setValue(value);
2076      }
2077      return this;
2078    }
2079
2080    /**
2081     * @return {@link #title} (Official human-readable label for the composition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
2082     */
2083    public StringType getTitleElement() { 
2084      if (this.title == null)
2085        if (Configuration.errorOnAutoCreate())
2086          throw new Error("Attempt to auto-create Composition.title");
2087        else if (Configuration.doAutoCreate())
2088          this.title = new StringType(); // bb
2089      return this.title;
2090    }
2091
2092    public boolean hasTitleElement() { 
2093      return this.title != null && !this.title.isEmpty();
2094    }
2095
2096    public boolean hasTitle() { 
2097      return this.title != null && !this.title.isEmpty();
2098    }
2099
2100    /**
2101     * @param value {@link #title} (Official human-readable label for the composition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
2102     */
2103    public Composition setTitleElement(StringType value) { 
2104      this.title = value;
2105      return this;
2106    }
2107
2108    /**
2109     * @return Official human-readable label for the composition.
2110     */
2111    public String getTitle() { 
2112      return this.title == null ? null : this.title.getValue();
2113    }
2114
2115    /**
2116     * @param value Official human-readable label for the composition.
2117     */
2118    public Composition setTitle(String value) { 
2119        if (this.title == null)
2120          this.title = new StringType();
2121        this.title.setValue(value);
2122      return this;
2123    }
2124
2125    /**
2126     * @return {@link #note} (For any additional notes.)
2127     */
2128    public List<Annotation> getNote() { 
2129      if (this.note == null)
2130        this.note = new ArrayList<Annotation>();
2131      return this.note;
2132    }
2133
2134    /**
2135     * @return Returns a reference to <code>this</code> for easy method chaining
2136     */
2137    public Composition setNote(List<Annotation> theNote) { 
2138      this.note = theNote;
2139      return this;
2140    }
2141
2142    public boolean hasNote() { 
2143      if (this.note == null)
2144        return false;
2145      for (Annotation item : this.note)
2146        if (!item.isEmpty())
2147          return true;
2148      return false;
2149    }
2150
2151    public Annotation addNote() { //3
2152      Annotation t = new Annotation();
2153      if (this.note == null)
2154        this.note = new ArrayList<Annotation>();
2155      this.note.add(t);
2156      return t;
2157    }
2158
2159    public Composition addNote(Annotation t) { //3
2160      if (t == null)
2161        return this;
2162      if (this.note == null)
2163        this.note = new ArrayList<Annotation>();
2164      this.note.add(t);
2165      return this;
2166    }
2167
2168    /**
2169     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
2170     */
2171    public Annotation getNoteFirstRep() { 
2172      if (getNote().isEmpty()) {
2173        addNote();
2174      }
2175      return getNote().get(0);
2176    }
2177
2178    /**
2179     * @return {@link #attester} (A participant who has attested to the accuracy of the composition/document.)
2180     */
2181    public List<CompositionAttesterComponent> getAttester() { 
2182      if (this.attester == null)
2183        this.attester = new ArrayList<CompositionAttesterComponent>();
2184      return this.attester;
2185    }
2186
2187    /**
2188     * @return Returns a reference to <code>this</code> for easy method chaining
2189     */
2190    public Composition setAttester(List<CompositionAttesterComponent> theAttester) { 
2191      this.attester = theAttester;
2192      return this;
2193    }
2194
2195    public boolean hasAttester() { 
2196      if (this.attester == null)
2197        return false;
2198      for (CompositionAttesterComponent item : this.attester)
2199        if (!item.isEmpty())
2200          return true;
2201      return false;
2202    }
2203
2204    public CompositionAttesterComponent addAttester() { //3
2205      CompositionAttesterComponent t = new CompositionAttesterComponent();
2206      if (this.attester == null)
2207        this.attester = new ArrayList<CompositionAttesterComponent>();
2208      this.attester.add(t);
2209      return t;
2210    }
2211
2212    public Composition addAttester(CompositionAttesterComponent t) { //3
2213      if (t == null)
2214        return this;
2215      if (this.attester == null)
2216        this.attester = new ArrayList<CompositionAttesterComponent>();
2217      this.attester.add(t);
2218      return this;
2219    }
2220
2221    /**
2222     * @return The first repetition of repeating field {@link #attester}, creating it if it does not already exist {3}
2223     */
2224    public CompositionAttesterComponent getAttesterFirstRep() { 
2225      if (getAttester().isEmpty()) {
2226        addAttester();
2227      }
2228      return getAttester().get(0);
2229    }
2230
2231    /**
2232     * @return {@link #custodian} (Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.)
2233     */
2234    public Reference getCustodian() { 
2235      if (this.custodian == null)
2236        if (Configuration.errorOnAutoCreate())
2237          throw new Error("Attempt to auto-create Composition.custodian");
2238        else if (Configuration.doAutoCreate())
2239          this.custodian = new Reference(); // cc
2240      return this.custodian;
2241    }
2242
2243    public boolean hasCustodian() { 
2244      return this.custodian != null && !this.custodian.isEmpty();
2245    }
2246
2247    /**
2248     * @param value {@link #custodian} (Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.)
2249     */
2250    public Composition setCustodian(Reference value) { 
2251      this.custodian = value;
2252      return this;
2253    }
2254
2255    /**
2256     * @return {@link #relatesTo} (Relationships that this composition has with other compositions or documents that already exist.)
2257     */
2258    public List<RelatedArtifact> getRelatesTo() { 
2259      if (this.relatesTo == null)
2260        this.relatesTo = new ArrayList<RelatedArtifact>();
2261      return this.relatesTo;
2262    }
2263
2264    /**
2265     * @return Returns a reference to <code>this</code> for easy method chaining
2266     */
2267    public Composition setRelatesTo(List<RelatedArtifact> theRelatesTo) { 
2268      this.relatesTo = theRelatesTo;
2269      return this;
2270    }
2271
2272    public boolean hasRelatesTo() { 
2273      if (this.relatesTo == null)
2274        return false;
2275      for (RelatedArtifact item : this.relatesTo)
2276        if (!item.isEmpty())
2277          return true;
2278      return false;
2279    }
2280
2281    public RelatedArtifact addRelatesTo() { //3
2282      RelatedArtifact t = new RelatedArtifact();
2283      if (this.relatesTo == null)
2284        this.relatesTo = new ArrayList<RelatedArtifact>();
2285      this.relatesTo.add(t);
2286      return t;
2287    }
2288
2289    public Composition addRelatesTo(RelatedArtifact t) { //3
2290      if (t == null)
2291        return this;
2292      if (this.relatesTo == null)
2293        this.relatesTo = new ArrayList<RelatedArtifact>();
2294      this.relatesTo.add(t);
2295      return this;
2296    }
2297
2298    /**
2299     * @return The first repetition of repeating field {@link #relatesTo}, creating it if it does not already exist {3}
2300     */
2301    public RelatedArtifact getRelatesToFirstRep() { 
2302      if (getRelatesTo().isEmpty()) {
2303        addRelatesTo();
2304      }
2305      return getRelatesTo().get(0);
2306    }
2307
2308    /**
2309     * @return {@link #event} (The clinical service, such as a colonoscopy or an appendectomy, being documented.)
2310     */
2311    public List<CompositionEventComponent> getEvent() { 
2312      if (this.event == null)
2313        this.event = new ArrayList<CompositionEventComponent>();
2314      return this.event;
2315    }
2316
2317    /**
2318     * @return Returns a reference to <code>this</code> for easy method chaining
2319     */
2320    public Composition setEvent(List<CompositionEventComponent> theEvent) { 
2321      this.event = theEvent;
2322      return this;
2323    }
2324
2325    public boolean hasEvent() { 
2326      if (this.event == null)
2327        return false;
2328      for (CompositionEventComponent item : this.event)
2329        if (!item.isEmpty())
2330          return true;
2331      return false;
2332    }
2333
2334    public CompositionEventComponent addEvent() { //3
2335      CompositionEventComponent t = new CompositionEventComponent();
2336      if (this.event == null)
2337        this.event = new ArrayList<CompositionEventComponent>();
2338      this.event.add(t);
2339      return t;
2340    }
2341
2342    public Composition addEvent(CompositionEventComponent t) { //3
2343      if (t == null)
2344        return this;
2345      if (this.event == null)
2346        this.event = new ArrayList<CompositionEventComponent>();
2347      this.event.add(t);
2348      return this;
2349    }
2350
2351    /**
2352     * @return The first repetition of repeating field {@link #event}, creating it if it does not already exist {3}
2353     */
2354    public CompositionEventComponent getEventFirstRep() { 
2355      if (getEvent().isEmpty()) {
2356        addEvent();
2357      }
2358      return getEvent().get(0);
2359    }
2360
2361    /**
2362     * @return {@link #section} (The root of the sections that make up the composition.)
2363     */
2364    public List<SectionComponent> getSection() { 
2365      if (this.section == null)
2366        this.section = new ArrayList<SectionComponent>();
2367      return this.section;
2368    }
2369
2370    /**
2371     * @return Returns a reference to <code>this</code> for easy method chaining
2372     */
2373    public Composition setSection(List<SectionComponent> theSection) { 
2374      this.section = theSection;
2375      return this;
2376    }
2377
2378    public boolean hasSection() { 
2379      if (this.section == null)
2380        return false;
2381      for (SectionComponent item : this.section)
2382        if (!item.isEmpty())
2383          return true;
2384      return false;
2385    }
2386
2387    public SectionComponent addSection() { //3
2388      SectionComponent t = new SectionComponent();
2389      if (this.section == null)
2390        this.section = new ArrayList<SectionComponent>();
2391      this.section.add(t);
2392      return t;
2393    }
2394
2395    public Composition addSection(SectionComponent t) { //3
2396      if (t == null)
2397        return this;
2398      if (this.section == null)
2399        this.section = new ArrayList<SectionComponent>();
2400      this.section.add(t);
2401      return this;
2402    }
2403
2404    /**
2405     * @return The first repetition of repeating field {@link #section}, creating it if it does not already exist {3}
2406     */
2407    public SectionComponent getSectionFirstRep() { 
2408      if (getSection().isEmpty()) {
2409        addSection();
2410      }
2411      return getSection().get(0);
2412    }
2413
2414      protected void listChildren(List<Property> children) {
2415        super.listChildren(children);
2416        children.add(new Property("url", "uri", "An absolute URI that is used to identify this Composition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this Composition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the Composition is stored on different servers.", 0, 1, url));
2417        children.add(new Property("identifier", "Identifier", "A version-independent identifier for the Composition. This identifier stays constant as the composition is changed over time.", 0, java.lang.Integer.MAX_VALUE, identifier));
2418        children.add(new Property("version", "string", "An explicitly assigned identifer of a variation of the content in the Composition.", 0, 1, version));
2419        children.add(new Property("status", "code", "The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.", 0, 1, status));
2420        children.add(new Property("type", "CodeableConcept", "Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.", 0, 1, type));
2421        children.add(new Property("category", "CodeableConcept", "A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.", 0, java.lang.Integer.MAX_VALUE, category));
2422        children.add(new Property("subject", "Reference(Any)", "Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).", 0, java.lang.Integer.MAX_VALUE, subject));
2423        children.add(new Property("encounter", "Reference(Encounter)", "Describes the clinical encounter or type of care this documentation is associated with.", 0, 1, encounter));
2424        children.add(new Property("date", "dateTime", "The composition editing time, when the composition was last logically changed by the author.", 0, 1, date));
2425        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate Composition instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
2426        children.add(new Property("author", "Reference(Practitioner|PractitionerRole|Device|Patient|RelatedPerson|Organization)", "Identifies who is responsible for the information in the composition, not necessarily who typed it in.", 0, java.lang.Integer.MAX_VALUE, author));
2427        children.add(new Property("name", "string", "A natural language name identifying the composition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
2428        children.add(new Property("title", "string", "Official human-readable label for the composition.", 0, 1, title));
2429        children.add(new Property("note", "Annotation", "For any additional notes.", 0, java.lang.Integer.MAX_VALUE, note));
2430        children.add(new Property("attester", "", "A participant who has attested to the accuracy of the composition/document.", 0, java.lang.Integer.MAX_VALUE, attester));
2431        children.add(new Property("custodian", "Reference(Organization)", "Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.", 0, 1, custodian));
2432        children.add(new Property("relatesTo", "RelatedArtifact", "Relationships that this composition has with other compositions or documents that already exist.", 0, java.lang.Integer.MAX_VALUE, relatesTo));
2433        children.add(new Property("event", "", "The clinical service, such as a colonoscopy or an appendectomy, being documented.", 0, java.lang.Integer.MAX_VALUE, event));
2434        children.add(new Property("section", "", "The root of the sections that make up the composition.", 0, java.lang.Integer.MAX_VALUE, section));
2435      }
2436
2437      @Override
2438      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2439        switch (_hash) {
2440        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this Composition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this Composition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the Composition is stored on different servers.", 0, 1, url);
2441        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A version-independent identifier for the Composition. This identifier stays constant as the composition is changed over time.", 0, java.lang.Integer.MAX_VALUE, identifier);
2442        case 351608024: /*version*/  return new Property("version", "string", "An explicitly assigned identifer of a variation of the content in the Composition.", 0, 1, version);
2443        case -892481550: /*status*/  return new Property("status", "code", "The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.", 0, 1, status);
2444        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.", 0, 1, type);
2445        case 50511102: /*category*/  return new Property("category", "CodeableConcept", "A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type.", 0, java.lang.Integer.MAX_VALUE, category);
2446        case -1867885268: /*subject*/  return new Property("subject", "Reference(Any)", "Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).", 0, java.lang.Integer.MAX_VALUE, subject);
2447        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "Describes the clinical encounter or type of care this documentation is associated with.", 0, 1, encounter);
2448        case 3076014: /*date*/  return new Property("date", "dateTime", "The composition editing time, when the composition was last logically changed by the author.", 0, 1, date);
2449        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate Composition instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
2450        case -1406328437: /*author*/  return new Property("author", "Reference(Practitioner|PractitionerRole|Device|Patient|RelatedPerson|Organization)", "Identifies who is responsible for the information in the composition, not necessarily who typed it in.", 0, java.lang.Integer.MAX_VALUE, author);
2451        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the composition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
2452        case 110371416: /*title*/  return new Property("title", "string", "Official human-readable label for the composition.", 0, 1, title);
2453        case 3387378: /*note*/  return new Property("note", "Annotation", "For any additional notes.", 0, java.lang.Integer.MAX_VALUE, note);
2454        case 542920370: /*attester*/  return new Property("attester", "", "A participant who has attested to the accuracy of the composition/document.", 0, java.lang.Integer.MAX_VALUE, attester);
2455        case 1611297262: /*custodian*/  return new Property("custodian", "Reference(Organization)", "Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.", 0, 1, custodian);
2456        case -7765931: /*relatesTo*/  return new Property("relatesTo", "RelatedArtifact", "Relationships that this composition has with other compositions or documents that already exist.", 0, java.lang.Integer.MAX_VALUE, relatesTo);
2457        case 96891546: /*event*/  return new Property("event", "", "The clinical service, such as a colonoscopy or an appendectomy, being documented.", 0, java.lang.Integer.MAX_VALUE, event);
2458        case 1970241253: /*section*/  return new Property("section", "", "The root of the sections that make up the composition.", 0, java.lang.Integer.MAX_VALUE, section);
2459        default: return super.getNamedProperty(_hash, _name, _checkValid);
2460        }
2461
2462      }
2463
2464      @Override
2465      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2466        switch (hash) {
2467        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
2468        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2469        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
2470        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<CompositionStatus>
2471        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
2472        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
2473        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : this.subject.toArray(new Base[this.subject.size()]); // Reference
2474        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
2475        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
2476        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
2477        case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // Reference
2478        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
2479        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
2480        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
2481        case 542920370: /*attester*/ return this.attester == null ? new Base[0] : this.attester.toArray(new Base[this.attester.size()]); // CompositionAttesterComponent
2482        case 1611297262: /*custodian*/ return this.custodian == null ? new Base[0] : new Base[] {this.custodian}; // Reference
2483        case -7765931: /*relatesTo*/ return this.relatesTo == null ? new Base[0] : this.relatesTo.toArray(new Base[this.relatesTo.size()]); // RelatedArtifact
2484        case 96891546: /*event*/ return this.event == null ? new Base[0] : this.event.toArray(new Base[this.event.size()]); // CompositionEventComponent
2485        case 1970241253: /*section*/ return this.section == null ? new Base[0] : this.section.toArray(new Base[this.section.size()]); // SectionComponent
2486        default: return super.getProperty(hash, name, checkValid);
2487        }
2488
2489      }
2490
2491      @Override
2492      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2493        switch (hash) {
2494        case 116079: // url
2495          this.url = TypeConvertor.castToUri(value); // UriType
2496          return value;
2497        case -1618432855: // identifier
2498          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
2499          return value;
2500        case 351608024: // version
2501          this.version = TypeConvertor.castToString(value); // StringType
2502          return value;
2503        case -892481550: // status
2504          value = new CompositionStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2505          this.status = (Enumeration) value; // Enumeration<CompositionStatus>
2506          return value;
2507        case 3575610: // type
2508          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2509          return value;
2510        case 50511102: // category
2511          this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
2512          return value;
2513        case -1867885268: // subject
2514          this.getSubject().add(TypeConvertor.castToReference(value)); // Reference
2515          return value;
2516        case 1524132147: // encounter
2517          this.encounter = TypeConvertor.castToReference(value); // Reference
2518          return value;
2519        case 3076014: // date
2520          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
2521          return value;
2522        case -669707736: // useContext
2523          this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext
2524          return value;
2525        case -1406328437: // author
2526          this.getAuthor().add(TypeConvertor.castToReference(value)); // Reference
2527          return value;
2528        case 3373707: // name
2529          this.name = TypeConvertor.castToString(value); // StringType
2530          return value;
2531        case 110371416: // title
2532          this.title = TypeConvertor.castToString(value); // StringType
2533          return value;
2534        case 3387378: // note
2535          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
2536          return value;
2537        case 542920370: // attester
2538          this.getAttester().add((CompositionAttesterComponent) value); // CompositionAttesterComponent
2539          return value;
2540        case 1611297262: // custodian
2541          this.custodian = TypeConvertor.castToReference(value); // Reference
2542          return value;
2543        case -7765931: // relatesTo
2544          this.getRelatesTo().add(TypeConvertor.castToRelatedArtifact(value)); // RelatedArtifact
2545          return value;
2546        case 96891546: // event
2547          this.getEvent().add((CompositionEventComponent) value); // CompositionEventComponent
2548          return value;
2549        case 1970241253: // section
2550          this.getSection().add((SectionComponent) value); // SectionComponent
2551          return value;
2552        default: return super.setProperty(hash, name, value);
2553        }
2554
2555      }
2556
2557      @Override
2558      public Base setProperty(String name, Base value) throws FHIRException {
2559        if (name.equals("url")) {
2560          this.url = TypeConvertor.castToUri(value); // UriType
2561        } else if (name.equals("identifier")) {
2562          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2563        } else if (name.equals("version")) {
2564          this.version = TypeConvertor.castToString(value); // StringType
2565        } else if (name.equals("status")) {
2566          value = new CompositionStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2567          this.status = (Enumeration) value; // Enumeration<CompositionStatus>
2568        } else if (name.equals("type")) {
2569          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2570        } else if (name.equals("category")) {
2571          this.getCategory().add(TypeConvertor.castToCodeableConcept(value));
2572        } else if (name.equals("subject")) {
2573          this.getSubject().add(TypeConvertor.castToReference(value));
2574        } else if (name.equals("encounter")) {
2575          this.encounter = TypeConvertor.castToReference(value); // Reference
2576        } else if (name.equals("date")) {
2577          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
2578        } else if (name.equals("useContext")) {
2579          this.getUseContext().add(TypeConvertor.castToUsageContext(value));
2580        } else if (name.equals("author")) {
2581          this.getAuthor().add(TypeConvertor.castToReference(value));
2582        } else if (name.equals("name")) {
2583          this.name = TypeConvertor.castToString(value); // StringType
2584        } else if (name.equals("title")) {
2585          this.title = TypeConvertor.castToString(value); // StringType
2586        } else if (name.equals("note")) {
2587          this.getNote().add(TypeConvertor.castToAnnotation(value));
2588        } else if (name.equals("attester")) {
2589          this.getAttester().add((CompositionAttesterComponent) value);
2590        } else if (name.equals("custodian")) {
2591          this.custodian = TypeConvertor.castToReference(value); // Reference
2592        } else if (name.equals("relatesTo")) {
2593          this.getRelatesTo().add(TypeConvertor.castToRelatedArtifact(value));
2594        } else if (name.equals("event")) {
2595          this.getEvent().add((CompositionEventComponent) value);
2596        } else if (name.equals("section")) {
2597          this.getSection().add((SectionComponent) value);
2598        } else
2599          return super.setProperty(name, value);
2600        return value;
2601      }
2602
2603      @Override
2604      public Base makeProperty(int hash, String name) throws FHIRException {
2605        switch (hash) {
2606        case 116079:  return getUrlElement();
2607        case -1618432855:  return addIdentifier(); 
2608        case 351608024:  return getVersionElement();
2609        case -892481550:  return getStatusElement();
2610        case 3575610:  return getType();
2611        case 50511102:  return addCategory(); 
2612        case -1867885268:  return addSubject(); 
2613        case 1524132147:  return getEncounter();
2614        case 3076014:  return getDateElement();
2615        case -669707736:  return addUseContext(); 
2616        case -1406328437:  return addAuthor(); 
2617        case 3373707:  return getNameElement();
2618        case 110371416:  return getTitleElement();
2619        case 3387378:  return addNote(); 
2620        case 542920370:  return addAttester(); 
2621        case 1611297262:  return getCustodian();
2622        case -7765931:  return addRelatesTo(); 
2623        case 96891546:  return addEvent(); 
2624        case 1970241253:  return addSection(); 
2625        default: return super.makeProperty(hash, name);
2626        }
2627
2628      }
2629
2630      @Override
2631      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2632        switch (hash) {
2633        case 116079: /*url*/ return new String[] {"uri"};
2634        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2635        case 351608024: /*version*/ return new String[] {"string"};
2636        case -892481550: /*status*/ return new String[] {"code"};
2637        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
2638        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
2639        case -1867885268: /*subject*/ return new String[] {"Reference"};
2640        case 1524132147: /*encounter*/ return new String[] {"Reference"};
2641        case 3076014: /*date*/ return new String[] {"dateTime"};
2642        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
2643        case -1406328437: /*author*/ return new String[] {"Reference"};
2644        case 3373707: /*name*/ return new String[] {"string"};
2645        case 110371416: /*title*/ return new String[] {"string"};
2646        case 3387378: /*note*/ return new String[] {"Annotation"};
2647        case 542920370: /*attester*/ return new String[] {};
2648        case 1611297262: /*custodian*/ return new String[] {"Reference"};
2649        case -7765931: /*relatesTo*/ return new String[] {"RelatedArtifact"};
2650        case 96891546: /*event*/ return new String[] {};
2651        case 1970241253: /*section*/ return new String[] {};
2652        default: return super.getTypesForProperty(hash, name);
2653        }
2654
2655      }
2656
2657      @Override
2658      public Base addChild(String name) throws FHIRException {
2659        if (name.equals("url")) {
2660          throw new FHIRException("Cannot call addChild on a primitive type Composition.url");
2661        }
2662        else if (name.equals("identifier")) {
2663          return addIdentifier();
2664        }
2665        else if (name.equals("version")) {
2666          throw new FHIRException("Cannot call addChild on a primitive type Composition.version");
2667        }
2668        else if (name.equals("status")) {
2669          throw new FHIRException("Cannot call addChild on a primitive type Composition.status");
2670        }
2671        else if (name.equals("type")) {
2672          this.type = new CodeableConcept();
2673          return this.type;
2674        }
2675        else if (name.equals("category")) {
2676          return addCategory();
2677        }
2678        else if (name.equals("subject")) {
2679          return addSubject();
2680        }
2681        else if (name.equals("encounter")) {
2682          this.encounter = new Reference();
2683          return this.encounter;
2684        }
2685        else if (name.equals("date")) {
2686          throw new FHIRException("Cannot call addChild on a primitive type Composition.date");
2687        }
2688        else if (name.equals("useContext")) {
2689          return addUseContext();
2690        }
2691        else if (name.equals("author")) {
2692          return addAuthor();
2693        }
2694        else if (name.equals("name")) {
2695          throw new FHIRException("Cannot call addChild on a primitive type Composition.name");
2696        }
2697        else if (name.equals("title")) {
2698          throw new FHIRException("Cannot call addChild on a primitive type Composition.title");
2699        }
2700        else if (name.equals("note")) {
2701          return addNote();
2702        }
2703        else if (name.equals("attester")) {
2704          return addAttester();
2705        }
2706        else if (name.equals("custodian")) {
2707          this.custodian = new Reference();
2708          return this.custodian;
2709        }
2710        else if (name.equals("relatesTo")) {
2711          return addRelatesTo();
2712        }
2713        else if (name.equals("event")) {
2714          return addEvent();
2715        }
2716        else if (name.equals("section")) {
2717          return addSection();
2718        }
2719        else
2720          return super.addChild(name);
2721      }
2722
2723  public String fhirType() {
2724    return "Composition";
2725
2726  }
2727
2728      public Composition copy() {
2729        Composition dst = new Composition();
2730        copyValues(dst);
2731        return dst;
2732      }
2733
2734      public void copyValues(Composition dst) {
2735        super.copyValues(dst);
2736        dst.url = url == null ? null : url.copy();
2737        if (identifier != null) {
2738          dst.identifier = new ArrayList<Identifier>();
2739          for (Identifier i : identifier)
2740            dst.identifier.add(i.copy());
2741        };
2742        dst.version = version == null ? null : version.copy();
2743        dst.status = status == null ? null : status.copy();
2744        dst.type = type == null ? null : type.copy();
2745        if (category != null) {
2746          dst.category = new ArrayList<CodeableConcept>();
2747          for (CodeableConcept i : category)
2748            dst.category.add(i.copy());
2749        };
2750        if (subject != null) {
2751          dst.subject = new ArrayList<Reference>();
2752          for (Reference i : subject)
2753            dst.subject.add(i.copy());
2754        };
2755        dst.encounter = encounter == null ? null : encounter.copy();
2756        dst.date = date == null ? null : date.copy();
2757        if (useContext != null) {
2758          dst.useContext = new ArrayList<UsageContext>();
2759          for (UsageContext i : useContext)
2760            dst.useContext.add(i.copy());
2761        };
2762        if (author != null) {
2763          dst.author = new ArrayList<Reference>();
2764          for (Reference i : author)
2765            dst.author.add(i.copy());
2766        };
2767        dst.name = name == null ? null : name.copy();
2768        dst.title = title == null ? null : title.copy();
2769        if (note != null) {
2770          dst.note = new ArrayList<Annotation>();
2771          for (Annotation i : note)
2772            dst.note.add(i.copy());
2773        };
2774        if (attester != null) {
2775          dst.attester = new ArrayList<CompositionAttesterComponent>();
2776          for (CompositionAttesterComponent i : attester)
2777            dst.attester.add(i.copy());
2778        };
2779        dst.custodian = custodian == null ? null : custodian.copy();
2780        if (relatesTo != null) {
2781          dst.relatesTo = new ArrayList<RelatedArtifact>();
2782          for (RelatedArtifact i : relatesTo)
2783            dst.relatesTo.add(i.copy());
2784        };
2785        if (event != null) {
2786          dst.event = new ArrayList<CompositionEventComponent>();
2787          for (CompositionEventComponent i : event)
2788            dst.event.add(i.copy());
2789        };
2790        if (section != null) {
2791          dst.section = new ArrayList<SectionComponent>();
2792          for (SectionComponent i : section)
2793            dst.section.add(i.copy());
2794        };
2795      }
2796
2797      protected Composition typedCopy() {
2798        return copy();
2799      }
2800
2801      @Override
2802      public boolean equalsDeep(Base other_) {
2803        if (!super.equalsDeep(other_))
2804          return false;
2805        if (!(other_ instanceof Composition))
2806          return false;
2807        Composition o = (Composition) other_;
2808        return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
2809           && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) && compareDeep(category, o.category, true)
2810           && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) && compareDeep(date, o.date, true)
2811           && compareDeep(useContext, o.useContext, true) && compareDeep(author, o.author, true) && compareDeep(name, o.name, true)
2812           && compareDeep(title, o.title, true) && compareDeep(note, o.note, true) && compareDeep(attester, o.attester, true)
2813           && compareDeep(custodian, o.custodian, true) && compareDeep(relatesTo, o.relatesTo, true) && compareDeep(event, o.event, true)
2814           && compareDeep(section, o.section, true);
2815      }
2816
2817      @Override
2818      public boolean equalsShallow(Base other_) {
2819        if (!super.equalsShallow(other_))
2820          return false;
2821        if (!(other_ instanceof Composition))
2822          return false;
2823        Composition o = (Composition) other_;
2824        return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(status, o.status, true)
2825           && compareValues(date, o.date, true) && compareValues(name, o.name, true) && compareValues(title, o.title, true)
2826          ;
2827      }
2828
2829      public boolean isEmpty() {
2830        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version
2831          , status, type, category, subject, encounter, date, useContext, author, name
2832          , title, note, attester, custodian, relatesTo, event, section);
2833      }
2834
2835  @Override
2836  public ResourceType getResourceType() {
2837    return ResourceType.Composition;
2838   }
2839
2840 /**
2841   * Search parameter: <b>attester</b>
2842   * <p>
2843   * Description: <b>Who attested the composition</b><br>
2844   * Type: <b>reference</b><br>
2845   * Path: <b>Composition.attester.party</b><br>
2846   * </p>
2847   */
2848  @SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference", providesMembershipIn={ @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={Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2849  public static final String SP_ATTESTER = "attester";
2850 /**
2851   * <b>Fluent Client</b> search parameter constant for <b>attester</b>
2852   * <p>
2853   * Description: <b>Who attested the composition</b><br>
2854   * Type: <b>reference</b><br>
2855   * Path: <b>Composition.attester.party</b><br>
2856   * </p>
2857   */
2858  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ATTESTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ATTESTER);
2859
2860/**
2861   * Constant for fluent queries to be used to add include statements. Specifies
2862   * the path value of "<b>Composition:attester</b>".
2863   */
2864  public static final ca.uhn.fhir.model.api.Include INCLUDE_ATTESTER = new ca.uhn.fhir.model.api.Include("Composition:attester").toLocked();
2865
2866 /**
2867   * Search parameter: <b>author</b>
2868   * <p>
2869   * Description: <b>Who and/or what authored the composition</b><br>
2870   * Type: <b>reference</b><br>
2871   * Path: <b>Composition.author</b><br>
2872   * </p>
2873   */
2874  @SearchParamDefinition(name="author", path="Composition.author", description="Who and/or what authored the composition", 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"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2875  public static final String SP_AUTHOR = "author";
2876 /**
2877   * <b>Fluent Client</b> search parameter constant for <b>author</b>
2878   * <p>
2879   * Description: <b>Who and/or what authored the composition</b><br>
2880   * Type: <b>reference</b><br>
2881   * Path: <b>Composition.author</b><br>
2882   * </p>
2883   */
2884  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHOR);
2885
2886/**
2887   * Constant for fluent queries to be used to add include statements. Specifies
2888   * the path value of "<b>Composition:author</b>".
2889   */
2890  public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR = new ca.uhn.fhir.model.api.Include("Composition:author").toLocked();
2891
2892 /**
2893   * Search parameter: <b>category</b>
2894   * <p>
2895   * Description: <b>Categorization of Composition</b><br>
2896   * Type: <b>token</b><br>
2897   * Path: <b>Composition.category</b><br>
2898   * </p>
2899   */
2900  @SearchParamDefinition(name="category", path="Composition.category", description="Categorization of Composition", type="token" )
2901  public static final String SP_CATEGORY = "category";
2902 /**
2903   * <b>Fluent Client</b> search parameter constant for <b>category</b>
2904   * <p>
2905   * Description: <b>Categorization of Composition</b><br>
2906   * Type: <b>token</b><br>
2907   * Path: <b>Composition.category</b><br>
2908   * </p>
2909   */
2910  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
2911
2912 /**
2913   * Search parameter: <b>context</b>
2914   * <p>
2915   * Description: <b>Code(s) that apply to the event being documented</b><br>
2916   * Type: <b>token</b><br>
2917   * Path: <b>Composition.event.code</b><br>
2918   * </p>
2919   */
2920  @SearchParamDefinition(name="context", path="Composition.event.code", description="Code(s) that apply to the event being documented", type="token" )
2921  public static final String SP_CONTEXT = "context";
2922 /**
2923   * <b>Fluent Client</b> search parameter constant for <b>context</b>
2924   * <p>
2925   * Description: <b>Code(s) that apply to the event being documented</b><br>
2926   * Type: <b>token</b><br>
2927   * Path: <b>Composition.event.code</b><br>
2928   * </p>
2929   */
2930  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
2931
2932 /**
2933   * Search parameter: <b>entry</b>
2934   * <p>
2935   * Description: <b>A reference to data that supports this section</b><br>
2936   * Type: <b>reference</b><br>
2937   * Path: <b>Composition.section.entry</b><br>
2938   * </p>
2939   */
2940  @SearchParamDefinition(name="entry", path="Composition.section.entry", description="A reference to data that supports this section", type="reference", target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.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, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
2941  public static final String SP_ENTRY = "entry";
2942 /**
2943   * <b>Fluent Client</b> search parameter constant for <b>entry</b>
2944   * <p>
2945   * Description: <b>A reference to data that supports this section</b><br>
2946   * Type: <b>reference</b><br>
2947   * Path: <b>Composition.section.entry</b><br>
2948   * </p>
2949   */
2950  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENTRY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENTRY);
2951
2952/**
2953   * Constant for fluent queries to be used to add include statements. Specifies
2954   * the path value of "<b>Composition:entry</b>".
2955   */
2956  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENTRY = new ca.uhn.fhir.model.api.Include("Composition:entry").toLocked();
2957
2958 /**
2959   * Search parameter: <b>period</b>
2960   * <p>
2961   * Description: <b>The period covered by the documentation</b><br>
2962   * Type: <b>date</b><br>
2963   * Path: <b>Composition.event.period</b><br>
2964   * </p>
2965   */
2966  @SearchParamDefinition(name="period", path="Composition.event.period", description="The period covered by the documentation", type="date" )
2967  public static final String SP_PERIOD = "period";
2968 /**
2969   * <b>Fluent Client</b> search parameter constant for <b>period</b>
2970   * <p>
2971   * Description: <b>The period covered by the documentation</b><br>
2972   * Type: <b>date</b><br>
2973   * Path: <b>Composition.event.period</b><br>
2974   * </p>
2975   */
2976  public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD);
2977
2978 /**
2979   * Search parameter: <b>related</b>
2980   * <p>
2981   * Description: <b>Target of the relationship</b><br>
2982   * Type: <b>reference</b><br>
2983   * Path: <b>Composition.relatesTo.resourceReference</b><br>
2984   * </p>
2985   */
2986  @SearchParamDefinition(name="related", path="Composition.relatesTo.resourceReference", description="Target of the relationship", type="reference", target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.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, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
2987  public static final String SP_RELATED = "related";
2988 /**
2989   * <b>Fluent Client</b> search parameter constant for <b>related</b>
2990   * <p>
2991   * Description: <b>Target of the relationship</b><br>
2992   * Type: <b>reference</b><br>
2993   * Path: <b>Composition.relatesTo.resourceReference</b><br>
2994   * </p>
2995   */
2996  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RELATED = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RELATED);
2997
2998/**
2999   * Constant for fluent queries to be used to add include statements. Specifies
3000   * the path value of "<b>Composition:related</b>".
3001   */
3002  public static final ca.uhn.fhir.model.api.Include INCLUDE_RELATED = new ca.uhn.fhir.model.api.Include("Composition:related").toLocked();
3003
3004 /**
3005   * Search parameter: <b>section-code-text</b>
3006   * <p>
3007   * Description: <b>Search on the section narrative of the resource</b><br>
3008   * Type: <b>composite</b><br>
3009   * Path: <b>Composition.section</b><br>
3010   * </p>
3011   */
3012  @SearchParamDefinition(name="section-code-text", path="Composition.section", description="Search on the section narrative of the resource", type="composite", compositeOf={"section", "section-text"} )
3013  public static final String SP_SECTION_CODE_TEXT = "section-code-text";
3014 /**
3015   * <b>Fluent Client</b> search parameter constant for <b>section-code-text</b>
3016   * <p>
3017   * Description: <b>Search on the section narrative of the resource</b><br>
3018   * Type: <b>composite</b><br>
3019   * Path: <b>Composition.section</b><br>
3020   * </p>
3021   */
3022  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.SpecialClientParam> SECTION_CODE_TEXT = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.SpecialClientParam>(SP_SECTION_CODE_TEXT);
3023
3024 /**
3025   * Search parameter: <b>section-text</b>
3026   * <p>
3027   * Description: <b>Search on the section narrative of the resource</b><br>
3028   * Type: <b>special</b><br>
3029   * Path: <b>Composition.section.text | Composition.section.section.text</b><br>
3030   * </p>
3031   */
3032  @SearchParamDefinition(name="section-text", path="Composition.section.text | Composition.section.section.text", description="Search on the section narrative of the resource", type="special" )
3033  public static final String SP_SECTION_TEXT = "section-text";
3034 /**
3035   * <b>Fluent Client</b> search parameter constant for <b>section-text</b>
3036   * <p>
3037   * Description: <b>Search on the section narrative of the resource</b><br>
3038   * Type: <b>special</b><br>
3039   * Path: <b>Composition.section.text | Composition.section.section.text</b><br>
3040   * </p>
3041   */
3042  public static final ca.uhn.fhir.rest.gclient.SpecialClientParam SECTION_TEXT = new ca.uhn.fhir.rest.gclient.SpecialClientParam(SP_SECTION_TEXT);
3043
3044 /**
3045   * Search parameter: <b>section</b>
3046   * <p>
3047   * Description: <b>Classification of section (recommended)</b><br>
3048   * Type: <b>token</b><br>
3049   * Path: <b>Composition.section.code</b><br>
3050   * </p>
3051   */
3052  @SearchParamDefinition(name="section", path="Composition.section.code", description="Classification of section (recommended)", type="token" )
3053  public static final String SP_SECTION = "section";
3054 /**
3055   * <b>Fluent Client</b> search parameter constant for <b>section</b>
3056   * <p>
3057   * Description: <b>Classification of section (recommended)</b><br>
3058   * Type: <b>token</b><br>
3059   * Path: <b>Composition.section.code</b><br>
3060   * </p>
3061   */
3062  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SECTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SECTION);
3063
3064 /**
3065   * Search parameter: <b>status</b>
3066   * <p>
3067   * Description: <b>preliminary | final | amended | entered-in-error</b><br>
3068   * Type: <b>token</b><br>
3069   * Path: <b>Composition.status</b><br>
3070   * </p>
3071   */
3072  @SearchParamDefinition(name="status", path="Composition.status", description="preliminary | final | amended | entered-in-error", type="token" )
3073  public static final String SP_STATUS = "status";
3074 /**
3075   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3076   * <p>
3077   * Description: <b>preliminary | final | amended | entered-in-error</b><br>
3078   * Type: <b>token</b><br>
3079   * Path: <b>Composition.status</b><br>
3080   * </p>
3081   */
3082  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3083
3084 /**
3085   * Search parameter: <b>subject</b>
3086   * <p>
3087   * Description: <b>Who and/or what the composition is about</b><br>
3088   * Type: <b>reference</b><br>
3089   * Path: <b>Composition.subject</b><br>
3090   * </p>
3091   */
3092  @SearchParamDefinition(name="subject", path="Composition.subject", description="Who and/or what the composition is about", type="reference", providesMembershipIn={ @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={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.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, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
3093  public static final String SP_SUBJECT = "subject";
3094 /**
3095   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
3096   * <p>
3097   * Description: <b>Who and/or what the composition is about</b><br>
3098   * Type: <b>reference</b><br>
3099   * Path: <b>Composition.subject</b><br>
3100   * </p>
3101   */
3102  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
3103
3104/**
3105   * Constant for fluent queries to be used to add include statements. Specifies
3106   * the path value of "<b>Composition:subject</b>".
3107   */
3108  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Composition:subject").toLocked();
3109
3110 /**
3111   * Search parameter: <b>title</b>
3112   * <p>
3113   * Description: <b>Human Readable name/title</b><br>
3114   * Type: <b>string</b><br>
3115   * Path: <b>Composition.title</b><br>
3116   * </p>
3117   */
3118  @SearchParamDefinition(name="title", path="Composition.title", description="Human Readable name/title", type="string" )
3119  public static final String SP_TITLE = "title";
3120 /**
3121   * <b>Fluent Client</b> search parameter constant for <b>title</b>
3122   * <p>
3123   * Description: <b>Human Readable name/title</b><br>
3124   * Type: <b>string</b><br>
3125   * Path: <b>Composition.title</b><br>
3126   * </p>
3127   */
3128  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
3129
3130 /**
3131   * Search parameter: <b>url</b>
3132   * <p>
3133   * Description: <b>The uri that identifies the activity definition</b><br>
3134   * Type: <b>uri</b><br>
3135   * Path: <b>Composition.url</b><br>
3136   * </p>
3137   */
3138  @SearchParamDefinition(name="url", path="Composition.url", description="The uri that identifies the activity definition", type="uri" )
3139  public static final String SP_URL = "url";
3140 /**
3141   * <b>Fluent Client</b> search parameter constant for <b>url</b>
3142   * <p>
3143   * Description: <b>The uri that identifies the activity definition</b><br>
3144   * Type: <b>uri</b><br>
3145   * Path: <b>Composition.url</b><br>
3146   * </p>
3147   */
3148  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
3149
3150 /**
3151   * Search parameter: <b>version</b>
3152   * <p>
3153   * Description: <b>The business version of the activity definition</b><br>
3154   * Type: <b>token</b><br>
3155   * Path: <b>Composition.version</b><br>
3156   * </p>
3157   */
3158  @SearchParamDefinition(name="version", path="Composition.version", description="The business version of the activity definition", type="token" )
3159  public static final String SP_VERSION = "version";
3160 /**
3161   * <b>Fluent Client</b> search parameter constant for <b>version</b>
3162   * <p>
3163   * Description: <b>The business version of the activity definition</b><br>
3164   * Type: <b>token</b><br>
3165   * Path: <b>Composition.version</b><br>
3166   * </p>
3167   */
3168  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
3169
3170 /**
3171   * Search parameter: <b>date</b>
3172   * <p>
3173   * Description: <b>Multiple Resources: 
3174
3175* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
3176* [CarePlan](careplan.html): Time period plan covers
3177* [CareTeam](careteam.html): A date within the coverage time period.
3178* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
3179* [Composition](composition.html): Composition editing time
3180* [Consent](consent.html): When consent was agreed to
3181* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
3182* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
3183* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
3184* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
3185* [Flag](flag.html): Time period when flag is active
3186* [Immunization](immunization.html): Vaccination  (non)-Administration Date
3187* [List](list.html): When the list was prepared
3188* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period
3189* [Procedure](procedure.html): When the procedure occurred or is occurring
3190* [RiskAssessment](riskassessment.html): When was assessment made?
3191* [SupplyRequest](supplyrequest.html): When the request was made
3192</b><br>
3193   * Type: <b>date</b><br>
3194   * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.as(dateTime) | DiagnosticReport.effective.as(Period) | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective.as(dateTime) | Observation.effective.as(Period) | Observation.effective.as(Timing) | Observation.effective.as(instant) | Procedure.occurrence.as(dateTime) | Procedure.occurrence.as(Period) | Procedure.occurrence.as(Timing) | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br>
3195   * </p>
3196   */
3197  @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.as(dateTime) | DiagnosticReport.effective.as(Period) | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective.as(dateTime) | Observation.effective.as(Period) | Observation.effective.as(Timing) | Observation.effective.as(instant) | Procedure.occurrence.as(dateTime) | Procedure.occurrence.as(Period) | Procedure.occurrence.as(Timing) | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination  (non)-Administration Date\r\n* [List](list.html): When the list was prepared\r\n* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" )
3198  public static final String SP_DATE = "date";
3199 /**
3200   * <b>Fluent Client</b> search parameter constant for <b>date</b>
3201   * <p>
3202   * Description: <b>Multiple Resources: 
3203
3204* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
3205* [CarePlan](careplan.html): Time period plan covers
3206* [CareTeam](careteam.html): A date within the coverage time period.
3207* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
3208* [Composition](composition.html): Composition editing time
3209* [Consent](consent.html): When consent was agreed to
3210* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
3211* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
3212* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
3213* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
3214* [Flag](flag.html): Time period when flag is active
3215* [Immunization](immunization.html): Vaccination  (non)-Administration Date
3216* [List](list.html): When the list was prepared
3217* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period
3218* [Procedure](procedure.html): When the procedure occurred or is occurring
3219* [RiskAssessment](riskassessment.html): When was assessment made?
3220* [SupplyRequest](supplyrequest.html): When the request was made
3221</b><br>
3222   * Type: <b>date</b><br>
3223   * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.as(dateTime) | DiagnosticReport.effective.as(Period) | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence as dateTime) | List.date | Observation.effective.as(dateTime) | Observation.effective.as(Period) | Observation.effective.as(Timing) | Observation.effective.as(instant) | Procedure.occurrence.as(dateTime) | Procedure.occurrence.as(Period) | Procedure.occurrence.as(Timing) | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br>
3224   * </p>
3225   */
3226  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
3227
3228 /**
3229   * Search parameter: <b>encounter</b>
3230   * <p>
3231   * Description: <b>Multiple Resources: 
3232
3233* [Composition](composition.html): Context of the Composition
3234* [DeviceRequest](devicerequest.html): Encounter during which request was created
3235* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
3236* [Flag](flag.html): Alert relevant during encounter
3237* [List](list.html): Context in which list created
3238* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
3239* [Observation](observation.html): Encounter related to the observation
3240* [Procedure](procedure.html): The Encounter during which this Procedure was created
3241* [RiskAssessment](riskassessment.html): Where was assessment performed?
3242* [ServiceRequest](servicerequest.html): An encounter in which this request is made
3243* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
3244</b><br>
3245   * Type: <b>reference</b><br>
3246   * Path: <b>Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter</b><br>
3247   * </p>
3248   */
3249  @SearchParamDefinition(name="encounter", path="Composition.encounter | DeviceRequest.encounter | DiagnosticReport.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* [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", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } )
3250  public static final String SP_ENCOUNTER = "encounter";
3251 /**
3252   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
3253   * <p>
3254   * Description: <b>Multiple Resources: 
3255
3256* [Composition](composition.html): Context of the Composition
3257* [DeviceRequest](devicerequest.html): Encounter during which request was created
3258* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
3259* [Flag](flag.html): Alert relevant during encounter
3260* [List](list.html): Context in which list created
3261* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
3262* [Observation](observation.html): Encounter related to the observation
3263* [Procedure](procedure.html): The Encounter during which this Procedure was created
3264* [RiskAssessment](riskassessment.html): Where was assessment performed?
3265* [ServiceRequest](servicerequest.html): An encounter in which this request is made
3266* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
3267</b><br>
3268   * Type: <b>reference</b><br>
3269   * Path: <b>Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter</b><br>
3270   * </p>
3271   */
3272  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
3273
3274/**
3275   * Constant for fluent queries to be used to add include statements. Specifies
3276   * the path value of "<b>Composition:encounter</b>".
3277   */
3278  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("Composition:encounter").toLocked();
3279
3280 /**
3281   * Search parameter: <b>identifier</b>
3282   * <p>
3283   * Description: <b>Multiple Resources: 
3284
3285* [AllergyIntolerance](allergyintolerance.html): External ids for this item
3286* [CarePlan](careplan.html): External Ids for this plan
3287* [CareTeam](careteam.html): External Ids for this team
3288* [Composition](composition.html): Version-independent identifier for the Composition
3289* [Condition](condition.html): A unique identifier of the condition record
3290* [Consent](consent.html): Identifier for this record (external references)
3291* [DetectedIssue](detectedissue.html): Unique id for the detected issue
3292* [DeviceRequest](devicerequest.html): Business identifier for request/order
3293* [DiagnosticReport](diagnosticreport.html): An identifier for the report
3294* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents
3295* [DocumentReference](documentreference.html): Identifier of the attachment binary
3296* [Encounter](encounter.html): Identifier(s) by which this encounter is known
3297* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3298* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3299* [Goal](goal.html): External Ids for this goal
3300* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
3301* [Immunization](immunization.html): Business identifier
3302* [List](list.html): Business identifier
3303* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3304* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3305* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3306* [MedicationUsage](medicationusage.html): Return statements with this external identifier
3307* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3308* [Observation](observation.html): The unique id for a particular observation
3309* [Procedure](procedure.html): A unique identifier for a procedure
3310* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3311* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3312* [SupplyDelivery](supplydelivery.html): External identifier
3313* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3314* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3315</b><br>
3316   * Type: <b>token</b><br>
3317   * 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.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>
3318   * </p>
3319   */
3320  @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.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationUsage](medicationusage.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
3321  public static final String SP_IDENTIFIER = "identifier";
3322 /**
3323   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3324   * <p>
3325   * Description: <b>Multiple Resources: 
3326
3327* [AllergyIntolerance](allergyintolerance.html): External ids for this item
3328* [CarePlan](careplan.html): External Ids for this plan
3329* [CareTeam](careteam.html): External Ids for this team
3330* [Composition](composition.html): Version-independent identifier for the Composition
3331* [Condition](condition.html): A unique identifier of the condition record
3332* [Consent](consent.html): Identifier for this record (external references)
3333* [DetectedIssue](detectedissue.html): Unique id for the detected issue
3334* [DeviceRequest](devicerequest.html): Business identifier for request/order
3335* [DiagnosticReport](diagnosticreport.html): An identifier for the report
3336* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents
3337* [DocumentReference](documentreference.html): Identifier of the attachment binary
3338* [Encounter](encounter.html): Identifier(s) by which this encounter is known
3339* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3340* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3341* [Goal](goal.html): External Ids for this goal
3342* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
3343* [Immunization](immunization.html): Business identifier
3344* [List](list.html): Business identifier
3345* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3346* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3347* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3348* [MedicationUsage](medicationusage.html): Return statements with this external identifier
3349* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3350* [Observation](observation.html): The unique id for a particular observation
3351* [Procedure](procedure.html): A unique identifier for a procedure
3352* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3353* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3354* [SupplyDelivery](supplydelivery.html): External identifier
3355* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3356* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3357</b><br>
3358   * Type: <b>token</b><br>
3359   * 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.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>
3360   * </p>
3361   */
3362  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3363
3364 /**
3365   * Search parameter: <b>patient</b>
3366   * <p>
3367   * Description: <b>Multiple Resources: 
3368
3369* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3370* [CarePlan](careplan.html): Who the care plan is for
3371* [CareTeam](careteam.html): Who care team is for
3372* [ClinicalImpression](clinicalimpression.html): Patient assessed
3373* [Composition](composition.html): Who and/or what the composition is about
3374* [Condition](condition.html): Who has the condition?
3375* [Consent](consent.html): Who the consent applies to
3376* [DetectedIssue](detectedissue.html): Associated patient
3377* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3378* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
3379* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3380* [DocumentManifest](documentmanifest.html): The subject of the set of documents
3381* [DocumentReference](documentreference.html): Who/what is the subject of the document
3382* [Encounter](encounter.html): The patient present at the encounter
3383* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3384* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3385* [Flag](flag.html): The identity of a subject to list flags for
3386* [Goal](goal.html): Who this goal is intended for
3387* [ImagingStudy](imagingstudy.html): Who the study is about
3388* [Immunization](immunization.html): The patient for the vaccination record
3389* [List](list.html): If all resources have the same subject
3390* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3391* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3392* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3393* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.
3394* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
3395* [Observation](observation.html): The subject that the observation is about (if patient)
3396* [Procedure](procedure.html): Search by subject - a patient
3397* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3398* [ServiceRequest](servicerequest.html): Search by subject - a patient
3399* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3400* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
3401* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3402</b><br>
3403   * Type: <b>reference</b><br>
3404   * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.subject | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is 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 | SupplyRequest.deliverFor | VisionPrescription.patient</b><br>
3405   * </p>
3406   */
3407  @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.subject | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is 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 | SupplyRequest.deliverFor | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [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* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", target={BiologicallyDerivedProduct.class, Device.class, Group.class, Location.class, Medication.class, NutritionProduct.class, Organization.class, Patient.class, Practitioner.class, Procedure.class, Substance.class } )
3408  public static final String SP_PATIENT = "patient";
3409 /**
3410   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
3411   * <p>
3412   * Description: <b>Multiple Resources: 
3413
3414* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3415* [CarePlan](careplan.html): Who the care plan is for
3416* [CareTeam](careteam.html): Who care team is for
3417* [ClinicalImpression](clinicalimpression.html): Patient assessed
3418* [Composition](composition.html): Who and/or what the composition is about
3419* [Condition](condition.html): Who has the condition?
3420* [Consent](consent.html): Who the consent applies to
3421* [DetectedIssue](detectedissue.html): Associated patient
3422* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3423* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
3424* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3425* [DocumentManifest](documentmanifest.html): The subject of the set of documents
3426* [DocumentReference](documentreference.html): Who/what is the subject of the document
3427* [Encounter](encounter.html): The patient present at the encounter
3428* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3429* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3430* [Flag](flag.html): The identity of a subject to list flags for
3431* [Goal](goal.html): Who this goal is intended for
3432* [ImagingStudy](imagingstudy.html): Who the study is about
3433* [Immunization](immunization.html): The patient for the vaccination record
3434* [List](list.html): If all resources have the same subject
3435* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3436* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3437* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3438* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.
3439* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
3440* [Observation](observation.html): The subject that the observation is about (if patient)
3441* [Procedure](procedure.html): Search by subject - a patient
3442* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3443* [ServiceRequest](servicerequest.html): Search by subject - a patient
3444* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3445* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
3446* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3447</b><br>
3448   * Type: <b>reference</b><br>
3449   * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | DetectedIssue.subject | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is 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 | SupplyRequest.deliverFor | VisionPrescription.patient</b><br>
3450   * </p>
3451   */
3452  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
3453
3454/**
3455   * Constant for fluent queries to be used to add include statements. Specifies
3456   * the path value of "<b>Composition:patient</b>".
3457   */
3458  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Composition:patient").toLocked();
3459
3460 /**
3461   * Search parameter: <b>type</b>
3462   * <p>
3463   * Description: <b>Multiple Resources: 
3464
3465* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)
3466* [Composition](composition.html): Kind of composition (LOINC if possible)
3467* [DocumentManifest](documentmanifest.html): Kind of document set
3468* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)
3469* [Encounter](encounter.html): Specific type of encounter
3470* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management
3471</b><br>
3472   * Type: <b>token</b><br>
3473   * Path: <b>AllergyIntolerance.type | Composition.type | DocumentManifest.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type</b><br>
3474   * </p>
3475   */
3476  @SearchParamDefinition(name="type", path="AllergyIntolerance.type | Composition.type | DocumentManifest.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)\r\n* [Composition](composition.html): Kind of composition (LOINC if possible)\r\n* [DocumentManifest](documentmanifest.html): Kind of document set\r\n* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)\r\n* [Encounter](encounter.html): Specific type of encounter\r\n* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management\r\n", type="token" )
3477  public static final String SP_TYPE = "type";
3478 /**
3479   * <b>Fluent Client</b> search parameter constant for <b>type</b>
3480   * <p>
3481   * Description: <b>Multiple Resources: 
3482
3483* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)
3484* [Composition](composition.html): Kind of composition (LOINC if possible)
3485* [DocumentManifest](documentmanifest.html): Kind of document set
3486* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)
3487* [Encounter](encounter.html): Specific type of encounter
3488* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management
3489</b><br>
3490   * Type: <b>token</b><br>
3491   * Path: <b>AllergyIntolerance.type | Composition.type | DocumentManifest.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type</b><br>
3492   * </p>
3493   */
3494  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
3495
3496
3497}
3498