001package org.hl7.fhir.dstu2.model;
002
003/*-
004 * #%L
005 * org.hl7.fhir.dstu2
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/*
025  Copyright (c) 2011+, HL7, Inc.
026  All rights reserved.
027  
028  Redistribution and use in source and binary forms, with or without modification, 
029  are permitted provided that the following conditions are met:
030  
031   * Redistributions of source code must retain the above copyright notice, this 
032     list of conditions and the following disclaimer.
033   * Redistributions in binary form must reproduce the above copyright notice, 
034     this list of conditions and the following disclaimer in the documentation 
035     and/or other materials provided with the distribution.
036   * Neither the name of HL7 nor the names of its contributors may be used to 
037     endorse or promote products derived from this software without specific 
038     prior written permission.
039  
040  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
041  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
042  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
043  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
044  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
045  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
046  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
047  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
048  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
049  POSSIBILITY OF SUCH DAMAGE.
050  
051*/
052
053// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2
054import java.util.ArrayList;
055import java.util.Date;
056import java.util.List;
057
058import org.hl7.fhir.dstu2.model.Enumerations.DocumentReferenceStatus;
059import org.hl7.fhir.dstu2.model.Enumerations.DocumentReferenceStatusEnumFactory;
060import ca.uhn.fhir.model.api.annotation.Block;
061import ca.uhn.fhir.model.api.annotation.Child;
062import ca.uhn.fhir.model.api.annotation.Description;
063import ca.uhn.fhir.model.api.annotation.ResourceDef;
064import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
065import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
066import org.hl7.fhir.exceptions.FHIRException;
067import org.hl7.fhir.utilities.Utilities;
068/**
069 * A manifest that defines a set of documents.
070 */
071@ResourceDef(name="DocumentManifest", profile="http://hl7.org/fhir/Profile/DocumentManifest")
072public class DocumentManifest extends DomainResource {
073
074    @Block()
075    public static class DocumentManifestContentComponent extends BackboneElement implements IBaseBackboneElement {
076        /**
077         * 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.
078         */
079        @Child(name = "p", type = {Attachment.class}, order=1, min=1, max=1, modifier=false, summary=true)
080        @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." )
081        protected Type p;
082
083        private static final long serialVersionUID = -347538500L;
084
085    /*
086     * Constructor
087     */
088      public DocumentManifestContentComponent() {
089        super();
090      }
091
092    /*
093     * Constructor
094     */
095      public DocumentManifestContentComponent(Type p) {
096        super();
097        this.p = p;
098      }
099
100        /**
101         * @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.)
102         */
103        public Type getP() { 
104          return this.p;
105        }
106
107        /**
108         * @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.)
109         */
110        public Attachment getPAttachment() throws FHIRException { 
111          if (!(this.p instanceof Attachment))
112            throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.p.getClass().getName()+" was encountered");
113          return (Attachment) this.p;
114        }
115
116        public boolean hasPAttachment() { 
117          return this.p instanceof Attachment;
118        }
119
120        /**
121         * @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.)
122         */
123        public Reference getPReference() throws FHIRException { 
124          if (!(this.p instanceof Reference))
125            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.p.getClass().getName()+" was encountered");
126          return (Reference) this.p;
127        }
128
129        public boolean hasPReference() { 
130          return this.p instanceof Reference;
131        }
132
133        public boolean hasP() { 
134          return this.p != null && !this.p.isEmpty();
135        }
136
137        /**
138         * @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.)
139         */
140        public DocumentManifestContentComponent setP(Type value) { 
141          this.p = value;
142          return this;
143        }
144
145        protected void listChildren(List<Property> childrenList) {
146          super.listChildren(childrenList);
147          childrenList.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, java.lang.Integer.MAX_VALUE, p));
148        }
149
150      @Override
151      public void setProperty(String name, Base value) throws FHIRException {
152        if (name.equals("p[x]"))
153          this.p = (Type) value; // Type
154        else
155          super.setProperty(name, value);
156      }
157
158      @Override
159      public Base addChild(String name) throws FHIRException {
160        if (name.equals("pAttachment")) {
161          this.p = new Attachment();
162          return this.p;
163        }
164        else if (name.equals("pReference")) {
165          this.p = new Reference();
166          return this.p;
167        }
168        else
169          return super.addChild(name);
170      }
171
172      public DocumentManifestContentComponent copy() {
173        DocumentManifestContentComponent dst = new DocumentManifestContentComponent();
174        copyValues(dst);
175        dst.p = p == null ? null : p.copy();
176        return dst;
177      }
178
179      @Override
180      public boolean equalsDeep(Base other) {
181        if (!super.equalsDeep(other))
182          return false;
183        if (!(other instanceof DocumentManifestContentComponent))
184          return false;
185        DocumentManifestContentComponent o = (DocumentManifestContentComponent) other;
186        return compareDeep(p, o.p, true);
187      }
188
189      @Override
190      public boolean equalsShallow(Base other) {
191        if (!super.equalsShallow(other))
192          return false;
193        if (!(other instanceof DocumentManifestContentComponent))
194          return false;
195        DocumentManifestContentComponent o = (DocumentManifestContentComponent) other;
196        return true;
197      }
198
199      public boolean isEmpty() {
200        return super.isEmpty() && (p == null || p.isEmpty());
201      }
202
203  public String fhirType() {
204    return "DocumentManifest.content";
205
206  }
207
208  }
209
210    @Block()
211    public static class DocumentManifestRelatedComponent extends BackboneElement implements IBaseBackboneElement {
212        /**
213         * Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers.
214         */
215        @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true)
216        @Description(shortDefinition="Identifiers of things that are related", formalDefinition="Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers." )
217        protected Identifier identifier;
218
219        /**
220         * Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder,  Procedure, EligibilityRequest, etc.
221         */
222        @Child(name = "ref", type = {}, order=2, min=0, max=1, modifier=false, summary=true)
223        @Description(shortDefinition="Related Resource", formalDefinition="Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder,  Procedure, EligibilityRequest, etc." )
224        protected Reference ref;
225
226        /**
227         * The actual object that is the target of the reference (Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder,  Procedure, EligibilityRequest, etc.)
228         */
229        protected Resource refTarget;
230
231        private static final long serialVersionUID = -1670123330L;
232
233    /*
234     * Constructor
235     */
236      public DocumentManifestRelatedComponent() {
237        super();
238      }
239
240        /**
241         * @return {@link #identifier} (Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers.)
242         */
243        public Identifier getIdentifier() { 
244          if (this.identifier == null)
245            if (Configuration.errorOnAutoCreate())
246              throw new Error("Attempt to auto-create DocumentManifestRelatedComponent.identifier");
247            else if (Configuration.doAutoCreate())
248              this.identifier = new Identifier(); // cc
249          return this.identifier;
250        }
251
252        public boolean hasIdentifier() { 
253          return this.identifier != null && !this.identifier.isEmpty();
254        }
255
256        /**
257         * @param value {@link #identifier} (Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers.)
258         */
259        public DocumentManifestRelatedComponent setIdentifier(Identifier value) { 
260          this.identifier = value;
261          return this;
262        }
263
264        /**
265         * @return {@link #ref} (Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder,  Procedure, EligibilityRequest, etc.)
266         */
267        public Reference getRef() { 
268          if (this.ref == null)
269            if (Configuration.errorOnAutoCreate())
270              throw new Error("Attempt to auto-create DocumentManifestRelatedComponent.ref");
271            else if (Configuration.doAutoCreate())
272              this.ref = new Reference(); // cc
273          return this.ref;
274        }
275
276        public boolean hasRef() { 
277          return this.ref != null && !this.ref.isEmpty();
278        }
279
280        /**
281         * @param value {@link #ref} (Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder,  Procedure, EligibilityRequest, etc.)
282         */
283        public DocumentManifestRelatedComponent setRef(Reference value) { 
284          this.ref = value;
285          return this;
286        }
287
288        /**
289         * @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, DiagnosticOrder,  Procedure, EligibilityRequest, etc.)
290         */
291        public Resource getRefTarget() { 
292          return this.refTarget;
293        }
294
295        /**
296         * @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, DiagnosticOrder,  Procedure, EligibilityRequest, etc.)
297         */
298        public DocumentManifestRelatedComponent setRefTarget(Resource value) { 
299          this.refTarget = value;
300          return this;
301        }
302
303        protected void listChildren(List<Property> childrenList) {
304          super.listChildren(childrenList);
305          childrenList.add(new Property("identifier", "Identifier", "Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers.", 0, java.lang.Integer.MAX_VALUE, identifier));
306          childrenList.add(new Property("ref", "Reference(Any)", "Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder,  Procedure, EligibilityRequest, etc.", 0, java.lang.Integer.MAX_VALUE, ref));
307        }
308
309      @Override
310      public void setProperty(String name, Base value) throws FHIRException {
311        if (name.equals("identifier"))
312          this.identifier = castToIdentifier(value); // Identifier
313        else if (name.equals("ref"))
314          this.ref = castToReference(value); // Reference
315        else
316          super.setProperty(name, value);
317      }
318
319      @Override
320      public Base addChild(String name) throws FHIRException {
321        if (name.equals("identifier")) {
322          this.identifier = new Identifier();
323          return this.identifier;
324        }
325        else if (name.equals("ref")) {
326          this.ref = new Reference();
327          return this.ref;
328        }
329        else
330          return super.addChild(name);
331      }
332
333      public DocumentManifestRelatedComponent copy() {
334        DocumentManifestRelatedComponent dst = new DocumentManifestRelatedComponent();
335        copyValues(dst);
336        dst.identifier = identifier == null ? null : identifier.copy();
337        dst.ref = ref == null ? null : ref.copy();
338        return dst;
339      }
340
341      @Override
342      public boolean equalsDeep(Base other) {
343        if (!super.equalsDeep(other))
344          return false;
345        if (!(other instanceof DocumentManifestRelatedComponent))
346          return false;
347        DocumentManifestRelatedComponent o = (DocumentManifestRelatedComponent) other;
348        return compareDeep(identifier, o.identifier, true) && compareDeep(ref, o.ref, true);
349      }
350
351      @Override
352      public boolean equalsShallow(Base other) {
353        if (!super.equalsShallow(other))
354          return false;
355        if (!(other instanceof DocumentManifestRelatedComponent))
356          return false;
357        DocumentManifestRelatedComponent o = (DocumentManifestRelatedComponent) other;
358        return true;
359      }
360
361      public boolean isEmpty() {
362        return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ref == null || ref.isEmpty())
363          ;
364      }
365
366  public String fhirType() {
367    return "DocumentManifest.related";
368
369  }
370
371  }
372
373    /**
374     * A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.
375     */
376    @Child(name = "masterIdentifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true)
377    @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." )
378    protected Identifier masterIdentifier;
379
380    /**
381     * Other identifiers associated with the document manifest, including version independent  identifiers.
382     */
383    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
384    @Description(shortDefinition="Other identifiers for the manifest", formalDefinition="Other identifiers associated with the document manifest, including version independent  identifiers." )
385    protected List<Identifier> identifier;
386
387    /**
388     * 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).
389     */
390    @Child(name = "subject", type = {Patient.class, Practitioner.class, Group.class, Device.class}, order=2, min=0, max=1, modifier=false, summary=true)
391    @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)." )
392    protected Reference subject;
393
394    /**
395     * 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).)
396     */
397    protected Resource subjectTarget;
398
399    /**
400     * A patient, practitioner, or organization for which this set of documents is intended.
401     */
402    @Child(name = "recipient", type = {Patient.class, Practitioner.class, RelatedPerson.class, Organization.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
403    @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." )
404    protected List<Reference> recipient;
405    /**
406     * The actual objects that are the target of the reference (A patient, practitioner, or organization for which this set of documents is intended.)
407     */
408    protected List<Resource> recipientTarget;
409
410
411    /**
412     * 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.
413     */
414    @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true)
415    @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." )
416    protected CodeableConcept type;
417
418    /**
419     * Identifies who is responsible for creating the manifest, and adding  documents to it.
420     */
421    @Child(name = "author", type = {Practitioner.class, Organization.class, Device.class, Patient.class, RelatedPerson.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
422    @Description(shortDefinition="Who and/or what authored the manifest", formalDefinition="Identifies who is responsible for creating the manifest, and adding  documents to it." )
423    protected List<Reference> author;
424    /**
425     * The actual objects that are the target of the reference (Identifies who is responsible for creating the manifest, and adding  documents to it.)
426     */
427    protected List<Resource> authorTarget;
428
429
430    /**
431     * 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.).
432     */
433    @Child(name = "created", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true)
434    @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.)." )
435    protected DateTimeType created;
436
437    /**
438     * Identifies the source system, application, or software that produced the document manifest.
439     */
440    @Child(name = "source", type = {UriType.class}, order=7, min=0, max=1, modifier=false, summary=true)
441    @Description(shortDefinition="The source system/application/software", formalDefinition="Identifies the source system, application, or software that produced the document manifest." )
442    protected UriType source;
443
444    /**
445     * The status of this document manifest.
446     */
447    @Child(name = "status", type = {CodeType.class}, order=8, min=1, max=1, modifier=true, summary=true)
448    @Description(shortDefinition="current | superseded | entered-in-error", formalDefinition="The status of this document manifest." )
449    protected Enumeration<DocumentReferenceStatus> status;
450
451    /**
452     * Human-readable description of the source document. This is sometimes known as the "title".
453     */
454    @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true)
455    @Description(shortDefinition="Human-readable description (title)", formalDefinition="Human-readable description of the source document. This is sometimes known as the \"title\"." )
456    protected StringType description;
457
458    /**
459     * The list of Documents included in the manifest.
460     */
461    @Child(name = "content", type = {}, order=10, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
462    @Description(shortDefinition="The items included", formalDefinition="The list of Documents included in the manifest." )
463    protected List<DocumentManifestContentComponent> content;
464
465    /**
466     * Related identifiers or resources associated with the DocumentManifest.
467     */
468    @Child(name = "related", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
469    @Description(shortDefinition="Related things", formalDefinition="Related identifiers or resources associated with the DocumentManifest." )
470    protected List<DocumentManifestRelatedComponent> related;
471
472    private static final long serialVersionUID = -2056683927L;
473
474  /*
475   * Constructor
476   */
477    public DocumentManifest() {
478      super();
479    }
480
481  /*
482   * Constructor
483   */
484    public DocumentManifest(Enumeration<DocumentReferenceStatus> status) {
485      super();
486      this.status = status;
487    }
488
489    /**
490     * @return {@link #masterIdentifier} (A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.)
491     */
492    public Identifier getMasterIdentifier() { 
493      if (this.masterIdentifier == null)
494        if (Configuration.errorOnAutoCreate())
495          throw new Error("Attempt to auto-create DocumentManifest.masterIdentifier");
496        else if (Configuration.doAutoCreate())
497          this.masterIdentifier = new Identifier(); // cc
498      return this.masterIdentifier;
499    }
500
501    public boolean hasMasterIdentifier() { 
502      return this.masterIdentifier != null && !this.masterIdentifier.isEmpty();
503    }
504
505    /**
506     * @param value {@link #masterIdentifier} (A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.)
507     */
508    public DocumentManifest setMasterIdentifier(Identifier value) { 
509      this.masterIdentifier = value;
510      return this;
511    }
512
513    /**
514     * @return {@link #identifier} (Other identifiers associated with the document manifest, including version independent  identifiers.)
515     */
516    public List<Identifier> getIdentifier() { 
517      if (this.identifier == null)
518        this.identifier = new ArrayList<Identifier>();
519      return this.identifier;
520    }
521
522    public boolean hasIdentifier() { 
523      if (this.identifier == null)
524        return false;
525      for (Identifier item : this.identifier)
526        if (!item.isEmpty())
527          return true;
528      return false;
529    }
530
531    /**
532     * @return {@link #identifier} (Other identifiers associated with the document manifest, including version independent  identifiers.)
533     */
534    // syntactic sugar
535    public Identifier addIdentifier() { //3
536      Identifier t = new Identifier();
537      if (this.identifier == null)
538        this.identifier = new ArrayList<Identifier>();
539      this.identifier.add(t);
540      return t;
541    }
542
543    // syntactic sugar
544    public DocumentManifest addIdentifier(Identifier t) { //3
545      if (t == null)
546        return this;
547      if (this.identifier == null)
548        this.identifier = new ArrayList<Identifier>();
549      this.identifier.add(t);
550      return this;
551    }
552
553    /**
554     * @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).)
555     */
556    public Reference getSubject() { 
557      if (this.subject == null)
558        if (Configuration.errorOnAutoCreate())
559          throw new Error("Attempt to auto-create DocumentManifest.subject");
560        else if (Configuration.doAutoCreate())
561          this.subject = new Reference(); // cc
562      return this.subject;
563    }
564
565    public boolean hasSubject() { 
566      return this.subject != null && !this.subject.isEmpty();
567    }
568
569    /**
570     * @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).)
571     */
572    public DocumentManifest setSubject(Reference value) { 
573      this.subject = value;
574      return this;
575    }
576
577    /**
578     * @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).)
579     */
580    public Resource getSubjectTarget() { 
581      return this.subjectTarget;
582    }
583
584    /**
585     * @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).)
586     */
587    public DocumentManifest setSubjectTarget(Resource value) { 
588      this.subjectTarget = value;
589      return this;
590    }
591
592    /**
593     * @return {@link #recipient} (A patient, practitioner, or organization for which this set of documents is intended.)
594     */
595    public List<Reference> getRecipient() { 
596      if (this.recipient == null)
597        this.recipient = new ArrayList<Reference>();
598      return this.recipient;
599    }
600
601    public boolean hasRecipient() { 
602      if (this.recipient == null)
603        return false;
604      for (Reference item : this.recipient)
605        if (!item.isEmpty())
606          return true;
607      return false;
608    }
609
610    /**
611     * @return {@link #recipient} (A patient, practitioner, or organization for which this set of documents is intended.)
612     */
613    // syntactic sugar
614    public Reference addRecipient() { //3
615      Reference t = new Reference();
616      if (this.recipient == null)
617        this.recipient = new ArrayList<Reference>();
618      this.recipient.add(t);
619      return t;
620    }
621
622    // syntactic sugar
623    public DocumentManifest addRecipient(Reference t) { //3
624      if (t == null)
625        return this;
626      if (this.recipient == null)
627        this.recipient = new ArrayList<Reference>();
628      this.recipient.add(t);
629      return this;
630    }
631
632    /**
633     * @return {@link #recipient} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A patient, practitioner, or organization for which this set of documents is intended.)
634     */
635    public List<Resource> getRecipientTarget() { 
636      if (this.recipientTarget == null)
637        this.recipientTarget = new ArrayList<Resource>();
638      return this.recipientTarget;
639    }
640
641    /**
642     * @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.)
643     */
644    public CodeableConcept getType() { 
645      if (this.type == null)
646        if (Configuration.errorOnAutoCreate())
647          throw new Error("Attempt to auto-create DocumentManifest.type");
648        else if (Configuration.doAutoCreate())
649          this.type = new CodeableConcept(); // cc
650      return this.type;
651    }
652
653    public boolean hasType() { 
654      return this.type != null && !this.type.isEmpty();
655    }
656
657    /**
658     * @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.)
659     */
660    public DocumentManifest setType(CodeableConcept value) { 
661      this.type = value;
662      return this;
663    }
664
665    /**
666     * @return {@link #author} (Identifies who is responsible for creating the manifest, and adding  documents to it.)
667     */
668    public List<Reference> getAuthor() { 
669      if (this.author == null)
670        this.author = new ArrayList<Reference>();
671      return this.author;
672    }
673
674    public boolean hasAuthor() { 
675      if (this.author == null)
676        return false;
677      for (Reference item : this.author)
678        if (!item.isEmpty())
679          return true;
680      return false;
681    }
682
683    /**
684     * @return {@link #author} (Identifies who is responsible for creating the manifest, and adding  documents to it.)
685     */
686    // syntactic sugar
687    public Reference addAuthor() { //3
688      Reference t = new Reference();
689      if (this.author == null)
690        this.author = new ArrayList<Reference>();
691      this.author.add(t);
692      return t;
693    }
694
695    // syntactic sugar
696    public DocumentManifest addAuthor(Reference t) { //3
697      if (t == null)
698        return this;
699      if (this.author == null)
700        this.author = new ArrayList<Reference>();
701      this.author.add(t);
702      return this;
703    }
704
705    /**
706     * @return {@link #author} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Identifies who is responsible for creating the manifest, and adding  documents to it.)
707     */
708    public List<Resource> getAuthorTarget() { 
709      if (this.authorTarget == null)
710        this.authorTarget = new ArrayList<Resource>();
711      return this.authorTarget;
712    }
713
714    /**
715     * @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
716     */
717    public DateTimeType getCreatedElement() { 
718      if (this.created == null)
719        if (Configuration.errorOnAutoCreate())
720          throw new Error("Attempt to auto-create DocumentManifest.created");
721        else if (Configuration.doAutoCreate())
722          this.created = new DateTimeType(); // bb
723      return this.created;
724    }
725
726    public boolean hasCreatedElement() { 
727      return this.created != null && !this.created.isEmpty();
728    }
729
730    public boolean hasCreated() { 
731      return this.created != null && !this.created.isEmpty();
732    }
733
734    /**
735     * @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
736     */
737    public DocumentManifest setCreatedElement(DateTimeType value) { 
738      this.created = value;
739      return this;
740    }
741
742    /**
743     * @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.).
744     */
745    public Date getCreated() { 
746      return this.created == null ? null : this.created.getValue();
747    }
748
749    /**
750     * @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.).
751     */
752    public DocumentManifest setCreated(Date value) { 
753      if (value == null)
754        this.created = null;
755      else {
756        if (this.created == null)
757          this.created = new DateTimeType();
758        this.created.setValue(value);
759      }
760      return this;
761    }
762
763    /**
764     * @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
765     */
766    public UriType getSourceElement() { 
767      if (this.source == null)
768        if (Configuration.errorOnAutoCreate())
769          throw new Error("Attempt to auto-create DocumentManifest.source");
770        else if (Configuration.doAutoCreate())
771          this.source = new UriType(); // bb
772      return this.source;
773    }
774
775    public boolean hasSourceElement() { 
776      return this.source != null && !this.source.isEmpty();
777    }
778
779    public boolean hasSource() { 
780      return this.source != null && !this.source.isEmpty();
781    }
782
783    /**
784     * @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
785     */
786    public DocumentManifest setSourceElement(UriType value) { 
787      this.source = value;
788      return this;
789    }
790
791    /**
792     * @return Identifies the source system, application, or software that produced the document manifest.
793     */
794    public String getSource() { 
795      return this.source == null ? null : this.source.getValue();
796    }
797
798    /**
799     * @param value Identifies the source system, application, or software that produced the document manifest.
800     */
801    public DocumentManifest setSource(String value) { 
802      if (Utilities.noString(value))
803        this.source = null;
804      else {
805        if (this.source == null)
806          this.source = new UriType();
807        this.source.setValue(value);
808      }
809      return this;
810    }
811
812    /**
813     * @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
814     */
815    public Enumeration<DocumentReferenceStatus> getStatusElement() { 
816      if (this.status == null)
817        if (Configuration.errorOnAutoCreate())
818          throw new Error("Attempt to auto-create DocumentManifest.status");
819        else if (Configuration.doAutoCreate())
820          this.status = new Enumeration<DocumentReferenceStatus>(new DocumentReferenceStatusEnumFactory()); // bb
821      return this.status;
822    }
823
824    public boolean hasStatusElement() { 
825      return this.status != null && !this.status.isEmpty();
826    }
827
828    public boolean hasStatus() { 
829      return this.status != null && !this.status.isEmpty();
830    }
831
832    /**
833     * @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
834     */
835    public DocumentManifest setStatusElement(Enumeration<DocumentReferenceStatus> value) { 
836      this.status = value;
837      return this;
838    }
839
840    /**
841     * @return The status of this document manifest.
842     */
843    public DocumentReferenceStatus getStatus() { 
844      return this.status == null ? null : this.status.getValue();
845    }
846
847    /**
848     * @param value The status of this document manifest.
849     */
850    public DocumentManifest setStatus(DocumentReferenceStatus value) { 
851        if (this.status == null)
852          this.status = new Enumeration<DocumentReferenceStatus>(new DocumentReferenceStatusEnumFactory());
853        this.status.setValue(value);
854      return this;
855    }
856
857    /**
858     * @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
859     */
860    public StringType getDescriptionElement() { 
861      if (this.description == null)
862        if (Configuration.errorOnAutoCreate())
863          throw new Error("Attempt to auto-create DocumentManifest.description");
864        else if (Configuration.doAutoCreate())
865          this.description = new StringType(); // bb
866      return this.description;
867    }
868
869    public boolean hasDescriptionElement() { 
870      return this.description != null && !this.description.isEmpty();
871    }
872
873    public boolean hasDescription() { 
874      return this.description != null && !this.description.isEmpty();
875    }
876
877    /**
878     * @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
879     */
880    public DocumentManifest setDescriptionElement(StringType value) { 
881      this.description = value;
882      return this;
883    }
884
885    /**
886     * @return Human-readable description of the source document. This is sometimes known as the "title".
887     */
888    public String getDescription() { 
889      return this.description == null ? null : this.description.getValue();
890    }
891
892    /**
893     * @param value Human-readable description of the source document. This is sometimes known as the "title".
894     */
895    public DocumentManifest setDescription(String value) { 
896      if (Utilities.noString(value))
897        this.description = null;
898      else {
899        if (this.description == null)
900          this.description = new StringType();
901        this.description.setValue(value);
902      }
903      return this;
904    }
905
906    /**
907     * @return {@link #content} (The list of Documents included in the manifest.)
908     */
909    public List<DocumentManifestContentComponent> getContent() { 
910      if (this.content == null)
911        this.content = new ArrayList<DocumentManifestContentComponent>();
912      return this.content;
913    }
914
915    public boolean hasContent() { 
916      if (this.content == null)
917        return false;
918      for (DocumentManifestContentComponent item : this.content)
919        if (!item.isEmpty())
920          return true;
921      return false;
922    }
923
924    /**
925     * @return {@link #content} (The list of Documents included in the manifest.)
926     */
927    // syntactic sugar
928    public DocumentManifestContentComponent addContent() { //3
929      DocumentManifestContentComponent t = new DocumentManifestContentComponent();
930      if (this.content == null)
931        this.content = new ArrayList<DocumentManifestContentComponent>();
932      this.content.add(t);
933      return t;
934    }
935
936    // syntactic sugar
937    public DocumentManifest addContent(DocumentManifestContentComponent t) { //3
938      if (t == null)
939        return this;
940      if (this.content == null)
941        this.content = new ArrayList<DocumentManifestContentComponent>();
942      this.content.add(t);
943      return this;
944    }
945
946    /**
947     * @return {@link #related} (Related identifiers or resources associated with the DocumentManifest.)
948     */
949    public List<DocumentManifestRelatedComponent> getRelated() { 
950      if (this.related == null)
951        this.related = new ArrayList<DocumentManifestRelatedComponent>();
952      return this.related;
953    }
954
955    public boolean hasRelated() { 
956      if (this.related == null)
957        return false;
958      for (DocumentManifestRelatedComponent item : this.related)
959        if (!item.isEmpty())
960          return true;
961      return false;
962    }
963
964    /**
965     * @return {@link #related} (Related identifiers or resources associated with the DocumentManifest.)
966     */
967    // syntactic sugar
968    public DocumentManifestRelatedComponent addRelated() { //3
969      DocumentManifestRelatedComponent t = new DocumentManifestRelatedComponent();
970      if (this.related == null)
971        this.related = new ArrayList<DocumentManifestRelatedComponent>();
972      this.related.add(t);
973      return t;
974    }
975
976    // syntactic sugar
977    public DocumentManifest addRelated(DocumentManifestRelatedComponent t) { //3
978      if (t == null)
979        return this;
980      if (this.related == null)
981        this.related = new ArrayList<DocumentManifestRelatedComponent>();
982      this.related.add(t);
983      return this;
984    }
985
986      protected void listChildren(List<Property> childrenList) {
987        super.listChildren(childrenList);
988        childrenList.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, java.lang.Integer.MAX_VALUE, masterIdentifier));
989        childrenList.add(new Property("identifier", "Identifier", "Other identifiers associated with the document manifest, including version independent  identifiers.", 0, java.lang.Integer.MAX_VALUE, identifier));
990        childrenList.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, java.lang.Integer.MAX_VALUE, subject));
991        childrenList.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));
992        childrenList.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, java.lang.Integer.MAX_VALUE, type));
993        childrenList.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));
994        childrenList.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, java.lang.Integer.MAX_VALUE, created));
995        childrenList.add(new Property("source", "uri", "Identifies the source system, application, or software that produced the document manifest.", 0, java.lang.Integer.MAX_VALUE, source));
996        childrenList.add(new Property("status", "code", "The status of this document manifest.", 0, java.lang.Integer.MAX_VALUE, status));
997        childrenList.add(new Property("description", "string", "Human-readable description of the source document. This is sometimes known as the \"title\".", 0, java.lang.Integer.MAX_VALUE, description));
998        childrenList.add(new Property("content", "", "The list of Documents included in the manifest.", 0, java.lang.Integer.MAX_VALUE, content));
999        childrenList.add(new Property("related", "", "Related identifiers or resources associated with the DocumentManifest.", 0, java.lang.Integer.MAX_VALUE, related));
1000      }
1001
1002      @Override
1003      public void setProperty(String name, Base value) throws FHIRException {
1004        if (name.equals("masterIdentifier"))
1005          this.masterIdentifier = castToIdentifier(value); // Identifier
1006        else if (name.equals("identifier"))
1007          this.getIdentifier().add(castToIdentifier(value));
1008        else if (name.equals("subject"))
1009          this.subject = castToReference(value); // Reference
1010        else if (name.equals("recipient"))
1011          this.getRecipient().add(castToReference(value));
1012        else if (name.equals("type"))
1013          this.type = castToCodeableConcept(value); // CodeableConcept
1014        else if (name.equals("author"))
1015          this.getAuthor().add(castToReference(value));
1016        else if (name.equals("created"))
1017          this.created = castToDateTime(value); // DateTimeType
1018        else if (name.equals("source"))
1019          this.source = castToUri(value); // UriType
1020        else if (name.equals("status"))
1021          this.status = new DocumentReferenceStatusEnumFactory().fromType(value); // Enumeration<DocumentReferenceStatus>
1022        else if (name.equals("description"))
1023          this.description = castToString(value); // StringType
1024        else if (name.equals("content"))
1025          this.getContent().add((DocumentManifestContentComponent) value);
1026        else if (name.equals("related"))
1027          this.getRelated().add((DocumentManifestRelatedComponent) value);
1028        else
1029          super.setProperty(name, value);
1030      }
1031
1032      @Override
1033      public Base addChild(String name) throws FHIRException {
1034        if (name.equals("masterIdentifier")) {
1035          this.masterIdentifier = new Identifier();
1036          return this.masterIdentifier;
1037        }
1038        else if (name.equals("identifier")) {
1039          return addIdentifier();
1040        }
1041        else if (name.equals("subject")) {
1042          this.subject = new Reference();
1043          return this.subject;
1044        }
1045        else if (name.equals("recipient")) {
1046          return addRecipient();
1047        }
1048        else if (name.equals("type")) {
1049          this.type = new CodeableConcept();
1050          return this.type;
1051        }
1052        else if (name.equals("author")) {
1053          return addAuthor();
1054        }
1055        else if (name.equals("created")) {
1056          throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.created");
1057        }
1058        else if (name.equals("source")) {
1059          throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.source");
1060        }
1061        else if (name.equals("status")) {
1062          throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.status");
1063        }
1064        else if (name.equals("description")) {
1065          throw new FHIRException("Cannot call addChild on a primitive type DocumentManifest.description");
1066        }
1067        else if (name.equals("content")) {
1068          return addContent();
1069        }
1070        else if (name.equals("related")) {
1071          return addRelated();
1072        }
1073        else
1074          return super.addChild(name);
1075      }
1076
1077  public String fhirType() {
1078    return "DocumentManifest";
1079
1080  }
1081
1082      public DocumentManifest copy() {
1083        DocumentManifest dst = new DocumentManifest();
1084        copyValues(dst);
1085        dst.masterIdentifier = masterIdentifier == null ? null : masterIdentifier.copy();
1086        if (identifier != null) {
1087          dst.identifier = new ArrayList<Identifier>();
1088          for (Identifier i : identifier)
1089            dst.identifier.add(i.copy());
1090        };
1091        dst.subject = subject == null ? null : subject.copy();
1092        if (recipient != null) {
1093          dst.recipient = new ArrayList<Reference>();
1094          for (Reference i : recipient)
1095            dst.recipient.add(i.copy());
1096        };
1097        dst.type = type == null ? null : type.copy();
1098        if (author != null) {
1099          dst.author = new ArrayList<Reference>();
1100          for (Reference i : author)
1101            dst.author.add(i.copy());
1102        };
1103        dst.created = created == null ? null : created.copy();
1104        dst.source = source == null ? null : source.copy();
1105        dst.status = status == null ? null : status.copy();
1106        dst.description = description == null ? null : description.copy();
1107        if (content != null) {
1108          dst.content = new ArrayList<DocumentManifestContentComponent>();
1109          for (DocumentManifestContentComponent i : content)
1110            dst.content.add(i.copy());
1111        };
1112        if (related != null) {
1113          dst.related = new ArrayList<DocumentManifestRelatedComponent>();
1114          for (DocumentManifestRelatedComponent i : related)
1115            dst.related.add(i.copy());
1116        };
1117        return dst;
1118      }
1119
1120      protected DocumentManifest typedCopy() {
1121        return copy();
1122      }
1123
1124      @Override
1125      public boolean equalsDeep(Base other) {
1126        if (!super.equalsDeep(other))
1127          return false;
1128        if (!(other instanceof DocumentManifest))
1129          return false;
1130        DocumentManifest o = (DocumentManifest) other;
1131        return compareDeep(masterIdentifier, o.masterIdentifier, true) && compareDeep(identifier, o.identifier, true)
1132           && compareDeep(subject, o.subject, true) && compareDeep(recipient, o.recipient, true) && compareDeep(type, o.type, true)
1133           && compareDeep(author, o.author, true) && compareDeep(created, o.created, true) && compareDeep(source, o.source, true)
1134           && compareDeep(status, o.status, true) && compareDeep(description, o.description, true) && compareDeep(content, o.content, true)
1135           && compareDeep(related, o.related, true);
1136      }
1137
1138      @Override
1139      public boolean equalsShallow(Base other) {
1140        if (!super.equalsShallow(other))
1141          return false;
1142        if (!(other instanceof DocumentManifest))
1143          return false;
1144        DocumentManifest o = (DocumentManifest) other;
1145        return compareValues(created, o.created, true) && compareValues(source, o.source, true) && compareValues(status, o.status, true)
1146           && compareValues(description, o.description, true);
1147      }
1148
1149      public boolean isEmpty() {
1150        return super.isEmpty() && (masterIdentifier == null || masterIdentifier.isEmpty()) && (identifier == null || identifier.isEmpty())
1151           && (subject == null || subject.isEmpty()) && (recipient == null || recipient.isEmpty()) && (type == null || type.isEmpty())
1152           && (author == null || author.isEmpty()) && (created == null || created.isEmpty()) && (source == null || source.isEmpty())
1153           && (status == null || status.isEmpty()) && (description == null || description.isEmpty())
1154           && (content == null || content.isEmpty()) && (related == null || related.isEmpty());
1155      }
1156
1157  @Override
1158  public ResourceType getResourceType() {
1159    return ResourceType.DocumentManifest;
1160   }
1161
1162  @SearchParamDefinition(name="identifier", path="DocumentManifest.masterIdentifier | DocumentManifest.identifier", description="Unique Identifier for the set of documents", type="token" )
1163  public static final String SP_IDENTIFIER = "identifier";
1164  @SearchParamDefinition(name="related-id", path="DocumentManifest.related.identifier", description="Identifiers of things that are related", type="token" )
1165  public static final String SP_RELATEDID = "related-id";
1166  @SearchParamDefinition(name="content-ref", path="DocumentManifest.content.pReference", description="Contents of this set of documents", type="reference" )
1167  public static final String SP_CONTENTREF = "content-ref";
1168  @SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" )
1169  public static final String SP_SUBJECT = "subject";
1170  @SearchParamDefinition(name="author", path="DocumentManifest.author", description="Who and/or what authored the manifest", type="reference" )
1171  public static final String SP_AUTHOR = "author";
1172  @SearchParamDefinition(name="created", path="DocumentManifest.created", description="When this document manifest created", type="date" )
1173  public static final String SP_CREATED = "created";
1174  @SearchParamDefinition(name="description", path="DocumentManifest.description", description="Human-readable description (title)", type="string" )
1175  public static final String SP_DESCRIPTION = "description";
1176  @SearchParamDefinition(name="source", path="DocumentManifest.source", description="The source system/application/software", type="uri" )
1177  public static final String SP_SOURCE = "source";
1178  @SearchParamDefinition(name="type", path="DocumentManifest.type", description="Kind of document set", type="token" )
1179  public static final String SP_TYPE = "type";
1180  @SearchParamDefinition(name="related-ref", path="DocumentManifest.related.ref", description="Related Resource", type="reference" )
1181  public static final String SP_RELATEDREF = "related-ref";
1182  @SearchParamDefinition(name="patient", path="DocumentManifest.subject", description="The subject of the set of documents", type="reference" )
1183  public static final String SP_PATIENT = "patient";
1184  @SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="Intended to get notified about this set of documents", type="reference" )
1185  public static final String SP_RECIPIENT = "recipient";
1186  @SearchParamDefinition(name="status", path="DocumentManifest.status", description="current | superseded | entered-in-error", type="token" )
1187  public static final String SP_STATUS = "status";
1188
1189}
1190