{
  "resourceType": "StructureDefinition",
  "url": "http://fhir.synapxe.sg/StructureDefinition/Invoice",
  "name": "Invoice-StructureDefinition",
  "status": "draft",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Invoice",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Invoice",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Invoice.lineItem.chargeItemReference",
        "path": "Invoice.lineItem.chargeItemReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/ChargeItem",
              "http://fhir.synapxe.sg/StructureDefinition/Encounter"
            ]
          }
        ]
      },
      {
        "id": "Invoice.extension",
        "path": "Invoice.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Invoice.extension:billType",
        "path": "Invoice.extension",
        "sliceName": "billType",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ihis.sg/ccdp/extension/billType"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Invoice.extension:billFlag",
        "path": "Invoice.extension",
        "sliceName": "billFlag",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ihis.sg/ccdp/extension/billFlag"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Invoice.extension:location",
        "path": "Invoice.extension",
        "sliceName": "location",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ihis.sg/ccdp/extension/location"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Invoice.extension:requesterId",
        "path": "Invoice.extension",
        "sliceName": "requesterId",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://ihis.sg/ccdp/extension/requesterId"
            ]
          }
        ],
        "isModifier": false
      }
    ]
  },
  "snapshot": {
    "element": [
      {
        "id": "Invoice.lineItem.chargeItemReference",
        "path": "Invoice.lineItem.chargeItemReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/ChargeItem",
              "http://fhir.synapxe.sg/StructureDefinition/Encounter"
            ]
          }
        ]
      }
    ]
  }
}