{
  "resourceType": "StructureDefinition",
  "id": "IDCoreEncounter",
  "url": "https://fhir.kemkes.go.id/r4/StructureDefinition/IDCoreEncounter",
  "name": "IDCoreEncounter",
  "status": "active",
  "contact": [
    {
      "name": "SatuSehat Kementerian Kesehatan Satu Sehat",
      "telecom": [
        {
          "system": "url",
          "value": "https://satusehat.kemkes.go.id/platform"
        },
        {
          "system": "email",
          "value": "cgp@lists.HL7.org"
        }
      ]
    }
  ],
  "description": "ID Core Encounter profile",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Encounter",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Encounter",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Encounter.identifier",
        "path": "Encounter.identifier",
        "min": 1
      },
      {
        "id": "Encounter.status",
        "path": "Encounter.status",
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/encounter-status"
        }
      },
      {
        "id": "Encounter.statusHistory.status",
        "path": "Encounter.statusHistory.status",
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/encounter-status"
        }
      },
      {
        "id": "Encounter.class",
        "path": "Encounter.class",
        "binding": {
          "strength": "required",
          "valueSet": "http://terminology.hl7.org/ValueSet/encounter-class"
        }
      },
      {
        "id": "Encounter.classHistory.class",
        "path": "Encounter.classHistory.class",
        "binding": {
          "strength": "required",
          "valueSet": "http://terminology.hl7.org/ValueSet/encounter-class"
        }
      },
      {
        "id": "Encounter.type",
        "path": "Encounter.type",
        "binding": {
          "strength": "required",
          "valueSet": "http://terminology.hl7.org/ValueSet/encounter-type"
        }
      },
      {
        "id": "Encounter.serviceType",
        "path": "Encounter.serviceType",
        "binding": {
          "strength": "required"
        }
      },
      {
        "id": "Encounter.priority",
        "path": "Encounter.priority",
        "binding": {
          "strength": "required"
        }
      },
      {
        "id": "Encounter.participant.type",
        "path": "Encounter.participant.type",
        "binding": {
          "strength": "required",
          "valueSet": "http://terminology.hl7.org/ValueSet/v3-ParticipationType"
        }
      },
      {
        "id": "Encounter.participant.individual",
        "path": "Encounter.participant.individual",
        "min": 1
      },
      {
        "id": "Encounter.period",
        "path": "Encounter.period",
        "min": 1
      },
      {
        "id": "Encounter.period.start",
        "path": "Encounter.period.start",
        "min": 1
      },
      {
        "id": "Encounter.reasonCode",
        "path": "Encounter.reasonCode",
        "binding": {
          "strength": "required"
        }
      },
      {
        "id": "Encounter.diagnosis.condition",
        "path": "Encounter.diagnosis.condition",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Condition"
            ]
          }
        ]
      },
      {
        "id": "Encounter.diagnosis.use",
        "path": "Encounter.diagnosis.use",
        "binding": {
          "strength": "required",
          "valueSet": "http://terminology.hl7.org/ValueSet/diagnosis-role"
        }
      },
      {
        "id": "Encounter.hospitalization.admitSource",
        "path": "Encounter.hospitalization.admitSource",
        "binding": {
          "strength": "required",
          "valueSet": "http://terminology.hl7.org/ValueSet/encounter-admit-source"
        }
      },
      {
        "id": "Encounter.hospitalization.reAdmission",
        "path": "Encounter.hospitalization.reAdmission",
        "binding": {
          "strength": "required"
        }
      },
      {
        "id": "Encounter.location",
        "extension": [
          {
            "url": "https://fhir.kemkes.go.id/r4/StructureDefinition/ServiceClass",
            "extension": [
              {
                "url": "value",
                "valueCodeableConcept": {
                  "coding": [
                    {
                      "system": "http://terminology.kemkes.go.id/CodeSystem/locationServiceClass-Outpatient"
                    },
                    {
                      "system": "http://terminology.kemkes.go.id/CodeSystem/locationServiceClass-Inpatient"
                    }
                  ]
                }
              },
              {
                "url": "upgradeClassIndicator",
                "valueCodeableConcept": {
                  "coding": [
                    {
                      "system": "http://terminology.kemkes.go.id/CodeSystem/locationUpgradeClass"
                    }
                  ]
                }
              }
            ]
          }
        ],
        "path": "Encounter.location",
        "min": 1
      },
      {
        "id": "Encounter.location.extension",
        "path": "Encounter.location.extension",
        "slicing": {
          "ordered": false,
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Encounter.location.extension:encounterlocation",
        "path": "Encounter.location.extension",
        "sliceName": "encounterlocation",
        "min": 1,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.kemkes.go.id/r4/StructureDefinition/EncounterLocation"
            ]
          }
        ]
      },
      {
        "id": "Encounter.serviceProvider",
        "path": "Encounter.serviceProvider",
        "min": 1
      }
    ]
  }
}