EpisodeOfCare

The EpisodeOfCare resource represents a patient’s care episode in Open Aidn. Integrations can use it to find patients relevant to an organization, department, or care setting.

Open Aidn supports the base HL7 FHIR R4 EpisodeOfCare resource. A formal Aidn profile may be published later.

Standards and profiles

Endpoints

Method Path Required scope Description
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 results are returned in a FHIR Bundle with type set to searchset.

Search parameters

Parameter Type Description
organization identifier Department identifier used to filter care episodes by the managing organization. In current Open Aidn integrations, this is typically a UUID.
organization.Identifier identifier Same purpose as organization. Use this when your client distinguishes between FHIR references and identifiers.
identifier identifier Alias for the patient identifier. 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 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 included resources

_include value Included resource Description
EpisodeOfCare:patient Patient Adds the referenced Patient resources.
EpisodeOfCare:managingOrganization Organization Adds the referenced managing organizations.

Included resources are added as separate entries with Bundle.entry.search.mode set to include. EpisodeOfCare search results have mode set to match.

Response fields

Open Aidn may add fields over time. Integrations should expect the following fields to be available:

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, such as Patient/<id>.
managingOrganization.reference Reference to the department or organization responsible for the care episode, such as 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 IPLOS-related where available, with display text for the service type.
POST /EpisodeOfCare/_search HTTP/1.1
Host: <OPEN_AIDN_FHIR_HOST>
Accept: application/fhir+json
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer <ACCESS_TOKEN>

organization=<DEPARTMENT_ID>&_include=EpisodeOfCare:patient

The response is a FHIR Bundle. Each matching EpisodeOfCare resource indicates a patient relevant to the department. If EpisodeOfCare:patient is included, the bundle also contains the referenced Patient resources.

Back to home