<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="86bce1b6-f4c0-4405-a8fd-0b44dd9b5791" />
  <meta>
    <lastUpdated value="2022-11-07T03:38:42.5902377+00:00" />
  </meta>
  <url value="https://simplifier.net/winningtest/service-invoice-profile" />
  <name value="ServiceInvoice" />
  <title value="服务收费/退费信息" />
  <status value="draft" />
  <date value="2022-11-07T03:38:56.0892151+00:00" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Invoice" />
  <baseDefinition value="https://simplifier.net/winningtest/invoice-profile" />
  <derivation value="constraint" />
  <differential>
    <element id="Invoice.identifier:requisition">
      <path value="Invoice.identifier" />
      <sliceName value="requisition" />
      <short value="申请单标识" />
      <max value="1" />
    </element>
    <element id="Invoice.identifier:requisition.use">
      <path value="Invoice.identifier.use" />
      <max value="0" />
    </element>
    <element id="Invoice.identifier:requisition.type">
      <path value="Invoice.identifier.type" />
      <max value="0" />
    </element>
    <element id="Invoice.identifier:requisition.system">
      <path value="Invoice.identifier.system" />
      <short value="申请单标识" />
      <fixedUri value="urn:oid:1.2.156.112604.1.1.4699" />
    </element>
    <element id="Invoice.identifier:requisition.period">
      <path value="Invoice.identifier.period" />
      <max value="0" />
    </element>
    <element id="Invoice.identifier:requisition.assigner">
      <path value="Invoice.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="Invoice.identifier:requisitionNo">
      <path value="Invoice.identifier" />
      <sliceName value="requisitionNo" />
      <short value="申请单编号" />
      <max value="1" />
    </element>
    <element id="Invoice.identifier:requisitionNo.use">
      <path value="Invoice.identifier.use" />
      <max value="0" />
    </element>
    <element id="Invoice.identifier:requisitionNo.type">
      <path value="Invoice.identifier.type" />
      <max value="0" />
    </element>
    <element id="Invoice.identifier:requisitionNo.system">
      <path value="Invoice.identifier.system" />
      <short value="申请单编号" />
      <fixedUri value="urn:oid:1.2.156.112604.1.1.287" />
    </element>
    <element id="Invoice.identifier:requisitionNo.period">
      <path value="Invoice.identifier.period" />
      <max value="0" />
    </element>
    <element id="Invoice.identifier:requisitionNo.assigner">
      <path value="Invoice.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="Invoice.status">
      <path value="Invoice.status" />
      <definition value="issued表示申请中，balanced表示已收费/已退费，cancelled表示已撤销" />
    </element>
    <element id="Invoice.status.extension">
      <path value="Invoice.status.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="Invoice.status.extension:reason">
      <path value="Invoice.status.extension" />
      <sliceName value="reason" />
      <short value="状态说明" />
      <min value="0" />
      <type>
        <code value="Extension" />
        <profile value="https://simplifier.net/winningtest/extension-status-reason" />
      </type>
    </element>
    <element id="Invoice.cancelledReason">
      <path value="Invoice.cancelledReason" />
      <max value="0" />
    </element>
    <element id="Invoice.type">
      <path value="Invoice.type" />
      <max value="0" />
    </element>
    <element id="Invoice.subject">
      <path value="Invoice.subject" />
      <max value="0" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
    </element>
    <element id="Invoice.recipient">
      <path value="Invoice.recipient" />
      <max value="0" />
    </element>
    <element id="Invoice.date">
      <path value="Invoice.date" />
      <short value="申请时间" />
    </element>
    <element id="Invoice.participant">
      <path value="Invoice.participant" />
      <max value="1" />
    </element>
    <element id="Invoice.participant.role.coding">
      <path value="Invoice.participant.role.coding" />
      <max value="0" />
    </element>
    <element id="Invoice.participant.role.text">
      <path value="Invoice.participant.role.text" />
      <short value="角色名称" />
      <definition value="当为退费申请时，固定值为“退费申请人”" />
    </element>
    <element id="Invoice.participant.actor">
      <path value="Invoice.participant.actor" />
      <short value="参与者" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://simplifier.net/winningtest/practitioner-profile" />
        <aggregation value="contained" />
      </type>
    </element>
    <element id="Invoice.issuer">
      <path value="Invoice.issuer" />
      <max value="0" />
    </element>
    <element id="Invoice.account">
      <path value="Invoice.account" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://simplifier.net/winningtest/account-profile" />
      </type>
    </element>
    <element id="Invoice.lineItem.extension">
      <path value="Invoice.lineItem.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="Invoice.lineItem.extension:collated">
      <path value="Invoice.lineItem.extension" />
      <sliceName value="collated" />
      <short value="核对" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://simplifier.net/winningtest/extension-collated" />
      </type>
    </element>
    <element id="Invoice.lineItem.extension:chargeClassification">
      <path value="Invoice.lineItem.extension" />
      <sliceName value="chargeClassification" />
      <short value="价格分类" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://simplifier.net/winningtest/extension-charge-classification" />
      </type>
    </element>
    <element id="Invoice.lineItem.extension:selfAffordRatio">
      <path value="Invoice.lineItem.extension" />
      <sliceName value="selfAffordRatio" />
      <short value="自负比例" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://simplifier.net/winningtest/extension-self-afford-ratio" />
      </type>
    </element>
    <element id="Invoice.lineItem.chargeItem[x]">
      <path value="Invoice.lineItem.chargeItem[x]" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://simplifier.net/winningtest/service-charge-item-profile" />
        <aggregation value="contained" />
      </type>
    </element>
    <element id="Invoice.lineItem.priceComponent">
      <path value="Invoice.lineItem.priceComponent" />
      <max value="1" />
    </element>
    <element id="Invoice.lineItem.priceComponent.code">
      <path value="Invoice.lineItem.priceComponent.code" />
      <max value="0" />
    </element>
    <element id="Invoice.lineItem.priceComponent.factor">
      <path value="Invoice.lineItem.priceComponent.factor" />
      <max value="0" />
    </element>
    <element id="Invoice.totalNet">
      <path value="Invoice.totalNet" />
      <short value="订单总计金额" />
    </element>
    <element id="Invoice.totalGross">
      <path value="Invoice.totalGross" />
      <max value="0" />
    </element>
    <element id="Invoice.paymentTerms">
      <path value="Invoice.paymentTerms" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>