<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="59d794bb-1834-4178-8812-909ff449b7d2" />
  <meta>
    <versionId value="1" />
    <lastUpdated value="2023-10-23T14:27:56.434+00:00" />
    <source value="#V2ldNA9EA697QGYp" />
  </meta>
  <url value="https://health.gov.on.ca/idms/fhir/StructureDefinition/IDMS-ServiceRequest-Child-Submission" />
  <version value="1.0" />
  <name value="IDMSServiceRequestChildSubmission" />
  <status value="active" />
  <description value="This profile is for the Additional Information, Withdrawl and Reconsideration Requests.  These are child requests of a primary request." />
  <fhirVersion value="5.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="ServiceRequest" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/ServiceRequest" />
  <derivation value="constraint" />
  <differential>
    <element id="ServiceRequest.extension">
      <path value="ServiceRequest.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="ServiceRequest.extension:createdUser">
      <path value="ServiceRequest.extension" />
      <sliceName value="createdUser" />
      <definition value="#### **_`IDMS:  Link to the user that created the record.`_**" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/CreatedUser" />
      </type>
    </element>
    <element id="ServiceRequest.extension:createdDate">
      <path value="ServiceRequest.extension" />
      <sliceName value="createdDate" />
      <definition value="#### **_`IDMS:  Date and Time the record was created.`_**" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/CreatedDate" />
      </type>
    </element>
    <element id="ServiceRequest.extension:updatedUser">
      <path value="ServiceRequest.extension" />
      <sliceName value="updatedUser" />
      <definition value="#### **_`IDMS:  Link to the user that last updated the record.`_**" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/UpdatedUser" />
      </type>
    </element>
    <element id="ServiceRequest.extension:updatedDate">
      <path value="ServiceRequest.extension" />
      <sliceName value="updatedDate" />
      <definition value="#### **_`IDMS:  Date and Time the record was last updated.`_**" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/UpdatedDate" />
      </type>
    </element>
    <element id="ServiceRequest.extension:external">
      <path value="ServiceRequest.extension" />
      <sliceName value="externalIndicator" />
      <definition value="#### **_`IDMS: Indicates it was submitted by external portal.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Extension-ServiceRequest-External-Indicator" />
      </type>
    </element>
    <element id="ServiceRequest.identifier">
      <path value="ServiceRequest.identifier" />
      <short value="Primary File Number" />
      <definition value="#### **_`IDMS:  In the old system this is the Master File Number,  in the new system this has been renamed to the  Primary File Number.`_**" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.instantiatesCanonical">
      <path value="ServiceRequest.instantiatesCanonical" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.instantiatesUri">
      <path value="ServiceRequest.instantiatesUri" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.basedOn">
      <path value="ServiceRequest.basedOn" />
      <short value="Reference to Previous Requests" />
      <definition value="#### **_`IDMS:  Reference to a parent IDMS ServiceRequest.`_**\n" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/IDMS_ServiceRequest" />
      </type>
    </element>
    <element id="ServiceRequest.replaces">
      <path value="ServiceRequest.replaces" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.requisition">
      <path value="ServiceRequest.requisition" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.status">
      <path value="ServiceRequest.status" />
      <definition value="#### **_`IDMS: Status of Request,  we are required to use FHIR status codes . There is a statechart that translates these to IDMS business terms`_**" />
    </element>
    <element id="ServiceRequest.intent">
      <path value="ServiceRequest.intent" />
      <definition value="#### **_`IDMS: This is a fixed value of 'order` ._**" />
      <fixedCode value="order" />
    </element>
    <element id="ServiceRequest.category">
      <path value="ServiceRequest.category" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="coding.version" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Classifications of the request" />
      <definition value="#### **_`IDMS: Product Type , Submission Type  and Request Type .`_**" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:RequestType">
      <path value="ServiceRequest.category" />
      <sliceName value="RequestType" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:RequestType.coding.system">
      <path value="ServiceRequest.category.coding.system" />
      <min value="1" />
      <fixedUri value="https://health.gov.on.ca/idms/fhir/CodeSystem/IDMS-Internal" />
    </element>
    <element id="ServiceRequest.category:RequestType.coding.version">
      <path value="ServiceRequest.category.coding.version" />
      <short value="Type of Code" />
      <definition value="This being used as the discriminator,  it is the type of code.  (The version of the code system is not relevant in IDMS so this is being reused)" />
      <max value="0" />
      <fixedString value="RequestType" />
    </element>
    <element id="ServiceRequest.category:RequestType.coding.code">
      <path value="ServiceRequest.category.coding.code" />
      <binding>
        <strength value="required" />
        <description value="Child Request Types" />
        <valueSet value="https://health.gov.on.ca/idms/fhir/ValueSet/IDMS-Child-Request-Types" />
      </binding>
    </element>
    <element id="ServiceRequest.category:RequestType.coding.display">
      <path value="ServiceRequest.category.coding.display" />
      <short value="This is the display Value for the Request Type" />
    </element>
    <element id="ServiceRequest.category:RequestType.coding.userSelected">
      <path value="ServiceRequest.category.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:RequestType.text">
      <path value="ServiceRequest.category.text" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.priority">
      <path value="ServiceRequest.priority" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.doNotPerform">
      <path value="ServiceRequest.doNotPerform" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.code">
      <path value="ServiceRequest.code" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.orderDetail">
      <path value="ServiceRequest.orderDetail" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.quantity[x]">
      <path value="ServiceRequest.quantity[x]" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.subject">
      <path value="ServiceRequest.subject" />
      <short value="Manufacturer" />
      <definition value="#### **_`IDMS: Reference to the dummy Group.  IDMS does not need a subject but it is mandatory in FHIR so a link to a dummy group will be populated.`_**" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/IDMS_Group" />
      </type>
    </element>
    <element id="ServiceRequest.focus">
      <path value="ServiceRequest.focus" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.encounter">
      <path value="ServiceRequest.encounter" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.occurrence[x]">
      <path value="ServiceRequest.occurrence[x]" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.asNeeded[x]">
      <path value="ServiceRequest.asNeeded[x]" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.authoredOn">
      <path value="ServiceRequest.authoredOn" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.requester">
      <path value="ServiceRequest.requester" />
      <definition value="#### **_`IDMS: Who submitted the request, it is a reference to a IDMS_PractitionerRole .`_**" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/IDMS-PractitionerRole-Employee" />
        <targetProfile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/IDMS-PractitionerRole-Contact" />
      </type>
    </element>
    <element id="ServiceRequest.performerType">
      <path value="ServiceRequest.performerType" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.performer">
      <path value="ServiceRequest.performer" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.location">
      <path value="ServiceRequest.location" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.reason">
      <path value="ServiceRequest.reason" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.insurance">
      <path value="ServiceRequest.insurance" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.supportingInfo">
      <path value="ServiceRequest.supportingInfo" />
      <definition value="#### **_`IDMS: Submitting consent`_**" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.supportingInfo.concept">
      <path value="ServiceRequest.supportingInfo.concept" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.supportingInfo.reference">
      <path value="ServiceRequest.supportingInfo.reference" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.supportingInfo.reference.reference">
      <path value="ServiceRequest.supportingInfo.reference.reference" />
      <definition value="#### **_`IDMS: Reference to the Submitting Consent.`_**" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.supportingInfo.reference.type">
      <path value="ServiceRequest.supportingInfo.reference.type" />
      <definition value="#### **_`IDMS: For the Submitting consent this will be Consent.`_**" />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.supportingInfo.reference.identifier">
      <path value="ServiceRequest.supportingInfo.reference.identifier" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.supportingInfo.reference.display">
      <path value="ServiceRequest.supportingInfo.reference.display" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.specimen">
      <path value="ServiceRequest.specimen" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.bodySite">
      <path value="ServiceRequest.bodySite" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.bodyStructure">
      <path value="ServiceRequest.bodyStructure" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.note">
      <path value="ServiceRequest.note" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.patientInstruction">
      <path value="ServiceRequest.patientInstruction" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.relevantHistory">
      <path value="ServiceRequest.relevantHistory" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>