<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://fhir.clevermed.com/StructureDefinition/DocumentReference-BNet" />
  <name value="DocumentReference-BNet" />
  <status value="active" />
  <date value="2025-03-25T15:48:13.0371153Z" />
  <publisher value="Clevermed Ltd." />
  <contact>
    <name value="Clevermed BadgerNet Spine FHIR Team" />
    <telecom>
      <system value="email" />
      <value value="support@clevermed.com" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="One or more added PDF document or images associated with a BadgerNet Patient Episode.  These represet saved patient reports and ad-hoc document attachements to the patient record." />
  <copyright value="(c) Clevermed Ltd.  Usage by permission and for BadgerNet Spine Platform integration only." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="DocumentReference" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DocumentReference" />
  <derivation value="constraint" />
  <differential>
    <element id="DocumentReference.identifier">
      <path value="DocumentReference.identifier" />
      <short value="Resource identifier that links internally back to its source BadgerNet note entry" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DocumentReference.status">
      <path value="DocumentReference.status" />
      <short value="Always uses 'current' as status" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DocumentReference.status.coding.system">
      <path value="DocumentReference.status.coding.system" />
      <fixedUri value="http://hl7.org/fhir/ValueSet/document-reference-status" />
    </element>
    <element id="DocumentReference.status.coding.code">
      <path value="DocumentReference.status.coding.code" />
      <fixedString value="current" />
    </element>
    <element id="DocumentReference.status.coding.display">
      <path value="DocumentReference.status.coding.display" />
      <fixedString value="Current" />
    </element>
    <element id="DocumentReference.docStatus">
      <path value="DocumentReference.docStatus" />
      <short value="Always uses 'final' as docStatus" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DocumentReference.type">
      <path value="DocumentReference.type" />
      <short value="Always set as fied valxue.  BadgerNet currently does not store document type codes" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DocumentReference.category">
      <path value="DocumentReference.category" />
      <short value="BadgerNet Code for type of document note entry in the patient record" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.date">
      <path value="DocumentReference.date" />
      <short value="Time of related note in BadgerNet record or time of document list creation" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.context.encounter">
      <path value="DocumentReference.context.encounter" />
      <short value="A reference to the respective BadgerNet EpisodeOfCare - pregnancy, or any child episode" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://clevermed.com/fhir/" />
      </type>
    </element>
    <element id="DocumentReference.authenticator">
      <path value="DocumentReference.authenticator" />
      <short value="If avaialble and relevent, a Practitioner reference to the user that 'authorised' the creation of the document(s)" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://clevermed.com/fhir/" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.custodian">
      <path value="DocumentReference.custodian" />
      <short value="Reference link to the BadgerNet Care location that 'owns' this document as an Organisation Resource instance" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://clevermed.com/fhir/" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.description">
      <path value="DocumentReference.description" />
      <short value="Free text comments assocaited with the document(s)" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.context[1..n]">
      <path value="DocumentReference.context[1..n]" />
      <definition value="A list of 1..n elements that provide a URI link to the document source and associated mime type of the document" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.context[x].attachement.url">
      <path value="DocumentReference.context[x].attachement.url" />
      <short value="Unique document-specific URI where you can download the binary attachement file from" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.context[x].attachement.contentType">
      <path value="DocumentReference.context[x].attachement.contentType" />
      <short value="the MIME type of this attachement file" />
      <definition value="" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>