Encounter
The Encounter resource represents a care contact or service context for a patient in Open Aidn.
Open Aidn supports selected fields from the base HL7 FHIR R4 Encounter resource. A formal Aidn
profile may be published later.
Standards and profiles
- HL7 FHIR R4: Encounter
- HL7 FHIR R4 search: FHIR search
Endpoints
| Method | Path | Required scope | Description |
|---|---|---|---|
POST |
/Encounter/_search |
encounter.search |
Search using application/x-www-form-urlencoded body parameters. |
GET |
/Encounter/{id} |
encounter.read |
Read one Encounter by ID. |
Search results are returned in a FHIR Bundle with type set to searchset.
Search parameters
| Parameter | Type | Description |
|---|---|---|
identifier |
identifier | Patient identifier alias. Resolved in the same way as patient.Identifier. |
patient.Identifier |
identifier | Patient identifier used to filter encounters for one patient. |
type |
token | Service type filter. HomeService maps to Open Aidn home-service filtering. |
location |
identifier | Department or location identifier used to filter encounters. |
location.Identifier |
identifier | Same purpose as location. Use this when your client distinguishes between FHIR references and identifiers. |
_include |
token, repeatable | Adds supported referenced resources to the response Bundle. |
A search without a patient or location filter returns an empty result set.
Supported includes
_include value |
Included resource | Description |
|---|---|---|
Encounter:subject |
Patient |
Adds referenced patient resources. |
Encounter:serviceProvider |
Organization |
Adds referenced service provider organizations. |
Encounter:location |
Location |
Adds referenced location resources. |
Encounter:participant |
Practitioner |
Adds referenced practitioner participants when available. |
When a Location is included, Open Aidn may also include its managing organization.
Response fields
Open Aidn may add fields over time. Integrations should expect the following fields to be available:
| Field | Description |
|---|---|
id |
Encounter identifier. |
meta.lastUpdated |
Last update timestamp when available. |
status |
FHIR Encounter status, such as in-progress, finished, cancelled, planned, or unknown. |
subject.reference |
Reference to the patient. |
serviceProvider.reference |
Reference to the organization providing the service. |
period |
Start and end time for the encounter. |
length |
Encounter length when available. |
location.location.reference |
Reference to the department or location. |
participant.individual.reference |
Reference to a practitioner or related person connected to the encounter. |
type.coding |
Service type coding and display text. |
Example search
POST /Encounter/_search HTTP/1.1
Host: <OPEN_AIDN_FHIR_HOST>
Accept: application/fhir+json
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer <ACCESS_TOKEN>
location.Identifier=<DEPARTMENT_ID>&_include=Encounter:subject
The response is a FHIR Bundle. Matching Encounter resources have mode = match; included
resources have mode = include.