{
  "resourceType": "StructureDefinition",
  "url": "http://sap.com/healthcare/IS-H/fhir/StructureDefinition/genericaccount/v2",
  "version": "SAP_ISH_R4_GEN",
  "name": "GenericAccount",
  "status": "draft",
  "fhirVersion": "4.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Account",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Account",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "Account.extension",
        "path": "Account.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Account.extension:diagnosis",
        "path": "Account.extension",
        "sliceName": "diagnosis",
        "short": "The list of diagnosis relevant to this account",
        "definition": "The list of diagnosis relevant to this account",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://sap.com/healthcare/fhir/StructureDefinition/Account-Diagnosis"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Account.extension:diagnosis.extension",
        "path": "Account.extension.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Account.extension:diagnosis.extension:condition",
        "path": "Account.extension.extension",
        "sliceName": "condition",
        "short": "The diagnosis or procedure relevant to the account",
        "definition": "Reason the account takes place. The indication will typically be a Condition (with other resources referenced in the evidence.detail), or a Procedure."
      },
      {
        "id": "Account.extension:diagnosis.extension:condition.value[x].reference",
        "path": "Account.extension.extension.value[x].reference",
        "min": 1
      },
      {
        "id": "Account.extension:diagnosis.extension:use",
        "path": "Account.extension.extension",
        "sliceName": "use",
        "short": "Role that this diagnosis has within the account (e.g. admission, billing, discharge …)",
        "definition": "Role that this diagnosis has within the account (e.g. admission, billing, discharge …)"
      },
      {
        "id": "Account.extension:diagnosis.extension:rank",
        "path": "Account.extension.extension",
        "sliceName": "rank",
        "short": "Ranking of the diagnosis (for each role type)",
        "definition": "Ranking of the diagnosis (for each role type)"
      },
      {
        "id": "Account.extension:encounter",
        "path": "Account.extension",
        "sliceName": "encounter",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://sap.com/healthcare/fhir/StructureDefinition/Account-encounter"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Account.extension:account",
        "path": "Account.extension",
        "sliceName": "account",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://sap.com/healthcare/fhir/StructureDefinition/Account-account"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Account.identifier",
        "path": "Account.identifier",
        "mustSupport": true
      },
      {
        "id": "Account.identifier.use",
        "path": "Account.identifier.use",
        "mustSupport": true
      },
      {
        "id": "Account.identifier.system",
        "path": "Account.identifier.system",
        "mustSupport": true
      },
      {
        "id": "Account.identifier.value",
        "path": "Account.identifier.value",
        "mustSupport": true
      },
      {
        "id": "Account.status",
        "path": "Account.status",
        "mustSupport": true
      },
      {
        "id": "Account.type.coding.code",
        "path": "Account.type.coding.code",
        "mustSupport": true
      },
      {
        "id": "Account.subject",
        "path": "Account.subject",
        "mustSupport": true
      },
      {
        "id": "Account.subject.type",
        "path": "Account.subject.type",
        "mustSupport": true
      },
      {
        "id": "Account.subject.identifier.value",
        "path": "Account.subject.identifier.value",
        "mustSupport": true
      },
      {
        "id": "Account.servicePeriod",
        "path": "Account.servicePeriod",
        "mustSupport": true
      },
      {
        "id": "Account.servicePeriod.start",
        "path": "Account.servicePeriod.start",
        "mustSupport": true
      },
      {
        "id": "Account.servicePeriod.end",
        "path": "Account.servicePeriod.end",
        "mustSupport": true
      },
      {
        "id": "Account.coverage",
        "path": "Account.coverage",
        "mustSupport": true
      },
      {
        "id": "Account.coverage.extension",
        "path": "Account.coverage.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Account.coverage.extension:copayment",
        "path": "Account.coverage.extension",
        "sliceName": "copayment",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://sap.com/healthcare/fhir/StructureDefinition/Account-copayment"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Account.coverage.extension:copayment.extension",
        "path": "Account.coverage.extension.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Account.coverage.extension:copayment.extension:copaymentobligation",
        "path": "Account.coverage.extension.extension",
        "sliceName": "copaymentobligation",
        "short": "copaymentobligation"
      },
      {
        "id": "Account.coverage.extension:copayment.extension:previousdays",
        "path": "Account.coverage.extension.extension",
        "sliceName": "previousdays",
        "short": "previous days for copayment calculation"
      },
      {
        "id": "Account.coverage.extension:copayment.extension:copaydays",
        "path": "Account.coverage.extension.extension",
        "sliceName": "copaydays",
        "short": "actual days for copayment calculation"
      },
      {
        "id": "Account.coverage.coverage",
        "path": "Account.coverage.coverage",
        "mustSupport": true
      },
      {
        "id": "Account.coverage.coverage.identifier.value",
        "path": "Account.coverage.coverage.identifier.value",
        "mustSupport": true
      },
      {
        "id": "Account.coverage.priority",
        "path": "Account.coverage.priority",
        "mustSupport": true
      },
      {
        "id": "Account.owner.identifier.value",
        "path": "Account.owner.identifier.value",
        "mustSupport": true
      },
      {
        "id": "Account.description",
        "path": "Account.description",
        "mustSupport": true
      }
    ]
  }
}