001package org.hl7.fhir.r4.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0
033
034import java.util.*;
035
036import org.hl7.fhir.utilities.Utilities;
037import org.hl7.fhir.r4.model.Enumerations.*;
038import ca.uhn.fhir.model.api.annotation.ResourceDef;
039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
040import ca.uhn.fhir.model.api.annotation.Child;
041import ca.uhn.fhir.model.api.annotation.ChildOrder;
042import ca.uhn.fhir.model.api.annotation.Description;
043import ca.uhn.fhir.model.api.annotation.Block;
044import org.hl7.fhir.instance.model.api.*;
045import org.hl7.fhir.exceptions.FHIRException;
046/**
047 * A collection of documents compiled for a purpose together with metadata that applies to the collection.
048 */
049@ResourceDef(name="DocumentManifest", profile="http://hl7.org/fhir/Profile/DocumentManifest")
050public class DocumentManifest extends DomainResource {
051
052    @Block()
053    public static class DocumentManifestAgentComponent extends BackboneElement implements IBaseBackboneElement {
054        /**
055         * Specification of the participation type the agent played.
056         */
057        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
058        @Description(shortDefinition="How agent participated", formalDefinition="Specification of the participation type the agent played." )
059        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/participation-role-type")
060        protected CodeableConcept type;
061
062        /**
063         * Identifies who is the agent. Such as the author of the manifest, and adding  documents to it.
064         */
065        @Child(name = "who", type = {Practitioner.class, PractitionerRole.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=true)
066        @Description(shortDefinition="Who and/or what had an agent participation", formalDefinition="Identifies who is the agent. Such as the author of the manifest, and adding  documents to it." )
067        protected Reference who;
068
069        /**
070         * The actual object that is the target of the reference (Identifies who is the agent. Such as the author of the manifest, and adding  documents to it.)
071         */
072        protected Resource whoTarget;
073
074        private static final long serialVersionUID = -1480994789L;
075
076    /**
077     * Constructor
078     */
079      public DocumentManifestAgentComponent() {
080        super();
081      }
082
083    /**
084     * Constructor
085     */
086      public DocumentManifestAgentComponent(Reference who) {
087        super();
088        this.who = who;
089      }
090
091        /**
092         * @return {@link #type} (Specification of the participation type the agent played.)
093         */
094        public CodeableConcept getType() { 
095          if (this.type == null)
096            if (Configuration.errorOnAutoCreate())
097              throw new Error("Attempt to auto-create DocumentManifestAgentComponent.type");
098            else if (Configuration.doAutoCreate())
099              this.type = new CodeableConcept(); // cc
100          return this.type;
101        }
102
103        public boolean hasType() { 
104          return this.type != null && !this.type.isEmpty();
105        }
106
107        /**
108         * @param value {@link #type} (Specification of the participation type the agent played.)
109         */
110        public DocumentManifestAgentComponent setType(CodeableConcept value) { 
111          this.type = value;
112          return this;
113        }
114
115        /**
116         * @return {@link #who} (Identifies who is the agent. Such as the author of the manifest, and adding  documents to it.)
117         */
118        public Reference getWho() { 
119          if (this.who == null)
120            if (Configuration.errorOnAutoCreate())
121              throw new Error("Attempt to auto-create DocumentManifestAgentComponent.who");
122            else if (Configuration.doAutoCreate())
123              this.who = new Reference(); // cc
124          return this.who;
125        }
126
127        public boolean hasWho() { 
128          return this.who != null && !this.who.isEmpty();
129        }
130
131        /**
132         * @param value {@link #who} (Identifies who is the agent. Such as the author of the manifest, and adding  documents to it.)
133         */
134        public DocumentManifestAgentComponent setWho(Reference value) { 
135          this.who = value;
136          return this;
137        }
138
139        /**
140         * @return {@link #who} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies who is the agent. Such as the author of the manifest, and adding  documents to it.)
141         */
142        public Resource getWhoTarget() { 
143          return this.whoTarget;
144        }
145
146        /**
147         * @param value {@link #who} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies who is the agent. Such as the author of the manifest, and adding  documents to it.)
148         */
149        public DocumentManifestAgentComponent setWhoTarget(Resource value) { 
150          this.whoTarget = value;
151          return this;
152        }
153
154        protected void listChildren(List<Property> children) {
155          super.listChildren(children);
156          children.add(new Property("type", "CodeableConcept", "Specification of the participation type the agent played.", 0, 1, type));
157          children.add(new Property("who", "Reference(Practitioner|PractitionerRole|Organization|Device|Patient|RelatedPerson)", "Identifies who is the agent. Such as the author of the manifest, and adding  documents to it.", 0, 1, who));
158        }
159
160        @Override
161        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
162          switch (_hash) {
163          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Specification of the participation type the agent played.", 0, 1, type);
164          case 117694: /*who*/  return new Property("who", "Reference(Practitioner|PractitionerRole|Organization|Device|Patient|RelatedPerson)", "Identifies who is the agent. Such as the author of the manifest, and adding  documents to it.", 0, 1, who);
165          default: return super.getNamedProperty(_hash, _name, _checkValid);
166          }
167
168        }
169
170      @Override
171      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
172        switch (hash) {
173        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
174        case 117694: /*who*/ return this.who == null ? new Base[0] : new Base[] {this.who}; // Reference
175        default: return super.getProperty(hash, name, checkValid);
176        }
177
178      }
179
180      @Override
181      public Base setProperty(int hash, String name, Base value) throws FHIRException {
182        switch (hash) {
183        case 3575610: // type
184          this.type = castToCodeableConcept(value); // CodeableConcept
185          return value;
186        case 117694: // who
187          this.who = castToReference(value); // Reference
188          return value;
189        default: return super.setProperty(hash, name, value);
190        }
191
192      }
193
194      @Override
195      public Base setProperty(String name, Base value) throws FHIRException {
196        if (name.equals("type")) {
197          this.type = castToCodeableConcept(value); // CodeableConcept
198        } else if (name.equals("who")) {
199          this.who = castToReference(value); // Reference
200        } else
201          return super.setProperty(name, value);
202        return value;
203      }
204
205      @Override
206      public Base makeProperty(int hash, String name) throws FHIRException {
207        switch (hash) {
208        case 3575610:  return getType(); 
209        case 117694:  return getWho(); 
210        default: return super.makeProperty(hash, name);
211        }
212
213      }
214
215      @Override
216      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
217        switch (hash) {
218        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
219        case 117694: /*who*/ return new String[] {"Reference"};
220        default: return super.getTypesForProperty(hash, name);
221        }
222
223      }
224
225      @Override
226      public Base addChild(String name) throws FHIRException {
227        if (name.equals("type")) {
228          this.type = new CodeableConcept();
229          return this.type;
230        }
231        else if (name.equals("who")) {
232          this.who = new Reference();
233          return this.who;
234        }
235        else
236          return super.addChild(name);
237      }
238
239      public DocumentManifestAgentComponent copy() {
240        DocumentManifestAgentComponent dst = new DocumentManifestAgentComponent();
241        copyValues(dst);
242        dst.type = type == null ? null : type.copy();
243        dst.who = who == null ? null : who.copy();
244        return dst;
245      }
246
247      @Override
248      public boolean equalsDeep(Base other_) {
249        if (!super.equalsDeep(other_))
250          return false;
251        if (!(other_ instanceof DocumentManifestAgentComponent))
252          return false;
253        DocumentManifestAgentComponent o = (DocumentManifestAgentComponent) other_;
254        return compareDeep(type, o.type, true) && compareDeep(who, o.who, true);
255      }
256
257      @Override
258      public boolean equalsShallow(Base other_) {
259        if (!super.equalsShallow(other_))
260          return false;
261        if (!(other_ instanceof DocumentManifestAgentComponent))
262          return false;
263        DocumentManifestAgentComponent o = (DocumentManifestAgentComponent) other_;
264        return true;
265      }
266
267      public boolean isEmpty() {
268        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, who);
269      }
270
271  public String fhirType() {
272    return "DocumentManifest.agent";
273
274  }
275
276  }
277
278    @Block()
279    public static class DocumentManifestRelatedComponent extends BackboneElement implements IBaseBackboneElement {
280        /**
281         * Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers.
282         */
283        @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=false)
284        @Description(shortDefinition="Identifiers of things that are related", formalDefinition="Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers." )
285        protected Identifier identifier;
286
287        /**
288         * Related Resource to this DocumentManifest. For example, Order, ServiceRequest,  Procedure, EligibilityRequest, etc.
289         */
290        @Child(name = "ref", type = {Reference.class}, order=2, min=0, max=1, modifier=false, summary=false)
291        @Description(shortDefinition="Related Resource", formalDefinition="Related Resource to this DocumentManifest. For example, Order, ServiceRequest,  Procedure, EligibilityRequest, etc." )
292        protected Reference ref;
293
294        /**
295         * The actual object that is the target of the reference (Related Resource to this DocumentManifest. For example, Order, ServiceRequest,  Procedure, EligibilityRequest, etc.)
296         */
297        protected Resource refTarget;
298
299        private static final long serialVersionUID = -1670123330L;
300
301    /**
302     * Constructor
303     */
304      public DocumentManifestRelatedComponent() {
305        super();
306      }
307
308        /**
309         * @return {@link #identifier} (Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers.)
310         */
311        public Identifier getIdentifier() { 
312          if (this.identifier == null)
313            if (Configuration.errorOnAutoCreate())
314              throw new Error("Attempt to auto-create DocumentManifestRelatedComponent.identifier");
315            else if (Configuration.doAutoCreate())
316              this.identifier = new Identifier(); // cc
317          return this.identifier;
318        }
319
320        public boolean hasIdentifier() { 
321          return this.identifier != null && !this.identifier.isEmpty();
322        }
323
324        /**
325         * @param value {@link #identifier} (Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers.)
326         */
327        public DocumentManifestRelatedComponent setIdentifier(Identifier value) { 
328          this.identifier = value;
329          return this;
330        }
331
332        /**
333         * @return {@link #ref} (Related Resource to this DocumentManifest. For example, Order, ServiceRequest,  Procedure, EligibilityRequest, etc.)
334         */
335        public Reference getRef() { 
336          if (this.ref == null)
337            if (Configuration.errorOnAutoCreate())
338              throw new Error("Attempt to auto-create DocumentManifestRelatedComponent.ref");
339            else if (Configuration.doAutoCreate())
340              this.ref = new Reference(); // cc
341          return this.ref;
342        }
343
344        public boolean hasRef() { 
345          return this.ref != null && !this.ref.isEmpty();
346        }
347
348        /**
349         * @param value {@link #ref} (Related Resource to this DocumentManifest. For example, Order, ServiceRequest,  Procedure, EligibilityRequest, etc.)
350         */
351        public DocumentManifestRelatedComponent setRef(Reference value) { 
352          this.ref = value;
353          return this;
354        }
355
356        /**
357         * @return {@link #ref} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Related Resource to this DocumentManifest. For example, Order, ServiceRequest,  Procedure, EligibilityRequest, etc.)
358         */
359        public Resource getRefTarget() { 
360          return this.refTarget;
361        }
362
363        /**
364         * @param value {@link #ref} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Related Resource to this DocumentManifest. For example, Order, ServiceRequest,  Procedure, EligibilityRequest, etc.)
365         */
366        public DocumentManifestRelatedComponent setRefTarget(Resource value) { 
367          this.refTarget = value;
368          return this;
369        }
370
371        protected void listChildren(List<Property> children) {
372          super.listChildren(children);
373          children.add(new Property("identifier", "Identifier", "Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers.", 0, 1, identifier));
374          children.add(new Property("ref", "Reference(Any)", "Related Resource to this DocumentManifest. For example, Order, ServiceRequest,  Procedure, EligibilityRequest, etc.", 0, 1, ref));
375        }
376
377        @Override
378        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
379          switch (_hash) {
380          case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers.", 0, 1, identifier);
381          case 112787: /*ref*/  return new Property("ref", "Reference(Any)", "Related Resource to this DocumentManifest. For example, Order, ServiceRequest,  Procedure, EligibilityRequest, etc.", 0, 1, ref);
382          default: return super.getNamedProperty(_hash, _name, _checkValid);
383          }
384
385        }
386
387      @Override
388      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
389        switch (hash) {
390        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
391        case 112787: /*ref*/ return this.ref == null ? new Base[0] : new Base[] {this.ref}; // Reference
392        default: return super.getProperty(hash, name, checkValid);
393        }
394
395      }
396
397      @Override
398      public Base setProperty(int hash, String name, Base value) throws FHIRException {
399        switch (hash) {
400        case -1618432855: // identifier
401          this.identifier = castToIdentifier(value); // Identifier
402          return value;
403        case 112787: // ref
404          this.ref = castToReference(value); // Reference
405          return value;
406        default: return super.setProperty(hash, name, value);
407        }
408
409      }
410
411      @Override
412      public Base setProperty(String name, Base value) throws FHIRException {
413        if (name.equals("identifier")) {
414          this.identifier = castToIdentifier(value); // Identifier
415        } else if (name.equals("ref")) {
416          this.ref = castToReference(value); // Reference
417        } else
418          return super.setProperty(name, value);
419        return value;
420      }
421
422      @Override
423      public Base makeProperty(int hash, String name) throws FHIRException {
424        switch (hash) {
425        case -1618432855:  return getIdentifier(); 
426        case 112787:  return getRef(); 
427        default: return super.makeProperty(hash, name);
428        }
429
430      }
431
432      @Override
433      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
434        switch (hash) {
435        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
436        case 112787: /*ref*/ return new String[] {"Reference"};
437        default: return super.getTypesForProperty(hash, name);
438        }
439
440      }
441
442      @Override
443      public Base addChild(String name) throws FHIRException {
444        if (name.equals("identifier")) {
445          this.identifier = new Identifier();
446          return this.identifier;
447        }
448        else if (name.equals("ref")) {
449          this.ref = new Reference();
450          return this.ref;
451        }
452        else
453          return super.addChild(name);
454      }
455
456      public DocumentManifestRelatedComponent copy() {
457        DocumentManifestRelatedComponent dst = new DocumentManifestRelatedComponent();
458        copyValues(dst);
459        dst.identifier = identifier == null ? null : identifier.copy();
460        dst.ref = ref == null ? null : ref.copy();
461        return dst;
462      }
463
464      @Override
465      public boolean equalsDeep(Base other_) {
466        if (!super.equalsDeep(other_))
467          return false;
468        if (!(other_ instanceof DocumentManifestRelatedComponent))
469          return false;
470        DocumentManifestRelatedComponent o = (DocumentManifestRelatedComponent) other_;
471        return compareDeep(identifier, o.identifier, true) && compareDeep(ref, o.ref, true);
472      }
473
474      @Override
475      public boolean equalsShallow(Base other_) {
476        if (!super.equalsShallow(other_))
477          return false;
478        if (!(other_ instanceof DocumentManifestRelatedComponent))
479          return false;
480        DocumentManifestRelatedComponent o = (DocumentManifestRelatedComponent) other_;
481        return true;
482      }
483
484      public boolean isEmpty() {
485        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, ref);
486      }
487
488  public String fhirType() {
489    return "DocumentManifest.related";
490
491  }
492
493  }
494
495    /**
496     * A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.
497     */
498    @Child(name = "masterIdentifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true)
499    @Description(shortDefinition="Unique Identifier for the set of documents", formalDefinition="A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts." )
500    protected Identifier masterIdentifier;
501
502    /**
503     * Other identifiers associated with the document manifest, including version independent  identifiers.
504     */
505    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
506    @Description(shortDefinition="Other identifiers for the manifest", formalDefinition="Other identifiers associated with the document manifest, including version independent  identifiers." )
507    protected List<Identifier> identifier;
508
509    /**
510     * The status of this document manifest.
511     */
512    @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true)
513    @Description(shortDefinition="current | superseded | entered-in-error", formalDefinition="The status of this document manifest." )
514    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/document-reference-status")
515    protected Enumeration<DocumentReferenceStatus> status;
516
517    /**
518     * Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.
519     */
520    @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true)
521    @Description(shortDefinition="Kind of document set", formalDefinition="Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider." )
522    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/c80-doc-typecodes")
523    protected CodeableConcept type;
524
525    /**
526     * Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).
527     */
528    @Child(name = "subject", type = {Patient.class, Practitioner.class, Group.class, Device.class}, order=4, min=0, max=1, modifier=false, summary=true)
529    @Description(shortDefinition="The subject of the set of documents", formalDefinition="Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case)." )
530    protected Reference subject;
531
532    /**
533     * The actual object that is the target of the reference (Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).)
534     */
535    protected Resource subjectTarget;
536
537    /**
538     * When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).
539     */
540    @Child(name = "created", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=false)
541    @Description(shortDefinition="When this document manifest created", formalDefinition="When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.)." )
542    protected DateTimeType created;
543
544    /**
545     * An actor taking an active role in the manifest.
546     */
547    @Child(name = "agent", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
548    @Description(shortDefinition="Agent involved", formalDefinition="An actor taking an active role in the manifest." )
549    protected List<DocumentManifestAgentComponent> agent;
550
551    /**
552     * A patient, practitioner, or organization for which this set of documents is intended.
553     */
554    @Child(name = "recipient", type = {Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Organization.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
555    @Description(shortDefinition="Intended to get notified about this set of documents", formalDefinition="A patient, practitioner, or organization for which this set of documents is intended." )
556    protected List<Reference> recipient;
557    /**
558     * The actual objects that are the target of the reference (A patient, practitioner, or organization for which this set of documents is intended.)
559     */
560    protected List<Resource> recipientTarget;
561
562
563    /**
564     * Identifies the source system, application, or software that produced the document manifest.
565     */
566    @Child(name = "source", type = {UriType.class}, order=8, min=0, max=1, modifier=false, summary=false)
567    @Description(shortDefinition="The source system/application/software", formalDefinition="Identifies the source system, application, or software that produced the document manifest." )
568    protected UriType source;
569
570    /**
571     * Human-readable description of the source document. This is sometimes known as the "title".
572     */
573    @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true)
574    @Description(shortDefinition="Human-readable description (title)", formalDefinition="Human-readable description of the source document. This is sometimes known as the \"title\"." )
575    protected StringType description;
576
577    /**
578     * The list of Resources that consist of the parts of this manifest.
579     */
580    @Child(name = "content", type = {Reference.class}, order=10, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
581    @Description(shortDefinition="Items in manifest", formalDefinition="The list of Resources that consist of the parts of this manifest." )
582    protected List<Reference> content;
583    /**
584     * The actual objects that are the target of the reference (The list of Resources that consist of the parts of this manifest.)
585     */
586    protected List<Resource> contentTarget;
587
588
589    /**
590     * Related identifiers or resources associated with the DocumentManifest.
591     */
592    @Child(name = "related", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
593    @Description(shortDefinition="Related things", formalDefinition="Related identifiers or resources associated with the DocumentManifest." )
594    protected List<DocumentManifestRelatedComponent> related;
595
596    private static final long serialVersionUID = -1607612345L;
597
598  /**
599   * Constructor
600   */
601    public DocumentManifest() {
602      super();
603    }
604
605  /**
606   * Constructor
607   */
608    public DocumentManifest(Enumeration<DocumentReferenceStatus> status) {
609      super();
610      this.status = status;
611    }
612
613    /**
614     * @return {@link #masterIdentifier} (A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.)
615     */
616    public Identifier getMasterIdentifier() { 
617      if (this.masterIdentifier == null)
618        if (Configuration.errorOnAutoCreate())
619          throw new Error("Attempt to auto-create DocumentManifest.masterIdentifier");
620        else if (Configuration.doAutoCreate())
621          this.masterIdentifier = new Identifier(); // cc
622      return this.masterIdentifier;
623    }
624
625    public boolean hasMasterIdentifier() { 
626      return this.masterIdentifier != null && !this.masterIdentifier.isEmpty();
627    }
628
629    /**
630     * @param value {@link #masterIdentifier} (A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.)
631     */
632    public DocumentManifest setMasterIdentifier(Identifier value) { 
633      this.masterIdentifier = value;
634      return this;
635    }
636
637    /**
638     * @return {@link #identifier} (Other identifiers associated with the document manifest, including version independent  identifiers.)
639     */
640    public List<Identifier> getIdentifier() { 
641      if (this.identifier == null)
642        this.identifier = new ArrayList<Identifier>();
643      return this.identifier;
644    }
645
646    /**
647     * @return Returns a reference to <code>this</code> for easy method chaining
648     */
649    public DocumentManifest setIdentifier(List<Identifier> theIdentifier) { 
650      this.identifier = theIdentifier;
651      return this;
652    }
653
654    public boolean hasIdentifier() { 
655      if (this.identifier == null)
656        return false;
657      for (Identifier item : this.identifier)
658        if (!item.isEmpty())
659          return true;
660      return false;
661    }
662
663    public Identifier addIdentifier() { //3
664      Identifier t = new Identifier();
665      if (this.identifier == null)
666        this.identifier = new ArrayList<Identifier>();
667      this.identifier.add(t);
668      return t;
669    }
670
671    public DocumentManifest addIdentifier(Identifier t) { //3
672      if (t == null)
673        return this;
674      if (this.identifier == null)
675        this.identifier = new ArrayList<Identifier>();
676      this.identifier.add(t);
677      return this;
678    }
679
680    /**
681     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
682     */
683    public Identifier getIdentifierFirstRep() { 
684      if (getIdentifier().isEmpty()) {
685        addIdentifier();
686      }
687      return getIdentifier().get(0);
688    }
689
690    /**
691     * @return {@link #status} (The status of this document manifest.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
692     */
693    public Enumeration<DocumentReferenceStatus> getStatusElement() { 
694      if (this.status == null)
695        if (Configuration.errorOnAutoCreate())
696          throw new Error("Attempt to auto-create DocumentManifest.status");
697        else if (Configuration.doAutoCreate())
698          this.status = new Enumeration<DocumentReferenceStatus>(new DocumentReferenceStatusEnumFactory()); // bb
699      return this.status;
700    }
701
702    public boolean hasStatusElement() { 
703      return this.status != null && !this.status.isEmpty();
704    }
705
706    public boolean hasStatus() { 
707      return this.status != null && !this.status.isEmpty();
708    }
709
710    /**
711     * @param value {@link #status} (The status of this document manifest.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
712     */
713    public DocumentManifest setStatusElement(Enumeration<DocumentReferenceStatus> value) { 
714      this.status = value;
715      return this;
716    }
717
718    /**
719     * @return The status of this document manifest.
720     */
721    public DocumentReferenceStatus getStatus() { 
722      return this.status == null ? null : this.status.getValue();
723    }
724
725    /**
726     * @param value The status of this document manifest.
727     */
728    public DocumentManifest setStatus(DocumentReferenceStatus value) { 
729        if (this.status == null)
730          this.status = new Enumeration<DocumentReferenceStatus>(new DocumentReferenceStatusEnumFactory());
731        this.status.setValue(value);
732      return this;
733    }
734
735    /**
736     * @return {@link #type} (Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.)
737     */
738    public CodeableConcept getType() { 
739      if (this.type == null)
740        if (Configuration.errorOnAutoCreate())
741          throw new Error("Attempt to auto-create DocumentManifest.type");
742        else if (Configuration.doAutoCreate())
743          this.type = new CodeableConcept(); // cc
744      return this.type;
745    }
746
747    public boolean hasType() { 
748      return this.type != null && !this.type.isEmpty();
749    }
750
751    /**
752     * @param value {@link #type} (Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.)
753     */
754    public DocumentManifest setType(CodeableConcept value) { 
755      this.type = value;
756      return this;
757    }
758
759    /**
760     * @return {@link #subject} (Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).)
761     */
762    public Reference getSubject() { 
763      if (this.subject == null)
764        if (Configuration.errorOnAutoCreate())
765          throw new Error("Attempt to auto-create DocumentManifest.subject");
766        else if (Configuration.doAutoCreate())
767          this.subject = new Reference(); // cc
768      return this.subject;
769    }
770
771    public boolean hasSubject() { 
772      return this.subject != null && !this.subject.isEmpty();
773    }
774
775    /**
776     * @param value {@link #subject} (Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).)
777     */
778    public DocumentManifest setSubject(Reference value) { 
779      this.subject = value;
780      return this;
781    }
782
783    /**
784     * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).)
785     */
786    public Resource getSubjectTarget() { 
787      return this.subjectTarget;
788    }
789
790    /**
791     * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).)
792     */
793    public DocumentManifest setSubjectTarget(Resource value) { 
794      this.subjectTarget = value;
795      return this;
796    }
797
798    /**
799     * @return {@link #created} (When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
800     */
801    public DateTimeType getCreatedElement() { 
802      if (this.created == null)
803        if (Configuration.errorOnAutoCreate())
804          throw new Error("Attempt to auto-create DocumentManifest.created");
805        else if (Configuration.doAutoCreate())
806          this.created = new DateTimeType(); // bb
807      return this.created;
808    }
809
810    public boolean hasCreatedElement() { 
811      return this.created != null && !this.created.isEmpty();
812    }
813
814    public boolean hasCreated() { 
815      return this.created != null && !this.created.isEmpty();
816    }
817
818    /**
819     * @param value {@link #created} (When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
820     */
821    public DocumentManifest setCreatedElement(DateTimeType value) { 
822      this.created = value;
823      return this;
824    }
825
826    /**
827     * @return When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).
828     */
829    public Date getCreated() { 
830      return this.created == null ? null : this.created.getValue();
831    }
832
833    /**
834     * @param value When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).
835     */
836    public DocumentManifest setCreated(Date value) { 
837      if (value == null)
838        this.created = null;
839      else {
840        if (this.created == null)
841          this.created = new DateTimeType();
842        this.created.setValue(value);
843      }
844      return this;
845    }
846
847    /**
848     * @return {@link #agent} (An actor taking an active role in the manifest.)
849     */
850    public List<DocumentManifestAgentComponent> getAgent() { 
851      if (this.agent == null)
852        this.agent = new ArrayList<DocumentManifestAgentComponent>();
853      return this.agent;
854    }
855
856    /**
857     * @return Returns a reference to <code>this</code> for easy method chaining
858     */
859    public DocumentManifest setAgent(List<DocumentManifestAgentComponent> theAgent) { 
860      this.agent = theAgent;
861      return this;
862    }
863
864    public boolean hasAgent() { 
865      if (this.agent == null)
866        return false;
867      for (DocumentManifestAgentComponent item : this.agent)
868        if (!item.isEmpty())
869          return true;
870      return false;
871    }
872
873    public DocumentManifestAgentComponent addAgent() { //3
874      DocumentManifestAgentComponent t = new DocumentManifestAgentComponent();
875      if (this.agent == null)
876        this.agent = new ArrayList<DocumentManifestAgentComponent>();
877      this.agent.add(t);
878      return t;
879    }
880
881    public DocumentManifest addAgent(DocumentManifestAgentComponent t) { //3
882      if (t == null)
883        return this;
884      if (this.agent == null)
885        this.agent = new ArrayList<DocumentManifestAgentComponent>();
886      this.agent.add(t);
887      return this;
888    }
889
890    /**
891     * @return The first repetition of repeating field {@link #agent}, creating it if it does not already exist
892     */
893    public DocumentManifestAgentComponent getAgentFirstRep() { 
894      if (getAgent().isEmpty()) {
895        addAgent();
896      }
897      return getAgent().get(0);
898    }
899
900    /**
901     * @return {@link #recipient} (A patient, practitioner, or organization for which this set of documents is intended.)
902     */
903    public List<Reference> getRecipient() { 
904      if (this.recipient == null)
905        this.recipient = new ArrayList<Reference>();
906      return this.recipient;
907    }
908
909    /**
910     * @return Returns a reference to <code>this</code> for easy method chaining
911     */
912    public DocumentManifest setRecipient(List<Reference> theRecipient) { 
913      this.recipient = theRecipient;
914      return this;
915    }
916
917    public boolean hasRecipient() { 
918      if (this.recipient == null)
919        return false;
920      for (Reference item : this.recipient)
921        if (!item.isEmpty())
922          return true;
923      return false;
924    }
925
926    public Reference addRecipient() { //3
927      Reference t = new Reference();
928      if (this.recipient == null)
929        this.recipient = new ArrayList<Reference>();
930      this.recipient.add(t);
931      return t;
932    }
933
934    public DocumentManifest addRecipient(Reference t) { //3
935      if (t == null)
936        return this;
937      if (this.recipient == null)
938        this.recipient = new ArrayList<Reference>();
939      this.recipient.add(t);
940      return this;
941    }
942
943    /**
944     * @return The first repetition of repeating field {@link #recipient}, creating it if it does not already exist
945     */
946    public Reference getRecipientFirstRep() { 
947      if (getRecipient().isEmpty()) {
948        addRecipient();
949      }
950      return getRecipient().get(0);
951    }
952
953    /**
954     * @deprecated Use Reference#setResource(IBaseResource) instead
955     */
956    @Deprecated
957    public List<Resource> getRecipientTarget() { 
958      if (this.recipientTarget == null)
959        this.recipientTarget = new ArrayList<Resource>();
960      return this.recipientTarget;
961    }
962
963    /**
964     * @return {@link #source} (Identifies the source system, application, or software that produced the document manifest.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value
965     */
966    public UriType getSourceElement() { 
967      if (this.source == null)
968        if (Configuration.errorOnAutoCreate())
969          throw new Error("Attempt to auto-create DocumentManifest.source");
970        else if (Configuration.doAutoCreate())
971          this.source = new UriType(); // bb
972      return this.source;
973    }
974
975    public boolean hasSourceElement() { 
976      return this.source != null && !this.source.isEmpty();
977    }
978
979    public boolean hasSource() { 
980      return this.source != null && !this.source.isEmpty();
981    }
982
983    /**
984     * @param value {@link #source} (Identifies the source system, application, or software that produced the document manifest.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value
985     */
986    public DocumentManifest setSourceElement(UriType value) { 
987      this.source = value;
988      return this;
989    }
990
991    /**
992     * @return Identifies the source system, application, or software that produced the document manifest.
993     */
994    public String getSource() { 
995      return this.source == null ? null : this.source.getValue();
996    }
997
998    /**
999     * @param value Identifies the source system, application, or software that produced the document manifest.
1000     */
1001    public DocumentManifest setSource(String value) { 
1002      if (Utilities.noString(value))
1003        this.source = null;
1004      else {
1005        if (this.source == null)
1006          this.source = new UriType();
1007        this.source.setValue(value);
1008      }
1009      return this;
1010    }
1011
1012    /**
1013     * @return {@link #description} (Human-readable description of the source document. This is sometimes known as the "title".). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1014     */
1015    public StringType getDescriptionElement() { 
1016      if (this.description == null)
1017        if (Configuration.errorOnAutoCreate())
1018          throw new Error("Attempt to auto-create DocumentManifest.description");
1019        else if (Configuration.doAutoCreate())
1020          this.description = new StringType(); // bb
1021      return this.description;
1022    }
1023
1024    public boolean hasDescriptionElement() { 
1025      return this.description != null && !this.description.isEmpty();
1026    }
1027
1028    public boolean hasDescription() { 
1029      return this.description != null && !this.description.isEmpty();
1030    }
1031
1032    /**
1033     * @param value {@link #description} (Human-readable description of the source document. This is sometimes known as the "title".). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1034     */
1035    public DocumentManifest setDescriptionElement(StringType value) { 
1036      this.description = value;
1037      return this;
1038    }
1039
1040    /**
1041     * @return Human-readable description of the source document. This is sometimes known as the "title".
1042     */
1043    public String getDescription() { 
1044      return this.description == null ? null : this.description.getValue();
1045    }
1046
1047    /**
1048     * @param value Human-readable description of the source document. This is sometimes known as the "title".
1049     */
1050    public DocumentManifest setDescription(String value) { 
1051      if (Utilities.noString(value))
1052        this.description = null;
1053      else {
1054        if (this.description == null)
1055          this.description = new StringType();
1056        this.description.setValue(value);
1057      }
1058      return this;
1059    }
1060
1061    /**
1062     * @return {@link #content} (The list of Resources that consist of the parts of this manifest.)
1063     */
1064    public List<Reference> getContent() { 
1065      if (this.content == null)
1066        this.content = new ArrayList<Reference>();
1067      return this.content;
1068    }
1069
1070    /**
1071     * @return Returns a reference to <code>this</code> for easy method chaining
1072     */
1073    public DocumentManifest setContent(List<Reference> theContent) { 
1074      this.content = theContent;
1075      return this;
1076    }
1077
1078    public boolean hasContent() { 
1079      if (this.content == null)
1080        return false;
1081      for (Reference item : this.content)
1082        if (!item.isEmpty())
1083          return true;
1084      return false;
1085    }
1086
1087    public Reference addContent() { //3
1088      Reference t = new Reference();
1089      if (this.content == null)
1090        this.content = new ArrayList<Reference>();
1091      this.content.add(t);
1092      return t;
1093    }
1094
1095    public DocumentManifest addContent(Reference t) { //3
1096      if (t == null)
1097        return this;
1098      if (this.content == null)
1099        this.content = new ArrayList<Reference>();
1100      this.content.add(t);
1101      return this;
1102    }
1103
1104    /**
1105     * @return The first repetition of repeating field {@link #content}, creating it if it does not already exist
1106     */
1107    public Reference getContentFirstRep() { 
1108      if (getContent().isEmpty()) {
1109        addContent();
1110      }
1111      return getContent().get(0);
1112    }
1113
1114    /**
1115     * @deprecated Use Reference#setResource(IBaseResource) instead
1116     */
1117    @Deprecated
1118    public List<Resource> getContentTarget() { 
1119      if (this.contentTarget == null)
1120        this.contentTarget = new ArrayList<Resource>();
1121      return this.contentTarget;
1122    }
1123
1124    /**
1125     * @return {@link #related} (Related identifiers or resources associated with the DocumentManifest.)
1126     */
1127    public List<DocumentManifestRelatedComponent> getRelated() { 
1128      if (this.related == null)
1129        this.related = new ArrayList<DocumentManifestRelatedComponent>();
1130      return this.related;
1131    }
1132
1133    /**
1134     * @return Returns a reference to <code>this</code> for easy method chaining
1135     */
1136    public DocumentManifest setRelated(List<DocumentManifestRelatedComponent> theRelated) { 
1137      this.related = theRelated;
1138      return this;
1139    }
1140
1141    public boolean hasRelated() { 
1142      if (this.related == null)
1143        return false;
1144      for (DocumentManifestRelatedComponent item : this.related)
1145        if (!item.isEmpty())
1146          return true;
1147      return false;
1148    }
1149
1150    public DocumentManifestRelatedComponent addRelated() { //3
1151      DocumentManifestRelatedComponent t = new DocumentManifestRelatedComponent();
1152      if (this.related == null)
1153        this.related = new ArrayList<DocumentManifestRelatedComponent>();
1154      this.related.add(t);
1155      return t;
1156    }
1157
1158    public DocumentManifest addRelated(DocumentManifestRelatedComponent t) { //3
1159      if (t == null)
1160        return this;
1161      if (this.related == null)
1162        this.related = new ArrayList<DocumentManifestRelatedComponent>();
1163      this.related.add(t);
1164      return this;
1165    }
1166
1167    /**
1168     * @return The first repetition of repeating field {@link #related}, creating it if it does not already exist
1169     */
1170    public DocumentManifestRelatedComponent getRelatedFirstRep() { 
1171      if (getRelated().isEmpty()) {
1172        addRelated();
1173      }
1174      return getRelated().get(0);
1175    }
1176
1177      protected void listChildren(List<Property> children) {
1178        super.listChildren(children);
1179        children.add(new Property("masterIdentifier", "Identifier", "A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.", 0, 1, masterIdentifier));
1180        children.add(new Property("identifier", "Identifier", "Other identifiers associated with the document manifest, including version independent  identifiers.", 0, java.lang.Integer.MAX_VALUE, identifier));
1181        children.add(new Property("status", "code", "The status of this document manifest.", 0, 1, status));
1182        children.add(new Property("type", "CodeableConcept", "Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.", 0, 1, type));
1183        children.add(new Property("subject", "Reference(Patient|Practitioner|Group|Device)", "Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).", 0, 1, subject));
1184        children.add(new Property("created", "dateTime", "When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).", 0, 1, created));
1185        children.add(new Property("agent", "", "An actor taking an active role in the manifest.", 0, java.lang.Integer.MAX_VALUE, agent));
1186        children.add(new Property("recipient", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Organization)", "A patient, practitioner, or organization for which this set of documents is intended.", 0, java.lang.Integer.MAX_VALUE, recipient));
1187        children.add(new Property("source", "uri", "Identifies the source system, application, or software that produced the document manifest.", 0, 1, source));
1188        children.add(new Property("description", "string", "Human-readable description of the source document. This is sometimes known as the \"title\".", 0, 1, description));
1189        children.add(new Property("content", "Reference(Any)", "The list of Resources that consist of the parts of this manifest.", 0, java.lang.Integer.MAX_VALUE, content));
1190        children.add(new Property("related", "", "Related identifiers or resources associated with the DocumentManifest.", 0, java.lang.Integer.MAX_VALUE, related));
1191      }
1192
1193      @Override
1194      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1195        switch (_hash) {
1196        case 243769515: /*masterIdentifier*/  return new Property("masterIdentifier", "Identifier", "A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.", 0, 1, masterIdentifier);
1197        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Other identifiers associated with the document manifest, including version independent  identifiers.", 0, java.lang.Integer.MAX_VALUE, identifier);
1198        case -892481550: /*status*/  return new Property("status", "code", "The status of this document manifest.", 0, 1, status);
1199        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.", 0, 1, type);
1200        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Practitioner|Group|Device)", "Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).", 0, 1, subject);
1201        case 1028554472: /*created*/  return new Property("created", "dateTime", "When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).", 0, 1, created);
1202        case 92750597: /*agent*/  return new Property("agent", "", "An actor taking an active role in the manifest.", 0, java.lang.Integer.MAX_VALUE, agent);
1203        case 820081177: /*recipient*/  return new Property("recipient", "Reference(Patient|Practitioner|PractitionerRole|RelatedPerson|Organization)", "A patient, practitioner, or organization for which this set of documents is intended.", 0, java.lang.Integer.MAX_VALUE, recipient);
1204        case -896505829: /*source*/  return new Property("source", "uri", "Identifies the source system, application, or software that produced the document manifest.", 0, 1, source);
1205        case -1724546052: /*description*/  return new Property("description", "string", "Human-readable description of the source document. This is sometimes known as the \"title\".", 0, 1, description);
1206        case 951530617: /*content*/  return new Property("content", "Reference(Any)", "The list of Resources that consist of the parts of this manifest.", 0, java.lang.Integer.MAX_VALUE, content);
1207        case 1090493483: /*related*/  return new Property("related", "", "Related identifiers or resources associated with the DocumentManifest.", 0, java.lang.Integer.MAX_VALUE, related);
1208        default: return super.getNamedProperty(_hash, _name, _checkValid);
1209        }
1210
1211      }
1212
1213      @Override
1214      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1215        switch (hash) {
1216        case 243769515: /*masterIdentifier*/ return this.masterIdentifier == null ? new Base[0] : new Base[] {this.masterIdentifier}; // Identifier
1217        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1218        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DocumentReferenceStatus>
1219        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1220        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1221        case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
1222        case 92750597: /*agent*/ return this.agent == null ? new Base[0] : this.agent.toArray(new Base[this.agent.size()]); // DocumentManifestAgentComponent
1223        case 820081177: /*recipient*/ return this.recipient == null ? new Base[0] : this.recipient.toArray(new Base[this.recipient.size()]); // Reference
1224        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // UriType
1225        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1226        case 951530617: /*content*/ return this.content == null ? new Base[0] : this.content.toArray(new Base[this.content.size()]); // Reference
1227        case 1090493483: /*related*/ return this.related == null ? new Base[0] : this.related.toArray(new Base[this.related.size()]); // DocumentManifestRelatedComponent
1228        default: return super.getProperty(hash, name, checkValid);
1229        }
1230
1231      }
1232
1233      @Override
1234      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1235        switch (hash) {
1236        case 243769515: // masterIdentifier
1237          this.masterIdentifier = castToIdentifier(value); // Identifier
1238          return value;
1239        case -1618432855: // identifier
1240          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1241          return value;
1242        case -892481550: // status
1243          value = new DocumentReferenceStatusEnumFactory().fromType(castToCode(value));
1244          this.status = (Enumeration) value; // Enumeration<DocumentReferenceStatus>
1245          return value;
1246        case 3575610: // type
1247          this.type = castToCodeableConcept(value); // CodeableConcept
1248          return value;
1249        case -1867885268: // subject
1250          this.subject = castToReference(value); // Reference
1251          return value;
1252        case 1028554472: // created
1253          this.created = castToDateTime(value); // DateTimeType
1254          return value;
1255        case 92750597: // agent
1256          this.getAgent().add((DocumentManifestAgentComponent) value); // DocumentManifestAgentComponent
1257          return value;
1258        case 820081177: // recipient
1259          this.getRecipient().add(castToReference(value)); // Reference
1260          return value;
1261        case -896505829: // source
1262          this.source = castToUri(value); // UriType
1263          return value;
1264        case -1724546052: // description
1265          this.description = castToString(value); // StringType
1266          return value;
1267        case 951530617: // content
1268          this.getContent().add(castToReference(value)); // Reference
1269          return value;
1270        case 1090493483: // related
1271          this.getRelated().add((DocumentManifestRelatedComponent) value); // DocumentManifestRelatedComponent
1272          return value;
1273        default: return super.setProperty(hash, name, value);
1274        }
1275
1276      }
1277
1278      @Override
1279      public Base setProperty(String name, Base value) throws FHIRException {
1280        if (name.equals("masterIdentifier")) {
1281          this.masterIdentifier = castToIdentifier(value); // Identifier
1282        } else if (name.equals("identifier")) {
1283          this.getIdentifier().add(castToIdentifier(value));
1284        } else if (name.equals("status")) {
1285          value = new DocumentReferenceStatusEnumFactory().fromType(castToCode(value));
1286          this.status = (Enumeration) value; // Enumeration<DocumentReferenceStatus>
1287        } else if (name.equals("type")) {
1288          this.type = castToCodeableConcept(value); // CodeableConcept
1289        } else if (name.equals("subject")) {
1290          this.subject = castToReference(value); // Reference
1291        } else if (name.equals("created")) {
1292          this.created = castToDateTime(value); // DateTimeType
1293        } else if (name.equals("agent")) {
1294          this.getAgent().add((DocumentManifestAgentComponent) value);
1295        } else if (name.equals("recipient")) {
1296          this.getRecipient().add(castToReference(value));
1297        } else if (name.equals("source")) {
1298          this.source = castToUri(value); // UriType
1299        } else if (name.equals("description")) {
1300          this.description = castToString(value); // StringType
1301        } else if (name.equals("content")) {
1302          this.getContent().add(castToReference(value));
1303        } else if (name.equals("related")) {
1304          this.getRelated().add((DocumentManifestRelatedComponent) value);
1305        } else
1306          return super.setProperty(name, value);
1307        return value;
1308      }
1309
1310      @Override
1311      public Base makeProperty(int hash, String name) throws FHIRException {
1312        switch (hash) {
1313        case 243769515:  return getMasterIdentifier(); 
1314        case -1618432855:  return addIdentifier(); 
1315        case -892481550:  return getStatusElement();
1316        case 3575610:  return getType(); 
1317        case -1867885268:  return getSubject(); 
1318        case 1028554472:  return getCreatedElement();
1319        case 92750597:  return addAgent(); 
1320        case 820081177:  return addRecipient(); 
1321        case -896505829:  return getSourceElement();
1322        case -1724546052:  return getDescriptionElement();
1323        case 951530617:  return addContent(); 
1324        case 1090493483:  return addRelated(); 
1325        default: return super.makeProperty(hash, name);
1326        }
1327
1328      }
1329
1330      @Override
1331      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1332        switch (hash) {
1333        case 243769515: /*masterIdentifier*/ return new String[] {"Identifier"};
1334        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1335        case -892481550: /*status*/ return new String[] {"code"};
1336        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1337        case -1867885268: /*subject*/ return new String[] {"Reference"};
1338        case 1028554472: /*created*/ return new String[] {"dateTime"};
1339        case 92750597: /*agent*/ return new String[] {};
1340        case 820081177: /*recipient*/ return new String[] {"Reference"};
1341        case -896505829: /*source*/ return new String[] {"uri"};
1342        case -1724546052: /*description*/ return new String[] {"string"};
1343        case 951530617: /*content*/ return new String[] {"Reference"};
1344        case 1090493483: /*related*/ return new String[] {};
1345        default: return super.getTypesForProperty(hash, name);
1346        }
1347
1348      }
1349
1350      @Override
1351      public Base addChild(String name) throws FHIRException {
1352        if (name.equals("masterIdentifier")) {
1353          this.masterIdentifier = new Identifier();
1354          return this.masterIdentifier;
1355        }
1356        else if (name.equals("identifier")) {
1357          return addIdentifier();
1358        }
1359        else if (name.equals("status")) {
1360          throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.status");
1361        }
1362        else if (name.equals("type")) {
1363          this.type = new CodeableConcept();
1364          return this.type;
1365        }
1366        else if (name.equals("subject")) {
1367          this.subject = new Reference();
1368          return this.subject;
1369        }
1370        else if (name.equals("created")) {
1371          throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.created");
1372        }
1373        else if (name.equals("agent")) {
1374          return addAgent();
1375        }
1376        else if (name.equals("recipient")) {
1377          return addRecipient();
1378        }
1379        else if (name.equals("source")) {
1380          throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.source");
1381        }
1382        else if (name.equals("description")) {
1383          throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.description");
1384        }
1385        else if (name.equals("content")) {
1386          return addContent();
1387        }
1388        else if (name.equals("related")) {
1389          return addRelated();
1390        }
1391        else
1392          return super.addChild(name);
1393      }
1394
1395  public String fhirType() {
1396    return "DocumentManifest";
1397
1398  }
1399
1400      public DocumentManifest copy() {
1401        DocumentManifest dst = new DocumentManifest();
1402        copyValues(dst);
1403        dst.masterIdentifier = masterIdentifier == null ? null : masterIdentifier.copy();
1404        if (identifier != null) {
1405          dst.identifier = new ArrayList<Identifier>();
1406          for (Identifier i : identifier)
1407            dst.identifier.add(i.copy());
1408        };
1409        dst.status = status == null ? null : status.copy();
1410        dst.type = type == null ? null : type.copy();
1411        dst.subject = subject == null ? null : subject.copy();
1412        dst.created = created == null ? null : created.copy();
1413        if (agent != null) {
1414          dst.agent = new ArrayList<DocumentManifestAgentComponent>();
1415          for (DocumentManifestAgentComponent i : agent)
1416            dst.agent.add(i.copy());
1417        };
1418        if (recipient != null) {
1419          dst.recipient = new ArrayList<Reference>();
1420          for (Reference i : recipient)
1421            dst.recipient.add(i.copy());
1422        };
1423        dst.source = source == null ? null : source.copy();
1424        dst.description = description == null ? null : description.copy();
1425        if (content != null) {
1426          dst.content = new ArrayList<Reference>();
1427          for (Reference i : content)
1428            dst.content.add(i.copy());
1429        };
1430        if (related != null) {
1431          dst.related = new ArrayList<DocumentManifestRelatedComponent>();
1432          for (DocumentManifestRelatedComponent i : related)
1433            dst.related.add(i.copy());
1434        };
1435        return dst;
1436      }
1437
1438      protected DocumentManifest typedCopy() {
1439        return copy();
1440      }
1441
1442      @Override
1443      public boolean equalsDeep(Base other_) {
1444        if (!super.equalsDeep(other_))
1445          return false;
1446        if (!(other_ instanceof DocumentManifest))
1447          return false;
1448        DocumentManifest o = (DocumentManifest) other_;
1449        return compareDeep(masterIdentifier, o.masterIdentifier, true) && compareDeep(identifier, o.identifier, true)
1450           && compareDeep(status, o.status, true) && compareDeep(type, o.type, true) && compareDeep(subject, o.subject, true)
1451           && compareDeep(created, o.created, true) && compareDeep(agent, o.agent, true) && compareDeep(recipient, o.recipient, true)
1452           && compareDeep(source, o.source, true) && compareDeep(description, o.description, true) && compareDeep(content, o.content, true)
1453           && compareDeep(related, o.related, true);
1454      }
1455
1456      @Override
1457      public boolean equalsShallow(Base other_) {
1458        if (!super.equalsShallow(other_))
1459          return false;
1460        if (!(other_ instanceof DocumentManifest))
1461          return false;
1462        DocumentManifest o = (DocumentManifest) other_;
1463        return compareValues(status, o.status, true) && compareValues(created, o.created, true) && compareValues(source, o.source, true)
1464           && compareValues(description, o.description, true);
1465      }
1466
1467      public boolean isEmpty() {
1468        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(masterIdentifier, identifier
1469          , status, type, subject, created, agent, recipient, source, description, content
1470          , related);
1471      }
1472
1473  @Override
1474  public ResourceType getResourceType() {
1475    return ResourceType.DocumentManifest;
1476   }
1477
1478 /**
1479   * Search parameter: <b>identifier</b>
1480   * <p>
1481   * Description: <b>Unique Identifier for the set of documents</b><br>
1482   * Type: <b>token</b><br>
1483   * Path: <b>DocumentManifest.masterIdentifier, DocumentManifest.identifier</b><br>
1484   * </p>
1485   */
1486  @SearchParamDefinition(name="identifier", path="DocumentManifest.masterIdentifier | DocumentManifest.identifier", description="Unique Identifier for the set of documents", type="token" )
1487  public static final String SP_IDENTIFIER = "identifier";
1488 /**
1489   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1490   * <p>
1491   * Description: <b>Unique Identifier for the set of documents</b><br>
1492   * Type: <b>token</b><br>
1493   * Path: <b>DocumentManifest.masterIdentifier, DocumentManifest.identifier</b><br>
1494   * </p>
1495   */
1496  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1497
1498 /**
1499   * Search parameter: <b>agent</b>
1500   * <p>
1501   * Description: <b>Who and/or what had an agent participation</b><br>
1502   * Type: <b>reference</b><br>
1503   * Path: <b>DocumentManifest.agent.who</b><br>
1504   * </p>
1505   */
1506  @SearchParamDefinition(name="agent", path="DocumentManifest.agent.who", description="Who and/or what had an agent participation", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
1507  public static final String SP_AGENT = "agent";
1508 /**
1509   * <b>Fluent Client</b> search parameter constant for <b>agent</b>
1510   * <p>
1511   * Description: <b>Who and/or what had an agent participation</b><br>
1512   * Type: <b>reference</b><br>
1513   * Path: <b>DocumentManifest.agent.who</b><br>
1514   * </p>
1515   */
1516  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AGENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AGENT);
1517
1518/**
1519   * Constant for fluent queries to be used to add include statements. Specifies
1520   * the path value of "<b>DocumentManifest:agent</b>".
1521   */
1522  public static final ca.uhn.fhir.model.api.Include INCLUDE_AGENT = new ca.uhn.fhir.model.api.Include("DocumentManifest:agent").toLocked();
1523
1524 /**
1525   * Search parameter: <b>item</b>
1526   * <p>
1527   * Description: <b>Items in manifest</b><br>
1528   * Type: <b>reference</b><br>
1529   * Path: <b>DocumentManifest.content</b><br>
1530   * </p>
1531   */
1532  @SearchParamDefinition(name="item", path="DocumentManifest.content", description="Items in manifest", type="reference" )
1533  public static final String SP_ITEM = "item";
1534 /**
1535   * <b>Fluent Client</b> search parameter constant for <b>item</b>
1536   * <p>
1537   * Description: <b>Items in manifest</b><br>
1538   * Type: <b>reference</b><br>
1539   * Path: <b>DocumentManifest.content</b><br>
1540   * </p>
1541   */
1542  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ITEM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ITEM);
1543
1544/**
1545   * Constant for fluent queries to be used to add include statements. Specifies
1546   * the path value of "<b>DocumentManifest:item</b>".
1547   */
1548  public static final ca.uhn.fhir.model.api.Include INCLUDE_ITEM = new ca.uhn.fhir.model.api.Include("DocumentManifest:item").toLocked();
1549
1550 /**
1551   * Search parameter: <b>related-id</b>
1552   * <p>
1553   * Description: <b>Identifiers of things that are related</b><br>
1554   * Type: <b>token</b><br>
1555   * Path: <b>DocumentManifest.related.identifier</b><br>
1556   * </p>
1557   */
1558  @SearchParamDefinition(name="related-id", path="DocumentManifest.related.identifier", description="Identifiers of things that are related", type="token" )
1559  public static final String SP_RELATED_ID = "related-id";
1560 /**
1561   * <b>Fluent Client</b> search parameter constant for <b>related-id</b>
1562   * <p>
1563   * Description: <b>Identifiers of things that are related</b><br>
1564   * Type: <b>token</b><br>
1565   * Path: <b>DocumentManifest.related.identifier</b><br>
1566   * </p>
1567   */
1568  public static final ca.uhn.fhir.rest.gclient.TokenClientParam RELATED_ID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RELATED_ID);
1569
1570 /**
1571   * Search parameter: <b>subject</b>
1572   * <p>
1573   * Description: <b>The subject of the set of documents</b><br>
1574   * Type: <b>reference</b><br>
1575   * Path: <b>DocumentManifest.subject</b><br>
1576   * </p>
1577   */
1578  @SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Device.class, Group.class, Patient.class, Practitioner.class } )
1579  public static final String SP_SUBJECT = "subject";
1580 /**
1581   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
1582   * <p>
1583   * Description: <b>The subject of the set of documents</b><br>
1584   * Type: <b>reference</b><br>
1585   * Path: <b>DocumentManifest.subject</b><br>
1586   * </p>
1587   */
1588  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
1589
1590/**
1591   * Constant for fluent queries to be used to add include statements. Specifies
1592   * the path value of "<b>DocumentManifest:subject</b>".
1593   */
1594  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("DocumentManifest:subject").toLocked();
1595
1596 /**
1597   * Search parameter: <b>created</b>
1598   * <p>
1599   * Description: <b>When this document manifest created</b><br>
1600   * Type: <b>date</b><br>
1601   * Path: <b>DocumentManifest.created</b><br>
1602   * </p>
1603   */
1604  @SearchParamDefinition(name="created", path="DocumentManifest.created", description="When this document manifest created", type="date" )
1605  public static final String SP_CREATED = "created";
1606 /**
1607   * <b>Fluent Client</b> search parameter constant for <b>created</b>
1608   * <p>
1609   * Description: <b>When this document manifest created</b><br>
1610   * Type: <b>date</b><br>
1611   * Path: <b>DocumentManifest.created</b><br>
1612   * </p>
1613   */
1614  public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED);
1615
1616 /**
1617   * Search parameter: <b>description</b>
1618   * <p>
1619   * Description: <b>Human-readable description (title)</b><br>
1620   * Type: <b>string</b><br>
1621   * Path: <b>DocumentManifest.description</b><br>
1622   * </p>
1623   */
1624  @SearchParamDefinition(name="description", path="DocumentManifest.description", description="Human-readable description (title)", type="string" )
1625  public static final String SP_DESCRIPTION = "description";
1626 /**
1627   * <b>Fluent Client</b> search parameter constant for <b>description</b>
1628   * <p>
1629   * Description: <b>Human-readable description (title)</b><br>
1630   * Type: <b>string</b><br>
1631   * Path: <b>DocumentManifest.description</b><br>
1632   * </p>
1633   */
1634  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
1635
1636 /**
1637   * Search parameter: <b>source</b>
1638   * <p>
1639   * Description: <b>The source system/application/software</b><br>
1640   * Type: <b>uri</b><br>
1641   * Path: <b>DocumentManifest.source</b><br>
1642   * </p>
1643   */
1644  @SearchParamDefinition(name="source", path="DocumentManifest.source", description="The source system/application/software", type="uri" )
1645  public static final String SP_SOURCE = "source";
1646 /**
1647   * <b>Fluent Client</b> search parameter constant for <b>source</b>
1648   * <p>
1649   * Description: <b>The source system/application/software</b><br>
1650   * Type: <b>uri</b><br>
1651   * Path: <b>DocumentManifest.source</b><br>
1652   * </p>
1653   */
1654  public static final ca.uhn.fhir.rest.gclient.UriClientParam SOURCE = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_SOURCE);
1655
1656 /**
1657   * Search parameter: <b>type</b>
1658   * <p>
1659   * Description: <b>Kind of document set</b><br>
1660   * Type: <b>token</b><br>
1661   * Path: <b>DocumentManifest.type</b><br>
1662   * </p>
1663   */
1664  @SearchParamDefinition(name="type", path="DocumentManifest.type", description="Kind of document set", type="token" )
1665  public static final String SP_TYPE = "type";
1666 /**
1667   * <b>Fluent Client</b> search parameter constant for <b>type</b>
1668   * <p>
1669   * Description: <b>Kind of document set</b><br>
1670   * Type: <b>token</b><br>
1671   * Path: <b>DocumentManifest.type</b><br>
1672   * </p>
1673   */
1674  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
1675
1676 /**
1677   * Search parameter: <b>related-ref</b>
1678   * <p>
1679   * Description: <b>Related Resource</b><br>
1680   * Type: <b>reference</b><br>
1681   * Path: <b>DocumentManifest.related.ref</b><br>
1682   * </p>
1683   */
1684  @SearchParamDefinition(name="related-ref", path="DocumentManifest.related.ref", description="Related Resource", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") } )
1685  public static final String SP_RELATED_REF = "related-ref";
1686 /**
1687   * <b>Fluent Client</b> search parameter constant for <b>related-ref</b>
1688   * <p>
1689   * Description: <b>Related Resource</b><br>
1690   * Type: <b>reference</b><br>
1691   * Path: <b>DocumentManifest.related.ref</b><br>
1692   * </p>
1693   */
1694  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RELATED_REF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RELATED_REF);
1695
1696/**
1697   * Constant for fluent queries to be used to add include statements. Specifies
1698   * the path value of "<b>DocumentManifest:related-ref</b>".
1699   */
1700  public static final ca.uhn.fhir.model.api.Include INCLUDE_RELATED_REF = new ca.uhn.fhir.model.api.Include("DocumentManifest:related-ref").toLocked();
1701
1702 /**
1703   * Search parameter: <b>patient</b>
1704   * <p>
1705   * Description: <b>The subject of the set of documents</b><br>
1706   * Type: <b>reference</b><br>
1707   * Path: <b>DocumentManifest.subject</b><br>
1708   * </p>
1709   */
1710  @SearchParamDefinition(name="patient", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference", target={Patient.class } )
1711  public static final String SP_PATIENT = "patient";
1712 /**
1713   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1714   * <p>
1715   * Description: <b>The subject of the set of documents</b><br>
1716   * Type: <b>reference</b><br>
1717   * Path: <b>DocumentManifest.subject</b><br>
1718   * </p>
1719   */
1720  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1721
1722/**
1723   * Constant for fluent queries to be used to add include statements. Specifies
1724   * the path value of "<b>DocumentManifest:patient</b>".
1725   */
1726  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("DocumentManifest:patient").toLocked();
1727
1728 /**
1729   * Search parameter: <b>recipient</b>
1730   * <p>
1731   * Description: <b>Intended to get notified about this set of documents</b><br>
1732   * Type: <b>reference</b><br>
1733   * Path: <b>DocumentManifest.recipient</b><br>
1734   * </p>
1735   */
1736  @SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
1737  public static final String SP_RECIPIENT = "recipient";
1738 /**
1739   * <b>Fluent Client</b> search parameter constant for <b>recipient</b>
1740   * <p>
1741   * Description: <b>Intended to get notified about this set of documents</b><br>
1742   * Type: <b>reference</b><br>
1743   * Path: <b>DocumentManifest.recipient</b><br>
1744   * </p>
1745   */
1746  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RECIPIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RECIPIENT);
1747
1748/**
1749   * Constant for fluent queries to be used to add include statements. Specifies
1750   * the path value of "<b>DocumentManifest:recipient</b>".
1751   */
1752  public static final ca.uhn.fhir.model.api.Include INCLUDE_RECIPIENT = new ca.uhn.fhir.model.api.Include("DocumentManifest:recipient").toLocked();
1753
1754 /**
1755   * Search parameter: <b>status</b>
1756   * <p>
1757   * Description: <b>current | superseded | entered-in-error</b><br>
1758   * Type: <b>token</b><br>
1759   * Path: <b>DocumentManifest.status</b><br>
1760   * </p>
1761   */
1762  @SearchParamDefinition(name="status", path="DocumentManifest.status", description="current | superseded | entered-in-error", type="token" )
1763  public static final String SP_STATUS = "status";
1764 /**
1765   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1766   * <p>
1767   * Description: <b>current | superseded | entered-in-error</b><br>
1768   * Type: <b>token</b><br>
1769   * Path: <b>DocumentManifest.status</b><br>
1770   * </p>
1771   */
1772  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1773
1774
1775}
1776