The Encounter resource represents an interaction between a patient and healthcare provider(s). All encounters must reference a valid Patient.
Endpoints
Create Encounter
Requires admin or practitioner role.
POST /api/fhir/Encounter
Authorization: Bearer {token}
Content-Type: application/json
planned, arrived, triaged, in-progress, onleave, finished, cancelled, entered-in-error, unknown
Classification of patient encounter (ambulatory, emergency, inpatient)
Specific type of encounter
Reference to Patient: {"reference": "Patient/{id}"}
The start and end time of the encounter
Coded reason for the encounter
List of participants in the encounter
Example Request
curl -X POST https://api.example.com/api/fhir/Encounter \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"resourceType": "Encounter",
"status": "finished",
"class": {
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "AMB",
"display": "ambulatory"
},
"type": [{
"coding": [{
"system": "http://snomed.info/sct",
"code": "185349003",
"display": "Encounter for check up"
}]
}],
"subject": {
"reference": "Patient/65f1234567890abcdef12345"
},
"period": {
"start": "2024-03-15T09:00:00Z",
"end": "2024-03-15T09:30:00Z"
},
"reasonCode": [{
"coding": [{
"system": "http://snomed.info/sct",
"code": "390906007",
"display": "Follow-up encounter"
}]
}]
}'
Response
{
"resourceType": "Encounter",
"id": "65f6789012345abcdef67890",
"status": "finished",
"class": {
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "AMB",
"display": "ambulatory"
},
"subject": {
"reference": "Patient/65f1234567890abcdef12345"
},
"period": {
"start": "2024-03-15T09:00:00Z",
"end": "2024-03-15T09:30:00Z"
}
}
List Encounters
GET /api/fhir/Encounter
Authorization: Bearer {token}
Filter by patient: Patient/{id}
Get Encounter by ID
GET /api/fhir/Encounter/:id
Authorization: Bearer {token}
Update Encounter
PUT /api/fhir/Encounter/:id
Authorization: Bearer {token}
Content-Type: application/json
Encounter Classes
| Code | Display | Description |
|---|
AMB | ambulatory | Outpatient visit |
EMER | emergency | Emergency department visit |
IMP | inpatient | Inpatient admission |
VR | virtual | Telemedicine encounter |
Encounter Status Lifecycle
Planned
Encounter is scheduled but not yet started
Arrived
Patient has arrived for the encounter
In Progress
Encounter is currently happening
Finished
Encounter has been completed
Role Permissions
| Role | Create | Read | Update |
|---|
| Admin | ✅ | ✅ | ✅ |
| Practitioner | ✅ | ✅ | ✅ |
| Auditor | ❌ | ✅ | ❌ |