<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-claim-response" />
  <url value="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/profile-claim-response" />
  <name value="ClaimResponse" />
  <title value="Claim Response" />
  <status value="draft" />
  <description value="A successfully processed claim response (no errors).   Used for both Professional Services and Medication Dispense Claim repsonses" />
  <purpose value="Conveys key information in a successfully processed claim response (no errors)" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="ClaimResponse" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/ClaimResponse" />
  <derivation value="constraint" />
  <differential>
    <element id="ClaimResponse">
      <path value="ClaimResponse" />
      <comment value="CPHA Mapping:   Response Status - E.05.03 where the following codes apply&#xD;&#xA;A=accepted as transmitted - no adjustments&#xD;&#xA;B=accepted with Rx price adjustment&#xD;&#xA;D=pay cardholder claim accepted (indicated using payee type)" />
    </element>
    <element id="ClaimResponse.id">
      <path value="ClaimResponse.id" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.meta">
      <path value="ClaimResponse.meta" />
    </element>
    <element id="ClaimResponse.meta.profile">
      <path value="ClaimResponse.meta.profile" />
      <max value="0" />
    </element>
    <element id="ClaimResponse.identifier">
      <path value="ClaimResponse.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="assigner.identifier.type.coding.system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <comment value="Usage Note: This is an internal reference number assigned to each claim by the processor.    This must be present on all claim response.   Though optional in CPHA3, this should be treated as mandatory&#xD;&#xA;CPHA Mapping: Reference Number  E.04.03  9N" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.identifier.system">
      <path value="ClaimResponse.identifier.system" />
      <comment value="Usage Note:  May be specified in order to guarantee uniqueness.&#xD;&#xA;Identifier.system is always case sensitive." />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.identifier.value">
      <path value="ClaimResponse.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.status">
      <path value="ClaimResponse.status" />
      <comment value="CPHA Mapping:  None&#xD;&#xA;This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." />
      <fixedCode value="active" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.type">
      <path value="ClaimResponse.type" />
      <comment value="CPHA Mapping:  None&#xD;&#xA;This may contain the local bill type codes, for example the US UB-04 bill type code or the CMS bill type." />
      <fixedCodeableConcept>
        <text value="pharmacy" />
      </fixedCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.type.text">
      <path value="ClaimResponse.type.text" />
      <min value="1" />
      <fixedString value="pharmacy" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.subType">
      <path value="ClaimResponse.subType" />
      <comment value="Conformance Rule:   This will be used to convey the &quot;type&quot; of Claim/Claim Response in accordance with the Plan Type.  Set value = &quot;public&quot; or &quot;private&quot; &quot;patientAssistedCard&quot; or &quot;unknown&quot;.   &#xD;&#xA;CPHA Map:  None&#xD;&#xA;Rationale:   This value will be conveyed in downstream claim requests, as part of the Prior Claim Response to assist in proper coordination of benefits.    Note:  This is also included in the Prior Adjuidcaton Results&#xD;&#xA;CPHA Map:  None:  This is a new data element&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This may contain the local bill type codes, for example the US UB-04 bill type code or the CMS bill type." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.subType.coding">
      <path value="ClaimResponse.subType.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.subType.coding.system">
      <path value="ClaimResponse.subType.coding.system" />
      <comment value="Usage:  Set value = http://pharmacyeclaims.ca/FHIR/CodeSystem/coverage-type&#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="ClaimResponse.subType.coding.code">
      <path value="ClaimResponse.subType.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.use">
      <path value="ClaimResponse.use" />
      <fixedCode value="claim" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.patient">
      <path value="ClaimResponse.patient" />
      <comment value="Usage Note:   The same resource from the request may be included here&#xD;&#xA;CPHA Mapping:  None&#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." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/profile-patient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.patient.reference">
      <path value="ClaimResponse.patient.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.created">
      <path value="ClaimResponse.created" />
      <comment value="CPHA Mapping:   Adjudication Date E.01.03" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.insurer">
      <path value="ClaimResponse.insurer" />
      <comment value="Usage Note:   This conveys the identifer for the insurer&#xD;&#xA;CPHA Mapping:  IIN ( Issuer Identification Number)    A.01.01&#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." />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.insurer.identifier">
      <path value="ClaimResponse.insurer.identifier" />
      <comment value="CPHA Mapping:  IIN ( Issuer Identification Number)    A.01.01&#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="ClaimResponse.insurer.identifier.system">
      <path value="ClaimResponse.insurer.identifier.system" />
      <min value="1" />
      <fixedUri value="http://pharmacyeclaims.ca/FHIR/CPHA-identifier/IIN" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.insurer.identifier.value">
      <path value="ClaimResponse.insurer.identifier.value" />
      <comment value="CPHA Mapping:  IIN ( Issuer Identification Number)    A.01.01&#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="ClaimResponse.request">
      <path value="ClaimResponse.request" />
      <max value="0" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.request.identifier">
      <path value="ClaimResponse.request.identifier" />
      <comment value="Usage Note:  This will be the Claim.identifier (slice Claim-identifier) from the request message.   Note:  the additional identifier from the request ( Trace number ) will be conveyed in the display element.&#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="ClaimResponse.request.identifier.system">
      <path value="ClaimResponse.request.identifier.system" />
      <fixedUri value="http://pharmacyeclaims.ca/FHIR/CPHA-identifier/trace-number" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.request.identifier.value">
      <path value="ClaimResponse.request.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.request.display">
      <path value="ClaimResponse.request.display" />
      <comment value="Usage Note:   This is limited to 6N in order to support backward compatibility to CPHA  This will be the trace number from the Claim Request.identifier.value  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.     This is optional as the Trace number can be deprecated once all implementations natively support FHIR.&#xD;&#xD;&#xA;CPHA Mapping: Trace Number B.23.03&#xD;&#xA;&#xD;&#xA;This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it." />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.outcome">
      <path value="ClaimResponse.outcome" />
      <comment value="Usage Note:   This can be set to &quot;complete&quot; unless there is an error that prevents the claim from being fully processed.&#xD;&#xA;CPHA Mapping:   Always map to complete; no field level mapping &#xD;&#xA;&#xD;&#xA;The resource may be used to indicate that: the request has been held (queued) for processing; that it has been processed and errors found (error); that no errors were found and that some of the adjudication has been undertaken (partial) or that all of the adjudication has been undertaken (complete)." />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.disposition">
      <path value="ClaimResponse.disposition" />
      <comment value="CPHA Map:   Response Status E.05.03&#xD;&#xA;This indicates the status of the claim response or prior claim response.   This must be populated&#xD;&#xA;&#xD;&#xA;Set value = Single letter of A or B or C, etc.. as follows:&#xD;&#xA;&#xD;&#xA;A=accepted as transmitted - no adjustments&#xD;&#xA;B=accepted with Rx price adjustment&#xD;&#xA;C=claim captured for batch processing&#xD;&#xA;D=pay cardholder claim accepted&#xD;&#xA;R=rejected claim/reversal&#xD;&#xA;V=reversal accepted&#xD;&#xA;Note that FHIR strings SHALL NOT exceed 1MB in sizeNote that FHIR strings SHALL NOT exceed 1MB in size" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.preAuthRef">
      <path value="ClaimResponse.preAuthRef" />
      <comment value="Usage Rule:    This is an indicator that this is a special authorization.   Each implementer will decide how this is to be used; for example this could be an identifier (GUID) or a URL or text.    If a link is provided, pharmacies may be able to download the information to store on the patient record.  If this is populated, PMS can expect that other special auth fields will be present.&#xD;&#xA;&#xD;&#xA;This value is only present on preauthorization adjudications." />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.preAuthPeriod">
      <path value="ClaimResponse.preAuthPeriod" />
      <comment value="Usage:   Used only for Special Auth claims to convey the start and expiry date.   Note:   An expiry date will not be present for &quot;unlimited&quot; expiry dates.   Payors who have this special authorization information (if available) should return it in the new fields. This would include things like the ODB limited use expiry date &#xD;&#xA;CPHA Map:  New data element&#xD;&#xA;&#xD;&#xA;A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. &quot;the patient was an inpatient of the hospital for this time range&quot;) or one value from the range applies (e.g. &quot;give to the patient between these two times&quot;).&#xA;&#xA;Period is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration)." />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.payeeType">
      <path value="ClaimResponse.payeeType" />
      <comment value="Usage Rule:  Determines who the adjudicator/insurer will issue payment to.  Set value = &quot;subscriber&quot; or &quot;provider&quot;.  &#xD;&#xA;Note:  The pay subscriber option may be used if the network is down, and when the pharmacy has collected from the patient and is submitting on their behalf.&#xD;&#xA;CPHA Mapping:   Transaction code E,03,03.  &#xD;&#xA;Value of &quot;provider&quot; maps to 51=response to a pay provider claim for real-time adjudication&#xD;&#xA;Value of &quot;subscriber&quot; maps to 54=response to a pay cardholder claim If value = subscriber, maps to CPHA  &#xD;&#xA;&#xD;&#xA;Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.payeeType.coding">
      <path value="ClaimResponse.payeeType.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.payeeType.coding.system">
      <path value="ClaimResponse.payeeType.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/payeetype" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.payeeType.coding.code">
      <path value="ClaimResponse.payeeType.coding.code" />
      <comment value="Set value = &quot;provider&quot; or &quot;subscriber&quot;&#xD;&#xA;&#xD;&#xA;Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item">
      <path value="ClaimResponse.item" />
      <comment value="Usage Note:  Identifies the item submitted and the associated adjudication results." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.itemSequence">
      <path value="ClaimResponse.item.itemSequence" />
      <comment value="Usage Note:   This is the claim.item.sequence from the request message.   Currently this will be a value of &quot;1&quot; as there is only one item per claim.&#xD;&#xA;CPHA Mapping:  None&#xD;&#xA;&#xD;&#xA;32 bit number; for values larger than this, use decimal" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication">
      <path value="ClaimResponse.item.adjudication" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="category.coding.code" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <comment value="Usage Note:   The adjudication details associated with the item being claimed." />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <comment value="Usage:   This will indicate the type of adjudication, eg DrugCost, Cost Upcharge, etc.   &#xD;&#xA;CPHA Mapping:   Used in field mapping&#xD;&#xA;For example codes indicating: Co-Pay, deductible, eligible, benefit, tax, etc." />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
      </binding>
    </element>
    <element id="ClaimResponse.item.adjudication.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication.category.coding.system">
      <path value="ClaimResponse.item.adjudication.category.coding.system" />
      <fixedUri value="http://pharmacyeclaims.ca/FHIR/CodeSystem/adjudication-category-codes" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication.reason">
      <path value="ClaimResponse.item.adjudication.reason" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication.amount">
      <path value="ClaimResponse.item.adjudication.amount" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication.value">
      <path value="ClaimResponse.item.adjudication.value" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:DrugCost">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="DrugCost" />
      <comment value="Usage: The value accepted for drug / product before any adjustment provided for in the Co-Pay, Deductible and Co-Insurance fields.    The eligible amount.&#xD;&#xA;Usage Rule:   There is no size restriction on the dollar amount&#xD;&#xA;CPHA Mapping:  Drug Cost / Product Value  E.08.03  Optional, D6" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:DrugCost.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:DrugCost.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:DrugCost.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <fixedCode value="DrugCost" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:DrugCost.amount">
      <path value="ClaimResponse.item.adjudication.amount" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CostUpcharge">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="CostUpcharge" />
      <comment value="Usage:  The amount accepted as a compounding charge before any adjustments provided for in the Co-Pay, Deductible and Co-Insurance fields  &#xD;&#xA;Usage Rule:   There is no size restriction on this dollar amount&#xD;&#xA;CPHA Map:  E.09.03 Cost Upcharge Optional D5" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CostUpcharge.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CostUpcharge.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CostUpcharge.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size&#xD;&#xA;CPHA Mapping:  E.09.03 in amount" />
      <min value="1" />
      <fixedCode value="Upcharge" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CostUpcharge.amount">
      <path value="ClaimResponse.item.adjudication.amount" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:GenericIncentive">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="GenericIncentive" />
      <comment value="Usage:  No known use cases; this is only present for backward compatibility but not expected to be used.&#xD;&#xA;CPHA Map: E.10.03 Generic Incentive" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:GenericIncentive.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:GenericIncentive.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:GenericIncentive.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <fixedCode value="GenericIncentive" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:GenericIncentive.amount">
      <path value="ClaimResponse.item.adjudication.amount" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ProfessionalFee">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="ProfessionalFee" />
      <comment value="Usage:  The amount accepted as a professional charge before any adjustments provided for in the Co-Pay, Deductible and Co-Insurance fields.  This reflects the amount claimed in the request, field Claim.item.detail:ProfessionalFee&#xD;&#xA;&#xD;&#xA;CPHA Map:  E.12.03  Professional Fee Optional D5" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ProfessionalFee.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ProfessionalFee.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ProfessionalFee.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <fixedCode value="ProfFee" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ProfessionalFee.amount">
      <path value="ClaimResponse.item.adjudication.amount" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CompoundingCharge">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="CompoundingCharge" />
      <comment value="Usage:  The amount accepted as a compounding charge before any adjustments provided for in the Co-Pay, Deductible and Co-Insurance fields.    This reflects the amount claimed in Field Claim.item.detail:CompoundingCharge&#xD;&#xA;CPHA Map: E.13.03 Compounding Charge Optional D5" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CompoundingCharge.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CompoundingCharge.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CompoundingCharge.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <fixedCode value="CompoundingCharge" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CompoundingCharge.amount">
      <path value="ClaimResponse.item.adjudication.amount" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialServicesFee">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="SpecialServicesFee" />
      <comment value="Usage:  The amount accepted as a special services fee before any adjustments provided for in the Co-Pay, Deductible and Co-Insurance fields. &#xD;&#xA;Usage:   This reflects the amount claimed in the request message for Special Services Fee (Refers to special services consistent with contractual agreements between provider and plan administrators)&#xD;&#xA;CPHA Map:  E.14.03 Special Services Fee  Optional D5;   0..*" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialServicesFee.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialServicesFee.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialServicesFee.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <fixedCode value="SSF" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialServicesFee.amount">
      <path value="ClaimResponse.item.adjudication.amount" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CoPayToCollect">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="CoPayToCollect" />
      <comment value="Usage:  The co pay amount which the provider collects from the beneficiary for a specific claim.  This refers to &quot;co pay&quot; as defined in the carrier's benefit brochure.&#xD;&#xA;CPHA Map:  Copay to Collect  E.15.03  Optional D6" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CoPayToCollect.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CoPayToCollect.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CoPayToCollect.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <fixedCode value="Copay" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CoPayToCollect.amount">
      <path value="ClaimResponse.item.adjudication.amount" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:DeductibleToCollect">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="DeductibleToCollect" />
      <comment value="Usage:  The deductible amount which the provider collects from the beneficiary for a specific claim.  This refers to &quot;deductible&quot; as defined in the carrier's benefit brochure.&#xD;&#xA;CPHA Map:  Deductible to Collect E.16.03  Optional D6" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:DeductibleToCollect.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:DeductibleToCollect.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:DeductibleToCollect.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <fixedCode value="Deductible" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:DeductibleToCollect.amount">
      <path value="ClaimResponse.item.adjudication.amount" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CoInsuranceToCollect">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="CoInsuranceToCollect" />
      <comment value="Usage:  The co-insurance amount which the provider collects from the beneficiary for a specific claim.  This refers to &quot;co-insurance&quot; as defined in the carrier's benefit brochure.&#xD;&#xA;CPHA Map:  Co-Insurance to Collect E.17.03  Optional D6" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CoInsuranceToCollect.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CoInsuranceToCollect.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CoInsuranceToCollect.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <fixedCode value="Co-Insurance" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:CoInsuranceToCollect.amount">
      <path value="ClaimResponse.item.adjudication.amount" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthTotalQuantityDispenseAccumulated">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="SpecialAuthTotalQuantityDispenseAccumulated" />
      <comment value="Usage:  Total Quantity Dispense Accumulated.   The total number of pills &quot;adjudicated&quot; for a special auth number.   An Adjudicator authorizes the number of pills against a special auth number; the dispenses may occur across several pharmacies.  This accumulated total is returned as part of the adjudication result as informational data.    &#xD;&#xA;Usage:  Used in NFLD today and may be used by other provinces.   &#xD;&#xA;CPHA Mapping:  None; this is a new data element" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthTotalQuantityDispenseAccumulated.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthTotalQuantityDispenseAccumulated.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <min value="1" />
      <max value="1" />
      <fixedCoding>
        <code value="SADispenseAccumulated" />
      </fixedCoding>
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthTotalQuantityDispenseAccumulated.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <fixedCode value="SATotalQuantityDispenseAccumulated" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthTotalQuantityDispenseAccumulated.value">
      <path value="ClaimResponse.item.adjudication.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthRemainingQuant">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="SpecialAuthRemainingQuant" />
      <comment value="Usage:   Total special authorized quantity remaining on a prescription after this dispense (across all prescriptions).   Recognizing that the quantity is relating to the unit and the strength of the product, this may also be specified.   eg 10 tabs of 5mg strength is equivalent to 20 tabs and 2.5 mg.     This will include the quantity and unit; extension allows for this.  &#xD;&#xA;Rationale:   The pharmacy does not currently have access to this data  &#xD;&#xA;Conformance Rule:   The quantity remaining must be based upon the DIN strength in the claim request, using the extension.  It may also be expressed in text using the reason.text for more complex cases, eg with multiple DINs.&#xD;&#xA;&#xD;&#xA;Usage Note: . If there is no special authorization, this field will not be used.   If the adjudicator is not currently returning this information, this may be left blank." />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthRemainingQuant.extension:extAuthQuantityBasedOnStrength">
      <path value="ClaimResponse.item.adjudication.extension" />
      <sliceName value="extAuthQuantityBasedOnStrength" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/Ext-AuthQuantityBasedOnUnit" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthRemainingQuant.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthRemainingQuant.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <min value="1" />
      <max value="1" />
      <fixedCoding>
        <code value="SARemainingQuantity" />
      </fixedCoding>
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthRemainingQuant.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <fixedCode value="SARemainingQuantityAuth" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthRemainingQuant.reason">
      <path value="ClaimResponse.item.adjudication.reason" />
      <comment value="Usage Note:  May express the remaining quantity, as text along with a decimal value.&#xD;&#xA;For example may indicate that the funds for this benefit type have been exhausted." />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthRemainingQuant.reason.text">
      <path value="ClaimResponse.item.adjudication.reason.text" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthApprovedDaysSupply">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="SpecialAuthApprovedDaysSupply" />
      <comment value="Usage:   The Special Authorized days supply for this prescription independent of where it is dispensed.  Today may be used for LU codes in Ontario." />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthApprovedDaysSupply.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <fixedCodeableConcept>
        <coding>
          <code value="SAApprovedDaysSupply" />
        </coding>
      </fixedCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthApprovedDaysSupply.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <min value="1" />
      <max value="1" />
      <fixedCoding>
        <code value="SADaysSupply" />
      </fixedCoding>
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthApprovedDaysSupply.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:SpecialAuthApprovedDaysSupply.value">
      <path value="ClaimResponse.item.adjudication.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:PertinentAdjudicationDetails">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="PertinentAdjudicationDetails" />
      <comment value="Usage Note:  This field allows the first payor to pass on pertinent information to a secondary carrier.   It allows for coding or textual data to be sent which may be useful as use cases evolve.&#xD;&#xA;Conformance Rule:  Only used by implementers with a specific use case, eg in BC today for BC does&#xD;&#xA;Usage Note:   In BC, data is passed in a response code, which is then transposed into a downstream claim request in the special auth field.  This field removes the requirement for the vendor to transposed the data.   It is instead placed here.   &#xD;&#xA;CPHA Mapping:    Today, data is returned from the first payor in BC as a response code; this is then transposed into the request message for the secondary carrier." />
      <max value="20" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:PertinentAdjudicationDetails.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:PertinentAdjudicationDetails.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:PertinentAdjudicationDetails.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:PertinentAdjudicationDetails.category.text">
      <path value="ClaimResponse.item.adjudication.category.text" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:PertinentAdjudicationDetails.value">
      <path value="ClaimResponse.item.adjudication.value" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ResponseCodes">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="ResponseCodes" />
      <comment value="Usage:  Codes to define responses that identify errors and other reasons that may cause the claim(s) to be altered or rejected. CPHA  will accommodate 5 response codes per claim.   FHIR will support a maximum of 10 codes.  The first two numeric digits of the field/version numbers in sections A, B, C and D reflect error codes which indicate missing or invalid information received &#xD;&#xA;in the respective fields. Alphanumeric and alpha combinations provide other response messages.&#xD;&#xA;CPHA Map:  Response Codes E.06.03   A/N10" />
      <max value="20" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ResponseCodes.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <comment value="Usage Note:  Set value = &quot;ResponseCode&quot;.   Note:  In future, more granular categories may be defined.&#xD;&#xA;&#xD;&#xA;For example codes indicating: Co-Pay, deductible, eligible, benefit, tax, DUR, etc." />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ResponseCodes.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ResponseCodes.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ResponseCodes.reason">
      <path value="ClaimResponse.item.adjudication.reason" />
      <comment value="CPHA Map:  Response Codes E.06.03   A/N10&#xD;&#xA;Usage Note:   Codes to define responses that identify errors and other reasons that may cause the claim(s) to be altered or rejected.   In CPHA, the Field length of 10 will accommodate 5 response codes per claim.   In FHIR, this is a list with a practical maximum of 20 codes.   Note:  error codes may be moved out of the repsonse codes in the future&#xD;&#xA;&#xD;&#xA;For example may indicate that the funds for this benefit type have been exhausted." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ResponseCodes.reason.coding">
      <path value="ClaimResponse.item.adjudication.reason.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ResponseCodes.reason.coding.system">
      <path value="ClaimResponse.item.adjudication.reason.coding.system" />
      <comment value="Usage Note:  This is recommended for use, but optional.   All coding systems should be specified to identify the source system, including http://pharmacyeclaims.ca/FHIR/CodeSystem/CPHA3-response-codes.&#xD;&#xA;Conformance Rule:  Must be present if known&#xD;&#xA;CPHA3 Mapping: None - this is new&#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." />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ResponseCodes.reason.coding.code">
      <path value="ClaimResponse.item.adjudication.reason.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ClinicalAlertCodes">
      <path value="ClaimResponse.item.adjudication" />
      <sliceName value="ClinicalAlertCodes" />
      <comment value="Usage Note:   May be used in the future to split out clinical codes from response codes that are directly related to adjudication.   ALERT CODES, as the name implies, are intended to be used to draw the attention of the provider to possible complications that may result from the medication concerned. In serious situations the claim may be rejected. Processors are encouraged to use discretion, on the use of this table, to avoid sending unnecessary &quot;ALERT CODES&quot; as they can be extremely interruptive to the routines of the provider and cause undesirable processing and service delays.  Rationale:  Allows POS vendors to easily differentiate between clinical codes, eg DUR codes&#xD;&#xA;Mapping:  None" />
      <max value="20" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ClinicalAlertCodes.category">
      <path value="ClaimResponse.item.adjudication.category" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ClinicalAlertCodes.category.coding">
      <path value="ClaimResponse.item.adjudication.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ClinicalAlertCodes.category.coding.code">
      <path value="ClaimResponse.item.adjudication.category.coding.code" />
      <min value="1" />
      <fixedCode value="ClinicalCode" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ClinicalAlertCodes.reason">
      <path value="ClaimResponse.item.adjudication.reason" />
      <comment value="Usage Note:  Clinical Code.  System should be included where known.   Text is optional&#xD;&#xA;&#xD;&#xA;For example may indicate that the funds for this benefit type have been exhausted." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ClinicalAlertCodes.reason.coding">
      <path value="ClaimResponse.item.adjudication.reason.coding" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ClinicalAlertCodes.reason.coding.system">
      <path value="ClaimResponse.item.adjudication.reason.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ClinicalAlertCodes.reason.coding.code">
      <path value="ClaimResponse.item.adjudication.reason.coding.code" />
      <comment value="Usage Note:  Alert Code&#xD;&#xA;Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.item.adjudication:ClinicalAlertCodes.reason.text">
      <path value="ClaimResponse.item.adjudication.reason.text" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.payment">
      <path value="ClaimResponse.payment" />
      <comment value="Usage:  The conveyes (in amount) the total amount payable, by the insurer, to the payee for product, services and taxes for a specific claim. This includes all amounts in the &quot;ClaimResponse.item.adjudication&quot; section (eg DrugCostProductValue, CostUpcharge, GenericIncentive.. etc) less any amount paid by the beneficiary &#xD;&#xA;Usage:   There is no size restriction on this dollar amount field" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.payment.type">
      <path value="ClaimResponse.payment.type" />
      <comment value="CPHA Mapping:   None.  &#xD;&#xA;Usage:  This amount must be derived.   If the paid amount is less than submitted, value = &quot;partial&quot;, else &quot;complete&quot;&#xD;&#xA;&#xD;&#xA;Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.payment.type.coding">
      <path value="ClaimResponse.payment.type.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.payment.type.coding.system">
      <path value="ClaimResponse.payment.type.coding.system" />
      <comment value="Usage:  This is a fixed value&#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://hl7.org/fhir/ValueSet/ex-paymenttype" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.payment.type.coding.code">
      <path value="ClaimResponse.payment.type.coding.code" />
      <comment value="Usage:  Set value = &quot;partial&quot; or &quot;complete&quot;&#xD;&#xA;Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.payment.amount">
      <path value="ClaimResponse.payment.amount" />
      <comment value="Usage:  The total amount payable, by the insurer, to the provider for product, services and taxes for a specific claim. This includes all amounts in the &quot;ClaimResponse.item.adjudication&quot; section (eg DrugCostProductValue, CostUpcharge, GenericIncentive.. etc) less any amount paid by the beneficiary.&#xD;&#xA;Usage:  There is no size restriction on this dollar amount field&#xD;&#xA;CPHA Mapping:  Plan Pays E.19.03 D6" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.payment.amount.value">
      <path value="ClaimResponse.payment.amount.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.processNote">
      <path value="ClaimResponse.processNote" />
      <comment value="Usage:  Detailed response information.  &#xD;&#xA;Conformance Rule:   A maximum of 1000 characters may be returned for each note&#xD;&#xA;Conformance Rule:   A maximum of 10 notes can be returned; this allows for a given note to be returned in both english and french and therefore allows up to 20 instances.    &#xD;&#xA;Conformance Rule:   Where possible adjudicators must return both english and french as this allows the vendor to display the note in the language of the user.&#xD;&#xA;Conformance Rule:    Vendors must co-relate french and english notes by assigning the same processNote.number&#xD;&#xA;Conformance Rule:   When the adjudicator does not know whether a note is french or english, the language.text must contain a value of &quot;unknown&quot;.&#xD;&#xA;&#xD;&#xA;CPHA Map:  Message Data Lines 1,2,3  E.20.03, E.21.03, E.22.03  A/N40" />
      <max value="20" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.processNote.extension:processNoteDirectedTo">
      <path value="ClaimResponse.processNote.extension" />
      <sliceName value="processNoteDirectedTo" />
      <comment value="Usage Note:   Allows the adjudicator to direct a note to a particular audiance.  Set value = &quot;patient&quot;, &quot;provider&quot; or &quot;both&#xD;&#xA;CPHA Map:   This is a new data element; mapping to a value of &quot;both&quot; if unknown.&#xD;&#xA;&#xD;&#xA;There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." />
      <type>
        <code value="Extension" />
        <profile value="http://pharmacyeclaims.ca/FHIR/v1.0/StructureDefinition/ext-ProcessNoteDirectedTo" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
    </element>
    <element id="ClaimResponse.processNote.number">
      <path value="ClaimResponse.processNote.number" />
      <comment value="Usage Note:   When an adjudicator returns the same note in both english and french, this number must be used to co-relate the notes.     Vendors must co-relate french and english notes by assigning the same processNote.number&#xD;&#xA;&#xD;&#xA;32 bit number; for values larger than this, use decimal" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.processNote.type">
      <path value="ClaimResponse.processNote.type" />
      <comment value="Usage Notes:   Systems that natively support FHIR must support this&#xD;&#xA;CPHA Mapping:  None&#xD;&#xA;&#xD;&#xA;Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.processNote.text">
      <path value="ClaimResponse.processNote.text" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.processNote.language">
      <path value="ClaimResponse.processNote.language" />
      <comment value="Conformance Rule:   This must be populated with a code of &quot;en&quot; for English or &quot;fr&quot; for French, OR,  if unknown, do not use a code and instead populate the text value with &quot;unknown&quot;.    &#xD;&#xA;Conformance Rule:  Where possible, both english and french messages shall be included.   If english is returned,  adjudicators must also return french to allow PMS vendors to display in the patient's language&#xD;&#xA;Usage Rule:   .   Patient language should be determined by the Pharmacy.   If french, adjudicators must always return english.   When language is unknown, PMS will always render whatever is returned.  Provider language is determined using the &quot;user language&quot; in the pharmacy software and the PMS can display the appropriate language based on the user who is viewing the patient record.   &#xD;&#xA;CPHA Mapping:  None.   New requirement&#xD;&#xA;Only required if the language is different from the resource language." />
      <min value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://hl7.org/fhir/ValueSet/all-languages" />
      </binding>
    </element>
    <element id="ClaimResponse.processNote.language.coding">
      <path value="ClaimResponse.processNote.language.coding" />
      <comment value="Usage:   Either system+ code must be present (for en and fr), or text must have a value of &quot;unknown&quot;.&#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="ClaimResponse.processNote.language.coding.system">
      <path value="ClaimResponse.processNote.language.coding.system" />
      <min value="1" />
      <fixedUri value="urn:ietf:bcp:47" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.processNote.language.coding.code">
      <path value="ClaimResponse.processNote.language.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.processNote.language.text">
      <path value="ClaimResponse.processNote.language.text" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.insurance">
      <path value="ClaimResponse.insurance" />
      <comment value="Usage Note:   This confirms the coverage that was used to adjudicate the claim and is also used to send prior Claim Response data for COB.   If the claim is paid in full, this is not required as there is no prior coverage response required &#xD;&#xA;CPHA Map:   Coverage resource in the request message; not sent in the Claim Response today&#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 'subrogation=false', should provide a reference to the ClaimResponse containing the adjudication results of the prior claim." />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.insurance.sequence">
      <path value="ClaimResponse.insurance.sequence" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.insurance.focal">
      <path value="ClaimResponse.insurance.focal" />
      <comment value="Usage:   Must include only the coverage that was used for adjudication; therefore this is always &quot;true&quot;&#xD;&#xA;&#xD;&#xA;A patient may (will) have multiple insurance policies which provide reimbursement for healthcare services and products. For example a person may also be covered by their spouse's policy and both appear in the list (and may be from the same insurer). This flag will be set to true for only one of the listed policies and that policy will be used for adjudicating this claim. Other claims would be created to request adjudication against the other listed policies." />
      <fixedBoolean value="true" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.insurance.coverage">
      <path value="ClaimResponse.insurance.coverage" />
      <comment value="Usage Note:   A reference to the coverage used for this adjudication result; same as inbound request&#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." />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.insurance.coverage.reference">
      <path value="ClaimResponse.insurance.coverage.reference" />
      <mustSupport value="true" />
    </element>
    <element id="ClaimResponse.insurance.claimResponse">
      <path value="ClaimResponse.insurance.claimResponse" />
      <comment value="Usage Note:  Not required if the claim is paid in full. &#xD;&#xA;&#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="ClaimResponse.insurance.claimResponse.reference">
      <path value="ClaimResponse.insurance.claimResponse.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>