{
  "resourceType": "StructureDefinition",
  "url": "https://cortex-care.io/fhir/StructureDefinition/EpisodeOfCare",
  "name": "Cortex_EpisodeOfCare",
  "status": "draft",
  "date": "2024-01-24",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "EpisodeOfCare",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "EpisodeOfCare.status",
        "path": "EpisodeOfCare.status",
        "short": "planned | active | onhold | finished | cancelled.",
        "definition": "planned | active | onhold | finished | cancelled."
      },
      {
        "id": "EpisodeOfCare.statusHistory",
        "path": "EpisodeOfCare.statusHistory",
        "max": "0"
      },
      {
        "id": "EpisodeOfCare.diagnosis",
        "path": "EpisodeOfCare.diagnosis",
        "max": "0"
      },
      {
        "id": "EpisodeOfCare.patient",
        "path": "EpisodeOfCare.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://interopsante.org/fhir/StructureDefinition/FrPatient"
            ]
          }
        ]
      },
      {
        "id": "EpisodeOfCare.referralRequest",
        "path": "EpisodeOfCare.referralRequest",
        "max": "0"
      },
      {
        "id": "EpisodeOfCare.team",
        "path": "EpisodeOfCare.team",
        "max": "0"
      },
      {
        "id": "EpisodeOfCare.account",
        "path": "EpisodeOfCare.account",
        "max": "0"
      },
      {
        "id": "EpisodeOfCare.extension",
        "path": "EpisodeOfCare.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ]
      },
      {
        "id": "EpisodeOfCare.extension:AnchorPoints",
        "path": "EpisodeOfCare.extension",
        "sliceName": "AnchorPoints",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://cortex-care.io/fhir/StructureDefinition/AnchorPoints"
            ]
          }
        ],
        "short": "Anchor Points Code",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        }
      }
    ]
  }
}