001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * The findings and interpretation of diagnostic tests performed on patients, groups of patients, products, substances, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. The report also includes non-clinical context such as batch analysis and stability reporting of products and substances.
052 */
053@ResourceDef(name="DiagnosticReport", profile="http://hl7.org/fhir/StructureDefinition/DiagnosticReport")
054public class DiagnosticReport extends DomainResource {
055
056    public enum DiagnosticReportStatus {
057        /**
058         * The existence of the report is registered, but there is nothing yet available.
059         */
060        REGISTERED, 
061        /**
062         * This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified.
063         */
064        PARTIAL, 
065        /**
066         * Verified early results are available, but not all results are final.
067         */
068        PRELIMINARY, 
069        /**
070         * Prior to being final, the report has been modified.  This includes any change in the results, diagnosis, narrative text, or other content of a non-finalized (e.g., preliminary) report that has been issued.
071         */
072        MODIFIED, 
073        /**
074         * The report is complete and verified by an authorized person.
075         */
076        FINAL, 
077        /**
078         * Subsequent to being final, the report has been modified.  This includes any change in the results, diagnosis, narrative text, or other content of a report that has been issued.
079         */
080        AMENDED, 
081        /**
082         * Subsequent to being final, the report has been modified to correct an error in the report or referenced results.
083         */
084        CORRECTED, 
085        /**
086         * Subsequent to being final, the report has been modified by adding new content. The existing content is unchanged.
087         */
088        APPENDED, 
089        /**
090         * The report is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\").
091         */
092        CANCELLED, 
093        /**
094         * The report has been withdrawn following a previous final release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".).
095         */
096        ENTEREDINERROR, 
097        /**
098         * The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which.
099         */
100        UNKNOWN, 
101        /**
102         * added to help the parsers with the generic types
103         */
104        NULL;
105        public static DiagnosticReportStatus fromCode(String codeString) throws FHIRException {
106            if (codeString == null || "".equals(codeString))
107                return null;
108        if ("registered".equals(codeString))
109          return REGISTERED;
110        if ("partial".equals(codeString))
111          return PARTIAL;
112        if ("preliminary".equals(codeString))
113          return PRELIMINARY;
114        if ("modified".equals(codeString))
115          return MODIFIED;
116        if ("final".equals(codeString))
117          return FINAL;
118        if ("amended".equals(codeString))
119          return AMENDED;
120        if ("corrected".equals(codeString))
121          return CORRECTED;
122        if ("appended".equals(codeString))
123          return APPENDED;
124        if ("cancelled".equals(codeString))
125          return CANCELLED;
126        if ("entered-in-error".equals(codeString))
127          return ENTEREDINERROR;
128        if ("unknown".equals(codeString))
129          return UNKNOWN;
130        if (Configuration.isAcceptInvalidEnums())
131          return null;
132        else
133          throw new FHIRException("Unknown DiagnosticReportStatus code '"+codeString+"'");
134        }
135        public String toCode() {
136          switch (this) {
137            case REGISTERED: return "registered";
138            case PARTIAL: return "partial";
139            case PRELIMINARY: return "preliminary";
140            case MODIFIED: return "modified";
141            case FINAL: return "final";
142            case AMENDED: return "amended";
143            case CORRECTED: return "corrected";
144            case APPENDED: return "appended";
145            case CANCELLED: return "cancelled";
146            case ENTEREDINERROR: return "entered-in-error";
147            case UNKNOWN: return "unknown";
148            case NULL: return null;
149            default: return "?";
150          }
151        }
152        public String getSystem() {
153          switch (this) {
154            case REGISTERED: return "http://hl7.org/fhir/diagnostic-report-status";
155            case PARTIAL: return "http://hl7.org/fhir/diagnostic-report-status";
156            case PRELIMINARY: return "http://hl7.org/fhir/diagnostic-report-status";
157            case MODIFIED: return "http://hl7.org/fhir/diagnostic-report-status";
158            case FINAL: return "http://hl7.org/fhir/diagnostic-report-status";
159            case AMENDED: return "http://hl7.org/fhir/diagnostic-report-status";
160            case CORRECTED: return "http://hl7.org/fhir/diagnostic-report-status";
161            case APPENDED: return "http://hl7.org/fhir/diagnostic-report-status";
162            case CANCELLED: return "http://hl7.org/fhir/diagnostic-report-status";
163            case ENTEREDINERROR: return "http://hl7.org/fhir/diagnostic-report-status";
164            case UNKNOWN: return "http://hl7.org/fhir/diagnostic-report-status";
165            case NULL: return null;
166            default: return "?";
167          }
168        }
169        public String getDefinition() {
170          switch (this) {
171            case REGISTERED: return "The existence of the report is registered, but there is nothing yet available.";
172            case PARTIAL: return "This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified.";
173            case PRELIMINARY: return "Verified early results are available, but not all results are final.";
174            case MODIFIED: return "Prior to being final, the report has been modified.  This includes any change in the results, diagnosis, narrative text, or other content of a non-finalized (e.g., preliminary) report that has been issued.";
175            case FINAL: return "The report is complete and verified by an authorized person.";
176            case AMENDED: return "Subsequent to being final, the report has been modified.  This includes any change in the results, diagnosis, narrative text, or other content of a report that has been issued.";
177            case CORRECTED: return "Subsequent to being final, the report has been modified to correct an error in the report or referenced results.";
178            case APPENDED: return "Subsequent to being final, the report has been modified by adding new content. The existing content is unchanged.";
179            case CANCELLED: return "The report is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\").";
180            case ENTEREDINERROR: return "The report has been withdrawn following a previous final release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".).";
181            case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which.";
182            case NULL: return null;
183            default: return "?";
184          }
185        }
186        public String getDisplay() {
187          switch (this) {
188            case REGISTERED: return "Registered";
189            case PARTIAL: return "Partial";
190            case PRELIMINARY: return "Preliminary";
191            case MODIFIED: return "Modified";
192            case FINAL: return "Final";
193            case AMENDED: return "Amended";
194            case CORRECTED: return "Corrected";
195            case APPENDED: return "Appended";
196            case CANCELLED: return "Cancelled";
197            case ENTEREDINERROR: return "Entered in Error";
198            case UNKNOWN: return "Unknown";
199            case NULL: return null;
200            default: return "?";
201          }
202        }
203    }
204
205  public static class DiagnosticReportStatusEnumFactory implements EnumFactory<DiagnosticReportStatus> {
206    public DiagnosticReportStatus fromCode(String codeString) throws IllegalArgumentException {
207      if (codeString == null || "".equals(codeString))
208            if (codeString == null || "".equals(codeString))
209                return null;
210        if ("registered".equals(codeString))
211          return DiagnosticReportStatus.REGISTERED;
212        if ("partial".equals(codeString))
213          return DiagnosticReportStatus.PARTIAL;
214        if ("preliminary".equals(codeString))
215          return DiagnosticReportStatus.PRELIMINARY;
216        if ("modified".equals(codeString))
217          return DiagnosticReportStatus.MODIFIED;
218        if ("final".equals(codeString))
219          return DiagnosticReportStatus.FINAL;
220        if ("amended".equals(codeString))
221          return DiagnosticReportStatus.AMENDED;
222        if ("corrected".equals(codeString))
223          return DiagnosticReportStatus.CORRECTED;
224        if ("appended".equals(codeString))
225          return DiagnosticReportStatus.APPENDED;
226        if ("cancelled".equals(codeString))
227          return DiagnosticReportStatus.CANCELLED;
228        if ("entered-in-error".equals(codeString))
229          return DiagnosticReportStatus.ENTEREDINERROR;
230        if ("unknown".equals(codeString))
231          return DiagnosticReportStatus.UNKNOWN;
232        throw new IllegalArgumentException("Unknown DiagnosticReportStatus code '"+codeString+"'");
233        }
234        public Enumeration<DiagnosticReportStatus> fromType(PrimitiveType<?> code) throws FHIRException {
235          if (code == null)
236            return null;
237          if (code.isEmpty())
238            return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.NULL, code);
239          String codeString = ((PrimitiveType) code).asStringValue();
240          if (codeString == null || "".equals(codeString))
241            return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.NULL, code);
242        if ("registered".equals(codeString))
243          return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.REGISTERED, code);
244        if ("partial".equals(codeString))
245          return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.PARTIAL, code);
246        if ("preliminary".equals(codeString))
247          return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.PRELIMINARY, code);
248        if ("modified".equals(codeString))
249          return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.MODIFIED, code);
250        if ("final".equals(codeString))
251          return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.FINAL, code);
252        if ("amended".equals(codeString))
253          return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.AMENDED, code);
254        if ("corrected".equals(codeString))
255          return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.CORRECTED, code);
256        if ("appended".equals(codeString))
257          return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.APPENDED, code);
258        if ("cancelled".equals(codeString))
259          return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.CANCELLED, code);
260        if ("entered-in-error".equals(codeString))
261          return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.ENTEREDINERROR, code);
262        if ("unknown".equals(codeString))
263          return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.UNKNOWN, code);
264        throw new FHIRException("Unknown DiagnosticReportStatus code '"+codeString+"'");
265        }
266    public String toCode(DiagnosticReportStatus code) {
267      if (code == DiagnosticReportStatus.REGISTERED)
268        return "registered";
269      if (code == DiagnosticReportStatus.PARTIAL)
270        return "partial";
271      if (code == DiagnosticReportStatus.PRELIMINARY)
272        return "preliminary";
273      if (code == DiagnosticReportStatus.MODIFIED)
274        return "modified";
275      if (code == DiagnosticReportStatus.FINAL)
276        return "final";
277      if (code == DiagnosticReportStatus.AMENDED)
278        return "amended";
279      if (code == DiagnosticReportStatus.CORRECTED)
280        return "corrected";
281      if (code == DiagnosticReportStatus.APPENDED)
282        return "appended";
283      if (code == DiagnosticReportStatus.CANCELLED)
284        return "cancelled";
285      if (code == DiagnosticReportStatus.ENTEREDINERROR)
286        return "entered-in-error";
287      if (code == DiagnosticReportStatus.UNKNOWN)
288        return "unknown";
289      return "?";
290      }
291    public String toSystem(DiagnosticReportStatus code) {
292      return code.getSystem();
293      }
294    }
295
296    @Block()
297    public static class DiagnosticReportSupportingInfoComponent extends BackboneElement implements IBaseBackboneElement {
298        /**
299         * The code value for the role of the supporting information in the diagnostic report.
300         */
301        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
302        @Description(shortDefinition="Supporting information role code", formalDefinition="The code value for the role of the supporting information in the diagnostic report." )
303        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0936")
304        protected CodeableConcept type;
305
306        /**
307         * The reference for the supporting information in the diagnostic report.
308         */
309        @Child(name = "reference", type = {Procedure.class, Observation.class, DiagnosticReport.class, Citation.class}, order=2, min=1, max=1, modifier=false, summary=false)
310        @Description(shortDefinition="Supporting information reference", formalDefinition="The reference for the supporting information in the diagnostic report." )
311        protected Reference reference;
312
313        private static final long serialVersionUID = 492391425L;
314
315    /**
316     * Constructor
317     */
318      public DiagnosticReportSupportingInfoComponent() {
319        super();
320      }
321
322    /**
323     * Constructor
324     */
325      public DiagnosticReportSupportingInfoComponent(CodeableConcept type, Reference reference) {
326        super();
327        this.setType(type);
328        this.setReference(reference);
329      }
330
331        /**
332         * @return {@link #type} (The code value for the role of the supporting information in the diagnostic report.)
333         */
334        public CodeableConcept getType() { 
335          if (this.type == null)
336            if (Configuration.errorOnAutoCreate())
337              throw new Error("Attempt to auto-create DiagnosticReportSupportingInfoComponent.type");
338            else if (Configuration.doAutoCreate())
339              this.type = new CodeableConcept(); // cc
340          return this.type;
341        }
342
343        public boolean hasType() { 
344          return this.type != null && !this.type.isEmpty();
345        }
346
347        /**
348         * @param value {@link #type} (The code value for the role of the supporting information in the diagnostic report.)
349         */
350        public DiagnosticReportSupportingInfoComponent setType(CodeableConcept value) { 
351          this.type = value;
352          return this;
353        }
354
355        /**
356         * @return {@link #reference} (The reference for the supporting information in the diagnostic report.)
357         */
358        public Reference getReference() { 
359          if (this.reference == null)
360            if (Configuration.errorOnAutoCreate())
361              throw new Error("Attempt to auto-create DiagnosticReportSupportingInfoComponent.reference");
362            else if (Configuration.doAutoCreate())
363              this.reference = new Reference(); // cc
364          return this.reference;
365        }
366
367        public boolean hasReference() { 
368          return this.reference != null && !this.reference.isEmpty();
369        }
370
371        /**
372         * @param value {@link #reference} (The reference for the supporting information in the diagnostic report.)
373         */
374        public DiagnosticReportSupportingInfoComponent setReference(Reference value) { 
375          this.reference = value;
376          return this;
377        }
378
379        protected void listChildren(List<Property> children) {
380          super.listChildren(children);
381          children.add(new Property("type", "CodeableConcept", "The code value for the role of the supporting information in the diagnostic report.", 0, 1, type));
382          children.add(new Property("reference", "Reference(Procedure|Observation|DiagnosticReport|Citation)", "The reference for the supporting information in the diagnostic report.", 0, 1, reference));
383        }
384
385        @Override
386        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
387          switch (_hash) {
388          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "The code value for the role of the supporting information in the diagnostic report.", 0, 1, type);
389          case -925155509: /*reference*/  return new Property("reference", "Reference(Procedure|Observation|DiagnosticReport|Citation)", "The reference for the supporting information in the diagnostic report.", 0, 1, reference);
390          default: return super.getNamedProperty(_hash, _name, _checkValid);
391          }
392
393        }
394
395      @Override
396      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
397        switch (hash) {
398        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
399        case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference
400        default: return super.getProperty(hash, name, checkValid);
401        }
402
403      }
404
405      @Override
406      public Base setProperty(int hash, String name, Base value) throws FHIRException {
407        switch (hash) {
408        case 3575610: // type
409          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
410          return value;
411        case -925155509: // reference
412          this.reference = TypeConvertor.castToReference(value); // Reference
413          return value;
414        default: return super.setProperty(hash, name, value);
415        }
416
417      }
418
419      @Override
420      public Base setProperty(String name, Base value) throws FHIRException {
421        if (name.equals("type")) {
422          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
423        } else if (name.equals("reference")) {
424          this.reference = TypeConvertor.castToReference(value); // Reference
425        } else
426          return super.setProperty(name, value);
427        return value;
428      }
429
430      @Override
431      public Base makeProperty(int hash, String name) throws FHIRException {
432        switch (hash) {
433        case 3575610:  return getType();
434        case -925155509:  return getReference();
435        default: return super.makeProperty(hash, name);
436        }
437
438      }
439
440      @Override
441      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
442        switch (hash) {
443        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
444        case -925155509: /*reference*/ return new String[] {"Reference"};
445        default: return super.getTypesForProperty(hash, name);
446        }
447
448      }
449
450      @Override
451      public Base addChild(String name) throws FHIRException {
452        if (name.equals("type")) {
453          this.type = new CodeableConcept();
454          return this.type;
455        }
456        else if (name.equals("reference")) {
457          this.reference = new Reference();
458          return this.reference;
459        }
460        else
461          return super.addChild(name);
462      }
463
464      public DiagnosticReportSupportingInfoComponent copy() {
465        DiagnosticReportSupportingInfoComponent dst = new DiagnosticReportSupportingInfoComponent();
466        copyValues(dst);
467        return dst;
468      }
469
470      public void copyValues(DiagnosticReportSupportingInfoComponent dst) {
471        super.copyValues(dst);
472        dst.type = type == null ? null : type.copy();
473        dst.reference = reference == null ? null : reference.copy();
474      }
475
476      @Override
477      public boolean equalsDeep(Base other_) {
478        if (!super.equalsDeep(other_))
479          return false;
480        if (!(other_ instanceof DiagnosticReportSupportingInfoComponent))
481          return false;
482        DiagnosticReportSupportingInfoComponent o = (DiagnosticReportSupportingInfoComponent) other_;
483        return compareDeep(type, o.type, true) && compareDeep(reference, o.reference, true);
484      }
485
486      @Override
487      public boolean equalsShallow(Base other_) {
488        if (!super.equalsShallow(other_))
489          return false;
490        if (!(other_ instanceof DiagnosticReportSupportingInfoComponent))
491          return false;
492        DiagnosticReportSupportingInfoComponent o = (DiagnosticReportSupportingInfoComponent) other_;
493        return true;
494      }
495
496      public boolean isEmpty() {
497        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, reference);
498      }
499
500  public String fhirType() {
501    return "DiagnosticReport.supportingInfo";
502
503  }
504
505  }
506
507    @Block()
508    public static class DiagnosticReportMediaComponent extends BackboneElement implements IBaseBackboneElement {
509        /**
510         * A comment about the image or data. Typically, this is used to provide an explanation for why the image or data is included, or to draw the viewer's attention to important features.
511         */
512        @Child(name = "comment", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
513        @Description(shortDefinition="Comment about the image or data (e.g. explanation)", formalDefinition="A comment about the image or data. Typically, this is used to provide an explanation for why the image or data is included, or to draw the viewer's attention to important features." )
514        protected StringType comment;
515
516        /**
517         * Reference to the image or data source.
518         */
519        @Child(name = "link", type = {DocumentReference.class}, order=2, min=1, max=1, modifier=false, summary=true)
520        @Description(shortDefinition="Reference to the image or data source", formalDefinition="Reference to the image or data source." )
521        protected Reference link;
522
523        private static final long serialVersionUID = 1827561947L;
524
525    /**
526     * Constructor
527     */
528      public DiagnosticReportMediaComponent() {
529        super();
530      }
531
532    /**
533     * Constructor
534     */
535      public DiagnosticReportMediaComponent(Reference link) {
536        super();
537        this.setLink(link);
538      }
539
540        /**
541         * @return {@link #comment} (A comment about the image or data. Typically, this is used to provide an explanation for why the image or data is included, or to draw the viewer's attention to important features.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
542         */
543        public StringType getCommentElement() { 
544          if (this.comment == null)
545            if (Configuration.errorOnAutoCreate())
546              throw new Error("Attempt to auto-create DiagnosticReportMediaComponent.comment");
547            else if (Configuration.doAutoCreate())
548              this.comment = new StringType(); // bb
549          return this.comment;
550        }
551
552        public boolean hasCommentElement() { 
553          return this.comment != null && !this.comment.isEmpty();
554        }
555
556        public boolean hasComment() { 
557          return this.comment != null && !this.comment.isEmpty();
558        }
559
560        /**
561         * @param value {@link #comment} (A comment about the image or data. Typically, this is used to provide an explanation for why the image or data is included, or to draw the viewer's attention to important features.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
562         */
563        public DiagnosticReportMediaComponent setCommentElement(StringType value) { 
564          this.comment = value;
565          return this;
566        }
567
568        /**
569         * @return A comment about the image or data. Typically, this is used to provide an explanation for why the image or data is included, or to draw the viewer's attention to important features.
570         */
571        public String getComment() { 
572          return this.comment == null ? null : this.comment.getValue();
573        }
574
575        /**
576         * @param value A comment about the image or data. Typically, this is used to provide an explanation for why the image or data is included, or to draw the viewer's attention to important features.
577         */
578        public DiagnosticReportMediaComponent setComment(String value) { 
579          if (Utilities.noString(value))
580            this.comment = null;
581          else {
582            if (this.comment == null)
583              this.comment = new StringType();
584            this.comment.setValue(value);
585          }
586          return this;
587        }
588
589        /**
590         * @return {@link #link} (Reference to the image or data source.)
591         */
592        public Reference getLink() { 
593          if (this.link == null)
594            if (Configuration.errorOnAutoCreate())
595              throw new Error("Attempt to auto-create DiagnosticReportMediaComponent.link");
596            else if (Configuration.doAutoCreate())
597              this.link = new Reference(); // cc
598          return this.link;
599        }
600
601        public boolean hasLink() { 
602          return this.link != null && !this.link.isEmpty();
603        }
604
605        /**
606         * @param value {@link #link} (Reference to the image or data source.)
607         */
608        public DiagnosticReportMediaComponent setLink(Reference value) { 
609          this.link = value;
610          return this;
611        }
612
613        protected void listChildren(List<Property> children) {
614          super.listChildren(children);
615          children.add(new Property("comment", "string", "A comment about the image or data. Typically, this is used to provide an explanation for why the image or data is included, or to draw the viewer's attention to important features.", 0, 1, comment));
616          children.add(new Property("link", "Reference(DocumentReference)", "Reference to the image or data source.", 0, 1, link));
617        }
618
619        @Override
620        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
621          switch (_hash) {
622          case 950398559: /*comment*/  return new Property("comment", "string", "A comment about the image or data. Typically, this is used to provide an explanation for why the image or data is included, or to draw the viewer's attention to important features.", 0, 1, comment);
623          case 3321850: /*link*/  return new Property("link", "Reference(DocumentReference)", "Reference to the image or data source.", 0, 1, link);
624          default: return super.getNamedProperty(_hash, _name, _checkValid);
625          }
626
627        }
628
629      @Override
630      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
631        switch (hash) {
632        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType
633        case 3321850: /*link*/ return this.link == null ? new Base[0] : new Base[] {this.link}; // Reference
634        default: return super.getProperty(hash, name, checkValid);
635        }
636
637      }
638
639      @Override
640      public Base setProperty(int hash, String name, Base value) throws FHIRException {
641        switch (hash) {
642        case 950398559: // comment
643          this.comment = TypeConvertor.castToString(value); // StringType
644          return value;
645        case 3321850: // link
646          this.link = TypeConvertor.castToReference(value); // Reference
647          return value;
648        default: return super.setProperty(hash, name, value);
649        }
650
651      }
652
653      @Override
654      public Base setProperty(String name, Base value) throws FHIRException {
655        if (name.equals("comment")) {
656          this.comment = TypeConvertor.castToString(value); // StringType
657        } else if (name.equals("link")) {
658          this.link = TypeConvertor.castToReference(value); // Reference
659        } else
660          return super.setProperty(name, value);
661        return value;
662      }
663
664      @Override
665      public Base makeProperty(int hash, String name) throws FHIRException {
666        switch (hash) {
667        case 950398559:  return getCommentElement();
668        case 3321850:  return getLink();
669        default: return super.makeProperty(hash, name);
670        }
671
672      }
673
674      @Override
675      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
676        switch (hash) {
677        case 950398559: /*comment*/ return new String[] {"string"};
678        case 3321850: /*link*/ return new String[] {"Reference"};
679        default: return super.getTypesForProperty(hash, name);
680        }
681
682      }
683
684      @Override
685      public Base addChild(String name) throws FHIRException {
686        if (name.equals("comment")) {
687          throw new FHIRException("Cannot call addChild on a singleton property DiagnosticReport.media.comment");
688        }
689        else if (name.equals("link")) {
690          this.link = new Reference();
691          return this.link;
692        }
693        else
694          return super.addChild(name);
695      }
696
697      public DiagnosticReportMediaComponent copy() {
698        DiagnosticReportMediaComponent dst = new DiagnosticReportMediaComponent();
699        copyValues(dst);
700        return dst;
701      }
702
703      public void copyValues(DiagnosticReportMediaComponent dst) {
704        super.copyValues(dst);
705        dst.comment = comment == null ? null : comment.copy();
706        dst.link = link == null ? null : link.copy();
707      }
708
709      @Override
710      public boolean equalsDeep(Base other_) {
711        if (!super.equalsDeep(other_))
712          return false;
713        if (!(other_ instanceof DiagnosticReportMediaComponent))
714          return false;
715        DiagnosticReportMediaComponent o = (DiagnosticReportMediaComponent) other_;
716        return compareDeep(comment, o.comment, true) && compareDeep(link, o.link, true);
717      }
718
719      @Override
720      public boolean equalsShallow(Base other_) {
721        if (!super.equalsShallow(other_))
722          return false;
723        if (!(other_ instanceof DiagnosticReportMediaComponent))
724          return false;
725        DiagnosticReportMediaComponent o = (DiagnosticReportMediaComponent) other_;
726        return compareValues(comment, o.comment, true);
727      }
728
729      public boolean isEmpty() {
730        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(comment, link);
731      }
732
733  public String fhirType() {
734    return "DiagnosticReport.media";
735
736  }
737
738  }
739
740    /**
741     * Identifiers assigned to this report by the performer or other systems.
742     */
743    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
744    @Description(shortDefinition="Business identifier for report", formalDefinition="Identifiers assigned to this report by the performer or other systems." )
745    protected List<Identifier> identifier;
746
747    /**
748     * Details concerning a service requested.
749     */
750    @Child(name = "basedOn", type = {CarePlan.class, ImmunizationRecommendation.class, MedicationRequest.class, NutritionOrder.class, ServiceRequest.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
751    @Description(shortDefinition="What was requested", formalDefinition="Details concerning a service requested." )
752    protected List<Reference> basedOn;
753
754    /**
755     * The status of the diagnostic report.
756     */
757    @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true)
758    @Description(shortDefinition="registered | partial | preliminary | modified | final | amended | corrected | appended | cancelled | entered-in-error | unknown", formalDefinition="The status of the diagnostic report." )
759    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/diagnostic-report-status")
760    protected Enumeration<DiagnosticReportStatus> status;
761
762    /**
763     * A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.
764     */
765    @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
766    @Description(shortDefinition="Service category", formalDefinition="A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes." )
767    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/diagnostic-service-sections")
768    protected List<CodeableConcept> category;
769
770    /**
771     * A code or name that describes this diagnostic report.
772     */
773    @Child(name = "code", type = {CodeableConcept.class}, order=4, min=1, max=1, modifier=false, summary=true)
774    @Description(shortDefinition="Name/Code for this diagnostic report", formalDefinition="A code or name that describes this diagnostic report." )
775    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/report-codes")
776    protected CodeableConcept code;
777
778    /**
779     * The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources.
780     */
781    @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Location.class, Organization.class, Practitioner.class, Medication.class, Substance.class, BiologicallyDerivedProduct.class}, order=5, min=0, max=1, modifier=false, summary=true)
782    @Description(shortDefinition="The subject of the report - usually, but not always, the patient", formalDefinition="The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources." )
783    protected Reference subject;
784
785    /**
786     * The healthcare event  (e.g. a patient and healthcare provider interaction) which this DiagnosticReport is about.
787     */
788    @Child(name = "encounter", type = {Encounter.class}, order=6, min=0, max=1, modifier=false, summary=true)
789    @Description(shortDefinition="Health care event when test ordered", formalDefinition="The healthcare event  (e.g. a patient and healthcare provider interaction) which this DiagnosticReport is about." )
790    protected Reference encounter;
791
792    /**
793     * The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.
794     */
795    @Child(name = "effective", type = {DateTimeType.class, Period.class}, order=7, min=0, max=1, modifier=false, summary=true)
796    @Description(shortDefinition="Clinically relevant time/time-period for report", formalDefinition="The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself." )
797    protected DataType effective;
798
799    /**
800     * The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.
801     */
802    @Child(name = "issued", type = {InstantType.class}, order=8, min=0, max=1, modifier=false, summary=true)
803    @Description(shortDefinition="DateTime this version was made", formalDefinition="The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified." )
804    protected InstantType issued;
805
806    /**
807     * The diagnostic service that is responsible for issuing the report.
808     */
809    @Child(name = "performer", type = {Practitioner.class, PractitionerRole.class, Organization.class, CareTeam.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
810    @Description(shortDefinition="Responsible Diagnostic Service", formalDefinition="The diagnostic service that is responsible for issuing the report." )
811    protected List<Reference> performer;
812
813    /**
814     * The practitioner or organization that is responsible for the report's conclusions and interpretations.
815     */
816    @Child(name = "resultsInterpreter", type = {Practitioner.class, PractitionerRole.class, Organization.class, CareTeam.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
817    @Description(shortDefinition="Primary result interpreter", formalDefinition="The practitioner or organization that is responsible for the report's conclusions and interpretations." )
818    protected List<Reference> resultsInterpreter;
819
820    /**
821     * Details about the specimens on which this diagnostic report is based.
822     */
823    @Child(name = "specimen", type = {Specimen.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
824    @Description(shortDefinition="Specimens this report is based on", formalDefinition="Details about the specimens on which this diagnostic report is based." )
825    protected List<Reference> specimen;
826
827    /**
828     * [Observations](observation.html)  that are part of this diagnostic report.
829     */
830    @Child(name = "result", type = {Observation.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
831    @Description(shortDefinition="Observations", formalDefinition="[Observations](observation.html)  that are part of this diagnostic report." )
832    protected List<Reference> result;
833
834    /**
835     * Comments about the diagnostic report.
836     */
837    @Child(name = "note", type = {Annotation.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
838    @Description(shortDefinition="Comments about the diagnostic report", formalDefinition="Comments about the diagnostic report." )
839    protected List<Annotation> note;
840
841    /**
842     * One or more links to full details of any study performed during the diagnostic investigation. An ImagingStudy might comprise a set of radiologic images obtained via a procedure that are analyzed as a group. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images. A GenomicStudy might comprise one or more analyses, each serving a specific purpose. These analyses may vary in method (e.g., karyotyping, CNV, or SNV detection), performer, software, devices used, or regions targeted.
843     */
844    @Child(name = "study", type = {GenomicStudy.class, ImagingStudy.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
845    @Description(shortDefinition="Reference to full details of an analysis associated with the diagnostic report", formalDefinition="One or more links to full details of any study performed during the diagnostic investigation. An ImagingStudy might comprise a set of radiologic images obtained via a procedure that are analyzed as a group. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images. A GenomicStudy might comprise one or more analyses, each serving a specific purpose. These analyses may vary in method (e.g., karyotyping, CNV, or SNV detection), performer, software, devices used, or regions targeted." )
846    protected List<Reference> study;
847
848    /**
849     * This backbone element contains supporting information that was used in the creation of the report not included in the results already included in the report.
850     */
851    @Child(name = "supportingInfo", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
852    @Description(shortDefinition="Additional information supporting the diagnostic report", formalDefinition="This backbone element contains supporting information that was used in the creation of the report not included in the results already included in the report." )
853    protected List<DiagnosticReportSupportingInfoComponent> supportingInfo;
854
855    /**
856     * A list of key images or data associated with this report. The images or data are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).
857     */
858    @Child(name = "media", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
859    @Description(shortDefinition="Key images or data associated with this report", formalDefinition="A list of key images or data associated with this report. The images or data are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)." )
860    protected List<DiagnosticReportMediaComponent> media;
861
862    /**
863     * Reference to a Composition resource instance that provides structure for organizing the contents of the DiagnosticReport.
864     */
865    @Child(name = "composition", type = {Composition.class}, order=17, min=0, max=1, modifier=false, summary=false)
866    @Description(shortDefinition="Reference to a Composition resource for the DiagnosticReport structure", formalDefinition="Reference to a Composition resource instance that provides structure for organizing the contents of the DiagnosticReport." )
867    protected Reference composition;
868
869    /**
870     * Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.
871     */
872    @Child(name = "conclusion", type = {MarkdownType.class}, order=18, min=0, max=1, modifier=false, summary=false)
873    @Description(shortDefinition="Clinical conclusion (interpretation) of test results", formalDefinition="Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report." )
874    protected MarkdownType conclusion;
875
876    /**
877     * One or more codes that represent the summary conclusion (interpretation/impression) of the diagnostic report.
878     */
879    @Child(name = "conclusionCode", type = {CodeableConcept.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
880    @Description(shortDefinition="Codes for the clinical conclusion of test results", formalDefinition="One or more codes that represent the summary conclusion (interpretation/impression) of the diagnostic report." )
881    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
882    protected List<CodeableConcept> conclusionCode;
883
884    /**
885     * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
886     */
887    @Child(name = "presentedForm", type = {Attachment.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
888    @Description(shortDefinition="Entire report as issued", formalDefinition="Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent." )
889    protected List<Attachment> presentedForm;
890
891    private static final long serialVersionUID = -530178625L;
892
893  /**
894   * Constructor
895   */
896    public DiagnosticReport() {
897      super();
898    }
899
900  /**
901   * Constructor
902   */
903    public DiagnosticReport(DiagnosticReportStatus status, CodeableConcept code) {
904      super();
905      this.setStatus(status);
906      this.setCode(code);
907    }
908
909    /**
910     * @return {@link #identifier} (Identifiers assigned to this report by the performer or other systems.)
911     */
912    public List<Identifier> getIdentifier() { 
913      if (this.identifier == null)
914        this.identifier = new ArrayList<Identifier>();
915      return this.identifier;
916    }
917
918    /**
919     * @return Returns a reference to <code>this</code> for easy method chaining
920     */
921    public DiagnosticReport setIdentifier(List<Identifier> theIdentifier) { 
922      this.identifier = theIdentifier;
923      return this;
924    }
925
926    public boolean hasIdentifier() { 
927      if (this.identifier == null)
928        return false;
929      for (Identifier item : this.identifier)
930        if (!item.isEmpty())
931          return true;
932      return false;
933    }
934
935    public Identifier addIdentifier() { //3
936      Identifier t = new Identifier();
937      if (this.identifier == null)
938        this.identifier = new ArrayList<Identifier>();
939      this.identifier.add(t);
940      return t;
941    }
942
943    public DiagnosticReport addIdentifier(Identifier t) { //3
944      if (t == null)
945        return this;
946      if (this.identifier == null)
947        this.identifier = new ArrayList<Identifier>();
948      this.identifier.add(t);
949      return this;
950    }
951
952    /**
953     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
954     */
955    public Identifier getIdentifierFirstRep() { 
956      if (getIdentifier().isEmpty()) {
957        addIdentifier();
958      }
959      return getIdentifier().get(0);
960    }
961
962    /**
963     * @return {@link #basedOn} (Details concerning a service requested.)
964     */
965    public List<Reference> getBasedOn() { 
966      if (this.basedOn == null)
967        this.basedOn = new ArrayList<Reference>();
968      return this.basedOn;
969    }
970
971    /**
972     * @return Returns a reference to <code>this</code> for easy method chaining
973     */
974    public DiagnosticReport setBasedOn(List<Reference> theBasedOn) { 
975      this.basedOn = theBasedOn;
976      return this;
977    }
978
979    public boolean hasBasedOn() { 
980      if (this.basedOn == null)
981        return false;
982      for (Reference item : this.basedOn)
983        if (!item.isEmpty())
984          return true;
985      return false;
986    }
987
988    public Reference addBasedOn() { //3
989      Reference t = new Reference();
990      if (this.basedOn == null)
991        this.basedOn = new ArrayList<Reference>();
992      this.basedOn.add(t);
993      return t;
994    }
995
996    public DiagnosticReport addBasedOn(Reference t) { //3
997      if (t == null)
998        return this;
999      if (this.basedOn == null)
1000        this.basedOn = new ArrayList<Reference>();
1001      this.basedOn.add(t);
1002      return this;
1003    }
1004
1005    /**
1006     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
1007     */
1008    public Reference getBasedOnFirstRep() { 
1009      if (getBasedOn().isEmpty()) {
1010        addBasedOn();
1011      }
1012      return getBasedOn().get(0);
1013    }
1014
1015    /**
1016     * @return {@link #status} (The status of the diagnostic report.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1017     */
1018    public Enumeration<DiagnosticReportStatus> getStatusElement() { 
1019      if (this.status == null)
1020        if (Configuration.errorOnAutoCreate())
1021          throw new Error("Attempt to auto-create DiagnosticReport.status");
1022        else if (Configuration.doAutoCreate())
1023          this.status = new Enumeration<DiagnosticReportStatus>(new DiagnosticReportStatusEnumFactory()); // bb
1024      return this.status;
1025    }
1026
1027    public boolean hasStatusElement() { 
1028      return this.status != null && !this.status.isEmpty();
1029    }
1030
1031    public boolean hasStatus() { 
1032      return this.status != null && !this.status.isEmpty();
1033    }
1034
1035    /**
1036     * @param value {@link #status} (The status of the diagnostic report.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1037     */
1038    public DiagnosticReport setStatusElement(Enumeration<DiagnosticReportStatus> value) { 
1039      this.status = value;
1040      return this;
1041    }
1042
1043    /**
1044     * @return The status of the diagnostic report.
1045     */
1046    public DiagnosticReportStatus getStatus() { 
1047      return this.status == null ? null : this.status.getValue();
1048    }
1049
1050    /**
1051     * @param value The status of the diagnostic report.
1052     */
1053    public DiagnosticReport setStatus(DiagnosticReportStatus value) { 
1054        if (this.status == null)
1055          this.status = new Enumeration<DiagnosticReportStatus>(new DiagnosticReportStatusEnumFactory());
1056        this.status.setValue(value);
1057      return this;
1058    }
1059
1060    /**
1061     * @return {@link #category} (A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.)
1062     */
1063    public List<CodeableConcept> getCategory() { 
1064      if (this.category == null)
1065        this.category = new ArrayList<CodeableConcept>();
1066      return this.category;
1067    }
1068
1069    /**
1070     * @return Returns a reference to <code>this</code> for easy method chaining
1071     */
1072    public DiagnosticReport setCategory(List<CodeableConcept> theCategory) { 
1073      this.category = theCategory;
1074      return this;
1075    }
1076
1077    public boolean hasCategory() { 
1078      if (this.category == null)
1079        return false;
1080      for (CodeableConcept item : this.category)
1081        if (!item.isEmpty())
1082          return true;
1083      return false;
1084    }
1085
1086    public CodeableConcept addCategory() { //3
1087      CodeableConcept t = new CodeableConcept();
1088      if (this.category == null)
1089        this.category = new ArrayList<CodeableConcept>();
1090      this.category.add(t);
1091      return t;
1092    }
1093
1094    public DiagnosticReport addCategory(CodeableConcept t) { //3
1095      if (t == null)
1096        return this;
1097      if (this.category == null)
1098        this.category = new ArrayList<CodeableConcept>();
1099      this.category.add(t);
1100      return this;
1101    }
1102
1103    /**
1104     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3}
1105     */
1106    public CodeableConcept getCategoryFirstRep() { 
1107      if (getCategory().isEmpty()) {
1108        addCategory();
1109      }
1110      return getCategory().get(0);
1111    }
1112
1113    /**
1114     * @return {@link #code} (A code or name that describes this diagnostic report.)
1115     */
1116    public CodeableConcept getCode() { 
1117      if (this.code == null)
1118        if (Configuration.errorOnAutoCreate())
1119          throw new Error("Attempt to auto-create DiagnosticReport.code");
1120        else if (Configuration.doAutoCreate())
1121          this.code = new CodeableConcept(); // cc
1122      return this.code;
1123    }
1124
1125    public boolean hasCode() { 
1126      return this.code != null && !this.code.isEmpty();
1127    }
1128
1129    /**
1130     * @param value {@link #code} (A code or name that describes this diagnostic report.)
1131     */
1132    public DiagnosticReport setCode(CodeableConcept value) { 
1133      this.code = value;
1134      return this;
1135    }
1136
1137    /**
1138     * @return {@link #subject} (The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources.)
1139     */
1140    public Reference getSubject() { 
1141      if (this.subject == null)
1142        if (Configuration.errorOnAutoCreate())
1143          throw new Error("Attempt to auto-create DiagnosticReport.subject");
1144        else if (Configuration.doAutoCreate())
1145          this.subject = new Reference(); // cc
1146      return this.subject;
1147    }
1148
1149    public boolean hasSubject() { 
1150      return this.subject != null && !this.subject.isEmpty();
1151    }
1152
1153    /**
1154     * @param value {@link #subject} (The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources.)
1155     */
1156    public DiagnosticReport setSubject(Reference value) { 
1157      this.subject = value;
1158      return this;
1159    }
1160
1161    /**
1162     * @return {@link #encounter} (The healthcare event  (e.g. a patient and healthcare provider interaction) which this DiagnosticReport is about.)
1163     */
1164    public Reference getEncounter() { 
1165      if (this.encounter == null)
1166        if (Configuration.errorOnAutoCreate())
1167          throw new Error("Attempt to auto-create DiagnosticReport.encounter");
1168        else if (Configuration.doAutoCreate())
1169          this.encounter = new Reference(); // cc
1170      return this.encounter;
1171    }
1172
1173    public boolean hasEncounter() { 
1174      return this.encounter != null && !this.encounter.isEmpty();
1175    }
1176
1177    /**
1178     * @param value {@link #encounter} (The healthcare event  (e.g. a patient and healthcare provider interaction) which this DiagnosticReport is about.)
1179     */
1180    public DiagnosticReport setEncounter(Reference value) { 
1181      this.encounter = value;
1182      return this;
1183    }
1184
1185    /**
1186     * @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.)
1187     */
1188    public DataType getEffective() { 
1189      return this.effective;
1190    }
1191
1192    /**
1193     * @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.)
1194     */
1195    public DateTimeType getEffectiveDateTimeType() throws FHIRException { 
1196      if (this.effective == null)
1197        this.effective = new DateTimeType();
1198      if (!(this.effective instanceof DateTimeType))
1199        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.effective.getClass().getName()+" was encountered");
1200      return (DateTimeType) this.effective;
1201    }
1202
1203    public boolean hasEffectiveDateTimeType() { 
1204      return this != null && this.effective instanceof DateTimeType;
1205    }
1206
1207    /**
1208     * @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.)
1209     */
1210    public Period getEffectivePeriod() throws FHIRException { 
1211      if (this.effective == null)
1212        this.effective = new Period();
1213      if (!(this.effective instanceof Period))
1214        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.effective.getClass().getName()+" was encountered");
1215      return (Period) this.effective;
1216    }
1217
1218    public boolean hasEffectivePeriod() { 
1219      return this != null && this.effective instanceof Period;
1220    }
1221
1222    public boolean hasEffective() { 
1223      return this.effective != null && !this.effective.isEmpty();
1224    }
1225
1226    /**
1227     * @param value {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.)
1228     */
1229    public DiagnosticReport setEffective(DataType value) { 
1230      if (value != null && !(value instanceof DateTimeType || value instanceof Period))
1231        throw new FHIRException("Not the right type for DiagnosticReport.effective[x]: "+value.fhirType());
1232      this.effective = value;
1233      return this;
1234    }
1235
1236    /**
1237     * @return {@link #issued} (The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value
1238     */
1239    public InstantType getIssuedElement() { 
1240      if (this.issued == null)
1241        if (Configuration.errorOnAutoCreate())
1242          throw new Error("Attempt to auto-create DiagnosticReport.issued");
1243        else if (Configuration.doAutoCreate())
1244          this.issued = new InstantType(); // bb
1245      return this.issued;
1246    }
1247
1248    public boolean hasIssuedElement() { 
1249      return this.issued != null && !this.issued.isEmpty();
1250    }
1251
1252    public boolean hasIssued() { 
1253      return this.issued != null && !this.issued.isEmpty();
1254    }
1255
1256    /**
1257     * @param value {@link #issued} (The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value
1258     */
1259    public DiagnosticReport setIssuedElement(InstantType value) { 
1260      this.issued = value;
1261      return this;
1262    }
1263
1264    /**
1265     * @return The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.
1266     */
1267    public Date getIssued() { 
1268      return this.issued == null ? null : this.issued.getValue();
1269    }
1270
1271    /**
1272     * @param value The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.
1273     */
1274    public DiagnosticReport setIssued(Date value) { 
1275      if (value == null)
1276        this.issued = null;
1277      else {
1278        if (this.issued == null)
1279          this.issued = new InstantType();
1280        this.issued.setValue(value);
1281      }
1282      return this;
1283    }
1284
1285    /**
1286     * @return {@link #performer} (The diagnostic service that is responsible for issuing the report.)
1287     */
1288    public List<Reference> getPerformer() { 
1289      if (this.performer == null)
1290        this.performer = new ArrayList<Reference>();
1291      return this.performer;
1292    }
1293
1294    /**
1295     * @return Returns a reference to <code>this</code> for easy method chaining
1296     */
1297    public DiagnosticReport setPerformer(List<Reference> thePerformer) { 
1298      this.performer = thePerformer;
1299      return this;
1300    }
1301
1302    public boolean hasPerformer() { 
1303      if (this.performer == null)
1304        return false;
1305      for (Reference item : this.performer)
1306        if (!item.isEmpty())
1307          return true;
1308      return false;
1309    }
1310
1311    public Reference addPerformer() { //3
1312      Reference t = new Reference();
1313      if (this.performer == null)
1314        this.performer = new ArrayList<Reference>();
1315      this.performer.add(t);
1316      return t;
1317    }
1318
1319    public DiagnosticReport addPerformer(Reference t) { //3
1320      if (t == null)
1321        return this;
1322      if (this.performer == null)
1323        this.performer = new ArrayList<Reference>();
1324      this.performer.add(t);
1325      return this;
1326    }
1327
1328    /**
1329     * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist {3}
1330     */
1331    public Reference getPerformerFirstRep() { 
1332      if (getPerformer().isEmpty()) {
1333        addPerformer();
1334      }
1335      return getPerformer().get(0);
1336    }
1337
1338    /**
1339     * @return {@link #resultsInterpreter} (The practitioner or organization that is responsible for the report's conclusions and interpretations.)
1340     */
1341    public List<Reference> getResultsInterpreter() { 
1342      if (this.resultsInterpreter == null)
1343        this.resultsInterpreter = new ArrayList<Reference>();
1344      return this.resultsInterpreter;
1345    }
1346
1347    /**
1348     * @return Returns a reference to <code>this</code> for easy method chaining
1349     */
1350    public DiagnosticReport setResultsInterpreter(List<Reference> theResultsInterpreter) { 
1351      this.resultsInterpreter = theResultsInterpreter;
1352      return this;
1353    }
1354
1355    public boolean hasResultsInterpreter() { 
1356      if (this.resultsInterpreter == null)
1357        return false;
1358      for (Reference item : this.resultsInterpreter)
1359        if (!item.isEmpty())
1360          return true;
1361      return false;
1362    }
1363
1364    public Reference addResultsInterpreter() { //3
1365      Reference t = new Reference();
1366      if (this.resultsInterpreter == null)
1367        this.resultsInterpreter = new ArrayList<Reference>();
1368      this.resultsInterpreter.add(t);
1369      return t;
1370    }
1371
1372    public DiagnosticReport addResultsInterpreter(Reference t) { //3
1373      if (t == null)
1374        return this;
1375      if (this.resultsInterpreter == null)
1376        this.resultsInterpreter = new ArrayList<Reference>();
1377      this.resultsInterpreter.add(t);
1378      return this;
1379    }
1380
1381    /**
1382     * @return The first repetition of repeating field {@link #resultsInterpreter}, creating it if it does not already exist {3}
1383     */
1384    public Reference getResultsInterpreterFirstRep() { 
1385      if (getResultsInterpreter().isEmpty()) {
1386        addResultsInterpreter();
1387      }
1388      return getResultsInterpreter().get(0);
1389    }
1390
1391    /**
1392     * @return {@link #specimen} (Details about the specimens on which this diagnostic report is based.)
1393     */
1394    public List<Reference> getSpecimen() { 
1395      if (this.specimen == null)
1396        this.specimen = new ArrayList<Reference>();
1397      return this.specimen;
1398    }
1399
1400    /**
1401     * @return Returns a reference to <code>this</code> for easy method chaining
1402     */
1403    public DiagnosticReport setSpecimen(List<Reference> theSpecimen) { 
1404      this.specimen = theSpecimen;
1405      return this;
1406    }
1407
1408    public boolean hasSpecimen() { 
1409      if (this.specimen == null)
1410        return false;
1411      for (Reference item : this.specimen)
1412        if (!item.isEmpty())
1413          return true;
1414      return false;
1415    }
1416
1417    public Reference addSpecimen() { //3
1418      Reference t = new Reference();
1419      if (this.specimen == null)
1420        this.specimen = new ArrayList<Reference>();
1421      this.specimen.add(t);
1422      return t;
1423    }
1424
1425    public DiagnosticReport addSpecimen(Reference t) { //3
1426      if (t == null)
1427        return this;
1428      if (this.specimen == null)
1429        this.specimen = new ArrayList<Reference>();
1430      this.specimen.add(t);
1431      return this;
1432    }
1433
1434    /**
1435     * @return The first repetition of repeating field {@link #specimen}, creating it if it does not already exist {3}
1436     */
1437    public Reference getSpecimenFirstRep() { 
1438      if (getSpecimen().isEmpty()) {
1439        addSpecimen();
1440      }
1441      return getSpecimen().get(0);
1442    }
1443
1444    /**
1445     * @return {@link #result} ([Observations](observation.html)  that are part of this diagnostic report.)
1446     */
1447    public List<Reference> getResult() { 
1448      if (this.result == null)
1449        this.result = new ArrayList<Reference>();
1450      return this.result;
1451    }
1452
1453    /**
1454     * @return Returns a reference to <code>this</code> for easy method chaining
1455     */
1456    public DiagnosticReport setResult(List<Reference> theResult) { 
1457      this.result = theResult;
1458      return this;
1459    }
1460
1461    public boolean hasResult() { 
1462      if (this.result == null)
1463        return false;
1464      for (Reference item : this.result)
1465        if (!item.isEmpty())
1466          return true;
1467      return false;
1468    }
1469
1470    public Reference addResult() { //3
1471      Reference t = new Reference();
1472      if (this.result == null)
1473        this.result = new ArrayList<Reference>();
1474      this.result.add(t);
1475      return t;
1476    }
1477
1478    public DiagnosticReport addResult(Reference t) { //3
1479      if (t == null)
1480        return this;
1481      if (this.result == null)
1482        this.result = new ArrayList<Reference>();
1483      this.result.add(t);
1484      return this;
1485    }
1486
1487    /**
1488     * @return The first repetition of repeating field {@link #result}, creating it if it does not already exist {3}
1489     */
1490    public Reference getResultFirstRep() { 
1491      if (getResult().isEmpty()) {
1492        addResult();
1493      }
1494      return getResult().get(0);
1495    }
1496
1497    /**
1498     * @return {@link #note} (Comments about the diagnostic report.)
1499     */
1500    public List<Annotation> getNote() { 
1501      if (this.note == null)
1502        this.note = new ArrayList<Annotation>();
1503      return this.note;
1504    }
1505
1506    /**
1507     * @return Returns a reference to <code>this</code> for easy method chaining
1508     */
1509    public DiagnosticReport setNote(List<Annotation> theNote) { 
1510      this.note = theNote;
1511      return this;
1512    }
1513
1514    public boolean hasNote() { 
1515      if (this.note == null)
1516        return false;
1517      for (Annotation item : this.note)
1518        if (!item.isEmpty())
1519          return true;
1520      return false;
1521    }
1522
1523    public Annotation addNote() { //3
1524      Annotation t = new Annotation();
1525      if (this.note == null)
1526        this.note = new ArrayList<Annotation>();
1527      this.note.add(t);
1528      return t;
1529    }
1530
1531    public DiagnosticReport addNote(Annotation t) { //3
1532      if (t == null)
1533        return this;
1534      if (this.note == null)
1535        this.note = new ArrayList<Annotation>();
1536      this.note.add(t);
1537      return this;
1538    }
1539
1540    /**
1541     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1542     */
1543    public Annotation getNoteFirstRep() { 
1544      if (getNote().isEmpty()) {
1545        addNote();
1546      }
1547      return getNote().get(0);
1548    }
1549
1550    /**
1551     * @return {@link #study} (One or more links to full details of any study performed during the diagnostic investigation. An ImagingStudy might comprise a set of radiologic images obtained via a procedure that are analyzed as a group. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images. A GenomicStudy might comprise one or more analyses, each serving a specific purpose. These analyses may vary in method (e.g., karyotyping, CNV, or SNV detection), performer, software, devices used, or regions targeted.)
1552     */
1553    public List<Reference> getStudy() { 
1554      if (this.study == null)
1555        this.study = new ArrayList<Reference>();
1556      return this.study;
1557    }
1558
1559    /**
1560     * @return Returns a reference to <code>this</code> for easy method chaining
1561     */
1562    public DiagnosticReport setStudy(List<Reference> theStudy) { 
1563      this.study = theStudy;
1564      return this;
1565    }
1566
1567    public boolean hasStudy() { 
1568      if (this.study == null)
1569        return false;
1570      for (Reference item : this.study)
1571        if (!item.isEmpty())
1572          return true;
1573      return false;
1574    }
1575
1576    public Reference addStudy() { //3
1577      Reference t = new Reference();
1578      if (this.study == null)
1579        this.study = new ArrayList<Reference>();
1580      this.study.add(t);
1581      return t;
1582    }
1583
1584    public DiagnosticReport addStudy(Reference t) { //3
1585      if (t == null)
1586        return this;
1587      if (this.study == null)
1588        this.study = new ArrayList<Reference>();
1589      this.study.add(t);
1590      return this;
1591    }
1592
1593    /**
1594     * @return The first repetition of repeating field {@link #study}, creating it if it does not already exist {3}
1595     */
1596    public Reference getStudyFirstRep() { 
1597      if (getStudy().isEmpty()) {
1598        addStudy();
1599      }
1600      return getStudy().get(0);
1601    }
1602
1603    /**
1604     * @return {@link #supportingInfo} (This backbone element contains supporting information that was used in the creation of the report not included in the results already included in the report.)
1605     */
1606    public List<DiagnosticReportSupportingInfoComponent> getSupportingInfo() { 
1607      if (this.supportingInfo == null)
1608        this.supportingInfo = new ArrayList<DiagnosticReportSupportingInfoComponent>();
1609      return this.supportingInfo;
1610    }
1611
1612    /**
1613     * @return Returns a reference to <code>this</code> for easy method chaining
1614     */
1615    public DiagnosticReport setSupportingInfo(List<DiagnosticReportSupportingInfoComponent> theSupportingInfo) { 
1616      this.supportingInfo = theSupportingInfo;
1617      return this;
1618    }
1619
1620    public boolean hasSupportingInfo() { 
1621      if (this.supportingInfo == null)
1622        return false;
1623      for (DiagnosticReportSupportingInfoComponent item : this.supportingInfo)
1624        if (!item.isEmpty())
1625          return true;
1626      return false;
1627    }
1628
1629    public DiagnosticReportSupportingInfoComponent addSupportingInfo() { //3
1630      DiagnosticReportSupportingInfoComponent t = new DiagnosticReportSupportingInfoComponent();
1631      if (this.supportingInfo == null)
1632        this.supportingInfo = new ArrayList<DiagnosticReportSupportingInfoComponent>();
1633      this.supportingInfo.add(t);
1634      return t;
1635    }
1636
1637    public DiagnosticReport addSupportingInfo(DiagnosticReportSupportingInfoComponent t) { //3
1638      if (t == null)
1639        return this;
1640      if (this.supportingInfo == null)
1641        this.supportingInfo = new ArrayList<DiagnosticReportSupportingInfoComponent>();
1642      this.supportingInfo.add(t);
1643      return this;
1644    }
1645
1646    /**
1647     * @return The first repetition of repeating field {@link #supportingInfo}, creating it if it does not already exist {3}
1648     */
1649    public DiagnosticReportSupportingInfoComponent getSupportingInfoFirstRep() { 
1650      if (getSupportingInfo().isEmpty()) {
1651        addSupportingInfo();
1652      }
1653      return getSupportingInfo().get(0);
1654    }
1655
1656    /**
1657     * @return {@link #media} (A list of key images or data associated with this report. The images or data are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).)
1658     */
1659    public List<DiagnosticReportMediaComponent> getMedia() { 
1660      if (this.media == null)
1661        this.media = new ArrayList<DiagnosticReportMediaComponent>();
1662      return this.media;
1663    }
1664
1665    /**
1666     * @return Returns a reference to <code>this</code> for easy method chaining
1667     */
1668    public DiagnosticReport setMedia(List<DiagnosticReportMediaComponent> theMedia) { 
1669      this.media = theMedia;
1670      return this;
1671    }
1672
1673    public boolean hasMedia() { 
1674      if (this.media == null)
1675        return false;
1676      for (DiagnosticReportMediaComponent item : this.media)
1677        if (!item.isEmpty())
1678          return true;
1679      return false;
1680    }
1681
1682    public DiagnosticReportMediaComponent addMedia() { //3
1683      DiagnosticReportMediaComponent t = new DiagnosticReportMediaComponent();
1684      if (this.media == null)
1685        this.media = new ArrayList<DiagnosticReportMediaComponent>();
1686      this.media.add(t);
1687      return t;
1688    }
1689
1690    public DiagnosticReport addMedia(DiagnosticReportMediaComponent t) { //3
1691      if (t == null)
1692        return this;
1693      if (this.media == null)
1694        this.media = new ArrayList<DiagnosticReportMediaComponent>();
1695      this.media.add(t);
1696      return this;
1697    }
1698
1699    /**
1700     * @return The first repetition of repeating field {@link #media}, creating it if it does not already exist {3}
1701     */
1702    public DiagnosticReportMediaComponent getMediaFirstRep() { 
1703      if (getMedia().isEmpty()) {
1704        addMedia();
1705      }
1706      return getMedia().get(0);
1707    }
1708
1709    /**
1710     * @return {@link #composition} (Reference to a Composition resource instance that provides structure for organizing the contents of the DiagnosticReport.)
1711     */
1712    public Reference getComposition() { 
1713      if (this.composition == null)
1714        if (Configuration.errorOnAutoCreate())
1715          throw new Error("Attempt to auto-create DiagnosticReport.composition");
1716        else if (Configuration.doAutoCreate())
1717          this.composition = new Reference(); // cc
1718      return this.composition;
1719    }
1720
1721    public boolean hasComposition() { 
1722      return this.composition != null && !this.composition.isEmpty();
1723    }
1724
1725    /**
1726     * @param value {@link #composition} (Reference to a Composition resource instance that provides structure for organizing the contents of the DiagnosticReport.)
1727     */
1728    public DiagnosticReport setComposition(Reference value) { 
1729      this.composition = value;
1730      return this;
1731    }
1732
1733    /**
1734     * @return {@link #conclusion} (Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.). This is the underlying object with id, value and extensions. The accessor "getConclusion" gives direct access to the value
1735     */
1736    public MarkdownType getConclusionElement() { 
1737      if (this.conclusion == null)
1738        if (Configuration.errorOnAutoCreate())
1739          throw new Error("Attempt to auto-create DiagnosticReport.conclusion");
1740        else if (Configuration.doAutoCreate())
1741          this.conclusion = new MarkdownType(); // bb
1742      return this.conclusion;
1743    }
1744
1745    public boolean hasConclusionElement() { 
1746      return this.conclusion != null && !this.conclusion.isEmpty();
1747    }
1748
1749    public boolean hasConclusion() { 
1750      return this.conclusion != null && !this.conclusion.isEmpty();
1751    }
1752
1753    /**
1754     * @param value {@link #conclusion} (Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.). This is the underlying object with id, value and extensions. The accessor "getConclusion" gives direct access to the value
1755     */
1756    public DiagnosticReport setConclusionElement(MarkdownType value) { 
1757      this.conclusion = value;
1758      return this;
1759    }
1760
1761    /**
1762     * @return Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.
1763     */
1764    public String getConclusion() { 
1765      return this.conclusion == null ? null : this.conclusion.getValue();
1766    }
1767
1768    /**
1769     * @param value Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.
1770     */
1771    public DiagnosticReport setConclusion(String value) { 
1772      if (Utilities.noString(value))
1773        this.conclusion = null;
1774      else {
1775        if (this.conclusion == null)
1776          this.conclusion = new MarkdownType();
1777        this.conclusion.setValue(value);
1778      }
1779      return this;
1780    }
1781
1782    /**
1783     * @return {@link #conclusionCode} (One or more codes that represent the summary conclusion (interpretation/impression) of the diagnostic report.)
1784     */
1785    public List<CodeableConcept> getConclusionCode() { 
1786      if (this.conclusionCode == null)
1787        this.conclusionCode = new ArrayList<CodeableConcept>();
1788      return this.conclusionCode;
1789    }
1790
1791    /**
1792     * @return Returns a reference to <code>this</code> for easy method chaining
1793     */
1794    public DiagnosticReport setConclusionCode(List<CodeableConcept> theConclusionCode) { 
1795      this.conclusionCode = theConclusionCode;
1796      return this;
1797    }
1798
1799    public boolean hasConclusionCode() { 
1800      if (this.conclusionCode == null)
1801        return false;
1802      for (CodeableConcept item : this.conclusionCode)
1803        if (!item.isEmpty())
1804          return true;
1805      return false;
1806    }
1807
1808    public CodeableConcept addConclusionCode() { //3
1809      CodeableConcept t = new CodeableConcept();
1810      if (this.conclusionCode == null)
1811        this.conclusionCode = new ArrayList<CodeableConcept>();
1812      this.conclusionCode.add(t);
1813      return t;
1814    }
1815
1816    public DiagnosticReport addConclusionCode(CodeableConcept t) { //3
1817      if (t == null)
1818        return this;
1819      if (this.conclusionCode == null)
1820        this.conclusionCode = new ArrayList<CodeableConcept>();
1821      this.conclusionCode.add(t);
1822      return this;
1823    }
1824
1825    /**
1826     * @return The first repetition of repeating field {@link #conclusionCode}, creating it if it does not already exist {3}
1827     */
1828    public CodeableConcept getConclusionCodeFirstRep() { 
1829      if (getConclusionCode().isEmpty()) {
1830        addConclusionCode();
1831      }
1832      return getConclusionCode().get(0);
1833    }
1834
1835    /**
1836     * @return {@link #presentedForm} (Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.)
1837     */
1838    public List<Attachment> getPresentedForm() { 
1839      if (this.presentedForm == null)
1840        this.presentedForm = new ArrayList<Attachment>();
1841      return this.presentedForm;
1842    }
1843
1844    /**
1845     * @return Returns a reference to <code>this</code> for easy method chaining
1846     */
1847    public DiagnosticReport setPresentedForm(List<Attachment> thePresentedForm) { 
1848      this.presentedForm = thePresentedForm;
1849      return this;
1850    }
1851
1852    public boolean hasPresentedForm() { 
1853      if (this.presentedForm == null)
1854        return false;
1855      for (Attachment item : this.presentedForm)
1856        if (!item.isEmpty())
1857          return true;
1858      return false;
1859    }
1860
1861    public Attachment addPresentedForm() { //3
1862      Attachment t = new Attachment();
1863      if (this.presentedForm == null)
1864        this.presentedForm = new ArrayList<Attachment>();
1865      this.presentedForm.add(t);
1866      return t;
1867    }
1868
1869    public DiagnosticReport addPresentedForm(Attachment t) { //3
1870      if (t == null)
1871        return this;
1872      if (this.presentedForm == null)
1873        this.presentedForm = new ArrayList<Attachment>();
1874      this.presentedForm.add(t);
1875      return this;
1876    }
1877
1878    /**
1879     * @return The first repetition of repeating field {@link #presentedForm}, creating it if it does not already exist {3}
1880     */
1881    public Attachment getPresentedFormFirstRep() { 
1882      if (getPresentedForm().isEmpty()) {
1883        addPresentedForm();
1884      }
1885      return getPresentedForm().get(0);
1886    }
1887
1888      protected void listChildren(List<Property> children) {
1889        super.listChildren(children);
1890        children.add(new Property("identifier", "Identifier", "Identifiers assigned to this report by the performer or other systems.", 0, java.lang.Integer.MAX_VALUE, identifier));
1891        children.add(new Property("basedOn", "Reference(CarePlan|ImmunizationRecommendation|MedicationRequest|NutritionOrder|ServiceRequest)", "Details concerning a service requested.", 0, java.lang.Integer.MAX_VALUE, basedOn));
1892        children.add(new Property("status", "code", "The status of the diagnostic report.", 0, 1, status));
1893        children.add(new Property("category", "CodeableConcept", "A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.", 0, java.lang.Integer.MAX_VALUE, category));
1894        children.add(new Property("code", "CodeableConcept", "A code or name that describes this diagnostic report.", 0, 1, code));
1895        children.add(new Property("subject", "Reference(Patient|Group|Device|Location|Organization|Practitioner|Medication|Substance|BiologicallyDerivedProduct)", "The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources.", 0, 1, subject));
1896        children.add(new Property("encounter", "Reference(Encounter)", "The healthcare event  (e.g. a patient and healthcare provider interaction) which this DiagnosticReport is about.", 0, 1, encounter));
1897        children.add(new Property("effective[x]", "dateTime|Period", "The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective));
1898        children.add(new Property("issued", "instant", "The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.", 0, 1, issued));
1899        children.add(new Property("performer", "Reference(Practitioner|PractitionerRole|Organization|CareTeam)", "The diagnostic service that is responsible for issuing the report.", 0, java.lang.Integer.MAX_VALUE, performer));
1900        children.add(new Property("resultsInterpreter", "Reference(Practitioner|PractitionerRole|Organization|CareTeam)", "The practitioner or organization that is responsible for the report's conclusions and interpretations.", 0, java.lang.Integer.MAX_VALUE, resultsInterpreter));
1901        children.add(new Property("specimen", "Reference(Specimen)", "Details about the specimens on which this diagnostic report is based.", 0, java.lang.Integer.MAX_VALUE, specimen));
1902        children.add(new Property("result", "Reference(Observation)", "[Observations](observation.html)  that are part of this diagnostic report.", 0, java.lang.Integer.MAX_VALUE, result));
1903        children.add(new Property("note", "Annotation", "Comments about the diagnostic report.", 0, java.lang.Integer.MAX_VALUE, note));
1904        children.add(new Property("study", "Reference(GenomicStudy|ImagingStudy)", "One or more links to full details of any study performed during the diagnostic investigation. An ImagingStudy might comprise a set of radiologic images obtained via a procedure that are analyzed as a group. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images. A GenomicStudy might comprise one or more analyses, each serving a specific purpose. These analyses may vary in method (e.g., karyotyping, CNV, or SNV detection), performer, software, devices used, or regions targeted.", 0, java.lang.Integer.MAX_VALUE, study));
1905        children.add(new Property("supportingInfo", "", "This backbone element contains supporting information that was used in the creation of the report not included in the results already included in the report.", 0, java.lang.Integer.MAX_VALUE, supportingInfo));
1906        children.add(new Property("media", "", "A list of key images or data associated with this report. The images or data are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).", 0, java.lang.Integer.MAX_VALUE, media));
1907        children.add(new Property("composition", "Reference(Composition)", "Reference to a Composition resource instance that provides structure for organizing the contents of the DiagnosticReport.", 0, 1, composition));
1908        children.add(new Property("conclusion", "markdown", "Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.", 0, 1, conclusion));
1909        children.add(new Property("conclusionCode", "CodeableConcept", "One or more codes that represent the summary conclusion (interpretation/impression) of the diagnostic report.", 0, java.lang.Integer.MAX_VALUE, conclusionCode));
1910        children.add(new Property("presentedForm", "Attachment", "Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.", 0, java.lang.Integer.MAX_VALUE, presentedForm));
1911      }
1912
1913      @Override
1914      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1915        switch (_hash) {
1916        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Identifiers assigned to this report by the performer or other systems.", 0, java.lang.Integer.MAX_VALUE, identifier);
1917        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(CarePlan|ImmunizationRecommendation|MedicationRequest|NutritionOrder|ServiceRequest)", "Details concerning a service requested.", 0, java.lang.Integer.MAX_VALUE, basedOn);
1918        case -892481550: /*status*/  return new Property("status", "code", "The status of the diagnostic report.", 0, 1, status);
1919        case 50511102: /*category*/  return new Property("category", "CodeableConcept", "A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.", 0, java.lang.Integer.MAX_VALUE, category);
1920        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A code or name that describes this diagnostic report.", 0, 1, code);
1921        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group|Device|Location|Organization|Practitioner|Medication|Substance|BiologicallyDerivedProduct)", "The subject of the report. Usually, but not always, this is a patient. However, diagnostic services also perform analyses on specimens collected from a variety of other sources.", 0, 1, subject);
1922        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The healthcare event  (e.g. a patient and healthcare provider interaction) which this DiagnosticReport is about.", 0, 1, encounter);
1923        case 247104889: /*effective[x]*/  return new Property("effective[x]", "dateTime|Period", "The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective);
1924        case -1468651097: /*effective*/  return new Property("effective[x]", "dateTime|Period", "The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective);
1925        case -275306910: /*effectiveDateTime*/  return new Property("effective[x]", "dateTime", "The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective);
1926        case -403934648: /*effectivePeriod*/  return new Property("effective[x]", "Period", "The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective);
1927        case -1179159893: /*issued*/  return new Property("issued", "instant", "The date and time that this version of the report was made available to providers, typically after the report was reviewed and verified.", 0, 1, issued);
1928        case 481140686: /*performer*/  return new Property("performer", "Reference(Practitioner|PractitionerRole|Organization|CareTeam)", "The diagnostic service that is responsible for issuing the report.", 0, java.lang.Integer.MAX_VALUE, performer);
1929        case 2134944932: /*resultsInterpreter*/  return new Property("resultsInterpreter", "Reference(Practitioner|PractitionerRole|Organization|CareTeam)", "The practitioner or organization that is responsible for the report's conclusions and interpretations.", 0, java.lang.Integer.MAX_VALUE, resultsInterpreter);
1930        case -2132868344: /*specimen*/  return new Property("specimen", "Reference(Specimen)", "Details about the specimens on which this diagnostic report is based.", 0, java.lang.Integer.MAX_VALUE, specimen);
1931        case -934426595: /*result*/  return new Property("result", "Reference(Observation)", "[Observations](observation.html)  that are part of this diagnostic report.", 0, java.lang.Integer.MAX_VALUE, result);
1932        case 3387378: /*note*/  return new Property("note", "Annotation", "Comments about the diagnostic report.", 0, java.lang.Integer.MAX_VALUE, note);
1933        case 109776329: /*study*/  return new Property("study", "Reference(GenomicStudy|ImagingStudy)", "One or more links to full details of any study performed during the diagnostic investigation. An ImagingStudy might comprise a set of radiologic images obtained via a procedure that are analyzed as a group. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images. A GenomicStudy might comprise one or more analyses, each serving a specific purpose. These analyses may vary in method (e.g., karyotyping, CNV, or SNV detection), performer, software, devices used, or regions targeted.", 0, java.lang.Integer.MAX_VALUE, study);
1934        case 1922406657: /*supportingInfo*/  return new Property("supportingInfo", "", "This backbone element contains supporting information that was used in the creation of the report not included in the results already included in the report.", 0, java.lang.Integer.MAX_VALUE, supportingInfo);
1935        case 103772132: /*media*/  return new Property("media", "", "A list of key images or data associated with this report. The images or data are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).", 0, java.lang.Integer.MAX_VALUE, media);
1936        case -838923862: /*composition*/  return new Property("composition", "Reference(Composition)", "Reference to a Composition resource instance that provides structure for organizing the contents of the DiagnosticReport.", 0, 1, composition);
1937        case -1731259873: /*conclusion*/  return new Property("conclusion", "markdown", "Concise and clinically contextualized summary conclusion (interpretation/impression) of the diagnostic report.", 0, 1, conclusion);
1938        case -1731523412: /*conclusionCode*/  return new Property("conclusionCode", "CodeableConcept", "One or more codes that represent the summary conclusion (interpretation/impression) of the diagnostic report.", 0, java.lang.Integer.MAX_VALUE, conclusionCode);
1939        case 230090366: /*presentedForm*/  return new Property("presentedForm", "Attachment", "Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.", 0, java.lang.Integer.MAX_VALUE, presentedForm);
1940        default: return super.getNamedProperty(_hash, _name, _checkValid);
1941        }
1942
1943      }
1944
1945      @Override
1946      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1947        switch (hash) {
1948        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1949        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
1950        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DiagnosticReportStatus>
1951        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
1952        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1953        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1954        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
1955        case -1468651097: /*effective*/ return this.effective == null ? new Base[0] : new Base[] {this.effective}; // DataType
1956        case -1179159893: /*issued*/ return this.issued == null ? new Base[0] : new Base[] {this.issued}; // InstantType
1957        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // Reference
1958        case 2134944932: /*resultsInterpreter*/ return this.resultsInterpreter == null ? new Base[0] : this.resultsInterpreter.toArray(new Base[this.resultsInterpreter.size()]); // Reference
1959        case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : this.specimen.toArray(new Base[this.specimen.size()]); // Reference
1960        case -934426595: /*result*/ return this.result == null ? new Base[0] : this.result.toArray(new Base[this.result.size()]); // Reference
1961        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1962        case 109776329: /*study*/ return this.study == null ? new Base[0] : this.study.toArray(new Base[this.study.size()]); // Reference
1963        case 1922406657: /*supportingInfo*/ return this.supportingInfo == null ? new Base[0] : this.supportingInfo.toArray(new Base[this.supportingInfo.size()]); // DiagnosticReportSupportingInfoComponent
1964        case 103772132: /*media*/ return this.media == null ? new Base[0] : this.media.toArray(new Base[this.media.size()]); // DiagnosticReportMediaComponent
1965        case -838923862: /*composition*/ return this.composition == null ? new Base[0] : new Base[] {this.composition}; // Reference
1966        case -1731259873: /*conclusion*/ return this.conclusion == null ? new Base[0] : new Base[] {this.conclusion}; // MarkdownType
1967        case -1731523412: /*conclusionCode*/ return this.conclusionCode == null ? new Base[0] : this.conclusionCode.toArray(new Base[this.conclusionCode.size()]); // CodeableConcept
1968        case 230090366: /*presentedForm*/ return this.presentedForm == null ? new Base[0] : this.presentedForm.toArray(new Base[this.presentedForm.size()]); // Attachment
1969        default: return super.getProperty(hash, name, checkValid);
1970        }
1971
1972      }
1973
1974      @Override
1975      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1976        switch (hash) {
1977        case -1618432855: // identifier
1978          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1979          return value;
1980        case -332612366: // basedOn
1981          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
1982          return value;
1983        case -892481550: // status
1984          value = new DiagnosticReportStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1985          this.status = (Enumeration) value; // Enumeration<DiagnosticReportStatus>
1986          return value;
1987        case 50511102: // category
1988          this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1989          return value;
1990        case 3059181: // code
1991          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1992          return value;
1993        case -1867885268: // subject
1994          this.subject = TypeConvertor.castToReference(value); // Reference
1995          return value;
1996        case 1524132147: // encounter
1997          this.encounter = TypeConvertor.castToReference(value); // Reference
1998          return value;
1999        case -1468651097: // effective
2000          this.effective = TypeConvertor.castToType(value); // DataType
2001          return value;
2002        case -1179159893: // issued
2003          this.issued = TypeConvertor.castToInstant(value); // InstantType
2004          return value;
2005        case 481140686: // performer
2006          this.getPerformer().add(TypeConvertor.castToReference(value)); // Reference
2007          return value;
2008        case 2134944932: // resultsInterpreter
2009          this.getResultsInterpreter().add(TypeConvertor.castToReference(value)); // Reference
2010          return value;
2011        case -2132868344: // specimen
2012          this.getSpecimen().add(TypeConvertor.castToReference(value)); // Reference
2013          return value;
2014        case -934426595: // result
2015          this.getResult().add(TypeConvertor.castToReference(value)); // Reference
2016          return value;
2017        case 3387378: // note
2018          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
2019          return value;
2020        case 109776329: // study
2021          this.getStudy().add(TypeConvertor.castToReference(value)); // Reference
2022          return value;
2023        case 1922406657: // supportingInfo
2024          this.getSupportingInfo().add((DiagnosticReportSupportingInfoComponent) value); // DiagnosticReportSupportingInfoComponent
2025          return value;
2026        case 103772132: // media
2027          this.getMedia().add((DiagnosticReportMediaComponent) value); // DiagnosticReportMediaComponent
2028          return value;
2029        case -838923862: // composition
2030          this.composition = TypeConvertor.castToReference(value); // Reference
2031          return value;
2032        case -1731259873: // conclusion
2033          this.conclusion = TypeConvertor.castToMarkdown(value); // MarkdownType
2034          return value;
2035        case -1731523412: // conclusionCode
2036          this.getConclusionCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
2037          return value;
2038        case 230090366: // presentedForm
2039          this.getPresentedForm().add(TypeConvertor.castToAttachment(value)); // Attachment
2040          return value;
2041        default: return super.setProperty(hash, name, value);
2042        }
2043
2044      }
2045
2046      @Override
2047      public Base setProperty(String name, Base value) throws FHIRException {
2048        if (name.equals("identifier")) {
2049          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2050        } else if (name.equals("basedOn")) {
2051          this.getBasedOn().add(TypeConvertor.castToReference(value));
2052        } else if (name.equals("status")) {
2053          value = new DiagnosticReportStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2054          this.status = (Enumeration) value; // Enumeration<DiagnosticReportStatus>
2055        } else if (name.equals("category")) {
2056          this.getCategory().add(TypeConvertor.castToCodeableConcept(value));
2057        } else if (name.equals("code")) {
2058          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2059        } else if (name.equals("subject")) {
2060          this.subject = TypeConvertor.castToReference(value); // Reference
2061        } else if (name.equals("encounter")) {
2062          this.encounter = TypeConvertor.castToReference(value); // Reference
2063        } else if (name.equals("effective[x]")) {
2064          this.effective = TypeConvertor.castToType(value); // DataType
2065        } else if (name.equals("issued")) {
2066          this.issued = TypeConvertor.castToInstant(value); // InstantType
2067        } else if (name.equals("performer")) {
2068          this.getPerformer().add(TypeConvertor.castToReference(value));
2069        } else if (name.equals("resultsInterpreter")) {
2070          this.getResultsInterpreter().add(TypeConvertor.castToReference(value));
2071        } else if (name.equals("specimen")) {
2072          this.getSpecimen().add(TypeConvertor.castToReference(value));
2073        } else if (name.equals("result")) {
2074          this.getResult().add(TypeConvertor.castToReference(value));
2075        } else if (name.equals("note")) {
2076          this.getNote().add(TypeConvertor.castToAnnotation(value));
2077        } else if (name.equals("study")) {
2078          this.getStudy().add(TypeConvertor.castToReference(value));
2079        } else if (name.equals("supportingInfo")) {
2080          this.getSupportingInfo().add((DiagnosticReportSupportingInfoComponent) value);
2081        } else if (name.equals("media")) {
2082          this.getMedia().add((DiagnosticReportMediaComponent) value);
2083        } else if (name.equals("composition")) {
2084          this.composition = TypeConvertor.castToReference(value); // Reference
2085        } else if (name.equals("conclusion")) {
2086          this.conclusion = TypeConvertor.castToMarkdown(value); // MarkdownType
2087        } else if (name.equals("conclusionCode")) {
2088          this.getConclusionCode().add(TypeConvertor.castToCodeableConcept(value));
2089        } else if (name.equals("presentedForm")) {
2090          this.getPresentedForm().add(TypeConvertor.castToAttachment(value));
2091        } else
2092          return super.setProperty(name, value);
2093        return value;
2094      }
2095
2096      @Override
2097      public Base makeProperty(int hash, String name) throws FHIRException {
2098        switch (hash) {
2099        case -1618432855:  return addIdentifier(); 
2100        case -332612366:  return addBasedOn(); 
2101        case -892481550:  return getStatusElement();
2102        case 50511102:  return addCategory(); 
2103        case 3059181:  return getCode();
2104        case -1867885268:  return getSubject();
2105        case 1524132147:  return getEncounter();
2106        case 247104889:  return getEffective();
2107        case -1468651097:  return getEffective();
2108        case -1179159893:  return getIssuedElement();
2109        case 481140686:  return addPerformer(); 
2110        case 2134944932:  return addResultsInterpreter(); 
2111        case -2132868344:  return addSpecimen(); 
2112        case -934426595:  return addResult(); 
2113        case 3387378:  return addNote(); 
2114        case 109776329:  return addStudy(); 
2115        case 1922406657:  return addSupportingInfo(); 
2116        case 103772132:  return addMedia(); 
2117        case -838923862:  return getComposition();
2118        case -1731259873:  return getConclusionElement();
2119        case -1731523412:  return addConclusionCode(); 
2120        case 230090366:  return addPresentedForm(); 
2121        default: return super.makeProperty(hash, name);
2122        }
2123
2124      }
2125
2126      @Override
2127      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2128        switch (hash) {
2129        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2130        case -332612366: /*basedOn*/ return new String[] {"Reference"};
2131        case -892481550: /*status*/ return new String[] {"code"};
2132        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
2133        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
2134        case -1867885268: /*subject*/ return new String[] {"Reference"};
2135        case 1524132147: /*encounter*/ return new String[] {"Reference"};
2136        case -1468651097: /*effective*/ return new String[] {"dateTime", "Period"};
2137        case -1179159893: /*issued*/ return new String[] {"instant"};
2138        case 481140686: /*performer*/ return new String[] {"Reference"};
2139        case 2134944932: /*resultsInterpreter*/ return new String[] {"Reference"};
2140        case -2132868344: /*specimen*/ return new String[] {"Reference"};
2141        case -934426595: /*result*/ return new String[] {"Reference"};
2142        case 3387378: /*note*/ return new String[] {"Annotation"};
2143        case 109776329: /*study*/ return new String[] {"Reference"};
2144        case 1922406657: /*supportingInfo*/ return new String[] {};
2145        case 103772132: /*media*/ return new String[] {};
2146        case -838923862: /*composition*/ return new String[] {"Reference"};
2147        case -1731259873: /*conclusion*/ return new String[] {"markdown"};
2148        case -1731523412: /*conclusionCode*/ return new String[] {"CodeableConcept"};
2149        case 230090366: /*presentedForm*/ return new String[] {"Attachment"};
2150        default: return super.getTypesForProperty(hash, name);
2151        }
2152
2153      }
2154
2155      @Override
2156      public Base addChild(String name) throws FHIRException {
2157        if (name.equals("identifier")) {
2158          return addIdentifier();
2159        }
2160        else if (name.equals("basedOn")) {
2161          return addBasedOn();
2162        }
2163        else if (name.equals("status")) {
2164          throw new FHIRException("Cannot call addChild on a singleton property DiagnosticReport.status");
2165        }
2166        else if (name.equals("category")) {
2167          return addCategory();
2168        }
2169        else if (name.equals("code")) {
2170          this.code = new CodeableConcept();
2171          return this.code;
2172        }
2173        else if (name.equals("subject")) {
2174          this.subject = new Reference();
2175          return this.subject;
2176        }
2177        else if (name.equals("encounter")) {
2178          this.encounter = new Reference();
2179          return this.encounter;
2180        }
2181        else if (name.equals("effectiveDateTime")) {
2182          this.effective = new DateTimeType();
2183          return this.effective;
2184        }
2185        else if (name.equals("effectivePeriod")) {
2186          this.effective = new Period();
2187          return this.effective;
2188        }
2189        else if (name.equals("issued")) {
2190          throw new FHIRException("Cannot call addChild on a singleton property DiagnosticReport.issued");
2191        }
2192        else if (name.equals("performer")) {
2193          return addPerformer();
2194        }
2195        else if (name.equals("resultsInterpreter")) {
2196          return addResultsInterpreter();
2197        }
2198        else if (name.equals("specimen")) {
2199          return addSpecimen();
2200        }
2201        else if (name.equals("result")) {
2202          return addResult();
2203        }
2204        else if (name.equals("note")) {
2205          return addNote();
2206        }
2207        else if (name.equals("study")) {
2208          return addStudy();
2209        }
2210        else if (name.equals("supportingInfo")) {
2211          return addSupportingInfo();
2212        }
2213        else if (name.equals("media")) {
2214          return addMedia();
2215        }
2216        else if (name.equals("composition")) {
2217          this.composition = new Reference();
2218          return this.composition;
2219        }
2220        else if (name.equals("conclusion")) {
2221          throw new FHIRException("Cannot call addChild on a singleton property DiagnosticReport.conclusion");
2222        }
2223        else if (name.equals("conclusionCode")) {
2224          return addConclusionCode();
2225        }
2226        else if (name.equals("presentedForm")) {
2227          return addPresentedForm();
2228        }
2229        else
2230          return super.addChild(name);
2231      }
2232
2233  public String fhirType() {
2234    return "DiagnosticReport";
2235
2236  }
2237
2238      public DiagnosticReport copy() {
2239        DiagnosticReport dst = new DiagnosticReport();
2240        copyValues(dst);
2241        return dst;
2242      }
2243
2244      public void copyValues(DiagnosticReport dst) {
2245        super.copyValues(dst);
2246        if (identifier != null) {
2247          dst.identifier = new ArrayList<Identifier>();
2248          for (Identifier i : identifier)
2249            dst.identifier.add(i.copy());
2250        };
2251        if (basedOn != null) {
2252          dst.basedOn = new ArrayList<Reference>();
2253          for (Reference i : basedOn)
2254            dst.basedOn.add(i.copy());
2255        };
2256        dst.status = status == null ? null : status.copy();
2257        if (category != null) {
2258          dst.category = new ArrayList<CodeableConcept>();
2259          for (CodeableConcept i : category)
2260            dst.category.add(i.copy());
2261        };
2262        dst.code = code == null ? null : code.copy();
2263        dst.subject = subject == null ? null : subject.copy();
2264        dst.encounter = encounter == null ? null : encounter.copy();
2265        dst.effective = effective == null ? null : effective.copy();
2266        dst.issued = issued == null ? null : issued.copy();
2267        if (performer != null) {
2268          dst.performer = new ArrayList<Reference>();
2269          for (Reference i : performer)
2270            dst.performer.add(i.copy());
2271        };
2272        if (resultsInterpreter != null) {
2273          dst.resultsInterpreter = new ArrayList<Reference>();
2274          for (Reference i : resultsInterpreter)
2275            dst.resultsInterpreter.add(i.copy());
2276        };
2277        if (specimen != null) {
2278          dst.specimen = new ArrayList<Reference>();
2279          for (Reference i : specimen)
2280            dst.specimen.add(i.copy());
2281        };
2282        if (result != null) {
2283          dst.result = new ArrayList<Reference>();
2284          for (Reference i : result)
2285            dst.result.add(i.copy());
2286        };
2287        if (note != null) {
2288          dst.note = new ArrayList<Annotation>();
2289          for (Annotation i : note)
2290            dst.note.add(i.copy());
2291        };
2292        if (study != null) {
2293          dst.study = new ArrayList<Reference>();
2294          for (Reference i : study)
2295            dst.study.add(i.copy());
2296        };
2297        if (supportingInfo != null) {
2298          dst.supportingInfo = new ArrayList<DiagnosticReportSupportingInfoComponent>();
2299          for (DiagnosticReportSupportingInfoComponent i : supportingInfo)
2300            dst.supportingInfo.add(i.copy());
2301        };
2302        if (media != null) {
2303          dst.media = new ArrayList<DiagnosticReportMediaComponent>();
2304          for (DiagnosticReportMediaComponent i : media)
2305            dst.media.add(i.copy());
2306        };
2307        dst.composition = composition == null ? null : composition.copy();
2308        dst.conclusion = conclusion == null ? null : conclusion.copy();
2309        if (conclusionCode != null) {
2310          dst.conclusionCode = new ArrayList<CodeableConcept>();
2311          for (CodeableConcept i : conclusionCode)
2312            dst.conclusionCode.add(i.copy());
2313        };
2314        if (presentedForm != null) {
2315          dst.presentedForm = new ArrayList<Attachment>();
2316          for (Attachment i : presentedForm)
2317            dst.presentedForm.add(i.copy());
2318        };
2319      }
2320
2321      protected DiagnosticReport typedCopy() {
2322        return copy();
2323      }
2324
2325      @Override
2326      public boolean equalsDeep(Base other_) {
2327        if (!super.equalsDeep(other_))
2328          return false;
2329        if (!(other_ instanceof DiagnosticReport))
2330          return false;
2331        DiagnosticReport o = (DiagnosticReport) other_;
2332        return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(status, o.status, true)
2333           && compareDeep(category, o.category, true) && compareDeep(code, o.code, true) && compareDeep(subject, o.subject, true)
2334           && compareDeep(encounter, o.encounter, true) && compareDeep(effective, o.effective, true) && compareDeep(issued, o.issued, true)
2335           && compareDeep(performer, o.performer, true) && compareDeep(resultsInterpreter, o.resultsInterpreter, true)
2336           && compareDeep(specimen, o.specimen, true) && compareDeep(result, o.result, true) && compareDeep(note, o.note, true)
2337           && compareDeep(study, o.study, true) && compareDeep(supportingInfo, o.supportingInfo, true) && compareDeep(media, o.media, true)
2338           && compareDeep(composition, o.composition, true) && compareDeep(conclusion, o.conclusion, true)
2339           && compareDeep(conclusionCode, o.conclusionCode, true) && compareDeep(presentedForm, o.presentedForm, true)
2340          ;
2341      }
2342
2343      @Override
2344      public boolean equalsShallow(Base other_) {
2345        if (!super.equalsShallow(other_))
2346          return false;
2347        if (!(other_ instanceof DiagnosticReport))
2348          return false;
2349        DiagnosticReport o = (DiagnosticReport) other_;
2350        return compareValues(status, o.status, true) && compareValues(issued, o.issued, true) && compareValues(conclusion, o.conclusion, true)
2351          ;
2352      }
2353
2354      public boolean isEmpty() {
2355        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, status
2356          , category, code, subject, encounter, effective, issued, performer, resultsInterpreter
2357          , specimen, result, note, study, supportingInfo, media, composition, conclusion
2358          , conclusionCode, presentedForm);
2359      }
2360
2361  @Override
2362  public ResourceType getResourceType() {
2363    return ResourceType.DiagnosticReport;
2364   }
2365
2366 /**
2367   * Search parameter: <b>based-on</b>
2368   * <p>
2369   * Description: <b>Reference to the service request.</b><br>
2370   * Type: <b>reference</b><br>
2371   * Path: <b>DiagnosticReport.basedOn</b><br>
2372   * </p>
2373   */
2374  @SearchParamDefinition(name="based-on", path="DiagnosticReport.basedOn", description="Reference to the service request.", type="reference", target={CarePlan.class, ImmunizationRecommendation.class, MedicationRequest.class, NutritionOrder.class, ServiceRequest.class } )
2375  public static final String SP_BASED_ON = "based-on";
2376 /**
2377   * <b>Fluent Client</b> search parameter constant for <b>based-on</b>
2378   * <p>
2379   * Description: <b>Reference to the service request.</b><br>
2380   * Type: <b>reference</b><br>
2381   * Path: <b>DiagnosticReport.basedOn</b><br>
2382   * </p>
2383   */
2384  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON);
2385
2386/**
2387   * Constant for fluent queries to be used to add include statements. Specifies
2388   * the path value of "<b>DiagnosticReport:based-on</b>".
2389   */
2390  public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("DiagnosticReport:based-on").toLocked();
2391
2392 /**
2393   * Search parameter: <b>category</b>
2394   * <p>
2395   * Description: <b>Which diagnostic discipline/department created the report</b><br>
2396   * Type: <b>token</b><br>
2397   * Path: <b>DiagnosticReport.category</b><br>
2398   * </p>
2399   */
2400  @SearchParamDefinition(name="category", path="DiagnosticReport.category", description="Which diagnostic discipline/department created the report", type="token" )
2401  public static final String SP_CATEGORY = "category";
2402 /**
2403   * <b>Fluent Client</b> search parameter constant for <b>category</b>
2404   * <p>
2405   * Description: <b>Which diagnostic discipline/department created the report</b><br>
2406   * Type: <b>token</b><br>
2407   * Path: <b>DiagnosticReport.category</b><br>
2408   * </p>
2409   */
2410  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
2411
2412 /**
2413   * Search parameter: <b>conclusion</b>
2414   * <p>
2415   * Description: <b>A coded conclusion (interpretation/impression) on the report</b><br>
2416   * Type: <b>token</b><br>
2417   * Path: <b>DiagnosticReport.conclusionCode</b><br>
2418   * </p>
2419   */
2420  @SearchParamDefinition(name="conclusion", path="DiagnosticReport.conclusionCode", description="A coded conclusion (interpretation/impression) on the report", type="token" )
2421  public static final String SP_CONCLUSION = "conclusion";
2422 /**
2423   * <b>Fluent Client</b> search parameter constant for <b>conclusion</b>
2424   * <p>
2425   * Description: <b>A coded conclusion (interpretation/impression) on the report</b><br>
2426   * Type: <b>token</b><br>
2427   * Path: <b>DiagnosticReport.conclusionCode</b><br>
2428   * </p>
2429   */
2430  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONCLUSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONCLUSION);
2431
2432 /**
2433   * Search parameter: <b>issued</b>
2434   * <p>
2435   * Description: <b>When the report was issued</b><br>
2436   * Type: <b>date</b><br>
2437   * Path: <b>DiagnosticReport.issued</b><br>
2438   * </p>
2439   */
2440  @SearchParamDefinition(name="issued", path="DiagnosticReport.issued", description="When the report was issued", type="date" )
2441  public static final String SP_ISSUED = "issued";
2442 /**
2443   * <b>Fluent Client</b> search parameter constant for <b>issued</b>
2444   * <p>
2445   * Description: <b>When the report was issued</b><br>
2446   * Type: <b>date</b><br>
2447   * Path: <b>DiagnosticReport.issued</b><br>
2448   * </p>
2449   */
2450  public static final ca.uhn.fhir.rest.gclient.DateClientParam ISSUED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_ISSUED);
2451
2452 /**
2453   * Search parameter: <b>media</b>
2454   * <p>
2455   * Description: <b>A reference to the image source.</b><br>
2456   * Type: <b>reference</b><br>
2457   * Path: <b>DiagnosticReport.media.link</b><br>
2458   * </p>
2459   */
2460  @SearchParamDefinition(name="media", path="DiagnosticReport.media.link", description="A reference to the image source.", type="reference", target={DocumentReference.class } )
2461  public static final String SP_MEDIA = "media";
2462 /**
2463   * <b>Fluent Client</b> search parameter constant for <b>media</b>
2464   * <p>
2465   * Description: <b>A reference to the image source.</b><br>
2466   * Type: <b>reference</b><br>
2467   * Path: <b>DiagnosticReport.media.link</b><br>
2468   * </p>
2469   */
2470  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MEDIA = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MEDIA);
2471
2472/**
2473   * Constant for fluent queries to be used to add include statements. Specifies
2474   * the path value of "<b>DiagnosticReport:media</b>".
2475   */
2476  public static final ca.uhn.fhir.model.api.Include INCLUDE_MEDIA = new ca.uhn.fhir.model.api.Include("DiagnosticReport:media").toLocked();
2477
2478 /**
2479   * Search parameter: <b>performer</b>
2480   * <p>
2481   * Description: <b>Who is responsible for the report</b><br>
2482   * Type: <b>reference</b><br>
2483   * Path: <b>DiagnosticReport.performer</b><br>
2484   * </p>
2485   */
2486  @SearchParamDefinition(name="performer", path="DiagnosticReport.performer", description="Who is responsible for the report", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={CareTeam.class, Organization.class, Practitioner.class, PractitionerRole.class } )
2487  public static final String SP_PERFORMER = "performer";
2488 /**
2489   * <b>Fluent Client</b> search parameter constant for <b>performer</b>
2490   * <p>
2491   * Description: <b>Who is responsible for the report</b><br>
2492   * Type: <b>reference</b><br>
2493   * Path: <b>DiagnosticReport.performer</b><br>
2494   * </p>
2495   */
2496  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER);
2497
2498/**
2499   * Constant for fluent queries to be used to add include statements. Specifies
2500   * the path value of "<b>DiagnosticReport:performer</b>".
2501   */
2502  public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("DiagnosticReport:performer").toLocked();
2503
2504 /**
2505   * Search parameter: <b>result</b>
2506   * <p>
2507   * Description: <b>Link to an atomic result (observation resource)</b><br>
2508   * Type: <b>reference</b><br>
2509   * Path: <b>DiagnosticReport.result</b><br>
2510   * </p>
2511   */
2512  @SearchParamDefinition(name="result", path="DiagnosticReport.result", description="Link to an atomic result (observation resource)", type="reference", target={Observation.class } )
2513  public static final String SP_RESULT = "result";
2514 /**
2515   * <b>Fluent Client</b> search parameter constant for <b>result</b>
2516   * <p>
2517   * Description: <b>Link to an atomic result (observation resource)</b><br>
2518   * Type: <b>reference</b><br>
2519   * Path: <b>DiagnosticReport.result</b><br>
2520   * </p>
2521   */
2522  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RESULT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RESULT);
2523
2524/**
2525   * Constant for fluent queries to be used to add include statements. Specifies
2526   * the path value of "<b>DiagnosticReport:result</b>".
2527   */
2528  public static final ca.uhn.fhir.model.api.Include INCLUDE_RESULT = new ca.uhn.fhir.model.api.Include("DiagnosticReport:result").toLocked();
2529
2530 /**
2531   * Search parameter: <b>results-interpreter</b>
2532   * <p>
2533   * Description: <b>Who was the source of the report</b><br>
2534   * Type: <b>reference</b><br>
2535   * Path: <b>DiagnosticReport.resultsInterpreter</b><br>
2536   * </p>
2537   */
2538  @SearchParamDefinition(name="results-interpreter", path="DiagnosticReport.resultsInterpreter", description="Who was the source of the report", type="reference", target={CareTeam.class, Organization.class, Practitioner.class, PractitionerRole.class } )
2539  public static final String SP_RESULTS_INTERPRETER = "results-interpreter";
2540 /**
2541   * <b>Fluent Client</b> search parameter constant for <b>results-interpreter</b>
2542   * <p>
2543   * Description: <b>Who was the source of the report</b><br>
2544   * Type: <b>reference</b><br>
2545   * Path: <b>DiagnosticReport.resultsInterpreter</b><br>
2546   * </p>
2547   */
2548  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RESULTS_INTERPRETER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RESULTS_INTERPRETER);
2549
2550/**
2551   * Constant for fluent queries to be used to add include statements. Specifies
2552   * the path value of "<b>DiagnosticReport:results-interpreter</b>".
2553   */
2554  public static final ca.uhn.fhir.model.api.Include INCLUDE_RESULTS_INTERPRETER = new ca.uhn.fhir.model.api.Include("DiagnosticReport:results-interpreter").toLocked();
2555
2556 /**
2557   * Search parameter: <b>specimen</b>
2558   * <p>
2559   * Description: <b>The specimen details</b><br>
2560   * Type: <b>reference</b><br>
2561   * Path: <b>DiagnosticReport.specimen</b><br>
2562   * </p>
2563   */
2564  @SearchParamDefinition(name="specimen", path="DiagnosticReport.specimen", description="The specimen details", type="reference", target={Specimen.class } )
2565  public static final String SP_SPECIMEN = "specimen";
2566 /**
2567   * <b>Fluent Client</b> search parameter constant for <b>specimen</b>
2568   * <p>
2569   * Description: <b>The specimen details</b><br>
2570   * Type: <b>reference</b><br>
2571   * Path: <b>DiagnosticReport.specimen</b><br>
2572   * </p>
2573   */
2574  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SPECIMEN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SPECIMEN);
2575
2576/**
2577   * Constant for fluent queries to be used to add include statements. Specifies
2578   * the path value of "<b>DiagnosticReport:specimen</b>".
2579   */
2580  public static final ca.uhn.fhir.model.api.Include INCLUDE_SPECIMEN = new ca.uhn.fhir.model.api.Include("DiagnosticReport:specimen").toLocked();
2581
2582 /**
2583   * Search parameter: <b>status</b>
2584   * <p>
2585   * Description: <b>The status of the report</b><br>
2586   * Type: <b>token</b><br>
2587   * Path: <b>DiagnosticReport.status</b><br>
2588   * </p>
2589   */
2590  @SearchParamDefinition(name="status", path="DiagnosticReport.status", description="The status of the report", type="token" )
2591  public static final String SP_STATUS = "status";
2592 /**
2593   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2594   * <p>
2595   * Description: <b>The status of the report</b><br>
2596   * Type: <b>token</b><br>
2597   * Path: <b>DiagnosticReport.status</b><br>
2598   * </p>
2599   */
2600  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2601
2602 /**
2603   * Search parameter: <b>study</b>
2604   * <p>
2605   * Description: <b>Studies associated with the diagnostic report</b><br>
2606   * Type: <b>reference</b><br>
2607   * Path: <b>DiagnosticReport.study</b><br>
2608   * </p>
2609   */
2610  @SearchParamDefinition(name="study", path="DiagnosticReport.study", description="Studies associated with the diagnostic report", type="reference", target={GenomicStudy.class, ImagingStudy.class } )
2611  public static final String SP_STUDY = "study";
2612 /**
2613   * <b>Fluent Client</b> search parameter constant for <b>study</b>
2614   * <p>
2615   * Description: <b>Studies associated with the diagnostic report</b><br>
2616   * Type: <b>reference</b><br>
2617   * Path: <b>DiagnosticReport.study</b><br>
2618   * </p>
2619   */
2620  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam STUDY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_STUDY);
2621
2622/**
2623   * Constant for fluent queries to be used to add include statements. Specifies
2624   * the path value of "<b>DiagnosticReport:study</b>".
2625   */
2626  public static final ca.uhn.fhir.model.api.Include INCLUDE_STUDY = new ca.uhn.fhir.model.api.Include("DiagnosticReport:study").toLocked();
2627
2628 /**
2629   * Search parameter: <b>subject</b>
2630   * <p>
2631   * Description: <b>The subject of the report</b><br>
2632   * Type: <b>reference</b><br>
2633   * Path: <b>DiagnosticReport.subject</b><br>
2634   * </p>
2635   */
2636  @SearchParamDefinition(name="subject", path="DiagnosticReport.subject", description="The subject of the report", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={BiologicallyDerivedProduct.class, Device.class, Group.class, Location.class, Medication.class, Organization.class, Patient.class, Practitioner.class, Substance.class } )
2637  public static final String SP_SUBJECT = "subject";
2638 /**
2639   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
2640   * <p>
2641   * Description: <b>The subject of the report</b><br>
2642   * Type: <b>reference</b><br>
2643   * Path: <b>DiagnosticReport.subject</b><br>
2644   * </p>
2645   */
2646  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
2647
2648/**
2649   * Constant for fluent queries to be used to add include statements. Specifies
2650   * the path value of "<b>DiagnosticReport:subject</b>".
2651   */
2652  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("DiagnosticReport:subject").toLocked();
2653
2654 /**
2655   * Search parameter: <b>code</b>
2656   * <p>
2657   * Description: <b>Multiple Resources: 
2658
2659* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted
2660* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
2661* [AuditEvent](auditevent.html): More specific code for the event
2662* [Basic](basic.html): Kind of Resource
2663* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code
2664* [Condition](condition.html): Code for the condition
2665* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.
2666* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
2667* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result
2668* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
2669* [ImagingSelection](imagingselection.html): The imaging selection status
2670* [List](list.html): What the purpose of this list is
2671* [Medication](medication.html): Returns medications for a specific code
2672* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
2673* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
2674* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
2675* [MedicationStatement](medicationstatement.html): Return statements of this medication code
2676* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake
2677* [Observation](observation.html): The code of the observation type
2678* [Procedure](procedure.html): A code to identify a  procedure
2679* [RequestOrchestration](requestorchestration.html): The code of the request orchestration
2680* [Task](task.html): Search by task code
2681</b><br>
2682   * Type: <b>token</b><br>
2683   * Path: <b>AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code</b><br>
2684   * </p>
2685   */
2686  @SearchParamDefinition(name="code", path="AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted\r\n* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance\r\n* [AuditEvent](auditevent.html): More specific code for the event\r\n* [Basic](basic.html): Kind of Resource\r\n* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code\r\n* [Condition](condition.html): Code for the condition\r\n* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.\r\n* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered\r\n* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code\r\n* [ImagingSelection](imagingselection.html): The imaging selection status\r\n* [List](list.html): What the purpose of this list is\r\n* [Medication](medication.html): Returns medications for a specific code\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code\r\n* [MedicationStatement](medicationstatement.html): Return statements of this medication code\r\n* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake\r\n* [Observation](observation.html): The code of the observation type\r\n* [Procedure](procedure.html): A code to identify a  procedure\r\n* [RequestOrchestration](requestorchestration.html): The code of the request orchestration\r\n* [Task](task.html): Search by task code\r\n", type="token" )
2687  public static final String SP_CODE = "code";
2688 /**
2689   * <b>Fluent Client</b> search parameter constant for <b>code</b>
2690   * <p>
2691   * Description: <b>Multiple Resources: 
2692
2693* [AdverseEvent](adverseevent.html): Event or incident that occurred or was averted
2694* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
2695* [AuditEvent](auditevent.html): More specific code for the event
2696* [Basic](basic.html): Kind of Resource
2697* [ChargeItem](chargeitem.html): A code that identifies the charge, like a billing code
2698* [Condition](condition.html): Code for the condition
2699* [DetectedIssue](detectedissue.html): Issue Type, e.g. drug-drug, duplicate therapy, etc.
2700* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
2701* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result
2702* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
2703* [ImagingSelection](imagingselection.html): The imaging selection status
2704* [List](list.html): What the purpose of this list is
2705* [Medication](medication.html): Returns medications for a specific code
2706* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
2707* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
2708* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
2709* [MedicationStatement](medicationstatement.html): Return statements of this medication code
2710* [NutritionIntake](nutritionintake.html): Returns statements of this code of NutritionIntake
2711* [Observation](observation.html): The code of the observation type
2712* [Procedure](procedure.html): A code to identify a  procedure
2713* [RequestOrchestration](requestorchestration.html): The code of the request orchestration
2714* [Task](task.html): Search by task code
2715</b><br>
2716   * Type: <b>token</b><br>
2717   * Path: <b>AdverseEvent.code | AllergyIntolerance.code | AllergyIntolerance.reaction.substance | AuditEvent.code | Basic.code | ChargeItem.code | Condition.code | DetectedIssue.code | DeviceRequest.code.concept | DiagnosticReport.code | FamilyMemberHistory.condition.code | ImagingSelection.status | List.code | Medication.code | MedicationAdministration.medication.concept | MedicationDispense.medication.concept | MedicationRequest.medication.concept | MedicationStatement.medication.concept | NutritionIntake.code | Observation.code | Procedure.code | RequestOrchestration.code | Task.code</b><br>
2718   * </p>
2719   */
2720  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
2721
2722 /**
2723   * Search parameter: <b>date</b>
2724   * <p>
2725   * Description: <b>Multiple Resources: 
2726
2727* [AdverseEvent](adverseevent.html): When the event occurred
2728* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
2729* [Appointment](appointment.html): Appointment date/time.
2730* [AuditEvent](auditevent.html): Time when the event was recorded
2731* [CarePlan](careplan.html): Time period plan covers
2732* [CareTeam](careteam.html): A date within the coverage time period.
2733* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
2734* [Composition](composition.html): Composition editing time
2735* [Consent](consent.html): When consent was agreed to
2736* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
2737* [DocumentReference](documentreference.html): When this document reference was created
2738* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
2739* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
2740* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
2741* [Flag](flag.html): Time period when flag is active
2742* [Immunization](immunization.html): Vaccination  (non)-Administration Date
2743* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
2744* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
2745* [Invoice](invoice.html): Invoice date / posting date
2746* [List](list.html): When the list was prepared
2747* [MeasureReport](measurereport.html): The date of the measure report
2748* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
2749* [Observation](observation.html): Clinically relevant time/time-period for observation
2750* [Procedure](procedure.html): When the procedure occurred or is occurring
2751* [ResearchSubject](researchsubject.html): Start and end of participation
2752* [RiskAssessment](riskassessment.html): When was assessment made?
2753* [SupplyRequest](supplyrequest.html): When the request was made
2754</b><br>
2755   * Type: <b>date</b><br>
2756   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
2757   * </p>
2758   */
2759  @SearchParamDefinition(name="date", path="AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): When the event occurred\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [Appointment](appointment.html): Appointment date/time.\r\n* [AuditEvent](auditevent.html): Time when the event was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [DocumentReference](documentreference.html): When this document reference was created\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination  (non)-Administration Date\r\n* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created\r\n* [Invoice](invoice.html): Invoice date / posting date\r\n* [List](list.html): When the list was prepared\r\n* [MeasureReport](measurereport.html): The date of the measure report\r\n* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication\r\n* [Observation](observation.html): Clinically relevant time/time-period for observation\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [ResearchSubject](researchsubject.html): Start and end of participation\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" )
2760  public static final String SP_DATE = "date";
2761 /**
2762   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2763   * <p>
2764   * Description: <b>Multiple Resources: 
2765
2766* [AdverseEvent](adverseevent.html): When the event occurred
2767* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
2768* [Appointment](appointment.html): Appointment date/time.
2769* [AuditEvent](auditevent.html): Time when the event was recorded
2770* [CarePlan](careplan.html): Time period plan covers
2771* [CareTeam](careteam.html): A date within the coverage time period.
2772* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
2773* [Composition](composition.html): Composition editing time
2774* [Consent](consent.html): When consent was agreed to
2775* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
2776* [DocumentReference](documentreference.html): When this document reference was created
2777* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
2778* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
2779* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
2780* [Flag](flag.html): Time period when flag is active
2781* [Immunization](immunization.html): Vaccination  (non)-Administration Date
2782* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
2783* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
2784* [Invoice](invoice.html): Invoice date / posting date
2785* [List](list.html): When the list was prepared
2786* [MeasureReport](measurereport.html): The date of the measure report
2787* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
2788* [Observation](observation.html): Clinically relevant time/time-period for observation
2789* [Procedure](procedure.html): When the procedure occurred or is occurring
2790* [ResearchSubject](researchsubject.html): Start and end of participation
2791* [RiskAssessment](riskassessment.html): When was assessment made?
2792* [SupplyRequest](supplyrequest.html): When the request was made
2793</b><br>
2794   * Type: <b>date</b><br>
2795   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
2796   * </p>
2797   */
2798  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2799
2800 /**
2801   * Search parameter: <b>encounter</b>
2802   * <p>
2803   * Description: <b>Multiple Resources: 
2804
2805* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
2806* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
2807* [ChargeItem](chargeitem.html): Encounter associated with event
2808* [Claim](claim.html): Encounters associated with a billed line item
2809* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
2810* [Communication](communication.html): The Encounter during which this Communication was created
2811* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
2812* [Composition](composition.html): Context of the Composition
2813* [Condition](condition.html): The Encounter during which this Condition was created
2814* [DeviceRequest](devicerequest.html): Encounter during which request was created
2815* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
2816* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
2817* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
2818* [Flag](flag.html): Alert relevant during encounter
2819* [ImagingStudy](imagingstudy.html): The context of the study
2820* [List](list.html): Context in which list created
2821* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
2822* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
2823* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
2824* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
2825* [Observation](observation.html): Encounter related to the observation
2826* [Procedure](procedure.html): The Encounter during which this Procedure was created
2827* [Provenance](provenance.html): Encounter related to the Provenance
2828* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
2829* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
2830* [RiskAssessment](riskassessment.html): Where was assessment performed?
2831* [ServiceRequest](servicerequest.html): An encounter in which this request is made
2832* [Task](task.html): Search by encounter
2833* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
2834</b><br>
2835   * Type: <b>reference</b><br>
2836   * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br>
2837   * </p>
2838   */
2839  @SearchParamDefinition(name="encounter", path="AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter", description="Multiple Resources: \r\n\r\n* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent\r\n* [CarePlan](careplan.html): The Encounter during which this CarePlan was created\r\n* [ChargeItem](chargeitem.html): Encounter associated with event\r\n* [Claim](claim.html): Encounters associated with a billed line item\r\n* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created\r\n* [Communication](communication.html): The Encounter during which this Communication was created\r\n* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created\r\n* [Composition](composition.html): Context of the Composition\r\n* [Condition](condition.html): The Encounter during which this Condition was created\r\n* [DeviceRequest](devicerequest.html): Encounter during which request was created\r\n* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made\r\n* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values\r\n* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item\r\n* [Flag](flag.html): Alert relevant during encounter\r\n* [ImagingStudy](imagingstudy.html): The context of the study\r\n* [List](list.html): Context in which list created\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier\r\n* [Observation](observation.html): Encounter related to the observation\r\n* [Procedure](procedure.html): The Encounter during which this Procedure was created\r\n* [Provenance](provenance.html): Encounter related to the Provenance\r\n* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response\r\n* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to\r\n* [RiskAssessment](riskassessment.html): Where was assessment performed?\r\n* [ServiceRequest](servicerequest.html): An encounter in which this request is made\r\n* [Task](task.html): Search by encounter\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } )
2840  public static final String SP_ENCOUNTER = "encounter";
2841 /**
2842   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
2843   * <p>
2844   * Description: <b>Multiple Resources: 
2845
2846* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
2847* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
2848* [ChargeItem](chargeitem.html): Encounter associated with event
2849* [Claim](claim.html): Encounters associated with a billed line item
2850* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
2851* [Communication](communication.html): The Encounter during which this Communication was created
2852* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
2853* [Composition](composition.html): Context of the Composition
2854* [Condition](condition.html): The Encounter during which this Condition was created
2855* [DeviceRequest](devicerequest.html): Encounter during which request was created
2856* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
2857* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
2858* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
2859* [Flag](flag.html): Alert relevant during encounter
2860* [ImagingStudy](imagingstudy.html): The context of the study
2861* [List](list.html): Context in which list created
2862* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
2863* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
2864* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
2865* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
2866* [Observation](observation.html): Encounter related to the observation
2867* [Procedure](procedure.html): The Encounter during which this Procedure was created
2868* [Provenance](provenance.html): Encounter related to the Provenance
2869* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
2870* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
2871* [RiskAssessment](riskassessment.html): Where was assessment performed?
2872* [ServiceRequest](servicerequest.html): An encounter in which this request is made
2873* [Task](task.html): Search by encounter
2874* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
2875</b><br>
2876   * Type: <b>reference</b><br>
2877   * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br>
2878   * </p>
2879   */
2880  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
2881
2882/**
2883   * Constant for fluent queries to be used to add include statements. Specifies
2884   * the path value of "<b>DiagnosticReport:encounter</b>".
2885   */
2886  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("DiagnosticReport:encounter").toLocked();
2887
2888 /**
2889   * Search parameter: <b>identifier</b>
2890   * <p>
2891   * Description: <b>Multiple Resources: 
2892
2893* [Account](account.html): Account number
2894* [AdverseEvent](adverseevent.html): Business identifier for the event
2895* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2896* [Appointment](appointment.html): An Identifier of the Appointment
2897* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2898* [Basic](basic.html): Business identifier
2899* [BodyStructure](bodystructure.html): Bodystructure identifier
2900* [CarePlan](careplan.html): External Ids for this plan
2901* [CareTeam](careteam.html): External Ids for this team
2902* [ChargeItem](chargeitem.html): Business Identifier for item
2903* [Claim](claim.html): The primary identifier of the financial resource
2904* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2905* [ClinicalImpression](clinicalimpression.html): Business identifier
2906* [Communication](communication.html): Unique identifier
2907* [CommunicationRequest](communicationrequest.html): Unique identifier
2908* [Composition](composition.html): Version-independent identifier for the Composition
2909* [Condition](condition.html): A unique identifier of the condition record
2910* [Consent](consent.html): Identifier for this record (external references)
2911* [Contract](contract.html): The identity of the contract
2912* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2913* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2914* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2915* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2916* [DeviceRequest](devicerequest.html): Business identifier for request/order
2917* [DeviceUsage](deviceusage.html): Search by identifier
2918* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2919* [DocumentReference](documentreference.html): Identifier of the attachment binary
2920* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2921* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2922* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2923* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2924* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2925* [Flag](flag.html): Business identifier
2926* [Goal](goal.html): External Ids for this goal
2927* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2928* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2929* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2930* [Immunization](immunization.html): Business identifier
2931* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2932* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2933* [Invoice](invoice.html): Business Identifier for item
2934* [List](list.html): Business identifier
2935* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2936* [Medication](medication.html): Returns medications with this external identifier
2937* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2938* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2939* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2940* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2941* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2942* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2943* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2944* [Observation](observation.html): The unique id for a particular observation
2945* [Person](person.html): A person Identifier
2946* [Procedure](procedure.html): A unique identifier for a procedure
2947* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2948* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2949* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2950* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2951* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2952* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2953* [Specimen](specimen.html): The unique identifier associated with the specimen
2954* [SupplyDelivery](supplydelivery.html): External identifier
2955* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2956* [Task](task.html): Search for a task instance by its business identifier
2957* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2958</b><br>
2959   * Type: <b>token</b><br>
2960   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
2961   * </p>
2962   */
2963  @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
2964  public static final String SP_IDENTIFIER = "identifier";
2965 /**
2966   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2967   * <p>
2968   * Description: <b>Multiple Resources: 
2969
2970* [Account](account.html): Account number
2971* [AdverseEvent](adverseevent.html): Business identifier for the event
2972* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2973* [Appointment](appointment.html): An Identifier of the Appointment
2974* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2975* [Basic](basic.html): Business identifier
2976* [BodyStructure](bodystructure.html): Bodystructure identifier
2977* [CarePlan](careplan.html): External Ids for this plan
2978* [CareTeam](careteam.html): External Ids for this team
2979* [ChargeItem](chargeitem.html): Business Identifier for item
2980* [Claim](claim.html): The primary identifier of the financial resource
2981* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2982* [ClinicalImpression](clinicalimpression.html): Business identifier
2983* [Communication](communication.html): Unique identifier
2984* [CommunicationRequest](communicationrequest.html): Unique identifier
2985* [Composition](composition.html): Version-independent identifier for the Composition
2986* [Condition](condition.html): A unique identifier of the condition record
2987* [Consent](consent.html): Identifier for this record (external references)
2988* [Contract](contract.html): The identity of the contract
2989* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2990* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2991* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2992* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2993* [DeviceRequest](devicerequest.html): Business identifier for request/order
2994* [DeviceUsage](deviceusage.html): Search by identifier
2995* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2996* [DocumentReference](documentreference.html): Identifier of the attachment binary
2997* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2998* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2999* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3000* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
3001* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3002* [Flag](flag.html): Business identifier
3003* [Goal](goal.html): External Ids for this goal
3004* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
3005* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
3006* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
3007* [Immunization](immunization.html): Business identifier
3008* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
3009* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
3010* [Invoice](invoice.html): Business Identifier for item
3011* [List](list.html): Business identifier
3012* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
3013* [Medication](medication.html): Returns medications with this external identifier
3014* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3015* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3016* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3017* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
3018* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
3019* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
3020* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3021* [Observation](observation.html): The unique id for a particular observation
3022* [Person](person.html): A person Identifier
3023* [Procedure](procedure.html): A unique identifier for a procedure
3024* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
3025* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
3026* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
3027* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
3028* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3029* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3030* [Specimen](specimen.html): The unique identifier associated with the specimen
3031* [SupplyDelivery](supplydelivery.html): External identifier
3032* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3033* [Task](task.html): Search for a task instance by its business identifier
3034* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3035</b><br>
3036   * Type: <b>token</b><br>
3037   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
3038   * </p>
3039   */
3040  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3041
3042 /**
3043   * Search parameter: <b>patient</b>
3044   * <p>
3045   * Description: <b>Multiple Resources: 
3046
3047* [Account](account.html): The entity that caused the expenses
3048* [AdverseEvent](adverseevent.html): Subject impacted by event
3049* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3050* [Appointment](appointment.html): One of the individuals of the appointment is this patient
3051* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
3052* [AuditEvent](auditevent.html): Where the activity involved patient data
3053* [Basic](basic.html): Identifies the focus of this resource
3054* [BodyStructure](bodystructure.html): Who this is about
3055* [CarePlan](careplan.html): Who the care plan is for
3056* [CareTeam](careteam.html): Who care team is for
3057* [ChargeItem](chargeitem.html): Individual service was done for/to
3058* [Claim](claim.html): Patient receiving the products or services
3059* [ClaimResponse](claimresponse.html): The subject of care
3060* [ClinicalImpression](clinicalimpression.html): Patient assessed
3061* [Communication](communication.html): Focus of message
3062* [CommunicationRequest](communicationrequest.html): Focus of message
3063* [Composition](composition.html): Who and/or what the composition is about
3064* [Condition](condition.html): Who has the condition?
3065* [Consent](consent.html): Who the consent applies to
3066* [Contract](contract.html): The identity of the subject of the contract (if a patient)
3067* [Coverage](coverage.html): Retrieve coverages for a patient
3068* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
3069* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
3070* [DetectedIssue](detectedissue.html): Associated patient
3071* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3072* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
3073* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3074* [DocumentReference](documentreference.html): Who/what is the subject of the document
3075* [Encounter](encounter.html): The patient present at the encounter
3076* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
3077* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3078* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
3079* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3080* [Flag](flag.html): The identity of a subject to list flags for
3081* [Goal](goal.html): Who this goal is intended for
3082* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
3083* [ImagingSelection](imagingselection.html): Who the study is about
3084* [ImagingStudy](imagingstudy.html): Who the study is about
3085* [Immunization](immunization.html): The patient for the vaccination record
3086* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
3087* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
3088* [Invoice](invoice.html): Recipient(s) of goods and services
3089* [List](list.html): If all resources have the same subject
3090* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
3091* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3092* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3093* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3094* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
3095* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
3096* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
3097* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
3098* [Observation](observation.html): The subject that the observation is about (if patient)
3099* [Person](person.html): The Person links to this Patient
3100* [Procedure](procedure.html): Search by subject - a patient
3101* [Provenance](provenance.html): Where the activity involved patient data
3102* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
3103* [RelatedPerson](relatedperson.html): The patient this related person is related to
3104* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
3105* [ResearchSubject](researchsubject.html): Who or what is part of study
3106* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3107* [ServiceRequest](servicerequest.html): Search by subject - a patient
3108* [Specimen](specimen.html): The patient the specimen comes from
3109* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3110* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
3111* [Task](task.html): Search by patient
3112* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3113</b><br>
3114   * Type: <b>reference</b><br>
3115   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
3116   * </p>
3117   */
3118  @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", target={Patient.class } )
3119  public static final String SP_PATIENT = "patient";
3120 /**
3121   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
3122   * <p>
3123   * Description: <b>Multiple Resources: 
3124
3125* [Account](account.html): The entity that caused the expenses
3126* [AdverseEvent](adverseevent.html): Subject impacted by event
3127* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3128* [Appointment](appointment.html): One of the individuals of the appointment is this patient
3129* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
3130* [AuditEvent](auditevent.html): Where the activity involved patient data
3131* [Basic](basic.html): Identifies the focus of this resource
3132* [BodyStructure](bodystructure.html): Who this is about
3133* [CarePlan](careplan.html): Who the care plan is for
3134* [CareTeam](careteam.html): Who care team is for
3135* [ChargeItem](chargeitem.html): Individual service was done for/to
3136* [Claim](claim.html): Patient receiving the products or services
3137* [ClaimResponse](claimresponse.html): The subject of care
3138* [ClinicalImpression](clinicalimpression.html): Patient assessed
3139* [Communication](communication.html): Focus of message
3140* [CommunicationRequest](communicationrequest.html): Focus of message
3141* [Composition](composition.html): Who and/or what the composition is about
3142* [Condition](condition.html): Who has the condition?
3143* [Consent](consent.html): Who the consent applies to
3144* [Contract](contract.html): The identity of the subject of the contract (if a patient)
3145* [Coverage](coverage.html): Retrieve coverages for a patient
3146* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
3147* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
3148* [DetectedIssue](detectedissue.html): Associated patient
3149* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3150* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
3151* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3152* [DocumentReference](documentreference.html): Who/what is the subject of the document
3153* [Encounter](encounter.html): The patient present at the encounter
3154* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
3155* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3156* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
3157* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3158* [Flag](flag.html): The identity of a subject to list flags for
3159* [Goal](goal.html): Who this goal is intended for
3160* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
3161* [ImagingSelection](imagingselection.html): Who the study is about
3162* [ImagingStudy](imagingstudy.html): Who the study is about
3163* [Immunization](immunization.html): The patient for the vaccination record
3164* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
3165* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
3166* [Invoice](invoice.html): Recipient(s) of goods and services
3167* [List](list.html): If all resources have the same subject
3168* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
3169* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3170* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3171* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3172* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
3173* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
3174* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
3175* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
3176* [Observation](observation.html): The subject that the observation is about (if patient)
3177* [Person](person.html): The Person links to this Patient
3178* [Procedure](procedure.html): Search by subject - a patient
3179* [Provenance](provenance.html): Where the activity involved patient data
3180* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
3181* [RelatedPerson](relatedperson.html): The patient this related person is related to
3182* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
3183* [ResearchSubject](researchsubject.html): Who or what is part of study
3184* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3185* [ServiceRequest](servicerequest.html): Search by subject - a patient
3186* [Specimen](specimen.html): The patient the specimen comes from
3187* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3188* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
3189* [Task](task.html): Search by patient
3190* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3191</b><br>
3192   * Type: <b>reference</b><br>
3193   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
3194   * </p>
3195   */
3196  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
3197
3198/**
3199   * Constant for fluent queries to be used to add include statements. Specifies
3200   * the path value of "<b>DiagnosticReport:patient</b>".
3201   */
3202  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("DiagnosticReport:patient").toLocked();
3203
3204
3205}
3206