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