Package ca.uhn.fhir.model.dstu.resource

Source Code of ca.uhn.fhir.model.dstu.resource.DiagnosticReport$Image
















package ca.uhn.fhir.model.dstu.resource;


import java.util.Date;
import java.util.List;

import ca.uhn.fhir.model.api.BaseElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.DiagnosticReportStatusEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.StringDt;


/**
* HAPI/FHIR <b>DiagnosticReport</b> Resource
* (A Diagnostic report - a combination of request information, atomic results, images, interpretation, as well as formatted reports)
*
* <p>
* <b>Definition:</b>
* The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretation, and formatted representation of diagnostic reports
* </p>
*
* <p>
* <b>Requirements:</b>
* To support reporting for any diagnostic report into a clinical data repository.
* </p>
*
* <p>
* <b>Profile Definition:</b>
* <a href="http://hl7.org/fhir/profiles/DiagnosticReport">http://hl7.org/fhir/profiles/DiagnosticReport</a>
* </p>
*
*/
@ResourceDef(name="DiagnosticReport", profile="http://hl7.org/fhir/profiles/DiagnosticReport", id="diagnosticreport")
public class DiagnosticReport extends BaseResource implements IResource {

  /**
   * Search parameter constant for <b>status</b>
   * <p>
   * Description: <b>The status of the report</b><br/>
   * Type: <b>token</b><br/>
   * Path: <b>DiagnosticReport.status</b><br/>
   * </p>
   */
  public static final String SP_STATUS = "status";

  /**
   * Search parameter constant for <b>issued</b>
   * <p>
   * Description: <b>When the report was issued</b><br/>
   * Type: <b>date</b><br/>
   * Path: <b>DiagnosticReport.issued</b><br/>
   * </p>
   */
  public static final String SP_ISSUED = "issued";

  /**
   * Search parameter constant for <b>subject</b>
   * <p>
   * Description: <b>The subject of the report</b><br/>
   * Type: <b>reference</b><br/>
   * Path: <b>DiagnosticReport.subject</b><br/>
   * </p>
   */
  public static final String SP_SUBJECT = "subject";

  /**
   * Search parameter constant for <b>performer</b>
   * <p>
   * Description: <b>Who was the source of the report (organization)</b><br/>
   * Type: <b>reference</b><br/>
   * Path: <b>DiagnosticReport.performer</b><br/>
   * </p>
   */
  public static final String SP_PERFORMER = "performer";

  /**
   * Search parameter constant for <b>identifier</b>
   * <p>
   * Description: <b>An identifier for the report</b><br/>
   * Type: <b>token</b><br/>
   * Path: <b>DiagnosticReport.identifier</b><br/>
   * </p>
   */
  public static final String SP_IDENTIFIER = "identifier";

  /**
   * Search parameter constant for <b>service</b>
   * <p>
   * Description: <b>Which diagnostic discipline/department created the report</b><br/>
   * Type: <b>token</b><br/>
   * Path: <b>DiagnosticReport.serviceCategory</b><br/>
   * </p>
   */
  public static final String SP_SERVICE = "service";

  /**
   * Search parameter constant for <b>date</b>
   * <p>
   * Description: <b>The clinically relevant time of the report</b><br/>
   * Type: <b>date</b><br/>
   * Path: <b>DiagnosticReport.diagnostic[x]</b><br/>
   * </p>
   */
  public static final String SP_DATE = "date";

  /**
   * Search parameter constant for <b>specimen</b>
   * <p>
   * Description: <b>The specimen details</b><br/>
   * Type: <b>reference</b><br/>
   * Path: <b>DiagnosticReport.specimen</b><br/>
   * </p>
   */
  public static final String SP_SPECIMEN = "specimen";

  /**
   * Search parameter constant for <b>name</b>
   * <p>
   * Description: <b>The name of the report (e.g. the code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result)</b><br/>
   * Type: <b>token</b><br/>
   * Path: <b>DiagnosticReport.name</b><br/>
   * </p>
   */
  public static final String SP_NAME = "name";

