{
  "resourceType": "StructureDefinition",
  "id": "il-core-encounter",
  "url": "http://fhir.health.gov.il/StructureDefinition/il-core-encounter",
  "version": "0.13.0",
  "name": "ILCoreEncounter",
  "title": "ILCore Encounter Profile",
  "status": "draft",
  "date": "2021-05-02",
  "publisher": "Israel Core Team",
  "contact": [
    {
      "telecom": [
        {
          "system": "email",
          "value": "ido.levin@moh.gov.il"
        }
      ]
    }
  ],
  "description": "Israel Core proposed constraints and extensions on the Encounter Resource",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Encounter",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Encounter",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Encounter",
        "path": "Encounter",
        "short": "ILCore Encounter Profile",
        "definition": "Definitions for the profile-Encounter resource profile."
      },
      {
        "id": "Encounter.extension",
        "path": "Encounter.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Encounter.extension:modeOfArrival",
        "path": "Encounter.extension",
        "sliceName": "modeOfArrival",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/encounter-modeOfArrival"
            ]
          }
        ]
      },
      {
        "id": "Encounter.extension:modeOfArrival.value[x]",
        "path": "Encounter.extension.value[x]",
        "binding": {
          "strength": "example",
          "valueSet": "http://fhir.health.gov.il/ValueSet/patient-mode-of-arrival-moh"
        }
      },
      {
        "id": "Encounter.extension:paying-entity",
        "path": "Encounter.extension",
        "sliceName": "paying-entity",
        "short": "Extension: Encounter Paying Entity",
        "definition": "Paying Entity for the Encounter",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/ext-encounter-paying-entity"
            ]
          }
        ]
      },
      {
        "id": "Encounter.extension:movement-number",
        "path": "Encounter.extension",
        "sliceName": "movement-number",
        "short": "Ext: Movement Sequence-Number",
        "definition": "Extension: Movement Sequence-Number",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/ext-movement-number"
            ]
          }
        ]
      },
      {
        "id": "Encounter.identifier",
        "path": "Encounter.identifier",
        "definition": "Must support - <b>receiving system SHOULD store the value</b>",
        "mustSupport": true
      },
      {
        "id": "Encounter.status",
        "path": "Encounter.status",
        "definition": "Must support - <b>receiving system SHALL either store the value as-is or SHALL be able to translate it into internal state and SHALL be able to reconstruct the value when requested to retrieve data</b>",
        "mustSupport": true
      },
      {
        "id": "Encounter.class",
        "path": "Encounter.class",
        "definition": "Must support - <b>receiving system SHALL either store the value as-is or SHALL be able to translate it into internal state and SHALL be able to reconstruct the value when requested to retrieve data</b>",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-encounter-class"
        }
      },
      {
        "id": "Encounter.classHistory.class",
        "path": "Encounter.classHistory.class",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-encounter-class"
        }
      },
      {
        "id": "Encounter.type",
        "path": "Encounter.type",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "definition": "Specific type of encounter that is orthogonal to class and serviceType (e.g. e-mail consultation)"
      },
      {
        "id": "Encounter.type:virtual-encounters",
        "path": "Encounter.type",
        "sliceName": "virtual-encounters",
        "min": 0,
        "max": "*",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-virtual-type"
        }
      },
      {
        "id": "Encounter.type:doctor-to-doctor-consultation",
        "path": "Encounter.type",
        "sliceName": "doctor-to-doctor-consultation",
        "min": 0,
        "max": "*",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-doctor-to-doctor"
        }
      },
      {
        "id": "Encounter.serviceType",
        "path": "Encounter.serviceType",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://fhir.health.gov.il/ValueSet/il-core-service-type"
        }
      },
      {
        "id": "Encounter.subject",
        "path": "Encounter.subject",
        "definition": "Must support - <b>receiving system SHALL either store the value as-is or SHALL be able to translate it into internal state and SHALL be able to reconstruct the value when requested to retrieve data</b>",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-patient",
              "http://fhir.health.gov.il/StructureDefinition/il-core-group"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Encounter.subject.extension:visitor-type",
        "path": "Encounter.subject.extension",
        "sliceName": "visitor-type",
        "short": "Extension: Israeli CORE Encounter Visitor Type",
        "definition": "Classification of the visitor type (סוג מבקר/סוג כניסה) for the Encounter",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.health.gov.il/StructureDefinition/ext-encounter-visitor-type"
            ]
          }
        ]
      },
      {
        "id": "Encounter.basedOn",
        "path": "Encounter.basedOn",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-service-request"
            ]
          }
        ]
      },
      {
        "id": "Encounter.participant",
        "path": "Encounter.participant",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Encounter.participant.individual",
        "path": "Encounter.participant.individual",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner",
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner-role",
              "http://fhir.health.gov.il/StructureDefinition/il-core-related-person"
            ]
          }
        ]
      },
      {
        "id": "Encounter.participant:primary-performer",
        "path": "Encounter.participant",
        "sliceName": "primary-performer",
        "definition": "Must support - <b>receiving system SHALL either store the value as-is or SHALL be able to translate it into internal state and SHALL be able to reconstruct the value when requested to retrieve data</b>",
        "min": 0,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Encounter.participant:primary-performer.type",
        "path": "Encounter.participant.type",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Encounter.participant:primary-performer.type.coding.system",
        "path": "Encounter.participant.type.coding.system",
        "fixedUri": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
      },
      {
        "id": "Encounter.participant:primary-performer.type.coding.code",
        "path": "Encounter.participant.type.coding.code",
        "fixedCode": "PPRF"
      },
      {
        "id": "Encounter.participant:primary-performer.period",
        "path": "Encounter.participant.period",
        "mustSupport": true
      },
      {
        "id": "Encounter.participant:primary-performer.individual",
        "path": "Encounter.participant.individual",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner",
              "http://fhir.health.gov.il/StructureDefinition/il-core-practitioner-role",
              "http://fhir.health.gov.il/StructureDefinition/il-core-related-person"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Encounter.period",
        "path": "Encounter.period",
        "definition": "Must support - <b>receiving system SHALL either store the value as-is or SHALL be able to translate it into internal state and SHALL be able to reconstruct the value when requested to retrieve data</b>",
        "mustSupport": true
      },
      {
        "id": "Encounter.reasonCode",
        "path": "Encounter.reasonCode",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Encounter.reasonCode:moh-reason-code",
        "path": "Encounter.reasonCode",
        "sliceName": "moh-reason-code",
        "min": 0,
        "max": "*",
        "binding": {
          "strength": "preferred",
          "valueSet": "http://fhir.health.gov.il/ValueSet/patient-visit-reason-moh"
        }
      },
      {
        "id": "Encounter.reasonReference",
        "path": "Encounter.reasonReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-condition",
              "http://fhir.health.gov.il/StructureDefinition/il-core-procedure",
              "http://fhir.health.gov.il/StructureDefinition/il-core-observation",
              "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
            ]
          }
        ]
      },
      {
        "id": "Encounter.diagnosis.condition",
        "path": "Encounter.diagnosis.condition",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-condition",
              "http://fhir.health.gov.il/StructureDefinition/il-core-procedure"
            ]
          }
        ]
      },
      {
        "id": "Encounter.hospitalization.origin",
        "path": "Encounter.hospitalization.origin",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-location",
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization"
            ]
          }
        ]
      },
      {
        "id": "Encounter.hospitalization.admitSource",
        "path": "Encounter.hospitalization.admitSource",
        "binding": {
          "strength": "preferred",
          "valueSet": "http://fhir.health.gov.il/ValueSet/patient-admit-source-moh"
        }
      },
      {
        "id": "Encounter.hospitalization.destination",
        "path": "Encounter.hospitalization.destination",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-location",
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization"
            ]
          }
        ]
      },
      {
        "id": "Encounter.hospitalization.dischargeDisposition",
        "path": "Encounter.hospitalization.dischargeDisposition",
        "binding": {
          "strength": "example",
          "valueSet": "http://fhir.health.gov.il/ValueSet/patient-release-type-moh"
        }
      },
      {
        "id": "Encounter.location.location",
        "path": "Encounter.location.location",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-location"
            ]
          }
        ]
      },
      {
        "id": "Encounter.serviceProvider",
        "path": "Encounter.serviceProvider",
        "definition": "Must support - <b>receiving system SHALL either store the value as-is or SHALL be able to translate it into internal state and SHALL be able to reconstruct the value when requested to retrieve data</b>",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-organization"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Encounter.partOf",
        "path": "Encounter.partOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.health.gov.il/StructureDefinition/il-core-encounter"
            ],
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy",
                "valueBoolean": true
              }
            ]
          }
        ]
      }
    ]
  }
}