EpisodeOfCare
The EpisodeOfCare resource represents a patient’s care episode in Open Aidn. It is used by integrations that need to know which patients are relevant for an organizational unit, department, or care context.
Open Aidn currently exposes the base HL7 FHIR R4 EpisodeOfCare resource. A formal Aidn profile may be published later.
Standards and profiles
- HL7 FHIR R4: EpisodeOfCare
- HL7 FHIR R4 search: FHIR search
- Norwegian VKP profile reference: Velferdsteknologisk knutepunkt VKP R4 EpisodeOfCare
Endpoints
| Method | Path | Required scope | Description |
|---|---|---|---|
GET |
/EpisodeOfCare/_search |
episodeofcare.search |
Search for care episodes using query parameters. |
POST |
/EpisodeOfCare/_search |
episodeofcare.search |
Search using application/x-www-form-urlencoded body parameters. |
GET |
/EpisodeOfCare/{id} |
episodeofcare.read |
Read one EpisodeOfCare by ID. |
Search responses are returned as FHIR Bundle resources with type set to searchset.
Search parameters
| Parameter | Type | Description |
|---|---|---|
organization |
identifier | Department identifier used to filter care episodes by the managing organization. For current Open Aidn integrations this is typically the department ID as a UUID. |
organization.Identifier |
identifier | Same purpose as organization. Use this when your client distinguishes between FHIR references and identifiers. |
identifier |
identifier | Patient identifier alias. Currently resolved in the same way as patient.Identifier. |
patient.Identifier |
identifier | Patient identifier used to filter care episodes for one patient. |
type |
token, repeatable | Filters by service type. Current values map to IPLOS codes where applicable. |
_include |
token, repeatable | Adds supported referenced resources to the response bundle. |
At least one of organization / organization.Identifier or identifier / patient.Identifier should be provided. A search without a patient or department filter returns an empty result set.
Supported includes
_include value |
Included resource | Description |
|---|---|---|
EpisodeOfCare:patient |
Patient |
Adds the referenced patient resources as include entries. |
EpisodeOfCare:managingOrganization |
Organization |
Adds the referenced managing organization resources as include entries. |
Included resources are added as separate bundle entries with Bundle.entry.search.mode = include. Primary EpisodeOfCare results are returned with mode = match.
Response fields
Open Aidn may expand the response over time, but integrations should currently expect data in these fields:
| Field | Description |
|---|---|
id |
EpisodeOfCare identifier. |
meta.lastUpdated |
Last update timestamp when available. |
status |
FHIR EpisodeOfCare status, such as planned, active, onhold, finished, cancelled, or waitlist. |
patient.reference |
Reference to the patient, for example Patient/<id>. |
managingOrganization.reference |
Reference to the department or organization managing the care episode, for example Organization/<department-id>. |
managingOrganization.identifier |
Department identifier. The value is the configured department ID. |
managingOrganization.display |
Human-readable department name when available. |
period.start |
Start time for the care episode. |
period.end |
End time when the care episode has ended. |
type.coding |
Service type coding. Codes are currently IPLOS-related where available, with display text for the service type. |
Example search
GET /EpisodeOfCare/_search?organization=<DEPARTMENT_ID>&_include=EpisodeOfCare:patient HTTP/1.1
Host: <OPEN_AIDN_FHIR_HOST>
Accept: application/fhir+json
Authorization: Bearer <ACCESS_TOKEN>
The response is a FHIR search bundle. Each matching EpisodeOfCare indicates a patient relevant to the department. If EpisodeOfCare:patient is included, the bundle also contains the referenced Patient resources.