<!-- edited with XMLSpy - DRAFT INCLUSIVE PCS PHARMACY CLAIM REQUEST DISPENSE,June 2 2025 EDITED and uploaded to SIMPLIFIER  -->
<Bundle xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <id value="c149ce78-0983-4fc2-ba63-aeac253e933e" />
  <meta>
    <tag>
      <system value="http://pharmacyeclaims.ca/FHIR/CodeSystem/message-version" />
      <!-- fixed value-->
      <code value="1.0" />
    </tag>
  </meta>
  <type value="message" />
  <timestamp value="2025-01-06T22:03:23Z" />
  <!-- mandatory-->
  <entry>
    <fullUrl value="urn:uuid:6d8041af-7963-4bff-baf4-968d600fbd1e" />
    <!-- first entry must be message header-->
    <resource>
      <MessageHeader>
        <id value="6d8041af-7963-4bff-baf4-968d600fbd1e" />
        <eventCoding>
          <system value="http://pharmacyeclaims.ca/fhir/CodeSystem/message-events" />
          <!-- fixed value-->
          <code value="01" />
          <!-- used in mapping from A.03.03 - not always direct mapping the payee is also considered-->
        </eventCoding>
        <destination>
          <name value="Name of Adjudicator" />
          <!--Optional-->
          <target>
            <identifier>
              <system value="urn:uri:f2c1b9e4-6e88-4e15-99fc-8a48c89d4d73" />
              <!--CPHA Mapping:  Provider Software ID   A.04.03-->
              <value value="device-12345" />
            </identifier>
          </target>
          <endpoint value="urn:oid:2.16.840.1.113883.3.7066.1" />
          <!-- network -->
          <!-- mandatory-->
          <receiver>
            <identifier>
              <system value="urn:oid:http://pharmacyeclaims.ca/FHIR/CPHA-identifier/IIN" />
              <!-- TBD update profile and this to code system-->
              <value value="IIN" />
              <!-- - CPHA Mapping: IIN A.01.01( Issuer Identification Number)-->
            </identifier>
          </receiver>
        </destination>
        <sender>
          <!--Optional, new field only used when requested by adjudicator for troubleshooting purposes-->
          <identifier>
            <system value="urn:oid:setbyPOSvendor" />
            <value value="SoftwareVendorClientName" />
          </identifier>
        </sender>
        <source>
          <name value="thename" />
          <!--CPHA Mapping:  A.07.03 Device ID-->
          <!-- optional, new, only use upon request-->
          <software value="POS software name" />
          <!--CPHA Mapping: Provider Software ID A.04.03 -->
          <version value="POSversion" />
          <!--CPHA Mapping: Provider Software Version A.05.03 -->
          <endpoint value="urn:uuid:2fcd0a14-4ad6-11e8-9c2d-fa7ae01bbebc" />
        </source>
        <responsible>
          <!-- optional, upon request-->
          <reference value="urn:uuid:b5c8a272-b078-4ac7-b53d-086968a8c716" />
          <!--reference to pharmacy org resource-->
        </responsible>
        <focus>
          <reference value="urn:uuid:6d8041af-7963-4bff-baf4-968d600fbd1" />
          <!-- mandatory reference to the claim-->
        </focus>
      </MessageHeader>
    </resource>
  </entry>
  <entry>
    <fullUrl value="urn:uuid:6d8041af-7963-4bff-baf4-968d600fbd1" />
    <resource>
      <Claim xmlns="http://hl7.org/fhir">
        <id value="7612345" />
        <text>
          <status value="generated" />
          <div xmlns="http://www.w3.org/1999/xhtml">A human-readable rendering of the Pharmacy Claim</div>
          <!--May not be supported - to be discussed; Anne to update profile to not allow-->
        </text>
        <identifier>
          <system value="urn:uri:happypharma123claim" />
          <!-- must differentiate between current RX and the trace number-->
          <!-- CPHA Current RX Number D.55.03,  9N-->
          <value value="7612345" />
        </identifier>
        <identifier>
          <system value="http://pharmacyeclaims.ca/FHIR/CPHA-identifier/trace-number" />
          <!-- must differentiate between current RX and the trace number-->
          <!-- CPHA Trace Number, B.23.03limited to 6N-->
          <value value="123456" />
        </identifier>
        <status value="active" />
        <!-- new fixed value, FHIR mandatory-->
        <type>
          <text value="pharmacy" />
          <!-- new fixed value   -->
        </type>
        <use value="claim" />
        <!-- new fixed value, FHIR mandatory-->
        <patient>
          <reference value="urn:uuid:db46f91d-f1a2-43ab-820a-03246da13580" />
        </patient>
        <created value="2025-03-16" />
        <!--B.22.03 Provider Transaction Date CPHA-->
        <provider>
          <identifier>
            <system value="urn:uri:adjudicatorA.pharmID" />
            <!--optional-->
            <value value="123456" />
            <!-- CPHA B.21.03 Pharmacy ID code-->
          </identifier>
        </provider>
        <priority>
          <coding>
            <code value="stat" />
            <!-- new fixed value, FHIR mandatory-->
          </coding>
        </priority>
        <related>
          <!-- new optional FHIR field to specify the identifier of a related proff services claim or vice versa-->
          <claim>
            <identifier>
              <system value="urn:uri:happypharma123claim" />
              <value value="17612345Proff" />
              <!-- related proff service claim id-->
            </identifier>
          </claim>
        </related>
        <prescription>
          <reference value="1f2a-4591-b09c-f4be8871431f" />
          <!-- reference prescription information within this claim-->
        </prescription>
        <originalPrescription>
          <!--CPHA D.53.03 original Prescription-->
          <identifier>
            <system value="urn:uuid:happypharma1234.claim" />
            <!-- optional system value; only set if claim originates in FHIR-->
            <value value="123456" />
          </identifier>
        </originalPrescription>
        <payee>
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/payeetype" />
              <!-- new fixed value, FHIR mandatory-->
              <code value="provider" />
              <!-- CPHA Map -  set value ="subscriber" or "provider" In CPHA this is differentiated by transaction type 01 or 04.-->
            </coding>
          </type>
        </payee>
        <supportingInfo>
          <!-- all supporting eleemnts are presently optional in the profile; dispense should be treated as mandatory-->
          <sequence value="1" />
          <category>
            <coding>
              <code value="dispense" />
            </coding>
          </category>
          <valueReference>
            <reference value="urn:uuid:db46f91d-f1a2-43ab-820a-03246da15555" />
            <!-- reference dispense information, considered mandatory-->
          </valueReference>
        </supportingInfo>
        <supportingInfo>
          <sequence value="2" />
          <category>
            <coding>
              <code value="SpecialAuth" />
            </coding>
          </category>
          <valueString value="123" />
          <!--CPHA Map: Special Authorization Number or Code D.64.03"-->
        </supportingInfo>
        <supportingInfo>
          <sequence value="4" />
          <category>
            <coding>
              <code value="RefillRemaining" />
            </coding>
          </category>
          <valueQuantity>
            <value value="12" />
            <!-- CPHA Map: Refill/Repeat Authorizations D.54.03 Usage Note: 00 – 99 = number of authorized refills / repeats remaining  -->
          </valueQuantity>
        </supportingInfo>
        <diagnosis>
          <sequence value="1" />
          <diagnosisCodeableConcept>
            <coding>
              <system value="http://hl7.org/fhir/sid/icd-10" />
              <!--CPHA - Medical Reason Reference D.50.03 - FHIR mandatory-->
              <code value="654456" />
              <!--CPHA D.51.03 Medication Reason-->
            </coding>
            <text value="NameofDiagnosis" />
          </diagnosisCodeableConcept>
        </diagnosis>
        <diagnosis>
          <sequence value="2" />
          <diagnosisCodeableConcept>
            <coding>
              <system value="http://hl7.org/fhir/sid/icd-9" />
              <!--CPHA - Medical Reason Reference D.50.03 - FHIR mandatory-->
              <code value="16111" />
            </coding>
            <text value="NameofDiagnosis2" />
          </diagnosisCodeableConcept>
        </diagnosis>
        <insurance>
          <sequence value="1" />
          <focal value="true" />
          <!-- FHIR mandatory; the coverage with focal=true identifies the active coverage for this claim-->
          <coverage>
            <reference value="urn:uuid:4e5af6dc-1f2a-4591-b09c-f4be8871431f" />
            <!--reference to primary coverage resource-->
          </coverage>
        </insurance>
        <insurance>
          <sequence value="2" />
          <focal value="false" />
          <!-- FHIR mandatory; the coverage with focal=false indicates other coverages that apply for this patient; in this case there is secondary-->
          <coverage>
            <reference value="urn:uuid:22222-1f2a-4591-b09c-22222" />
          </coverage>
          <claimResponse>
            <reference value="urn:uuid:22222priorclaimresponse222" />
            <!-- for secondary claims, eference to the prior claim results that are included in the secondary request..  shown here but would not present in primary claim; would be present in a secondary claim (focus = true on secondary coverage)-->
          </claimResponse>
        </insurance>
        <item>
          <sequence value="1" />
          <productOrService>
            <coding>
              <system value="http://localdruglist.org" />
              <!-- system TBD and updated-->
              <code value="916111" />
              <!-- this will be present for Drugs; maybe for compounds for ease of mapping TBD-->
            </coding>
            <text value="custom compound name" />
          </productOrService>
          <modifier>
            <coding>
              <system value="http://pharmacyeclaims.ca/FHIR/CodeSystem/intervention-codes" />
              <!-- system is new - CPHA mapping to Intervention code D.65.03-->
              <code value="MX" />
            </coding>
          </modifier>
          <modifier>
            <coding>
              <system value="http://pharmacyeclaims.ca/FHIR/CodeSystem/special-service-codes" />
              <!-- system TBD and updated - CPHA mapping to D.57.03 SSC-->
              <code value="O" />
            </coding>
          </modifier>
          <servicedDate value="2014-08-16" />
          <quantity>
            <!-- CPHA maps to Quanitity D.58.03- how populated for compounds? - quantity of main ingredient?  if yes may leave for mapping?-->
            <value value="30.50" />
            <!--FHIR no limit on decimal places-->
            <unit value="mg" />
            <!-- optional, not required-->
            <system value="http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm" />
            <code value="TAB" />
          </quantity>
          <net>
            <value value="155.00" />
            <!--optional amount claimed; equal to the total amount -->
          </net>
          <detail>
            <sequence value="1" />
            <productOrService>
              <coding>
                <system value="http://pharmacyeclaims.ca/FHIR/CodeSystem/adjudication-category-codes" />
                <!--optional-->
                <code value="DrugCost" />
              </coding>
            </productOrService>
            <net>
              <value value="20.00" />
              <!--d.66.03 Drug cost-->
            </net>
          </detail>
          <detail>
            <sequence value="2" />
            <productOrService>
              <coding>
                <system value="http://pharmacyeclaims.ca/FHIR/CodeSystem/adjudication-category-codes" />
                <!--optional-->
                <code value="Upcharge" />
              </coding>
            </productOrService>
            <net>
              <value value="5.00" />
              <!--d.67.03 Upcharge -->
            </net>
          </detail>
          <detail>
            <sequence value="3" />
            <productOrService>
              <coding>
                <system value="http://pharmacyeclaims.ca/FHIR/CodeSystem/adjudication-category-codes" />
                <!--optional-->
                <code value="Proffee" />
              </coding>
            </productOrService>
            <net>
              <value value="28.00" />
              <!--d.68.03 Professional Fee-->
            </net>
          </detail>
          <detail>
            <sequence value="4" />
            <productOrService>
              <coding>
                <system value="http://pharmacyeclaims.ca/FHIR/CodeSystem/adjudication-category-codes" />
                <!--optional-->
                <code value="CompoundCharge" />
              </coding>
            </productOrService>
            <net>
              <value value="22.00" />
              <!--d.70.03 Compounding charge-->
            </net>
          </detail>
          <detail>
            <sequence value="5" />
            <productOrService>
              <coding>
                <system value="http://pharmacyeclaims.ca/FHIR/CodeSystem/adjudication-category-codes" />
                <!--optional-->
                <code value="CompoundTime" />
              </coding>
            </productOrService>
            <quantity>
              <value value="30" />
              <!--d.71.03 Compounding Time; unit is new-->
              <unit value="min" />
            </quantity>
          </detail>
          <detail>
            <sequence value="6" />
            <productOrService>
              <coding>
                <system value="http://pharmacyeclaims.ca/FHIR/CodeSystem/adjudication-category-codes" />
                <!--optional-->
                <code value="SSF" />
              </coding>
            </productOrService>
            <net>
              <value value="5.00" />
              <!--d.72.03 Special SErvice Fee-->
            </net>
          </detail>
          <detail>
            <sequence value="7" />
            <productOrService>
              <coding>
                <system value="http://pharmacyeclaims.ca/FHIR/CodeSystem/adjudication-category-codes" />
                <!--optional-->
                <code value="QCProffFee" />
              </coding>
            </productOrService>
            <net>
              <value value="23.00" />
              <!--New code value and net value for Quebec Qualifying claims-->
            </net>
          </detail>
          <detail>
            <sequence value="8" />
            <productOrService>
              <coding>
                <system value="http://pharmacyeclaims.ca/FHIR/CodeSystem/adjudication-category-codes" />
                <!--optional-->
                <code value="QCRefPrice" />
                <!--New for Quebec Qualifying claims-->
              </coding>
            </productOrService>
            <net>
              <value value="38.00" />
              <!--New code value and net value for Quebec Qualifying claims-->
            </net>
          </detail>
          <detail>
            <sequence value="9" />
            <productOrService>
              <coding>
                <system value="http://pharmacyeclaims.ca/FHIR/CodeSystem/adjudication-category-codes" />
                <!--optional-->
                <code value="QCRetailDispense" />
              </coding>
            </productOrService>
            <net>
              <value value="40.00" />
              <!--New, code value and net value for Quebec Qualifying claims-->
            </net>
          </detail>
        </item>
      </Claim>
    </resource>
  </entry>
  <entry>
    <fullUrl value="urn:uuid:b5c8a272-b078-4ac7-b53d-086968a8c716" />
    <resource>
      <Organization>
        <id value="b5c8a272-b078-4ac7-b53d-086968a8c716" />
        <identifier>
          <system value="urn:uuid:b.1.2.PharmacyIDCode" />
          <value value="Identifier" />
          <!--Mandatory; maps to CPHA Pharmacy ID code-->
        </identifier>
        <!--optional-only provide if requested
        <identifier>
          <system value="VendorPharmacyIdentifier" />
          <value value="IdentifierassignedbyPharmacy" />
        </identifier> -->
        <identifier>
          <system value="urn:uuid:12345657575757" />
          <!--Optional, some implementers have requested this-->
          <value value="Identifier" />
        </identifier>
        <name value="BestPharmacyEver" />
        <!--Optional-->
      </Organization>
    </resource>
  </entry>
  <entry>
    <fullUrl value="urn:uuid:22222-1f2a-4591-b09c-22222" />
    <!-- secondary coverage in the primary claim-->
    <resource>
      <Coverage xmlns="http://hl7.org/fhir">
        <id value="22222-1f2a-4591-b09c-22222" />
        <status value="active" />
        <!--mandatory fixed-->
        <type>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode" />
            <code value="EHCPOL" />
          </coding>
        </type>
        <subscriber>
          <identifier>
            <!-- C.32.03 Client ID #? or Code mandatory-->
            <system value="TBD.SecondaryCoverageCarrierSystem " />
            <value value="2222222" />
            <display value="Blackenberry" />
            <!--Mandatory, CPHA Map C.35.05 Cardholder Identity A/N 5,  In FHIR, this is a full name-, mandatory-->
          </identifier>
        </subscriber>
        <beneficiary>
          <reference value="urn:uuid:db46f91d-f1a2-43ab-820a-03246da13580" />
          <!-- reference to patient which is the same for both primary and secondary coverage-->
        </beneficiary>
        <dependent value="123" />
        <!-- CPHA map to C.33.01 dependent code-->
        <relationship>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/subscriber-relationship" />
            <code value="self" />
          </coding>
        </relationship>
        <payor>
          <identifier>
            <system value="tbdOptional" />
            <value value="11" />
            <!-- CPHA Mapping only if the same carrier; this is the secondary payor identifier on the primary claim; C.30.03 if this can be specified-->
          </identifier>
        </payor>
        <contract>
          <identifier>
            <system value="tbdOptional" />
            <value value="222222" />
            <!-- CPHA C.31.03 Group Number or Code for the secondary coverage-->
          </identifier>
        </contract>
      </Coverage>
    </resource>
  </entry>
  <entry>
    <fullUrl value="urn:uuid:4e5af6dc-1f2a-4591-b09c-f4be8871431f" />
    <!--Primary coverage on the primary claim-->
    <resource>
      <Coverage>
        <id value="Coverage/4e5af6dc-1f2a-4591-b09c-f4be8871431f" />
        <status value="active" />
        <type>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode" />
            <code value="public" />
          </coding>
        </type>
        <subscriber>
          <identifier>
            <!-- C.32.03 Client ID #? or Code mandatory-->
            <system value="TBD.Optional " />
            <value value="1234567891234" />
            <display value="Blackenberry" />
            <!--Mandatory, CPHA Map C.35.03 Cardholder Identity A/N 5,  In FHIR, this is a full name-, mandatory-->
          </identifier>
        </subscriber>
        <beneficiary>
          <reference value="urn:uuid:db46f91d-f1a2-43ab-820a-03246da13580" />
          <!-- reference to patient-->
          <text value="Smith" />
        </beneficiary>
        <relationship>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/subscriber-relationship" />
            <!-- fixed value-->
            <code value="self" />
          </coding>
        </relationship>
        <payor>
          <identifier>
            <system value="tbdOptional" />
            <value value="14" />
            <!-- CPHA Mapping: Carrier ID C.30.03 A/N2-->
          </identifier>
        </payor>
        <contract>
          <identifier>
            <system value="tbdOptional" />
            <value value="3434343" />
            <!-- CPHA C.31.03 Group Number or Code-->
          </identifier>
        </contract>
      </Coverage>
    </resource>
  </entry>
  <entry>
    <fullUrl value="urn:uuid:1f2a-4591-b09c-f4be8871431f" />
    <resource>
      <MedicationRequest>
        <id value="1f2a-4591-b09c-f4be8871431f" />
        <!-- anne to update-->
        <identifier>
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
              <code value="JRX" />
              <display value="Jurisdictional Prescription Number" />
            </coding>
          </type>
          <system value="http://example.org/prescriptions" />
          <value value="12345689" />
        </identifier>
        <identifier>
          <!-- populate when known from ePrescriptions - New for FHIR-->
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
              <code value="PrescribeIT" />
              <display value="PrescribeIT" />
            </coding>
          </type>
          <system value="http://example.org/prescriptions" />
          <value value="12345689" />
        </identifier>
        <status value="active" />
        <intent value="order" />
        <medicationCodeableConcept>
          <!-- CPHA  Map: DIN / GP# / PIN D.56.03 - this is present in both the medication request (prscription and the dispense)-->
          <coding>
            <system value="http://hl7.org/fhir/NamingSystem/ca-hc-din" />
            <!-- TBD for compounds.   -->
            <code value="CompoundA" />
            <display value="PharmaSpecialOintment" />
          </coding>
          <text value="PharmaSpecialOintment" />
          <!--  eg name of the compound, optional -->
        </medicationCodeableConcept>
        <subject>
          <reference value="Patient/db46f91d-f1a2-43ab-820a-03246da13580" />
        </subject>
        <requestor>
          <identifier>
            <system value="urn:oid:2.16.840.1.113883.4.39" />
            <!--  CPHA Mapping: D.60.03 Prescriber ID Reference-->
            <value value="2345676" />
            <!--  CPHA Mapping:  D.61.03 Prescriber ID -->
            <assigner value="87=Alberta College of Pharmacists" />
            <!-- CPHA value can be included for mapping if helpful - Implementer discussion-->
          </identifier>
        </requestor>
      </MedicationRequest>
    </resource>
  </entry>
  <entry>
    <fullUrl value="urn:uuid:db46f91d-f1a2-43ab-820a-03246da13580" />
    <resource>
      <Patient>
        <id value="db46f91d-f1a2-43ab-820a-03246da13580" />
        <identifier>
          <!-- Optional and only provided upon implementer request; PMS Patient Identifier-->
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
              <code value="PLAC" />
            </coding>
          </type>
          <system value="POSSystemIDTBD" />
          <!-- New in FHIR; POS Patient identifier-->
          <value value="74359345" />
        </identifier>
        <identifier>
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
              <code value="JHN" />
              <!--this differentiates the type of identifier; the jurisdictional health number-->
            </coding>
          </type>
          <system value="urn:oid:2.16.840.1.113883.4.20" />
          <!-- refer to terminology for exact code to identify the provincial JHN-->
          <value value="74359345" />
          <!-- CPHA C.39.03 Provincial Healthcare ID code-->
        </identifier>
        <name>
          <family value="Tremblant" />
          <!-- CPHA Map:   C.38.01-->
          <given value="Katia" />
          <!-- CPHA Map:   C.37.01-->
        </name>
        <gender value="female" />
        <!--CPHA C.40.03 Gender-->
        <birthDate value="2018-06-23" />
        <!--CPHA  C.34.01 Patient DOB-->
      </Patient>
    </resource>
  </entry>
  <entry>
    <fullUrl value="urn:uuid:db46f91d-f1a2-43ab-820a-03246da15555" />
    <resource>
      <MedicationDispense>
        <id value="db46f91d-f1a2-43ab-820a-03246da15555" />
        <contained>
          <Medication>
            <id value="med0319" />
            <code>
              <coding>
                <system value="http://hl7.org/fhir/NamingSystem/ca-hc-din" />
                <!-- http://pharmacyeclaims.ca/FHIR/CodeSystem/unlisted-compound-codes  for compounds.   -->
                <code value="CompoundA" />
                <!-- CPHA  Map: DIN / GP# / PIN    D.56.03-->
                <display value="PharmaSpecialOintment" />
              </coding>
              <text value="PharmaSpecialOintment" />
              <!--  eg name of the compound, optional -->
            </code>
            <ingredient>
              <extension url="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/ext-ingredient-percentage-total-cost">
                <valueDecimal value="35" />
              </extension>
              <extension url="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/ext-IngredientQuantity">
                <valueQuantity>
                  <value value="5" />
                  <unit value="mg" />
                  <system value="http://unitsofmeasure.org" />
                  <code value="mg" />
                </valueQuantity>
              </extension>
              <itemCodeableConcept>
                <coding>
                  <system value="http://hl7.org/fhir/NamingSystem/ca-hc-din" />
                  <code value="387253001" />
                  <display value="Salicyclic Acid (substance)" />
                </coding>
              </itemCodeableConcept>
              <IsActive value="true" />
              <strength>
                <!-- eg250 mg per tablet. This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet.-->
                <numerator>
                  <value value="5" />
                  <system value="http://unitsofmeasure.org" />
                  <code value="g" />
                </numerator>
                <denominator>
                  <value value="100" />
                  <system value="http://unitsofmeasure.org" />
                  <code value="g" />
                </denominator>
              </strength>
            </ingredient>
            <ingredient>
              <extension url="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/ext-ingredient-percentage-total-cost">
                <valueDecimal value="65" />
              </extension>
              <extension url="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/ext-IngredientQuantity">
                <valueQuantity>
                  <value value="5" />
                  <unit value="mg" />
                  <system value="http://unitsofmeasure.org" />
                  <code value="mg" />
                </valueQuantity>
              </extension>
              <itemCodeableConcept>
                <coding>
                  <system value="http://hl7.org/fhir/NamingSystem/OtherCompoundSubstance" />
                  <code value="4545452" />
                  <display value="White Petrolatum (substance)" />
                </coding>
              </itemCodeableConcept>
              <IsActive value="false" />
              <strength>
                <!-- optional; not always applicable-->
                <numerator>
                  <value value="1" />
                  <system value="http://unitsofmeasure.org" />
                  <code value="g" />
                </numerator>
                <denominator>
                  <value value="100" />
                  <system value="http://unitsofmeasure.org" />
                  <code value="g" />
                </denominator>
              </strength>
            </ingredient>
          </Medication>
        </contained>
        <extension url="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/ext-RenderedDosageInstruction">
          <!-- May later add a Nested extension for language (CodeableConcept) which goes first -->
          <valueString value="Take 1 tablet by mouth twice daily. Take with food. Take after meals." />
        </extension>
        <status value="completed" />
        <medicationReference>
          <reference value="#med0319" />
        </medicationReference>
        <performer>
          <actor>
            <identifier>
              <system value="http://pharmacyeclaims.ca/FHIR/ValueSet/pharmacist-licence-identifier-system" />
              <value value="123456" />
              <!-- CPHA map to D.76.03 Pharmacist ID-->
            </identifier>
          </actor>
        </performer>
        <type>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode" />
            <code value="RFP" />
            <!-- CPHA Map: New/Refill Code D.52.03 -->
            <display value="Refill - Part Fill" />
          </coding>
        </type>
        <quantity>
          <!--Quantity D.58.03, Limited to one decimal place O Q6 No "unit" is expressed-->
          <value value="30" />
          <system value="http://unitsofmeasure.org" />
          <code value="g" />
        </quantity>
        <daysSupply>
          <!-- CPHA Map: Days Supply D.59.02 Optional  Note: CPHA 3 char, FHIR restricts to 4 char; only supports days.-->
          <value value="10" />
          <unit value="Day" />
          <system value="http://unitsofmeasure.org" />
          <code value="d" />
        </daysSupply>
        <substitution>
          <wasSubstituted value="false" />
          <reason>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/v3-ActReason" />
              <code value="1" />
              <display value="prescriber's choice" />
              <!--D.62.03 Product Selection Code-->
            </coding>
          </reason>
        </substitution>
        <!--<detectedIssue>
          <reference value="urn:uuid:123456789"/>   New/Optional to specify more detail re drug interactions.  Future support if needed.  Initially, intervention codes will continue to be used to indicate drug interactions.
        </detectedIssue>  -->
      </MedicationDispense>
    </resource>
  </entry>
  <entry>
    <fullUrl value="urn:uuid:db46f91d-f1a2-43ab-820a-666615555" />
    <resource>
      <ClaimResponse>
        <!-- only included on secondary claims with a prior adjudcation result-->
        <id value="db46f91d-f1a2-43ab-820a-666615555" />
        <status value="active" />
        <!--mandatory fixed value-->
        <type>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/claim-type" />
            <code value="pharmacy" />
            <!--mandatory fixed value-->
          </coding>
        </type>
        <subType>
          <coding>
            <system value="http://pharmacyeclaims.ca/FHIR/CodeSystem/claim-response-subType" />
            <code value="privateEHCPOL" />
            <!--optional, indicates type of policy used in adjudication-->
          </coding>
        </subType>
        <use value="claim" />
        <patient>
          <reference value="urn:uuid:db46f91d-f1a2-43ab-820a-03246da13580" />
          <!-- reference to patient used in adjudication; same as submitted-->
        </patient>
        <created value="2014-08-16" />
        <insurer>
          <identifier>
            <system value="http://pharmacyeclaims.ca/FHIR/CPHA-identifier/IIN" />
            <!--fixed value - value may be updated-->
            <value value="11" />
            <display value="not available" />
            <!--value is only set when the primary and secondary are the same insurer; else use not available may be used-->
          </identifier>
        </insurer>
        <request>
          <reference value="urn:uuid:primaryclaimrequstid" />
        </request>
        <outcome value="complete" />
        <!--CPHA Map: E.05.03 Response Status  CPHA value "A" (accepted) or "R" rejected, maps to "complete" or "error".-->
        <disposition value="B" />
        <!--CPHA Map: Response Status E.05.03   set value= A,B,C etc-->
        <payeeType>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/payeetype" />
            <code value="provider" />
            <!-- value is derived from the CPHA transaction code-->
          </coding>
        </payeeType>
        <item>
          <itemSequence value="1" />
          <adjudication>
            <category>
              <coding>
                <code value="Co-pay" />
                <!--  CPHA Map: Copay to Collect E.15.03 Optional D6-->
              </coding>
            </category>
            <amount>
              <value value="12.00" />
            </amount>
          </adjudication>
        </item>
        <item>
          <itemSequence value="2" />
          <adjudication>
            <category>
              <coding>
                <code value="Deductible" />
                <!-- CPHA Map: Deductible to Collect E.16.03 Optional D6-->
              </coding>
            </category>
            <amount>
              <value value="0.00" />
            </amount>
          </adjudication>
        </item>
        <item>
          <itemSequence value="3" />
          <adjudication>
            <category>
              <coding>
                <code value="CoInsurance" />
                <!--  CPHA Map: Co-Insurance to Collect E.17.03 Optional D6-->
              </coding>
            </category>
            <amount>
              <value value="0.00" />
            </amount>
          </adjudication>
        </item>
        <item>
          <itemSequence value="4" />
          <adjudication>
            <category>
              <coding>
                <code value="DrugCost" />
                <!-- CPHA Map: E.08.03 Drug Cost/Product Value-->
              </coding>
            </category>
            <amount>
              <value value="40.00" />
            </amount>
          </adjudication>
        </item>
        <item>
          <itemSequence value="5" />
          <adjudication>
            <category>
              <coding>
                <code value="Upcharge" />
                <!--CPHA Map: E.09.03 Cost Upcharge-->
              </coding>
            </category>
            <amount>
              <value value="5.00" />
            </amount>
          </adjudication>
        </item>
        <item>
          <itemSequence value="6" />
          <adjudication>
            <category>
              <coding>
                <code value="GenericIncentive" />
                <!--CPHA Map: E.10.03 Generic Incentive-->
              </coding>
            </category>
            <amount>
              <value value="5.00" />
            </amount>
          </adjudication>
        </item>
        <item>
          <itemSequence value="8" />
          <adjudication>
            <category>
              <coding>
                <code value="ProfFee" />
                <!--CPHA: E.12.03 Professional Fee-->
              </coding>
            </category>
            <amount>
              <value value="9.00" />
            </amount>
          </adjudication>
        </item>
        <item>
          <itemSequence value="9" />
          <adjudication>
            <category>
              <coding>
                <code value="CompoundingCharge" />
                <!--CPHA Map: E.13.03 Compounding Charge-->
              </coding>
            </category>
            <amount>
              <value value="9.00" />
            </amount>
          </adjudication>
        </item>
        <item>
          <itemSequence value="10" />
          <adjudication>
            <category>
              <coding>
                <code value="SSF" />
                <!--CPHA Map: E.14.03 Special Services Fee-->
              </coding>
            </category>
            <amount>
              <value value="2.00" />
            </amount>
          </adjudication>
        </item>
        <item>
          <itemSequence value="11" />
          <adjudication>
            <category>
              <coding>
                <code value="ResponseCode" />
                <!--CPHA Map: Response Codes E.06.03 A/N10 - in FHIR up to 20 codes are allowed:  -->
              </coding>
            </category>
            <reason>
              <coding>
                <system value="http://terminology.hl7.org/CodeSystem/adjudication-reason" />
                <code value="ar002" />
                <display value="Optional display" />
              </coding>
            </reason>
            <amount>
              <!-- optional in FHIR, discuss whether we would ever support this-->
              <value value="1.00" />
            </amount>
          </adjudication>
        </item>
        <item>
          <itemSequence value="11" />
          <adjudication>
            <category>
              <coding>
                <code value="ResponseCode" />
                <!--CPHA Map: Response Codes E.06.03 A/N10 -   -->
              </coding>
            </category>
            <reason>
              <coding>
                <system value="http://terminology.hl7.org/CodeSystem/adjudication-reason" />
                <code value="ar002" />
                <display value="Optional display" />
              </coding>
            </reason>
          </adjudication>
        </item>
        <payment>
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/ex-paymenttype" />
              <code value="complete" />
            </coding>
          </type>
          <date value="2025-06-29" />
          <amount>
            <value value="100.47" />
          </amount>
        </payment>
        <processNote>
          <!--CPHA Map: Message Data Lines 1,2,3 E.20.03, E.21.03, E.22.03 A/N40 only when relevant to a second payor-->
          <number value="1" />
          <type value="display" />
          <!--- Optional to indicate 'display' or 'print'-->
          <text value="First adjudicator note" />
          <language>
            <!-- must be populated with a code of "en" for English or "fr" for French, -->
            <coding>
              <system value="urn:ietf:bcp:47" />
              <code value="en-CA" />
            </coding>
            <text value="unknown" />
            <!-- populate if unknown, do not use a code instead populate text value with "unknown".-->
          </language>
        </processNote>
        <!-- add process note directed to after confrimation-->
        <processNote>
          <!--CPHA Map: Message Data Lines 1,2,3 E.20.03, E.21.03, E.22.03 A/N40-->
          <number value="2" />
          <type value="display" />
          <text value="Second adjudicator note" />
          <language>
            <!-- Mandatory in FHIR, new- must be populated with a code of "en" for English or "fr" for French, -->
            <coding>
              <system value="urn:ietf:bcp:47" />
              <code value="en-CA" />
            </coding>
          </language>
        </processNote>
      </ClaimResponse>
    </resource>
  </entry>
</Bundle>