<StructureDefinition xmlns="http://hl7.org/fhir">
  <meta>
    <lastUpdated value="2018-10-25T13:37:50.137+00:00" />
  </meta>
  <url value="http://apiframework.dedalus.eu/fhir/StructureDefinition/DiagnosticReport" />
  <name value="DiagnosticReport" />
  <title value="API Framework Diagnostic Report" />
  <status value="active" />
  <experimental value="false" />
  <date value="2018-10-25T13:37:49.9132595+00:00" />
  <description value="API Framework Core Profile for Diagnostic Report" />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="DiagnosticReport" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport" />
  <derivation value="constraint" />
  <differential>
    <element id="DiagnosticReport.id">
      <path value="DiagnosticReport.id" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.meta">
      <path value="DiagnosticReport.meta" />
      <type>
        <code value="Meta" />
        <profile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Meta-ForCommonConformance" />
      </type>
    </element>
    <element id="DiagnosticReport.text">
      <path value="DiagnosticReport.text" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.extension">
      <path value="DiagnosticReport.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="DiagnosticReport.extension:attachedDocument">
      <path value="DiagnosticReport.extension" />
      <sliceName value="attachedDocument" />
      <type>
        <code value="Extension" />
        <profile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/extension-diagnosticReport-attachedDocument" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.extension:attachedDocument.valueAttachment:valueAttachment.extension:documentReferenceMasterIdentifier">
      <path value="DiagnosticReport.extension.valueAttachment.extension" />
      <sliceName value="documentReferenceMasterIdentifier" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.extension:businessStatus">
      <path value="DiagnosticReport.extension" />
      <sliceName value="businessStatus" />
      <definition value="Contains business-specific nuances of the business state." />
      <requirements value="There's often a need to track substates of a diagnsotic report - this is often variable by specific workflow implementation. The businessStatus shall be coherent with the status element, providing additional information over that status." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/extension-resource-businessStatus" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier">
      <path value="DiagnosticReport.identifier" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.basedOn">
      <path value="DiagnosticReport.basedOn" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CarePlan" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/MedicationRequest" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/ProcedureRequest" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.status">
      <path value="DiagnosticReport.status" />
      <definition value="The status of the diagnostic report as a whole (considering the Status of the referenced Observation(s))" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.category">
      <path value="DiagnosticReport.category" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.code">
      <path value="DiagnosticReport.code" />
      <definition value="WARNING!.&#xD;&#xA;A code or name that describes this diagnostic report. Review it with different CodeSystem (not LOINC) for more high level definitions and scenarios coverage. (see tech page)" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://apiframework.dedalus.eu/fhir/ValueSet/AffinityDomainFormatCodes" />
        </valueSetReference>
      </binding>
    </element>
    <element id="DiagnosticReport.code.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="DiagnosticReport.code.text" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.subject">
      <path value="DiagnosticReport.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Patient" />
        <aggregation value="referenced" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.context">
      <path value="DiagnosticReport.context" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Encounter" />
        <aggregation value="referenced" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/EpisodeOfCare" />
        <aggregation value="referenced" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.issued">
      <path value="DiagnosticReport.issued" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer">
      <path value="DiagnosticReport.performer" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer.role">
      <path value="DiagnosticReport.performer.role" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://apiframework.dedalus.eu/fhir/ValueSet/DiagnosticReportPerformerRoles" />
        </valueSetReference>
      </binding>
    </element>
    <element id="DiagnosticReport.performer.actor">
      <path value="DiagnosticReport.performer.actor" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Practitioner" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Organization" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.specimen">
      <path value="DiagnosticReport.specimen" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Specimen" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.result">
      <path value="DiagnosticReport.result" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Observation" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.imagingStudy">
      <path value="DiagnosticReport.imagingStudy" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/ImagingStudy" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImagingManifest" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.image">
      <path value="DiagnosticReport.image" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.image.link">
      <path value="DiagnosticReport.image.link" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Media" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm">
      <path value="DiagnosticReport.presentedForm" />
      <type>
        <code value="Attachment" />
        <profile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Attachment" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm.extension:documentReferenceMasterIdentifier">
      <path value="DiagnosticReport.presentedForm.extension" />
      <sliceName value="documentReferenceMasterIdentifier" />
      <requirements value="Extension hosting document master itendifier information for attachments. This extension is meant to contain the same information in DocumentReference.masterIdentifier, it is used to provide redundant data into the linked Diagnosticreport instance for performance reasons." />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.presentedForm.extension:documentReferenceContentFormat">
      <path value="DiagnosticReport.presentedForm.extension" />
      <sliceName value="documentReferenceContentFormat" />
      <requirements value="Extension hosting format code information for attachments. This extension is meant to contain the same information in DocumentReference.content.format, it is used to provide redundant data into the linked Diagnosticreport instance for performance reasons." />
      <binding>
        <strength value="required" />
        <description value="Same as .code Element" />
        <valueSetUri value="http://apiframework.dedalus.eu/fhir/ValueSet/AffinityDomainFormatCodes" />
      </binding>
    </element>
    <element id="DiagnosticReport.presentedForm.contentType">
      <path value="DiagnosticReport.presentedForm.contentType" />
      <binding>
        <strength value="required" />
        <valueSetUri value="http://apiframework.dedalus.eu/fhir/ValueSet/AffinityDomainimeTypes" />
      </binding>
    </element>
  </differential>
</StructureDefinition>