<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="03377a26-2f34-4a81-94ba-eefb0eb15d72" />
  <meta>
    <versionId value="2" />
    <lastUpdated value="2023-10-24T14:25:42.361+00:00" />
    <source value="#4KusfayOiwBqqm7Q" />
  </meta>
  <url value="https://health.gov.on.ca/idms/fhir/StructureDefinition/IDMS-ServiceRequest-New" />
  <version value="1.0.0" />
  <name value="IDMSServiceRequestNew" />
  <status value="active" />
  <description value="This profile is for a Request that has not been submitted yet." />
  <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:requestManufacturer">
      <path value="ServiceRequest.extension" />
      <sliceName value="requestManufacturer" />
      <definition value="#### **_`IDMS:  This is the Manufacturer.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/RelatedManufacturer" />
      </type>
    </element>
    <element id="ServiceRequest.extension:submittingOrganization">
      <path value="ServiceRequest.extension" />
      <sliceName value="submittingOrganization" />
      <definition value="#### **_`IDMS:  This is the Submitting Organization,  most of the time it's the Manufacturer but it can also be a third party organization.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Extension-Submitting-Organization" />
      </type>
    </element>
    <element id="ServiceRequest.extension:thirdPartySubmitterIndicator">
      <path value="ServiceRequest.extension" />
      <sliceName value="thirdPartySubmitterIndicator" />
      <definition value="#### **_`IDMS:  Indicates a third party organization submitted the request instead of the manufacturer.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Extension-Third-Party-Submitter-Indicator" />
      </type>
    </element>
    <element id="ServiceRequest.extension:contactType">
      <path value="ServiceRequest.extension" />
      <sliceName value="contactType" />
      <definition value="#### **_`IDMS:  The type of Contact, either Manufacturer or Vendor.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Extension-Request-Contact-Type" />
      </type>
    </element>
    <element id="ServiceRequest.extension:medicinalProduct">
      <path value="ServiceRequest.extension" />
      <sliceName value="medicinalProduct" />
      <definition value="#### **_`IDMS: Reference to a MedicinalProductDefinition.  A request can have multiple references to medicinal products`_**" />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Extension-Included-Medicinal-Product" />
      </type>
    </element>
    <element id="ServiceRequest.extension:NOCAnticipatedDate">
      <path value="ServiceRequest.extension" />
      <sliceName value="NOCAnticipatedDate" />
      <definition value="#### **_`IDMS: Notice of Compliance Anticipated Date`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/NOC-Anticipated-Date" />
      </type>
    </element>
    <element id="ServiceRequest.extension:NOC">
      <path value="ServiceRequest.extension" />
      <sliceName value="NOC" />
      <definition value="#### **_`IDMS: Notice of Compliance Date and Control Number`_**" />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/NOC-Complex" />
      </type>
    </element>
    <element id="ServiceRequest.extension:productMonograph">
      <path value="ServiceRequest.extension" />
      <sliceName value="productMonograph" />
      <definition value="#### **_`IDMS: Product Monograph Date and Control Number`_**" />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Product-Monograph-Complex" />
      </type>
    </element>
    <element id="ServiceRequest.extension:streamlinedIndicator">
      <path value="ServiceRequest.extension" />
      <sliceName value="streamlinedIndicator" />
      <definition value="#### **_`IDMS: Streamlined Indicator`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Streamlined-Indicator" />
      </type>
    </element>
    <element id="ServiceRequest.extension:requestBusinessStatus">
      <path value="ServiceRequest.extension" />
      <sliceName value="requestBusinessStatus" />
      <definition value="#### **_`IDMS:  This is business status.`_**" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Extension-Request-Business-Status" />
      </type>
    </element>
    <element id="ServiceRequest.extension:indication">
      <path value="ServiceRequest.extension" />
      <sliceName value="indication" />
      <definition value="#### **_`IDMS:  Indication for the request.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Extension-Indication" />
      </type>
    </element>
    <element id="ServiceRequest.extension:externalIndication">
      <path value="ServiceRequest.extension" />
      <sliceName value="externalIndication" />
      <definition value="#### **_`IDMS:  External Indication for the request.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/StructureDefinition/Extension-External-Indication" />
      </type>
    </element>
    <element id="ServiceRequest.extension:submissionConsent">
      <path value="ServiceRequest.extension" />
      <sliceName value="submissionConsent" />
      <definition value="#### **_`IDMS:  The Terms Of Use Consent related to submitting this request.`_**" />
      <max value="0" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/RelatedSubmissionConsent" />
      </type>
    </element>
    <element id="ServiceRequest.extension:searchableExtraString">
      <path value="ServiceRequest.extension" />
      <sliceName value="searchableExtraString" />
      <definition value="#### **_`IDMS:  Used for doing multi element searches.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/SearchableExtraString" />
      </type>
    </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:migrationNotes">
      <path value="ServiceRequest.extension" />
      <sliceName value="migrationNotes" />
      <definition value="#### **_`IDMS:  Data that was migrated from DSTS that is no longer needed.`_**" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/MigrationNotes" />
      </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.extension:requestExternalStatus">
      <path value="ServiceRequest.extension" />
      <sliceName value="requestExternalStatus" />
      <definition value="#### **_`IDMS:  This is external status,  this is what external users see.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Extension-External-Status" />
      </type>
    </element>
    <element id="ServiceRequest.extension:requestBrandName">
      <path value="ServiceRequest.extension" />
      <sliceName value="requestBrandName" />
      <definition value="#### **_`IDMS:  Brand Name of the external product stored in the contained resource.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Extension-ServiceRequest-BrandName" />
      </type>
    </element>
    <element id="ServiceRequest.extension:externalUpdatedDate">
      <path value="ServiceRequest.extension" />
      <sliceName value="externalUpdatedDate" />
      <definition value="#### **_`IDMS: Last external facing update date.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/LastExternalDate" />
      </type>
    </element>
    <element id="ServiceRequest.extension:submissionDate">
      <path value="ServiceRequest.extension" />
      <sliceName value="submissionDate" />
      <definition value="#### **_`IDMS: External Submission Date.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/ExternalSubmissionDate" />
      </type>
    </element>
    <element id="ServiceRequest.extension:letterOfIntent">
      <path value="ServiceRequest.extension" />
      <sliceName value="letterOfIntentIndicator" />
      <definition value="#### **_`IDMS: Letter of Intent Indicator.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/LOI-Indicator" />
      </type>
    </element>
    <element id="ServiceRequest.extension:letterOfIntent">
      <path value="ServiceRequest.extension" />
      <sliceName value="availableActions" />
      <definition value="#### **_`IDMS: Avaiblable Actions with optional Expiry Dates.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/ServiceRequest-Available-Actions" />
      </type>
    </element>
    <element id="ServiceRequest.extension:businessArrangementLetter">
      <path value="ServiceRequest.extension" />
      <sliceName value="businessArrangementLetter" />
      <definition value="#### **_`IDMS: Business Arrangement Letter.  Multiple letters are permitted..`_**" />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Extension-Business-Arrangement-Letter" />
      </type>
    </element>
    <element id="ServiceRequest.extension:additionalInformationIndicator">
      <path value="ServiceRequest.extension" />
      <sliceName value="additionalInformationIndicator" />
      <definition value="#### **_`IDMS: Indicates additional information has been submitted. Used to determine external status`_**" />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Extension-additional-information-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.`_**" />
      <min value="1" />
    </element>
    <element id="ServiceRequest.identifier.extension">
      <path value="ServiceRequest.identifier.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.identifier.use">
      <path value="ServiceRequest.identifier.use" />
      <definition value="#### **_`IDMS: The Primary File number can change over time.  The current Primary File Number will have a use of 'offical',  previous Primary File Numbers will have a use of 'old'.`_**" />
      <min value="1" />
    </element>
    <element id="ServiceRequest.identifier.type">
      <path value="ServiceRequest.identifier.type" />
      <definition value="#### **_`IDMS: The type of request,  Primary, Additional Information or Reconsideration.    TO DO`_**" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.identifier.type.coding.system">
      <path value="ServiceRequest.identifier.type.coding.system" />
      <min value="1" />
    </element>
    <element id="ServiceRequest.identifier.type.coding.code">
      <path value="ServiceRequest.identifier.type.coding.code" />
      <min value="1" />
    </element>
    <element id="ServiceRequest.identifier.type.coding.display">
      <path value="ServiceRequest.identifier.type.coding.display" />
      <min value="1" />
    </element>
    <element id="ServiceRequest.identifier.system">
      <path value="ServiceRequest.identifier.system" />
      <short value="Primary File Number System" />
      <definition value="IDMS's Primary File Number System" />
      <min value="1" />
      <fixedUri value="urn:idms:request:primaryfilenumber" />
    </element>
    <element id="ServiceRequest.identifier.value">
      <path value="ServiceRequest.identifier.value" />
      <short value="Primary File Number" />
      <definition value="#### **_`IDMS:  Primary File Number.  The format is P12345678 ,  where P is static,  12345678 is a random number. Once it's submitted the submitted date is appended to the number : P12345678-2023-10-25.  `_**" />
      <min value="1" />
    </element>
    <element id="ServiceRequest.identifier.period">
      <path value="ServiceRequest.identifier.period" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.identifier.assigner">
      <path value="ServiceRequest.identifier.assigner" />
      <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" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.replaces">
      <path value="ServiceRequest.replaces" />
      <definition value="#### **_`IDMS: This is a ServiceRequest reference. The UI allows the user to link one submission to another, this is where that link is stored.  `_**" />
    </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.  The 'unknown' status are used for records that don't have all the required information to make it an 'active' record. Old 'unknown' records will be eventually be deleted.   `_**" />
    </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 .`_**" />
      <max value="6" />
    </element>
    <element id="ServiceRequest.category:RequestCategory">
      <path value="ServiceRequest.category" />
      <sliceName value="RequestCategory" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:RequestCategory.extension">
      <path value="ServiceRequest.category.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:RequestCategory.coding">
      <path value="ServiceRequest.category.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:RequestCategory.coding.extension">
      <path value="ServiceRequest.category.coding.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:RequestCategory.coding.system">
      <path value="ServiceRequest.category.coding.system" />
      <min value="1" />
      <fixedUri value="https://health.gov.on.ca/idms/fhir/CodeSystem/Internal-Request-Category-Types" />
    </element>
    <element id="ServiceRequest.category:RequestCategory.coding.version">
      <path value="ServiceRequest.category.coding.version" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:RequestCategory.coding.code">
      <path value="ServiceRequest.category.coding.code" />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="Request Category" />
        <valueSet value="https://health.gov.on.ca/idms/fhir/ValueSet/Request-Category" />
      </binding>
    </element>
    <element id="ServiceRequest.category:RequestCategory.coding.display">
      <path value="ServiceRequest.category.coding.display" />
      <min value="1" />
    </element>
    <element id="ServiceRequest.category:RequestCategory.coding.userSelected">
      <path value="ServiceRequest.category.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:RequestCategory.text">
      <path value="ServiceRequest.category.text" />
      <short value="Distinquishes this as the ProductType Code,  has a fixed value of 'ProductType'" />
      <max value="0" />
      <fixedString value="RequestCategory" />
    </element>
    <element id="ServiceRequest.category:ProductType">
      <path value="ServiceRequest.category" />
      <sliceName value="ProductType" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:ProductType.extension">
      <path value="ServiceRequest.category.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:ProductType.coding">
      <path value="ServiceRequest.category.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:ProductType.coding.extension">
      <path value="ServiceRequest.category.coding.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:ProductType.coding.system">
      <path value="ServiceRequest.category.coding.system" />
      <short value="IDMS Product Submission Code System" />
      <min value="1" />
      <fixedUri value="https://health.gov.on.ca/idms/fhir/CodeSystem/Internal-Product-Types" />
    </element>
    <element id="ServiceRequest.category:ProductType.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="ProductType" />
    </element>
    <element id="ServiceRequest.category:ProductType.coding.code">
      <path value="ServiceRequest.category.coding.code" />
      <short value="This is the Product Type Code" />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="List of Product Types" />
        <valueSet value="https://health.gov.on.ca/idms/fhir/ValueSet/IDMS-Product-Types" />
      </binding>
    </element>
    <element id="ServiceRequest.category:ProductType.coding.display">
      <path value="ServiceRequest.category.coding.display" />
      <short value="Display Value for the Product Type code" />
      <min value="1" />
    </element>
    <element id="ServiceRequest.category:ProductType.coding.userSelected">
      <path value="ServiceRequest.category.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:ProductType.text">
      <path value="ServiceRequest.category.text" />
      <short value="Distinquishes this as the ProductType Code,  has a fixed value of 'ProductType'" />
      <max value="0" />
      <fixedString value="ProductType" />
    </element>
    <element id="ServiceRequest.category:SubmissionType">
      <path value="ServiceRequest.category" />
      <sliceName value="SubmissionType" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:SubmissionType.extension">
      <path value="ServiceRequest.category.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:SubmissionType.coding">
      <path value="ServiceRequest.category.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:SubmissionType.coding.extension">
      <path value="ServiceRequest.category.coding.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:SubmissionType.coding.system">
      <path value="ServiceRequest.category.coding.system" />
      <min value="1" />
      <fixedUri value="https://health.gov.on.ca/idms/fhir/CodeSystem/Internal-Submission-Types" />
    </element>
    <element id="ServiceRequest.category:SubmissionType.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="SubmissionType" />
    </element>
    <element id="ServiceRequest.category:SubmissionType.coding.code">
      <path value="ServiceRequest.category.coding.code" />
      <short value="This is the Submission Code" />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="Submission Types" />
        <valueSet value="https://health.gov.on.ca/idms/fhir/ValueSet/IDMS-Submission-Types" />
      </binding>
    </element>
    <element id="ServiceRequest.category:SubmissionType.coding.display">
      <path value="ServiceRequest.category.coding.display" />
      <short value="This is the display Value for the Submission Code" />
      <min value="1" />
    </element>
    <element id="ServiceRequest.category:SubmissionType.coding.userSelected">
      <path value="ServiceRequest.category.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:SubmissionType.text">
      <path value="ServiceRequest.category.text" />
      <short value="Distinquishes this as the SubmissionType Code,  has a fixed value of 'SubmissionType'" />
      <max value="0" />
      <fixedString value="SubmissionType" />
    </element>
    <element id="ServiceRequest.category:RequestType">
      <path value="ServiceRequest.category" />
      <sliceName value="RequestType" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:RequestType.extension">
      <path value="ServiceRequest.category.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:RequestType.coding">
      <path value="ServiceRequest.category.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:RequestType.coding.extension">
      <path value="ServiceRequest.category.coding.extension" />
      <max value="0" />
    </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" />
      <min value="1" />
      <fixedString value="REQUEST-TYPE-INITIAL" />
      <binding>
        <strength value="required" />
        <description value="Request Types" />
        <valueSet value="https://health.gov.on.ca/idms/fhir/ValueSet/IDMS-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" />
      <min value="1" />
    </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.category:ReviewPathway">
      <path value="ServiceRequest.category" />
      <sliceName value="ReviewPathway" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:ReviewPathway.extension">
      <path value="ServiceRequest.category.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:ReviewPathway.coding">
      <path value="ServiceRequest.category.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:ReviewPathway.coding.extension">
      <path value="ServiceRequest.category.coding.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:ReviewPathway.coding.system">
      <path value="ServiceRequest.category.coding.system" />
      <min value="1" />
      <fixedUri value="https://health.gov.on.ca/idms/fhir/CodeSystem/Drug-Review-Pathway" />
    </element>
    <element id="ServiceRequest.category:ReviewPathway.coding.version">
      <path value="ServiceRequest.category.coding.version" />
      <short value="Type of Code" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:ReviewPathway.coding.code">
      <path value="ServiceRequest.category.coding.code" />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="Request Types" />
        <valueSet value="https://health.gov.on.ca/idms/fhir/CodeSystem/Drug-Review-Pathway" />
      </binding>
    </element>
    <element id="ServiceRequest.category:ReviewPathway.coding.display">
      <path value="ServiceRequest.category.coding.display" />
      <short value="This is the display Value for the Request Type" />
      <min value="1" />
    </element>
    <element id="ServiceRequest.category:ReviewPathway.coding.userSelected">
      <path value="ServiceRequest.category.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:ReviewPathway.text">
      <path value="ServiceRequest.category.text" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:GenericClassification">
      <path value="ServiceRequest.category" />
      <sliceName value="GenericClassification" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:GenericClassification.extension">
      <path value="ServiceRequest.category.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:GenericClassification.coding">
      <path value="ServiceRequest.category.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="ServiceRequest.category:GenericClassification.coding.extension">
      <path value="ServiceRequest.category.coding.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:GenericClassification.coding.system">
      <path value="ServiceRequest.category.coding.system" />
      <min value="1" />
      <fixedUri value="https://health.gov.on.ca/idms/fhir/CodeSystem/Generic-Classification" />
    </element>
    <element id="ServiceRequest.category:GenericClassification.coding.version">
      <path value="ServiceRequest.category.coding.version" />
      <short value="Type of Code" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:GenericClassification.coding.code">
      <path value="ServiceRequest.category.coding.code" />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="Request Types" />
        <valueSet value="https://health.gov.on.ca/idms/fhir/ValueSet/IDMS-New-Generic-Classification" />
      </binding>
    </element>
    <element id="ServiceRequest.category:GenericClassification.coding.display">
      <path value="ServiceRequest.category.coding.display" />
      <short value="This is the display Value for the Request Type" />
      <min value="1" />
    </element>
    <element id="ServiceRequest.category:GenericClassification.coding.userSelected">
      <path value="ServiceRequest.category.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.category:GenericClassification.text">
      <path value="ServiceRequest.category.text" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.priority">
      <path value="ServiceRequest.priority" />
      <definition value="#### **_`IDMS: Populate with either  'routine' or 'urgent' . For the frontend use https://health.gov.on.ca/idms/fhir/ValueSet/Request-Priority  to only show these 2 options.  `_**" />
    </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" />
      <definition value="#### **_`IDMS: Pre-NOC, Priority, Date Received, Title `_**" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.orderDetail.extension">
      <path value="ServiceRequest.orderDetail.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.orderDetail.modifierExtension">
      <path value="ServiceRequest.orderDetail.modifierExtension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.orderDetail.parameterFocus">
      <path value="ServiceRequest.orderDetail.parameterFocus" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.orderDetail.parameter">
      <path value="ServiceRequest.orderDetail.parameter" />
      <definition value="#### **_`IDMS: This defines which attribute is being stored ( Pre-NOC, Priority, Date Received, Title) .`_**" />
    </element>
    <element id="ServiceRequest.orderDetail.parameter.eExtension">
      <path value="ServiceRequest.orderDetail.parameter.extension" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.orderDetail.parameter.modifierExtension">
      <path value="ServiceRequest.orderDetail.parameter.modifierExtension" />
      <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: This is a reference to a Group that contains a list of Contacts.`_**" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/IDMS-Group-Request-Contacts" />
      </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" />
      <comment value="#### **_`IDMS: This is the Date Received , this can be changed to any date.`_**" />
    </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" />
      <short value="Request Modifier" />
      <definition value="#### **_`IDMS: Who is Assigned To 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" />
      </type>
    </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="1" />
      <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" />
      <definition value="#### **_`IDMS: Notes relating the request.  This is an annoation, so when possible include the PractitionerRole of who made the note,  datetime and the note itself.  When submitting if there is a Rationale provided it will be stored here with a Rationale: prefix on the note and the authorString = 'RATIONALE'.`_**" />
    </element>
    <element id="ServiceRequest.note.extension">
      <path value="ServiceRequest.note.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="ServiceRequest.note.extension:noteType">
      <path value="ServiceRequest.note.extension" />
      <sliceName value="noteType" />
      <definition value="#### **_`IDMS:  Type of note (Rationale or Note)`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/idms/fhir/StructureDefinition/Extension-Submission-Note-Type" />
      </type>
    </element>
    <element id="ServiceRequest.note.author[x]">
      <path value="ServiceRequest.note.author[x]" />
      <definition value="#### **_`IDMS: Who authored the note`_**" />
    </element>
    <element id="ServiceRequest.note.authorReference">
      <path value="ServiceRequest.note.authorReference" />
      <definition value="#### **_`IDMS: Reference to the PractitionerRole that created the note.`_**" />
    </element>
    <element id="ServiceRequest.note.authorString">
      <path value="ServiceRequest.note.authorString" />
      <max value="0" />
    </element>
    <element id="ServiceRequest.note.time">
      <path value="ServiceRequest.note.time" />
      <definition value="#### **_`IDMS: Date and time the note was added`_**" />
    </element>
    <element id="ServiceRequest.note.text">
      <path value="ServiceRequest.note.text" />
      <definition value="#### **_`IDMS: The note text`_**" />
    </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>