<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-claim-dispense" />
  <url value="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/profile-claim-dispense" />
  <name value="MedicationClaimRequest" />
  <title value="Medication Claim Request" />
  <status value="draft" />
  <description value="Profile used specifically for claims related to a dispense" />
  <purpose value="Profile used specifically for claims related to a dispense" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Claim" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Claim" />
  <derivation value="constraint" />
  <differential>
    <element id="Claim">
      <path value="Claim" />
      <comment value="Usage Note:   This profile is used for both Pay Provider claims and Pay Subscriber/Cardholder claims, which are differentiated by the payee.type&#xD;&#xA;&#xD;&#xA;The Claim resource fulfills three information request requirements: Claim - a request for adjudication for reimbursement for products and/or services provided; Preauthorization - a request to authorize the future provision of products and/or services including an anticipated adjudication; and, Predetermination - a request for a non-bind adjudication of possible future products and/or services." />
    </element>
    <element id="Claim.id">
      <path value="Claim.id" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.meta">
      <path value="Claim.meta" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.meta.profile">
      <path value="Claim.meta.profile" />
      <max value="1" />
      <fixedCanonical value="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/profile-claim-dispense" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.identifier">
      <path value="Claim.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <comment value="Usage Note:   Both the CPHA Trace Number and the Claim Identifier must be present in the message.   The CPHA Trace number is present for backward compatibility purposes." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.identifier.system">
      <path value="Claim.identifier.system" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.identifier.value">
      <path value="Claim.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.identifier:CPHA-Trace-Number">
      <path value="Claim.identifier" />
      <sliceName value="CPHA-Trace-Number" />
      <comment value="Usage Note:  This is limited to 6N, as per the CPHA message specification.   This is present for backward compatibility.   In the future, once all implementations natively support FHIR, this identifier will be deprecated in favour of the Claim-identifier which has no limitations.    This must be present when sending to adjudicators who do not support FHIR natively.&#xD;&#xA;&#xD;&#xA;Usage Note:   This will be the trace number from the Claim Request.identifier.  The number assigned, by the provider, to the transaction to which this response applies.   This is limited to 6N, in order to maintain backward compatibility with CPHA.   &#xD;&#xD;&#xA;CPHA Mapping: Trace Number B.23.03" />
      <max value="1" />
    </element>
    <element id="Claim.identifier:CPHA-Trace-Number.system">
      <path value="Claim.identifier.system" />
      <min value="1" />
      <fixedUri value="http://pharmacyeclaims.ca/FHIR/CPHA-identifier/trace-number" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.identifier:CPHA-Trace-Number.value">
      <path value="Claim.identifier.value" />
      <comment value="Usage Note:  Unique number produced sequentially by the provider software (or manually in absence of computer) for each transaction transmitted by the provider.    &#xD;&#xD;&#xA;CPHA Map:   Trace Number  E.02.03   6N&#xD;&#xA;&#xD;&#xA;If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.identifier:Claim-identifier">
      <path value="Claim.identifier" />
      <sliceName value="Claim-identifier" />
      <comment value="Usage Note:   This must be present for all FHIR-based identfiiers.   The length of this identifier is limited to 9N; the Trace-Number is limited as per the CPHA spec.   Prescription Number appearing on the label of the dispensed prescription or on the record of the service provided.&#xD;&#xA;CPHA Map:  Maps to current RX number and is therefore limited to 9N" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.identifier:Claim-identifier.system">
      <path value="Claim.identifier.system" />
      <comment value="Usage Note:   This is assigned by the sending system to uniquely identify the namespace.&#xD;&#xA;Identifier.system is always case sensitive." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.identifier:Claim-identifier.value">
      <path value="Claim.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.status">
      <path value="Claim.status" />
      <comment value="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.&#xD;&#xA;CPHA - no mapping" />
      <fixedCode value="active" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.type">
      <path value="Claim.type" />
      <comment value="The majority of jurisdictions use: oral, pharmacy, vision, professional and institutional, or variants on those terms, as the general styles of claims. The valueset is extensible to accommodate other jurisdictional requirements.&#xD;&#xA;CPHA - no mapping" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.type.coding">
      <path value="Claim.type.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.type.coding.code">
      <path value="Claim.type.coding.code" />
      <min value="1" />
      <fixedCode value="pharmacy" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.type.text">
      <path value="Claim.type.text" />
      <max value="0" />
    </element>
    <element id="Claim.subType.coding">
      <path value="Claim.subType.coding" />
      <mustSupport value="false" />
    </element>
    <element id="Claim.use">
      <path value="Claim.use" />
      <fixedCode value="claim" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.patient">
      <path value="Claim.patient" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/profile-patient" />
        <aggregation value="bundled" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Claim.patient.reference">
      <path value="Claim.patient.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.created">
      <path value="Claim.created" />
      <comment value="Usage note:  This may be different from the service date and is mandatory in FHIR&#xD;&#xA;&#xD;&#xA;This field is independent of the date of creation of the resource as it may reflect the creation date of a source document prior to digitization. Typically for claims all services must be completed as of this date." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.provider">
      <path value="Claim.provider" />
      <comment value="Usage:  Identity of the pharmacy providing the service.&#xD;&#xA;CPHA 3 Map:  B.21.03 Provider ID &#xD;&#xA;&#xD;&#xA;ypically this field would be 1..1 where this party is responsible for the claim but not necessarily professionally responsible for the provision of the individual products and services listed below." />
    </element>
    <element id="Claim.provider.identifier">
      <path value="Claim.provider.identifier" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.provider.identifier.system">
      <path value="Claim.provider.identifier.system" />
      <comment value="Usage Note:  This may be assigned by the Adjudicator&#xD;&#xA;&#xD;&#xA;Identifier.system is always case sensitive." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.provider.identifier.value">
      <path value="Claim.provider.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.priority">
      <path value="Claim.priority" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.priority.coding">
      <path value="Claim.priority.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.priority.coding.system">
      <path value="Claim.priority.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/processpriority" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.priority.coding.code">
      <path value="Claim.priority.coding.code" />
      <min value="1" />
      <fixedCode value="stat" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.priority.text">
      <path value="Claim.priority.text" />
      <comment value="CPHA Map:  None, this is a new mandatory field&#xD;&#xA;&#xD;&#xA;Very often the text is the same as a displayName of one of the codings." />
      <min value="1" />
      <fixedString value="Immediate" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.related">
      <path value="Claim.related" />
      <comment value="Usage Note:   This is a reference to a related claim identifier to allow adjudicators to formally relate the professional claim to the claim for the medication dispense.   &#xD;&#xA;Usage Note:   If known to the pharmacy, this link should be provided.&#xD;&#xA;CPHA Map:   None  - this is a new data element&#xD;&#xA;&#xD;&#xA;For example,  for the original treatment and follow-up exams." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.related.claim">
      <path value="Claim.related.claim" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.related.claim.identifier">
      <path value="Claim.related.claim.identifier" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.related.claim.identifier.system">
      <path value="Claim.related.claim.identifier.system" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.related.claim.identifier.value">
      <path value="Claim.related.claim.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.prescription">
      <path value="Claim.prescription" />
      <comment value="A reference to the resource must be included in order to specify identifiers and prescriber details.&#xD;&#xA;&#xD;&#xA;References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/profile-prescription" />
        <aggregation value="bundled" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Claim.prescription.reference">
      <path value="Claim.prescription.reference" />
      <comment value="Usage:  A reference to the Prescription resource is required in order to specify the Prescriber details and the identifiers&#xD;&#xA;&#xD;&#xA;Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure &quot;/[type]/[id]&quot; then it should be assumed that the reference is to a FHIR RESTful server." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.originalPrescription">
      <path value="Claim.originalPrescription" />
      <comment value="Usage:  Number assigned to a prescription or service record on the original date of prescription provided.  The original number is the number assigned to a “new prescription&quot; when it is dispensed.  &#xD;&#xA;CPHA Mapping:   Original Prescription Number D.53.03&#xD;&#xA;&#xD;&#xA;Usage:  Prescription Number appearing on the label of the dispensed prescription or on the record of the &#xD;&#xA;service provided.  Varying regulations and pharmacy systems prevent a uniform procedure for assignment of prescription numbers. The “current prescription number “ is the number shown on the label and the receipt for the product and/or service being claimed in the current transaction. The number may change with each refill / or service being claimed in the current with each refill / repeat or it may remain the same as the original for as many refills / repeats as are authorized. &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;For example, a physician may prescribe a medication which the pharmacy determines is contraindicated, or for which the patient has an intolerance, and therefore issues a new prescription for an alternate medication which has the same therapeutic intent. The prescription from the pharmacy becomes the 'prescription' and that from the physician becomes the 'original prescription'." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.originalPrescription.identifier">
      <path value="Claim.originalPrescription.identifier" />
      <comment value="CPHA Mapping:   Original Prescription Number D.53.03&#xD;&#xA;CPHA:  Number assigned to a prescription or service record on the original date of prescription or professional service was provided.   The original number is the number assigned to a “new prescription”&#xD;&#xA;&#xD;&#xA;When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. &#xA;&#xA;When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference&#xA;&#xA;Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.&#xA;&#xA;Reference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference.  For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport).  One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any)." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.originalPrescription.identifier.system">
      <path value="Claim.originalPrescription.identifier.system" />
      <comment value="Usage Note:    This must be provided where known; eg OID/UUID assigned by the Pharmacy system.   Not mandatory for backward compatibility purposes.&#xD;&#xA;Identifier.system is always case sensitive." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.originalPrescription.identifier.value">
      <path value="Claim.originalPrescription.identifier.value" />
      <comment value="CPHA Mapping:   Original Prescription Number   D.53.03&#xD;&#xA;If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.payee">
      <path value="Claim.payee" />
      <comment value="Usage Note:   This field differentiates between the &quot;Pay Provider&quot; and &quot;Pay Cardholder (aka Subscriber) &quot; claims.   &#xD;&#xA;Usage Note:   Set code = &quot;subscriber&quot; or &quot;provider&quot; to indicate the payee type requested.&#xD;&#xA;CPHA Map:   This was differentiated by transaction type 01 or 04.   &#xD;&#xA;&#xD;&#xA;Often providers agree to receive the benefits payable to reduce the near-term costs to the patient. The insurer may decline to pay the provider and choose to pay the subscriber instead." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.payee.type">
      <path value="Claim.payee.type" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.payee.type.coding">
      <path value="Claim.payee.type.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://hl7.org/fhir/ValueSet/payeetype" />
      </binding>
    </element>
    <element id="Claim.payee.type.coding.system">
      <path value="Claim.payee.type.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/payeetype" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.payee.type.coding.code">
      <path value="Claim.payee.type.coding.code" />
      <comment value="Usage Note:   Set code = &quot;subscriber&quot; or &quot;provider&quot; to indicate the payee type requested.&#xD;&#xA;CPHA Map:   Transaction Code 01 for Provider claims, code 04 for cardholder claims.&#xD;&#xA;&#xD;&#xA;Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.careTeam">
      <path value="Claim.careTeam" />
      <comment value="Usage Note:  This provides an opportunity to identify the pharmacist involved in an intervention or a DUR.  There may be situations where it is beneficial for the pharmacist who is involved in an intervention or drug utilization review to be &#xD;&#xA;identified. &#xD;&#xA;Usage:   This is the licence number of the pharmacists, issued by the licencing authority.   This is also identified in the claim resource as the CareTeam.provider.   This is optionally specified if the pharmacist performed the dispense.&#xD;&#xA;CPHA Map:  D.76.03 Pharmacist ID&#xD;&#xA;Mapping:   CPHA: Pharmacist ID D.76.03" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.careTeam.sequence">
      <path value="Claim.careTeam.sequence" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.careTeam.provider">
      <path value="Claim.careTeam.provider" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.careTeam.provider.identifier">
      <path value="Claim.careTeam.provider.identifier" />
      <comment value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve Usage:   Identifies the pharmacist or otehr provider responsible for the service&#xD;&#xA;Mapping:   CPHA: Pharmacist ID D.76.03&#xD;&#xA;&#xD;&#xA;the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. &#xA;&#xA;When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference&#xA;&#xA;Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.&#xA;&#xA;Reference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference.  For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport).  One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any)." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.careTeam.provider.identifier.system">
      <path value="Claim.careTeam.provider.identifier.system" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.careTeam.provider.identifier.value">
      <path value="Claim.careTeam.provider.identifier.value" />
      <comment value="Mapping:   CPHA: Pharmacist ID D.76.03&#xD;&#xA;&#xD;&#xA;If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo">
      <path value="Claim.supportingInfo" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="code.coding.code" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo.sequence">
      <path value="Claim.supportingInfo.sequence" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo.category">
      <path value="Claim.supportingInfo.category" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo.category.coding">
      <path value="Claim.supportingInfo.category.coding" />
      <comment value="Conformance Rule:   Set code value = Dispense, and value = reference to the dispense resource.   Set code = DaysSupply     Set code = Refils Remaining&#xD;&#xA;&#xD;&#xA;Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true." />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo.category.coding.code">
      <path value="Claim.supportingInfo.category.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo.value[x]">
      <path value="Claim.supportingInfo.value[x]" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:DispenseResource">
      <path value="Claim.supportingInfo" />
      <sliceName value="DispenseResource" />
      <comment value="Usage:   Always expected to be present&#xD;&#xA;Often there are multiple jurisdiction specific valuesets which are required." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:DispenseResource.sequence">
      <path value="Claim.supportingInfo.sequence" />
      <fixedPositiveInt value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:DispenseResource.category">
      <path value="Claim.supportingInfo.category" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:DispenseResource.category.coding">
      <path value="Claim.supportingInfo.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:DispenseResource.category.coding.code">
      <path value="Claim.supportingInfo.category.coding.code" />
      <min value="1" />
      <fixedCode value="Dispense" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:DispenseResource.value[x]">
      <path value="Claim.supportingInfo.value[x]" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/profile-medication-dispense" />
        <aggregation value="bundled" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:DispenseResource.value[x].reference">
      <path value="Claim.supportingInfo.value[x].reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:SpecialAuthNumber">
      <path value="Claim.supportingInfo" />
      <sliceName value="SpecialAuthNumber" />
      <comment value="Usage Note:   This allows the provider to claim for products and services which require prior authorization,  This field enables the provider to claim for a product or service which is not ordinarily covered (e.g. NIHB Non-Formulary Benefits which can be provided by prior authorization). Authorization &#xD;&#xA;numbers will be issued by the payor. &#xD;&#xA;CPHA Map:  Special Authorization Number or Code D.64.03  A/N 8&#xD;&#xA;&#xD;&#xA;Often there are multiple jurisdiction specific valuesets which are required." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:SpecialAuthNumber.sequence">
      <path value="Claim.supportingInfo.sequence" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:SpecialAuthNumber.category">
      <path value="Claim.supportingInfo.category" />
      <comment value="Usage:   This is a fixed value of &quot;SpecialAuth&quot;&#xD;&#xA;This may contain a category for the local bill type codes." />
      <fixedCodeableConcept>
        <coding>
          <code value="SpecialAuth" />
        </coding>
      </fixedCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:SpecialAuthNumber.category.coding">
      <path value="Claim.supportingInfo.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:SpecialAuthNumber.category.coding.code">
      <path value="Claim.supportingInfo.category.coding.code" />
      <min value="1" />
      <fixedCode value="SpecialAuth" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:SpecialAuthNumber.value[x]">
      <path value="Claim.supportingInfo.value[x]" />
      <comment value="Usage Note:   This allows the provider to claim for products and services which require prior authorization,  This field enables the provider to claim for a product or service which is not ordinarily covered (e.g. NIHB Non-Formulary Benefits which can be provided by prior authorization). Authorization &#xD;&#xA;numbers will be issued by the payor. &#xD;&#xA;CPHA Map:  Special Authorization Number or Code D.64.03  &#xD;&#xA;&#xD;&#xA;Could be used to provide references to other resources, document. For example could contain a PDF in an Attachment of the Police Report for an Accident." />
      <min value="1" />
      <type>
        <code value="string" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:RefillsRemaining">
      <path value="Claim.supportingInfo" />
      <sliceName value="RefillsRemaining" />
      <comment value="Usage Note - FHIR:   Supports up to three positions, eg 00-999.   On the first fill of a “new prescription”, the number of refills / repeats remaining will be the full number authorized. The numeral will reduce by one each time a refill / repeat is obtained.&#xD;&#xA;CPHA Map:  Refill/Repeat Authorizations  D.54.03, which supports 00-99.&#xD;&#xA;Usage Note - CPHA:   00 – 99 = number of authorized refills / repeats remaining. On the first fill of a “new prescription”, the number of refills / repeats remaining will be the full number authorized. The numeral will reduce by one each time a refill / repeat is obtained." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:RefillsRemaining.sequence">
      <path value="Claim.supportingInfo.sequence" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:RefillsRemaining.category">
      <path value="Claim.supportingInfo.category" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:RefillsRemaining.category.coding">
      <path value="Claim.supportingInfo.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:RefillsRemaining.category.coding.code">
      <path value="Claim.supportingInfo.category.coding.code" />
      <min value="1" />
      <fixedCode value="RefillRemaining" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.supportingInfo:RefillsRemaining.value[x]">
      <path value="Claim.supportingInfo.value[x]" />
      <min value="1" />
      <type>
        <code value="Quantity" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Claim.diagnosis">
      <path value="Claim.diagnosis" />
      <comment value="Usage Note: Indicates prescriber's designation of the medical condition for which the patient is being treated if required by plan.    This supports a maximum of 5 diagnosis codes.&#xD;&#xA;&#xD;&#xA;Conformance Rule:  The preferred codeset is ICD-10.   Current support for: ICD-9 or ICD-10CA, ODB reason for use codes, DND Eligible Medical Conditions.    If one or more are known, they must be included.   Adjudicators may also include implementation specific rules, eg SNOMED and this may also be included if known or agreed to by implementers.&#xD;&#xA;&#xD;&#xA;CPHA Map: Medical Condition/ Reason for Use D.51.03  A/N6   and Medical Reason/Reference D.50.03    Limited to one code" />
      <max value="5" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.diagnosis.sequence">
      <path value="Claim.diagnosis.sequence" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.diagnosis.diagnosis[x]">
      <path value="Claim.diagnosis.diagnosis[x]" />
      <comment value="Usage Note:   Allows coding and/or text to be specified.   Both should be specified when known" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Claim.diagnosis.diagnosis[x].coding">
      <path value="Claim.diagnosis.diagnosis[x].coding" />
      <comment value="Usage Note:  Allows multiple codes to be specified where translation has occurred.    Vendors should send all possible codings as this may vary amongst adjudicators.&#xD;&#xA;Alignment:  PrescribeIT supports SNOMED&#xD;&#xA;&#xD;&#xA;Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.diagnosis.diagnosis[x].coding.system">
      <path value="Claim.diagnosis.diagnosis[x].coding.system" />
      <comment value="Usage:  Provides for the Identification of reference codes that are used by the prescriber to designate the medical condition or reason for use.  &#xD;&#xA;Conformance Rule:   System values are:  &#xD;&#xA;&#xD;&#xA;CPHA Map:  Medical Reason Reference D.50.03    A1&#xD;&#xA;ICD-9   (http://hl7.org/fhir/sid/icd-9-cm)&#xD;&#xA;ODB reason for use (system =http://pharmacyeclaims.ca/FHIR/CPHA-diagnosis-ODB-reason-code|&#xD;&#xA;ICD-10 (http://hl7.org/fhir/sid/icd-10)&#xD;&#xA;DND Eligible Medical Conditions (system = http://pharmacyeclaims.ca/FHIR/CPHA-diagnosis-DND-eligible-medical-conditions|Claim.diagnosis.code)&#xD;&#xD;&#xA;The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.diagnosis.diagnosis[x].coding.code">
      <path value="Claim.diagnosis.diagnosis[x].coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.diagnosis.diagnosis[x].text">
      <path value="Claim.diagnosis.diagnosis[x].text" />
      <comment value="Usage Note:   This must be included as there are many code systems used across adjudicators.   Also useful when code system mapping has occurred.   Not mandatory for backward compatibility only&#xD;&#xA;&#xD;&#xA;Very often the text is the same as a displayName of one of the codings." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.insurance">
      <path value="Claim.insurance" />
      <comment value="Usage Note:    This is restricted to 5 instances of insurance.   All known instances should be included with the sequence number reflecting the COB Order.   Only one instance can be the focal=true.    Secondary/downstream claim submissions will include prior instances of Insurance (non-focal) and their associated Prior COBClaim Responses.&#xD;&#xA;&#xD;&#xA;All insurance coverages for the patient which may be applicable for reimbursement, of the products and services listed in the claim, are typically provided in the claim to allow insurers to confirm the ordering of the insurance coverages relative to local 'coordination of benefit' rules. One coverage (and only one) with 'focal=true' is to be used in the adjudication of this claim. Coverages appearing before the focal Coverage in the list, and where 'Coverage.subrogation=false', should provide a reference to the ClaimResponse containing the adjudication results of the prior claim." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.insurance.sequence">
      <path value="Claim.insurance.sequence" />
      <comment value="Usage Note:   This reflects the order for COB purposes.   By example, if a secondary claim is being submitted, the sequence = 2 and focal = true and the claimResponse from the primary adjudicator will be present.   If a primary claim is being submitted, multiple coverages can be included.  Sequence 1 and focal=true.&#xD;&#xA;Usage Note:   Where available, the claimResponse frrom prior claims must be included.&#xD;&#xA;&#xD;&#xA;CPHA Map:  N/A - new&#xD;&#xA;32 bit number; for values larger than this, use decimal" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.insurance.focal">
      <path value="Claim.insurance.focal" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.insurance.coverage">
      <path value="Claim.insurance.coverage" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/profile-coverage" />
        <aggregation value="bundled" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Claim.insurance.coverage.reference">
      <path value="Claim.insurance.coverage.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.insurance.claimResponse">
      <path value="Claim.insurance.claimResponse" />
      <comment value="Usage Note:  Includes the claim response from prior adjudicators, for secondary, tertiary claims.   This is a reference to the resource containing the information for a prior coverage&#xD;&#xA;CPHA Map:  N/A - new.    &#xD;&#xA;Must not be specified when 'focal=true' for this insurance." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/profile-claim-response-prior" />
        <aggregation value="bundled" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Claim.insurance.claimResponse.reference">
      <path value="Claim.insurance.claimResponse.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item">
      <path value="Claim.item" />
      <comment value="Usage Note:   Only a single item may be submitted per claim" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.sequence">
      <path value="Claim.item.sequence" />
      <comment value="Usage Note:    This is expected to be a value of &quot;1&quot;&#xD;&#xA;32 bit number; for values larger than this, use decimal" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.productOrService">
      <path value="Claim.item.productOrService" />
      <comment value="Usage Note:   This is the product or service being claimed.   The produce being claimed must be codified.&#xD;&#xA;Usage Note: This element is used to represent the medication that has been dispensed. A 'code' (Canadian Clinical Drug Data Set (CCDD), or DIN or NPN)  must be provided.  A DIN, or an NPN may also be used if a CCDD code is not available.   The CCDD code system should be used but if a code is not available, vendors may also submit a code from the DIN or NPN code system.    Note:  CCDD will encompass all DINs and NPNs.&#xD;&#xA;Usage Note:  For compounds, The &quot;unlisted compound code&quot; will be specified here.  Additionally, for compounds which do not have an assigned PIN, the DIN of the eligible active ingredient with the highest total cost will be specified in the medication.code.   This field is optional only if the SSC is used and no product, compound or other item(s) are provided to the patient.&#xD;&#xA;&#xD;&#xA;CPHA Map:  DIN/GP#/PIN/UNLISTED COMPOUND&#xD;&#xA;&#xD;&#xA;Conformance Rule:   This field is optional only when a Special Service Code is used and no product, compound or other item(s) are provided to the patient.&#xD;&#xA;&#xD;&#xA;Code systems that are acceptable in the message are:&#xD;&#xA;CCDD - https://fhir.infoway-inforoute.ca/CodeSystem/canadianclinicaldrugdataset&#xD;&#xA;DIN - http://hl7.org/fhir/NamingSystem/ca-hc-din&#xD;&#xA;NPN - http://hl7.org/fhir/NamingSystem/ca-hc-npn&#xD;&#xA;UnlistedCompound PINS- http://pharmacyeclaims.ca/FHIR/CodeSystem/unlisted-compound-codes &#xD;&#xA;Opinions - PIN - 2.16.840.1.113883.5.1102  (source PEI)&#xD;&#xA;Adjudicator-specific Psuedo DINs  - Adjudicator specific.  Each adjudicator will provide the &quot;Code system&quot; associated with their set of codes.   Once established this specificaiton can be updated to include&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.productOrService.coding">
      <path value="Claim.item.productOrService.coding" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.productOrService.coding.system">
      <path value="Claim.item.productOrService.coding.system" />
      <comment value="Usage Note:   Differentiates between code systems&#xD;&#xA;Usage:  Code systems that are acceptable in the message are:&#xD;&#xA;CCDD - https://fhir.infoway-inforoute.ca/CodeSystem/canadianclinicaldrugdataset&#xD;&#xA;DIN - http://hl7.org/fhir/NamingSystem/ca-hc-din&#xD;&#xA;NPN - http://hl7.org/fhir/NamingSystem/ca-hc-npn&#xD;&#xA;Opinions - PIN - 2.16.840.1.113883.5.1102  (source PEI)&#xD;&#xA;Unlisted Compound - http://pharmacyeclaims.ca/FHIR/CodeSystem/unlisted-compound-codes &#xD;&#xA;Adjudicator-specific Psuedo DINs  - Adjudicator specific.  Each adjudicator will provide the &quot;Code system&quot; associated with their set of codes.   Once established this specificaiton can be updated to include&#xD;&#xA;CPHA:  No mapping; this is a new data element&#xD;&#xA;&#xD;&#xA;The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.productOrService.coding.code">
      <path value="Claim.item.productOrService.coding.code" />
      <comment value="Usage:  This is the DIN, PIN, NPN, etc being claimed.  &#xD;&#xA;&#xD;&#xA;Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.productOrService.text">
      <path value="Claim.item.productOrService.text" />
      <comment value="Usage Note:  May be used to convey the description of the compound (eg Magic Mouthwash)&#xD;&#xA;&#xD;&#xA;Very often the text is the same as a displayName of one of the codings." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.modifier">
      <path value="Claim.item.modifier" />
      <comment value="Usage Note:  Provides codes which detail intervention procedures taken or identify that special coverage and payment rules are being claimed.  Conformance Rule:   This supports up to 10 intervention codes  and up to 5 Special Service codes.&#xD;&#xA; &#xD;&#xA;CPHA Map:  INTERVENTION CODES   D.65.03.   Limt of two for CPHA; limit of 10 or FHIR.   As FHIR allows more, only two intervention codes should be sent if the claim is going to an adjudicator who supports CPHA.   Note:  As a general rule, the vendor submitting the claim will submit in accordance with the adjudication system requriements.&#xD;&#xA;&#xD;&#xA;CPHA Map:  SPECIAL SERVICE CODE D.57.03.   Limit of 3 decimal places (3 codes in CPHA3).   Logical limit of 5.&#xD;&#xA;&#xD;&#xA;For example in Oral whether the treatment is cosmetic or associated with TMJ, or for Medical whether the treatment was outside the clinic or outside of office hours." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.modifier.coding">
      <path value="Claim.item.modifier.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.modifier.coding.system">
      <path value="Claim.item.modifier.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.modifier.coding.code">
      <path value="Claim.item.modifier.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.modifier.coding:InterventionCode">
      <path value="Claim.item.modifier.coding" />
      <sliceName value="InterventionCode" />
      <comment value="Conformance Rule:   Up to 10 intervention codes will be supported.&#xD;&#xA;CPHA Mapping:  Intervention and Exception CodesD.65.03      &#xD;&#xA;This field provides codes which detail DUR intervention procedures taken or identify that special coverage and payment rules are being claimed&#xD;&#xD;&#xA;&#xD;&#xA;Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.modifier.coding:InterventionCode.system">
      <path value="Claim.item.modifier.coding.system" />
      <comment value="Usage:  Identifies the authority that has assigned the intervention codes.   This will likely align with the native protocol but becomes important in the future as the system evolves.   The default is http://pharmacyeclaims.ca/FHIR/CodeSystem/FHIR-intervention-codes but could also be http://pharmacyeclaims.ca/FHIR/CodeSystem/CPHA-intervention-codes.&#xD;&#xA;&#xD;&#xA;The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously." />
      <min value="1" />
      <fixedUri value="http://pharmacyeclaims.ca/FHIR/CodeSystem/intervention-codes" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.modifier.coding:InterventionCode.code">
      <path value="Claim.item.modifier.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.modifier.coding:SpecialServiceCode">
      <path value="Claim.item.modifier.coding" />
      <sliceName value="SpecialServiceCode" />
      <comment value="Usage: The Special Service Code (SSC) describes a service which has been provided in accordance with a benefit plan or agreement.  It is also used to identify claims where the cost of the medication prescribed exceeds $9999.99.&#xD;&#xA;&#xD;&#xA;Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true." />
      <max value="5" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.modifier.coding:SpecialServiceCode.system">
      <path value="Claim.item.modifier.coding.system" />
      <min value="1" />
      <fixedUri value="http://pharmacyeclaims.ca/FHIR/CodeSystem/special-service-codes" />
    </element>
    <element id="Claim.item.modifier.coding:SpecialServiceCode.code">
      <path value="Claim.item.modifier.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.serviced[x]">
      <path value="Claim.item.serviced[x]" />
      <comment value="Usage note:  Date on which prescription and/or professional service is provided.  Established by the provider in accordance with the official time in the zone where the provider is located&#xD;&#xA;CPHA Map:  B.22.03 - Provider Transaction Date" />
      <min value="1" />
      <type>
        <code value="date" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.quantity">
      <path value="Claim.item.quantity" />
      <comment value="CPHA Mapping:  Quantity D.58.03. Q6 &#xD;&#xA;Usage Note:   When populated this value must match the value in the MedicationDispense resource.&#xD;&#xA;Conformance Rule:   3 places for vendors; adjudicators must accept 3 but could round to 2 if they wish&#xD;&#xA;&#xD;&#xA;CPHA :  All quantities are submitted as containing one decimal (e.g. 100= 10.0). Quantities always describe dosage units (e.g. tablet, puff, suppository) or metric weights or measures when they apply to liquids, solids, semi-solids or powders. Software suppliers should program their systems to convert unit or metric inputs into package units to comply with specific plan requirements such as the ODB, before communicating the claim. Use &quot;0&quot; unit items for claims for approved special services.&#xD;&#xA;&#xD;&#xA;CPHA Mapping:  Quantity D.58.03. Q6   Limits the prescription dispensing quantity to one decimal place.    &#xD;&#xA;FHIR:  no limit on number of decimal places.  The quantity field will allow for units, eg unit, package, mL, L,g, kg&#xD;&#xA;&#xD;&#xA;The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/prescribedquantityunit" />
      </binding>
    </element>
    <element id="Claim.item.quantity.value">
      <path value="Claim.item.quantity.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.quantity.system">
      <path value="Claim.item.quantity.system" />
      <comment value="Usage:  Must be specified when known.&#xD;&#xA;Note:  Alignment to PrescribeIT value set; codes from both UCUM and SNOMED&#xD;&#xA;CPHA map: N/A new&#xD;&#xA;&#xD;&#xA;see http://en.wikipedia.org/wiki/Uniform_resource_identifier" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.quantity.code">
      <path value="Claim.item.quantity.code" />
      <comment value="Usage Rule:  Allows for units, eg unit, package, mL, L,g, kg.   &#xD;&#xA;Usage Note:  Must be specified when known&#xD;&#xA;&#xD;&#xA;The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency.  The context of use may additionally require a code from a particular system." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.net">
      <path value="Claim.item.net" />
      <comment value="Usage Note:    Total amount claimed in Canadian dollars.   Must be populated; optional for backward compatibility&#xD;&#xA;Usage:  Conformance rule limit will be determined by adjudicators.  Default is 0 million less a penny (9,999,999.99).&#xD;&#xA;CPHA Mapping:  None&#xD;&#xA;&#xD;&#xA;Quebec Usage Note:  The total drug cost should be the only price field submitted to the third-party payer for medications and services that do not fall under the basic prescription drug insurance plan. This total drug cost would include the acquisition cost from the supplier and the professional fees from the pharmacist. These fees would consist of any cost upcharge added at the pharmacy level. Again, this field should be decimals with seven (7) or eight (8) positions in length.    For medications that fall under the basic prescription drug insurance plan, this field would be the sum of the Quebec Professional Fees, Quebec Price Paid by Basic Plan and the Wholesalers Profit Margin.  REVIEW WITH AQPP.. JUST THESE THREE FIELDS?  WHERE IS UPCHARGE?&#xD;&#xA;&#xD;&#xA;For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.net.value">
      <path value="Claim.item.net.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail">
      <path value="Claim.item.detail" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="productOrService.coding.code" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <comment value="Usage Note:  Details are used to specify each component pertaining to the item being claimed, including the Drug Cost, Dispense Fee,  Quebec Professional Fee, Quebec Reference Price, Quebec Wholesaler Profit Margin, Special Service Fee, Cost Upcharge, Compounding Fee, Compounding Time.   For each, a sequence number, code and net amount will be specified." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail.sequence">
      <path value="Claim.item.detail.sequence" />
      <comment value="Usage Note:   This is a sequential number assigned for each detail&#xD;&#xA;32 bit number; for values larger than this, use decimal" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail.productOrService">
      <path value="Claim.item.detail.productOrService" />
      <comment value="Usage:   This provides the detailed breakdown of what is being claimed.&#xD;&#xA;Terminology:  http://pharmacyeclaims.ca/FHIR/ValueSet/pharma-service &#xD;&#xA;&#xD;&#xA;If this is an actual service or product line, i.e. not a Group, then use code to indicate the Professional Service or Product supplied (e.g. CTP, HCPCS, USCLS, ICD10, NCPDP, DIN, RxNorm, ACHI, CCI). If a grouping item then use a group code to indicate the type of thing being grouped e.g. 'glasses' or 'compound'." />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
      </binding>
    </element>
    <element id="Claim.item.detail.productOrService.coding">
      <path value="Claim.item.detail.productOrService.coding" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail.productOrService.coding.system">
      <path value="Claim.item.detail.productOrService.coding.system" />
      <comment value="Usage:  Code systems that are acceptable in the message are:&#xD;&#xA;CCDD - https://fhir.infoway-inforoute.ca/CodeSystem/canadianclinicaldrugdataset&#xD;&#xA;DIN - http://hl7.org/fhir/NamingSystem/ca-hc-din&#xD;&#xA;NPN - http://hl7.org/fhir/NamingSystem/ca-hc-npn&#xD;&#xA;Opinions - PIN - 2.16.840.1.113883.5.1102  (source PEI)&#xD;&#xA;Unlisted Compound - http://pharmacyeclaims.ca/FHIR/CodeSystem/unlisted-compound-codes &#xD;&#xA;Adjudicator-specific Psuedo DINs  - Adjudicator specific.  Each adjudicator will provide the &quot;Code system&quot; associated with their set of codes.   Once established this specificaiton can be updated to include&#xD;&#xA;The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail.productOrService.coding.code">
      <path value="Claim.item.detail.productOrService.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail.productOrService.text">
      <path value="Claim.item.detail.productOrService.text" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail.net">
      <path value="Claim.item.detail.net" />
      <comment value="Usage Note:  Must be populated for all except Compounding Time.&#xD;&#xA;Conformance Rule:   The sum of all net amounts for the details must equal the net amount charged for the item (claim.item.net) &#xD;&#xA;&#xD;&#xA;For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:DrugCost">
      <path value="Claim.item.detail" />
      <sliceName value="DrugCost" />
      <comment value="Usage Note:  Total cost of ingredient(s) in prescription dispensed, or total value of supplies issued.   This is a total value of drug or material dispensed calculated by multiplying unit cost (or value) by quantity. Unless cost is otherwise defined in a contract or agreement between the payor and the provider, it will reflect the cost price to the provider shown on the price list of the supplier from which the pharmacy obtains the product being claimed plus any applicable federal or provincial taxes&#xD;&#xA;&#xD;&#xA;Conformance Rule:   This is mandatory&#xD;&#xA; &#xD;&#xA;CPHA Mapping:  D.66.03  Drug Cost or Value  D6.   &#xD;&#xA; FHIR, no limit on dollar amount unless specified by Adjudicators." />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:DrugCost.sequence">
      <path value="Claim.item.detail.sequence" />
      <comment value="Usage Note:   When item is specified, the next availabe sequence number will be assigned, eg 1,2,3&#xD;&#xA;&#xD;&#xA;32 bit number; for values larger than this, use decimal" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:DrugCost.productOrService">
      <path value="Claim.item.detail.productOrService" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:DrugCost.productOrService.coding">
      <path value="Claim.item.detail.productOrService.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:DrugCost.productOrService.coding.code">
      <path value="Claim.item.detail.productOrService.coding.code" />
      <min value="1" />
      <fixedCode value="DrugCost" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:DrugCost.net">
      <path value="Claim.item.detail.net" />
      <comment value="CPHA - D.66.03 - Drug Cost&#xD;&#xA;&#xD;&#xA;For example, the formula: quantity * unitPrice * factor  = net. Quantity and factor are assumed to be 1 if not supplied." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:DrugCost.net.value">
      <path value="Claim.item.detail.net.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CostUpcharge">
      <path value="Claim.item.detail" />
      <sliceName value="CostUpcharge" />
      <comment value="Usage Note:  The agreed upcharge on the cost of dispensed product calculated as a specific amount.  This refers to total added value (e.g. mark up, inventory allowance, etc.) plus any applicable federal or provincial taxes but does not include any rofessional fee.&#xD;&#xD;&#xA;CPHA Map:  Upcharge D.67.03" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CostUpcharge.sequence">
      <path value="Claim.item.detail.sequence" />
      <comment value="Usage Note:   When item is specified, the next availabe sequence number will be assigned.  eg 1,2,3&#xD;&#xA;&#xD;&#xA;32 bit number; for values larger than this, use decimal" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CostUpcharge.productOrService">
      <path value="Claim.item.detail.productOrService" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CostUpcharge.productOrService.coding">
      <path value="Claim.item.detail.productOrService.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CostUpcharge.productOrService.coding.code">
      <path value="Claim.item.detail.productOrService.coding.code" />
      <min value="1" />
      <fixedCode value="Upcharge" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CostUpcharge.net">
      <path value="Claim.item.detail.net" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:ProfessionalFee">
      <path value="Claim.item.detail" />
      <sliceName value="ProfessionalFee" />
      <comment value="FHIR Usage Note:   This field is expanded to allow larger professional fee amounts.  &#xD;&#xA;Conformance Rule:  This is mandatory&#xD;&#xA;&#xD;&#xA;Usage Note:  Pharmacist's fee for professional and technical activities associated with providing the prescribed medication and service.  This is a fee to compensate the pharacist for professional services associated with the dispensing of a prescription. Unless a plan, or agreement between a provider and a payor, contains provisions for including compensation for compounding or special services in the professional fee, compensation for these services will be claimed separately as a &quot;Compounding Charge&quot; ( D.70.03) and a &quot;Special Services Fee&quot; (D.72.03).&#xD;&#xA;&#xD;&#xA;CPHA Mapping:  D.68.03 Professional Fee" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:ProfessionalFee.sequence">
      <path value="Claim.item.detail.sequence" />
      <comment value="Usage Note:   When item is specified, the next availabe sequence number will be assigned.  eg 1,2,3&#xD;&#xA;&#xD;&#xA;32 bit number; for values larger than this, use decimal" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:ProfessionalFee.productOrService">
      <path value="Claim.item.detail.productOrService" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:ProfessionalFee.productOrService.coding">
      <path value="Claim.item.detail.productOrService.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:ProfessionalFee.productOrService.coding.code">
      <path value="Claim.item.detail.productOrService.coding.code" />
      <min value="1" />
      <fixedCode value="Proffee" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:ProfessionalFee.net">
      <path value="Claim.item.detail.net" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingCharge">
      <path value="Claim.item.detail" />
      <sliceName value="CompoundingCharge" />
      <comment value="Usage Note: Amount payable for compounding the prescription.  There are variations on how this is calculated. It may be:  - a multiple of rate per minute,  - other calculations.  Unless a plan or agreement between a provider and payor contains a provision for including compensation for compounding in the &quot;Professional Fee&quot; (Field D.68.03), the &quot;Compounding Charge&quot; will be claimed in addition to the Professional Fee.The provider will claim the appropriate amount as defined by agreement with the payor.&#xD;&#xA;&#xD;&#xA;CPHA Mapping:  D.70.03 Compounding Charge" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingCharge.sequence">
      <path value="Claim.item.detail.sequence" />
      <comment value="Usage Note:   When item is specified, the next availabe sequence number will be assigned.  eg 1,2,3&#xD;&#xA;&#xD;&#xA;32 bit number; for values larger than this, use decimal" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingCharge.productOrService">
      <path value="Claim.item.detail.productOrService" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingCharge.productOrService.coding">
      <path value="Claim.item.detail.productOrService.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingCharge.productOrService.coding.code">
      <path value="Claim.item.detail.productOrService.coding.code" />
      <min value="1" />
      <fixedCode value="CompoundCharge" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingCharge.net">
      <path value="Claim.item.detail.net" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingTime">
      <path value="Claim.item.detail" />
      <sliceName value="CompoundingTime" />
      <comment value="Usage Note:  The time in minutes required to compound the prescription&#xD;&#xA;CPHA Mapping:  D.71.03  2N" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingTime.sequence">
      <path value="Claim.item.detail.sequence" />
      <comment value="Usage Note:   When item is specified, the next availabe sequence number will be assigned.  eg 1,2,3&#xD;&#xA;&#xD;&#xA;2 bit number; for values larger than this, use decimal" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingTime.productOrService">
      <path value="Claim.item.detail.productOrService" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingTime.productOrService.coding">
      <path value="Claim.item.detail.productOrService.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingTime.productOrService.coding.code">
      <path value="Claim.item.detail.productOrService.coding.code" />
      <min value="1" />
      <fixedCode value="CompoundTime" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingTime.quantity">
      <path value="Claim.item.detail.quantity" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingTime.quantity.value">
      <path value="Claim.item.detail.quantity.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:CompoundingTime.quantity.unit">
      <path value="Claim.item.detail.quantity.unit" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:SpecialServiceFee">
      <path value="Claim.item.detail" />
      <sliceName value="SpecialServiceFee" />
      <comment value="Usage Note:  Refers to special services consistent with contractual agreements between provider and plan administrators.    Included for backward compatibility.   Note:   There is a field specifically to convey the Eligible Amount for provincial plans for a coordinated claim.&#xD;&#xA; &#xD;&#xA;CPHA Mapping:  Special Services Fee(s) D.72.03" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:SpecialServiceFee.sequence">
      <path value="Claim.item.detail.sequence" />
      <comment value="Usage Note:   When item is specified, the next availabe sequence number will be assigned.  eg 1,2,3&#xD;&#xA;&#xD;&#xA;32 bit number; for values larger than this, use decimal" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:SpecialServiceFee.productOrService">
      <path value="Claim.item.detail.productOrService" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:SpecialServiceFee.productOrService.coding">
      <path value="Claim.item.detail.productOrService.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:SpecialServiceFee.productOrService.coding.code">
      <path value="Claim.item.detail.productOrService.coding.code" />
      <min value="1" />
      <fixedCode value="SSF" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:SpecialServiceFee.net">
      <path value="Claim.item.detail.net" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:EligibleAmtProvincialPlan">
      <path value="Claim.item.detail" />
      <sliceName value="EligibleAmtProvincialPlan" />
      <comment value="Usage:   Eligible Amount (total cost and fee) for a given medication for a provincial plan.   May be used for coordinated claims in Ontario, where this amount represents the amount the pharmacy is looking to be paid. This is not the difference between total submitted and the previous paid amount.  This may be used by adjudicators to drive specific adjudication rules.&#xD;&#xA;CPHA Mapping:  Special Services Fee(s) D.72.03" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:EligibleAmtProvincialPlan.sequence">
      <path value="Claim.item.detail.sequence" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:EligibleAmtProvincialPlan.productOrService">
      <path value="Claim.item.detail.productOrService" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:EligibleAmtProvincialPlan.productOrService.coding">
      <path value="Claim.item.detail.productOrService.coding" />
      <min value="1" />
      <max value="1" />
      <fixedCoding>
        <code value="EligibleAmtProvincial" />
      </fixedCoding>
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:EligibleAmtProvincialPlan.productOrService.coding.code">
      <path value="Claim.item.detail.productOrService.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:EligibleAmtProvincialPlan.net">
      <path value="Claim.item.detail.net" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:EligibleAmtProvincialPlan.net.value">
      <path value="Claim.item.detail.net.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecProfessionalFeeInfo">
      <path value="Claim.item.detail" />
      <sliceName value="QuebecProfessionalFeeInfo" />
      <comment value="Definition:  In Quebec, this amount reflects that the professional fee, including any cost upcharge at the pharmacy level.    Supplemental to professional fee; not included in the total cost.   This is informational ONLY&#xD;&#xA;&#xD;&#xA;CPHA Mapping:  This field already exists under D.68.03. But, in Quebec, the definition that would need to be used will reflect that the professional fees also include any cost upcharge at the pharmacy level. The field could be kept with the corrected description or be modified to have six (6) positions in length to give more freedom if expensive medications come in the following years." />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecProfessionalFeeInfo.sequence">
      <path value="Claim.item.detail.sequence" />
      <comment value="Usage Note:   When specified, the next availabe sequence number will be assigned.&#xD;&#xA;&#xD;&#xA;32 bit number; for values larger than this, use decimal" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecProfessionalFeeInfo.productOrService">
      <path value="Claim.item.detail.productOrService" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecProfessionalFeeInfo.productOrService.coding">
      <path value="Claim.item.detail.productOrService.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecProfessionalFeeInfo.productOrService.coding.code">
      <path value="Claim.item.detail.productOrService.coding.code" />
      <min value="1" />
      <fixedCode value="QCProffee" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecProfessionalFeeInfo.net">
      <path value="Claim.item.detail.net" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecWholesalerProfitMargin">
      <path value="Claim.item.detail" />
      <sliceName value="QuebecWholesalerProfitMargin" />
      <comment value="Usage Note:   Used for medications included in the basic prescription drug insurance plan in Quebec.   &#xD;&#xA;Conformance Rule:  This field has a limit of five (5) decimal positions to account for current and future needs. If the pharmacists purchased the medication directly from the manufacturer, there would not be any wholesaler's profit margin.  &#xD;&#xA;CPHA Mapping:  None; this is a new field" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecWholesalerProfitMargin.sequence">
      <path value="Claim.item.detail.sequence" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecWholesalerProfitMargin.productOrService">
      <path value="Claim.item.detail.productOrService" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecWholesalerProfitMargin.productOrService.coding">
      <path value="Claim.item.detail.productOrService.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecWholesalerProfitMargin.productOrService.coding.code">
      <path value="Claim.item.detail.productOrService.coding.code" />
      <min value="1" />
      <fixedCode value="QCRefPrice" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecWholesalerProfitMargin.net">
      <path value="Claim.item.detail.net" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecGuaranteedSellingPrice">
      <path value="Claim.item.detail" />
      <sliceName value="QuebecGuaranteedSellingPrice" />
      <comment value="Usage Note:  The price paid by the basic plan is shown on the list of medications. . The guaranteed selling price does not include the wholesaler's profit margin.   This field is mandatory for medications included in the basic prescription drug insurance plan.&#xD;&#xA;The new field supports seven (7) positions in length to account for drug costs up to $99999.99.  If needed in the this future this will be expanded.   &#xD;&#xA;CPHA Mapping:   None, new data element" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecGuaranteedSellingPrice.sequence">
      <path value="Claim.item.detail.sequence" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecGuaranteedSellingPrice.productOrService">
      <path value="Claim.item.detail.productOrService" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecGuaranteedSellingPrice.productOrService.coding">
      <path value="Claim.item.detail.productOrService.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecGuaranteedSellingPrice.productOrService.coding.code">
      <path value="Claim.item.detail.productOrService.coding.code" />
      <min value="1" />
      <fixedCode value="QCRetailDispense" />
      <mustSupport value="true" />
    </element>
    <element id="Claim.item.detail:QuebecGuaranteedSellingPrice.productOrService.coding.display">
      <path value="Claim.item.detail.productOrService.coding.display" />
      <mustSupport value="false" />
    </element>
    <element id="Claim.item.detail:QuebecGuaranteedSellingPrice.net">
      <path value="Claim.item.detail.net" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>