  /**
   * Search parameter constant for <b>result</b>
   * <p>
   * Description: <b>Link to an atomic result (observation resource)</b><br/>
   * Type: <b>reference</b><br/>
   * Path: <b>DiagnosticReport.result</b><br/>
   * </p>
   */
  public static final String SP_RESULT = "result";

  /**
   * Search parameter constant for <b>diagnosis</b>
   * <p>
   * Description: <b>A coded diagnosis on the report</b><br/>
   * Type: <b>token</b><br/>
   * Path: <b>DiagnosticReport.codedDiagnosis</b><br/>
   * </p>
   */
  public static final String SP_DIAGNOSIS = "diagnosis";

  /**
   * Search parameter constant for <b>image</b>
   * <p>
   * Description: <b></b><br/>
   * Type: <b>reference</b><br/>
   * Path: <b>DiagnosticReport.image.link</b><br/>
   * </p>
   */
  public static final String SP_IMAGE = "image";

  /**
   * Search parameter constant for <b>request</b>
   * <p>
   * Description: <b></b><br/>
   * Type: <b>reference</b><br/>
   * Path: <b>DiagnosticReport.requestDetail</b><br/>
   * </p>
   */
  public static final String SP_REQUEST = "request";


  @Child(name="name", type=CodeableConceptDt.class, order=0, min=1, max=1
  @Description(
    shortDefinition="Name/Code for this diagnostic report",
    formalDefinition="A code or name that describes this diagnostic report"
  )
  private CodeableConceptDt myName;
 
  @Child(name="status", type=CodeDt.class, order=1, min=1, max=1
  @Description(
    shortDefinition="registered | partial | final | corrected +",
    formalDefinition="The status of the diagnostic report as a whole"
  )
  private BoundCodeDt<DiagnosticReportStatusEnum> myStatus;
 
  @Child(name="issued", type=DateTimeDt.class, order=2, min=1, max=1
  @Description(
    shortDefinition="Date this version was released",
    formalDefinition="The date and/or time that this version of the report was released from the source diagnostic service"
  )
  private DateTimeDt myIssued;
 
  @Child(name="subject", order=3, min=1, max=1, type={
    ca.uhn.fhir.model.dstu.resource.Patient.class,     ca.uhn.fhir.model.dstu.resource.Group.class,     ca.uhn.fhir.model.dstu.resource.Device.class,     ca.uhn.fhir.model.dstu.resource.Location.class  })
  @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"
  )
  private ResourceReferenceDt mySubject;
 
  @Child(name="performer", order=4, min=1, max=1, type={
    ca.uhn.fhir.model.dstu.resource.Practitioner.class,     ca.uhn.fhir.model.dstu.resource.Organization.class  })
  @Description(
    shortDefinition="Responsible Diagnostic Service",
    formalDefinition="The diagnostic service that is responsible for issuing the report"
  )
  private ResourceReferenceDt myPerformer;
 
  @Child(name="identifier", type=IdentifierDt.class, order=5, min=0, max=1
  @Description(
    shortDefinition="Id for external references to this report",
    formalDefinition="The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider"
  )
  private IdentifierDt myIdentifier;
 
  @Child(name="requestDetail", order=6, min=0, max=Child.MAX_UNLIMITED, type={
    ca.uhn.fhir.model.dstu.resource.DiagnosticOrder.class  })
  @Description(
    shortDefinition="What was requested",
    formalDefinition="Details concerning a test requested."
  )
  private java.util.List<ResourceReferenceDt> myRequestDetail;
 
  @Child(name="serviceCategory", type=CodeableConceptDt.class, order=7, min=0, max=1
  @Description(
    shortDefinition="Biochemistry, Hematology etc.",
    formalDefinition="The section of the diagnostic service that performs the examination e.g. biochemistry, hematology, MRI"
  )
  private CodeableConceptDt myServiceCategory;
 
  @Child(name="diagnostic", order=8, min=1, max=1, type={
    DateTimeDt.class,     PeriodDt.class  })
  @Description(
    shortDefinition="Physiologically Relevant time/time-period for report",
    formalDefinition="The time or time-period the observed values are related to. 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"
  )
  private IDatatype myDiagnostic;
 
  @Child(name="specimen", order=9, min=0, max=Child.MAX_UNLIMITED, type={
    ca.uhn.fhir.model.dstu.resource.Specimen.class  })
  @Description(
    shortDefinition="Specimens this report is based on",
    formalDefinition="Details about the specimens on which this Disagnostic report is based"
  )
  private java.util.List<ResourceReferenceDt> mySpecimen;
 
  @Child(name="result", order=10, min=0, max=Child.MAX_UNLIMITED, type={
    ca.uhn.fhir.model.dstu.resource.Observation.class  })
  @Description(
    shortDefinition="Observations - simple, or complex nested groups",
    formalDefinition="Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. \"atomic\" results), or they can be grouping observations that include references to other members of the group (e.g. \"panels\")"
  )
  private java.util.List<ResourceReferenceDt> myResult;
 
  @Child(name="imagingStudy", order=11, min=0, max=Child.MAX_UNLIMITED, type={
    ca.uhn.fhir.model.dstu.resource.ImagingStudy.class  })
  @Description(
    shortDefinition="Reference to full details of imaging associated with the diagnostic report",
    formalDefinition="One or more links to full details of any imaging performed during the diagnostic investigation. 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"
  )
  private java.util.List<ResourceReferenceDt> myImagingStudy;
 
  @Child(name="image", order=12, min=0, max=Child.MAX_UNLIMITED
  @Description(
    shortDefinition="Key images associated with this report",
    formalDefinition="A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)"
  )
  private java.util.List<Image> myImage;
 
  @Child(name="conclusion", type=StringDt.class, order=13, min=0, max=1
  @Description(
    shortDefinition="Clinical Interpretation of test results",
    formalDefinition="Concise and clinically contextualized narrative interpretation of the diagnostic report"
  )
  private StringDt myConclusion;
 
  @Child(name="codedDiagnosis", type=CodeableConceptDt.class, order=14, min=0, max=Child.MAX_UNLIMITED
  @Description(
    shortDefinition="Codes for the conclusion",
    formalDefinition=""
  )
  private java.util.List<CodeableConceptDt> myCodedDiagnosis;
 
  @Child(name="presentedForm", type=AttachmentDt.class, order=15, min=0, max=Child.MAX_UNLIMITED
  @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."
  )
  private java.util.List<AttachmentDt> myPresentedForm;
 

  @Override
  public boolean isEmpty() {
    return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmptymyName,  myStatus,  myIssued,  mySubject,  myPerformer,  myIdentifier,  myRequestDetail,  myServiceCategory,  myDiagnostic,  mySpecimen,  myResult,  myImagingStudy,  myImage,  myConclusion,  myCodedDiagnosis,  myPresentedForm);
  }
 
  @Override
  public java.util.List<IElement> getAllPopulatedChildElements() {
    return getAllPopulatedChildElementsOfType(null);
  }

  @Override
  public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
    return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myStatus, myIssued, mySubject, myPerformer, myIdentifier, myRequestDetail, myServiceCategory, myDiagnostic, mySpecimen, myResult, myImagingStudy, myImage, myConclusion, myCodedDiagnosis, myPresentedForm);
  }

  /**
   * Gets the value(s) for <b>name</b> (Name/Code for this diagnostic report).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * A code or name that describes this diagnostic report
     * </p>
   */
  public CodeableConceptDt getName() { 
    if (myName == null) {
      myName = new CodeableConceptDt();
    }
    return myName;
  }

  /**
   * Sets the value(s) for <b>name</b> (Name/Code for this diagnostic report)
   *
     * <p>
     * <b>Definition:</b>
     * A code or name that describes this diagnostic report
     * </p>
   */
  public DiagnosticReport setName(CodeableConceptDt theValue) {
    myName = theValue;
    return this;
  }

 
  /**
   * Gets the value(s) for <b>status</b> (registered | partial | final | corrected +).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * The status of the diagnostic report as a whole
     * </p>
   */
  public BoundCodeDt<DiagnosticReportStatusEnum> getStatus() { 
    if (myStatus == null) {
      myStatus = new BoundCodeDt<DiagnosticReportStatusEnum>(DiagnosticReportStatusEnum.VALUESET_BINDER);
    }
    return myStatus;
  }

  /**
   * Sets the value(s) for <b>status</b> (registered | partial | final | corrected +)
   *
     * <p>
     * <b>Definition:</b>
     * The status of the diagnostic report as a whole
     * </p>
   */
  public DiagnosticReport setStatus(BoundCodeDt<DiagnosticReportStatusEnum> theValue) {
    myStatus = theValue;
    return this;
  }

  /**
   * Sets the value(s) for <b>status</b> (registered | partial | final | corrected +)
   *
     * <p>
     * <b>Definition:</b>
     * The status of the diagnostic report as a whole
     * </p>
   */
  public DiagnosticReport setStatus(DiagnosticReportStatusEnum theValue) {
    getStatus().setValueAsEnum(theValue);
    return this;
  }

 
  /**
   * Gets the value(s) for <b>issued</b> (Date this version was released).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * The date and/or time that this version of the report was released from the source diagnostic service
     * </p>
   */
  public DateTimeDt getIssued() { 
    if (myIssued == null) {
      myIssued = new DateTimeDt();
    }
    return myIssued;
  }

  /**
   * Sets the value(s) for <b>issued</b> (Date this version was released)
   *
     * <p>
     * <b>Definition:</b>
     * The date and/or time that this version of the report was released from the source diagnostic service
     * </p>
   */
  public DiagnosticReport setIssued(DateTimeDt theValue) {
    myIssued = theValue;
    return this;
  }

   /**
   * Sets the value for <b>issued</b> (Date this version was released)
   *
     * <p>
     * <b>Definition:</b>
     * The date and/or time that this version of the report was released from the source diagnostic service
     * </p>
   */
  public DiagnosticReport setIssued( Date theDate,  TemporalPrecisionEnum thePrecision) {
    myIssued = new DateTimeDt(theDate, thePrecision);
    return this;
  }

  /**
   * Sets the value for <b>issued</b> (Date this version was released)
   *
     * <p>
     * <b>Definition:</b>
     * The date and/or time that this version of the report was released from the source diagnostic service
     * </p>
   */
  public DiagnosticReport setIssuedWithSecondsPrecision( Date theDate) {
    myIssued = new DateTimeDt(theDate);
    return this;
  }

  /**
   * Gets the value(s) for <b>subject</b> (The subject of the report, usually, but not always, the patient).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * 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
     * </p>
   */
  public ResourceReferenceDt getSubject() { 
    return mySubject;
  }

  /**
   * Sets the value(s) for <b>subject</b> (The subject of the report, usually, but not always, the patient)
   *
     * <p>
     * <b>Definition:</b>
     * 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
     * </p>
   */
  public DiagnosticReport setSubject(ResourceReferenceDt theValue) {
    mySubject = theValue;
    return this;
  }

 
  /**
   * Gets the value(s) for <b>performer</b> (Responsible Diagnostic Service).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * The diagnostic service that is responsible for issuing the report
     * </p>
   */
  public ResourceReferenceDt getPerformer() { 
    return myPerformer;
  }

  /**
   * Sets the value(s) for <b>performer</b> (Responsible Diagnostic Service)
   *
     * <p>
     * <b>Definition:</b>
     * The diagnostic service that is responsible for issuing the report
     * </p>
   */
  public DiagnosticReport setPerformer(ResourceReferenceDt theValue) {
    myPerformer = theValue;
    return this;
  }

 
  /**
   * Gets the value(s) for <b>identifier</b> (Id for external references to this report).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
     * </p>
   */
  public IdentifierDt getIdentifier() { 
    if (myIdentifier == null) {
      myIdentifier = new IdentifierDt();
    }
    return myIdentifier;
  }

  /**
   * Sets the value(s) for <b>identifier</b> (Id for external references to this report)
   *
     * <p>
     * <b>Definition:</b>
     * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
     * </p>
   */
  public DiagnosticReport setIdentifier(IdentifierDt theValue) {
    myIdentifier = theValue;
    return this;
  }

   /**
   * Sets the value for <b>identifier</b> (Id for external references to this report)
   *
     * <p>
     * <b>Definition:</b>
     * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
     * </p>
   */
  public DiagnosticReport setIdentifier( IdentifierUseEnum theUse,  String theSystem,  String theValue,  String theLabel) {
    myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
    return this;
  }

  /**
   * Sets the value for <b>identifier</b> (Id for external references to this report)
   *
     * <p>
     * <b>Definition:</b>
     * The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider
     * </p>
   */
  public DiagnosticReport setIdentifier( String theSystem,  String theValue) {
    myIdentifier = new IdentifierDt(theSystem, theValue);
    return this;
  }

  /**
   * Gets the value(s) for <b>requestDetail</b> (What was requested).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * Details concerning a test requested.
     * </p>
   */
  public java.util.List<ResourceReferenceDt> getRequestDetail() { 
    if (myRequestDetail == null) {
      myRequestDetail = new java.util.ArrayList<ResourceReferenceDt>();
    }
    return myRequestDetail;
  }

  /**
   * Sets the value(s) for <b>requestDetail</b> (What was requested)
   *
     * <p>
     * <b>Definition:</b>
     * Details concerning a test requested.
     * </p>
   */
  public DiagnosticReport setRequestDetail(java.util.List<ResourceReferenceDt> theValue) {
    myRequestDetail = theValue;
    return this;
  }

  /**
   * Adds and returns a new value for <b>requestDetail</b> (What was requested)
   *
     * <p>
     * <b>Definition:</b>
     * Details concerning a test requested.
     * </p>
   */
  public ResourceReferenceDt addRequestDetail() {
    ResourceReferenceDt newType = new ResourceReferenceDt();
    getRequestDetail().add(newType);
    return newType;
  }
 
  /**
   * Gets the value(s) for <b>serviceCategory</b> (Biochemistry, Hematology etc.).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * The section of the diagnostic service that performs the examination e.g. biochemistry, hematology, MRI
     * </p>
   */
  public CodeableConceptDt getServiceCategory() { 
    if (myServiceCategory == null) {
      myServiceCategory = new CodeableConceptDt();
    }
    return myServiceCategory;
  }

  /**
   * Sets the value(s) for <b>serviceCategory</b> (Biochemistry, Hematology etc.)
   *
     * <p>
     * <b>Definition:</b>
     * The section of the diagnostic service that performs the examination e.g. biochemistry, hematology, MRI
     * </p>
   */
  public DiagnosticReport setServiceCategory(CodeableConceptDt theValue) {
    myServiceCategory = theValue;
    return this;
  }

 
  /**
   * Gets the value(s) for <b>diagnostic[x]</b> (Physiologically Relevant time/time-period for report).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * The time or time-period the observed values are related to. 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
     * </p>
   */
  public IDatatype getDiagnostic() { 
    return myDiagnostic;
  }

  /**
   * Sets the value(s) for <b>diagnostic[x]</b> (Physiologically Relevant time/time-period for report)
   *
     * <p>
     * <b>Definition:</b>
     * The time or time-period the observed values are related to. 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
     * </p>
   */
  public DiagnosticReport setDiagnostic(IDatatype theValue) {
    myDiagnostic = theValue;
    return this;
  }

 
  /**
   * Gets the value(s) for <b>specimen</b> (Specimens this report is based on).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * Details about the specimens on which this Disagnostic report is based
     * </p>
   */
  public java.util.List<ResourceReferenceDt> getSpecimen() { 
    if (mySpecimen == null) {
      mySpecimen = new java.util.ArrayList<ResourceReferenceDt>();
    }
    return mySpecimen;
  }

  /**
   * Sets the value(s) for <b>specimen</b> (Specimens this report is based on)
   *
     * <p>
     * <b>Definition:</b>
     * Details about the specimens on which this Disagnostic report is based
     * </p>
   */
  public DiagnosticReport setSpecimen(java.util.List<ResourceReferenceDt> theValue) {
    mySpecimen = theValue;
    return this;
  }

  /**
   * Adds and returns a new value for <b>specimen</b> (Specimens this report is based on)
   *
     * <p>
     * <b>Definition:</b>
     * Details about the specimens on which this Disagnostic report is based
     * </p>
   */
  public ResourceReferenceDt addSpecimen() {
    ResourceReferenceDt newType = new ResourceReferenceDt();
    getSpecimen().add(newType);
    return newType;
  }
 
  /**
   * Gets the value(s) for <b>result</b> (Observations - simple, or complex nested groups).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. \"atomic\" results), or they can be grouping observations that include references to other members of the group (e.g. \"panels\")
     * </p>
   */
  public java.util.List<ResourceReferenceDt> getResult() { 
    if (myResult == null) {
      myResult = new java.util.ArrayList<ResourceReferenceDt>();
    }
    return myResult;
  }

  /**
   * Sets the value(s) for <b>result</b> (Observations - simple, or complex nested groups)
   *
     * <p>
     * <b>Definition:</b>
     * Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. \"atomic\" results), or they can be grouping observations that include references to other members of the group (e.g. \"panels\")
     * </p>
   */
  public DiagnosticReport setResult(java.util.List<ResourceReferenceDt> theValue) {
    myResult = theValue;
    return this;
  }

  /**
   * Adds and returns a new value for <b>result</b> (Observations - simple, or complex nested groups)
   *
     * <p>
     * <b>Definition:</b>
     * Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. \"atomic\" results), or they can be grouping observations that include references to other members of the group (e.g. \"panels\")
     * </p>
   */
  public ResourceReferenceDt addResult() {
    ResourceReferenceDt newType = new ResourceReferenceDt();
    getResult().add(newType);
    return newType;
  }
 
  /**
   * Gets the value(s) for <b>imagingStudy</b> (Reference to full details of imaging associated with the diagnostic report).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * One or more links to full details of any imaging performed during the diagnostic investigation. 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
     * </p>
   */
  public java.util.List<ResourceReferenceDt> getImagingStudy() { 
    if (myImagingStudy == null) {
      myImagingStudy = new java.util.ArrayList<ResourceReferenceDt>();
    }
    return myImagingStudy;
  }

  /**
   * Sets the value(s) for <b>imagingStudy</b> (Reference to full details of imaging associated with the diagnostic report)
   *
     * <p>
     * <b>Definition:</b>
     * One or more links to full details of any imaging performed during the diagnostic investigation. 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
     * </p>
   */
  public DiagnosticReport setImagingStudy(java.util.List<ResourceReferenceDt> theValue) {
    myImagingStudy = theValue;
    return this;
  }

  /**
   * Adds and returns a new value for <b>imagingStudy</b> (Reference to full details of imaging associated with the diagnostic report)
   *
     * <p>
     * <b>Definition:</b>
     * One or more links to full details of any imaging performed during the diagnostic investigation. 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
     * </p>
   */
  public ResourceReferenceDt addImagingStudy() {
    ResourceReferenceDt newType = new ResourceReferenceDt();
    getImagingStudy().add(newType);
    return newType;
  }
 
  /**
   * Gets the value(s) for <b>image</b> (Key images associated with this report).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)
     * </p>
   */
  public java.util.List<Image> getImage() { 
    if (myImage == null) {
      myImage = new java.util.ArrayList<Image>();
    }
    return myImage;
  }

  /**
   * Sets the value(s) for <b>image</b> (Key images associated with this report)
   *
     * <p>
     * <b>Definition:</b>
     * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)
     * </p>
   */
  public DiagnosticReport setImage(java.util.List<Image> theValue) {
    myImage = theValue;
    return this;
  }

  /**
   * Adds and returns a new value for <b>image</b> (Key images associated with this report)
   *
     * <p>
     * <b>Definition:</b>
     * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)
     * </p>
   */
  public Image addImage() {
    Image newType = new Image();
    getImage().add(newType);
    return newType;
  }

  /**
   * Gets the first repetition for <b>image</b> (Key images associated with this report),
   * creating it if it does not already exist.
   *
     * <p>
     * <b>Definition:</b>
     * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)
     * </p>
   */
  public Image getImageFirstRep() {
    if (getImage().isEmpty()) {
      return addImage();
    }
    return getImage().get(0);
  }
 
  /**
   * Gets the value(s) for <b>conclusion</b> (Clinical Interpretation of test results).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * Concise and clinically contextualized narrative interpretation of the diagnostic report
     * </p>
   */
  public StringDt getConclusion() { 
    if (myConclusion == null) {
      myConclusion = new StringDt();
    }
    return myConclusion;
  }

  /**
   * Sets the value(s) for <b>conclusion</b> (Clinical Interpretation of test results)
   *
     * <p>
     * <b>Definition:</b>
     * Concise and clinically contextualized narrative interpretation of the diagnostic report
     * </p>
   */
  public DiagnosticReport setConclusion(StringDt theValue) {
    myConclusion = theValue;
    return this;
  }

   /**
   * Sets the value for <b>conclusion</b> (Clinical Interpretation of test results)
   *
     * <p>
     * <b>Definition:</b>
     * Concise and clinically contextualized narrative interpretation of the diagnostic report
     * </p>
   */
  public DiagnosticReport setConclusion( String theString) {
    myConclusion = new StringDt(theString);
    return this;
  }

  /**
   * Gets the value(s) for <b>codedDiagnosis</b> (Codes for the conclusion).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     *
     * </p>
   */
  public java.util.List<CodeableConceptDt> getCodedDiagnosis() { 
    if (myCodedDiagnosis == null) {
      myCodedDiagnosis = new java.util.ArrayList<CodeableConceptDt>();
    }
    return myCodedDiagnosis;
  }

  /**
   * Sets the value(s) for <b>codedDiagnosis</b> (Codes for the conclusion)
   *
     * <p>
     * <b>Definition:</b>
     *
     * </p>
   */
  public DiagnosticReport setCodedDiagnosis(java.util.List<CodeableConceptDt> theValue) {
    myCodedDiagnosis = theValue;
    return this;
  }

  /**
   * Adds and returns a new value for <b>codedDiagnosis</b> (Codes for the conclusion)
   *
     * <p>
     * <b>Definition:</b>
     *
     * </p>
   */
  public CodeableConceptDt addCodedDiagnosis() {
    CodeableConceptDt newType = new CodeableConceptDt();
    getCodedDiagnosis().add(newType);
    return newType;
  }

  /**
   * Gets the first repetition for <b>codedDiagnosis</b> (Codes for the conclusion),
   * creating it if it does not already exist.
   *
     * <p>
     * <b>Definition:</b>
     *
     * </p>
   */
  public CodeableConceptDt getCodedDiagnosisFirstRep() {
    if (getCodedDiagnosis().isEmpty()) {
      return addCodedDiagnosis();
    }
    return getCodedDiagnosis().get(0);
  }
 
  /**
   * Gets the value(s) for <b>presentedForm</b> (Entire Report as issued).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
     * </p>
   */
  public java.util.List<AttachmentDt> getPresentedForm() { 
    if (myPresentedForm == null) {
      myPresentedForm = new java.util.ArrayList<AttachmentDt>();
    }
    return myPresentedForm;
  }

  /**
   * Sets the value(s) for <b>presentedForm</b> (Entire Report as issued)
   *
     * <p>
     * <b>Definition:</b>
     * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
     * </p>
   */
  public DiagnosticReport setPresentedForm(java.util.List<AttachmentDt> theValue) {
    myPresentedForm = theValue;
    return this;
  }

  /**
   * Adds and returns a new value for <b>presentedForm</b> (Entire Report as issued)
   *
     * <p>
     * <b>Definition:</b>
     * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
     * </p>
   */
  public AttachmentDt addPresentedForm() {
    AttachmentDt newType = new AttachmentDt();
    getPresentedForm().add(newType);
    return newType;
  }

  /**
   * Gets the first repetition for <b>presentedForm</b> (Entire Report as issued),
   * creating it if it does not already exist.
   *
     * <p>
     * <b>Definition:</b>
     * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.
     * </p>
   */
  public AttachmentDt getPresentedFormFirstRep() {
    if (getPresentedForm().isEmpty()) {
      return addPresentedForm();
    }
    return getPresentedForm().get(0);
  }
 
  /**
   * Block class for child element: <b>DiagnosticReport.image</b> (Key images associated with this report)
   *
     * <p>
     * <b>Definition:</b>
     * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)
     * </p>
   */
  @Block(name="DiagnosticReport.image"
  public static class Image extends BaseElement implements IResourceBlock {
 
  @Child(name="comment", type=StringDt.class, order=0, min=0, max=1
  @Description(
    shortDefinition="Comment about the image (e.g. explanation)",
    formalDefinition="A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features"
  )
  private StringDt myComment;
 
  @Child(name="link", order=1, min=1, max=1, type={
    ca.uhn.fhir.model.dstu.resource.Media.class  })
  @Description(
    shortDefinition="Reference to the image source",
    formalDefinition=""
  )
  private ResourceReferenceDt myLink;
 

  @Override
  public boolean isEmpty() {
    return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmptymyComment,  myLink);
  }
 
  @Override
  public java.util.List<IElement> getAllPopulatedChildElements() {
    return getAllPopulatedChildElementsOfType(null);
  }

  @Override
  public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
    return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myComment, myLink);
  }

  /**
   * Gets the value(s) for <b>comment</b> (Comment about the image (e.g. explanation)).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     * A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features
     * </p>
   */
  public StringDt getComment() { 
    if (myComment == null) {
      myComment = new StringDt();
    }
    return myComment;
  }

  /**
   * Sets the value(s) for <b>comment</b> (Comment about the image (e.g. explanation))
   *
     * <p>
     * <b>Definition:</b>
     * A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features
     * </p>
   */
  public Image setComment(StringDt theValue) {
    myComment = theValue;
    return this;
  }

   /**
   * Sets the value for <b>comment</b> (Comment about the image (e.g. explanation))
   *
     * <p>
     * <b>Definition:</b>
     * A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features
     * </p>
   */
  public Image setComment( String theString) {
    myComment = new StringDt(theString);
    return this;
  }

  /**
   * Gets the value(s) for <b>link</b> (Reference to the image source).
   * creating it if it does
   * not exist. Will not return <code>null</code>.
   *
     * <p>
     * <b>Definition:</b>
     *
     * </p>
   */
  public ResourceReferenceDt getLink() { 
    if (myLink == null) {
      myLink = new ResourceReferenceDt();
    }
    return myLink;
  }

  /**
   * Sets the value(s) for <b>link</b> (Reference to the image source)
   *
     * <p>
     * <b>Definition:</b>
     *
     * </p>
   */
  public Image setLink(ResourceReferenceDt theValue) {
    myLink = theValue;
    return this;
  }

 

  }




}
TOP

Related Classes of ca.uhn.fhir.model.dstu.resource.DiagnosticReport$Image

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.