← Tous les contrats
OHN-09 Encounter and Care Timeline
- Version
- 1.0.0
- OpenAPI
- 3.1.0
- Source dans le dépôt
modules/OHN-09/api/openapi.json- Serveurs
https://opeshealthnetwork.com/api/ohn/v1/encounter-timeline
- Authentification
bearer: http bearer
Télécharger le contrat (JSON)
Les contrats sont rédigés en anglais.
Server paths are under /api/ohn/v1/encounter-timeline. Default deny: role AND purpose must match. Inventory paths OHN-09-API-001..003 are mapped to this disjoint prefix (see ADR-0001).
Opérations
OHN-09
GET/patients/{id}/encountersLatest cross-facility timeline projection for a patient (stale flag included)
Identifiant d’opération: getPatientTimeline
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
GET/patients/{id}/episodesEpisodes of care with derived boundaries
Identifiant d’opération: getPatientEpisodes
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
GET/patients/{id}/patient-viewThe patient's own current, indexed encounters for the OHN-31 patient chart (role patient under purpose patient_access; own record only, otherwise 404; OHN-16 decision read_own_encounters; every read audited)
Identifiant d’opération: patientEncounterView
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | The patient's own OHN-03 id (must equal the token subject) |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
GET/encountersIngest worklist and exception queue
Identifiant d’opération: listEncounters
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
state | query | string | non | |
facility | query | string (uuid) | non | |
patient_id | query | string (uuid) | non | |
current_only | query | "true" | "false" | non | |
cursor | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
POST/encountersRegister a source encounter (F001, W001)
Identifiant d’opération: registerEncounter
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
POST/encounters/projectBuild and store a cross-facility timeline (W003)
Identifiant d’opération: projectTimeline
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
GET/encounters/compareField-by-field comparison of two encounters of one patient
Identifiant d’opération: compareEncounters
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
left | query | string (uuid) | oui | |
right | query | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
GET/encounters/{id}Encounter with versions, corrections, episodes and handovers
Identifiant d’opération: getEncounter
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
POST/encounters/{id}/transitionsAdvance ingestion (W001)
Identifiant d’opération: stepEncounter
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
GET/correctionsCorrections and provenance
Identifiant d’opération: listCorrections
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
state | query | string | non | |
facility | query | string (uuid) | non | |
cursor | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
POST/correctionsOpen an encounter correction (F002, W002)
Identifiant d’opération: openCorrection
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
POST/corrections/{id}/transitionsAdvance a correction; an amendment creates a new encounter version
Identifiant d’opération: stepCorrection
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
POST/episode-linksLink an encounter to an episode of care (F003)
Identifiant d’opération: linkEpisode
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
GET/handoversCare transitions
Identifiant d’opération: listHandovers
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
acknowledged | query | "true" | "false" | non | |
cursor | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
POST/handoversRecord a care transition between two encounters
Identifiant d’opération: createHandover
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
POST/handovers/{id}/acknowledgeAcknowledge a handover (not by its recorder)
Identifiant d’opération: acknowledgeHandover
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
GET/code-lists/{list}Controlled list (encounter_type, care_setting, transfer_type)
Identifiant d’opération: getCodeList
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
list | path | "encounter_type" | "care_setting" | "transfer_type" | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
POST/code-lists/{list}Upsert controlled list entries
Identifiant d’opération: upsertCodeList
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
list | path | "encounter_type" | "care_setting" | "transfer_type" | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
GET/policyTimeline policy
Identifiant d’opération: getPolicy
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
POST/policySet the timeline policy
Identifiant d’opération: setPolicy
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
POST/maintenance/drain-outboxReport pending outbox events (no sink: nothing claimed delivered)
Identifiant d’opération: drainOutbox
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
GET/report-catalogAvailable reports
Identifiant d’opération: reportCatalog
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
GET/reports/{reportId}Run report R001..R003
Identifiant d’opération: runReport
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
reportId | path | "OHN-09-R001" | "OHN-09-R002" | "OHN-09-R003" | oui | |
region | query | string | non | |
facility | query | string (uuid) | non | |
type | query | string | non | |
status | query | string | non | |
jurisdiction | query | string (uuid) | non | |
period_from | query | string | non | |
period_to | query | string | non | |
cursor | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
POST/reports/{reportId}/exportCreate a signed single-use report export
Identifiant d’opération: exportReport
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
reportId | path | "OHN-09-R001" | "OHN-09-R002" | "OHN-09-R003" | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
GET/report-exports/{token}Download a report export once
Identifiant d’opération: downloadReportExport
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
token | path | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Denied by policy | — |
404 | Not found / not disclosed | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Domain validation failed | |
429 | Rate limited | — |
503 | Dependency unavailable (fail closed) | — |
Schémas
EncounterCommand
| Nom | Type | Obligatoire | Description |
|---|
patient_id | string | oui | |
source_facility_id | string | oui | |
encounter_source_id | string | oui | |
encounter_type | string | oui | |
start_at | string | oui | |
end_at | string | non | |
status | "planned" | "in_progress" | "finished" | "cancelled" | "entered_in_error" | oui | |
EncounterStepCommand
| Nom | Type | Obligatoire | Description |
|---|
to_state | "schema_validated" | "identity_matched" | "source_linked" | "indexed" | "rejected" | oui | |
expected_version | integer | oui | |
reason | string | oui | |
CorrectionCommand
| Nom | Type | Obligatoire | Description |
|---|
encounter_ref | string | oui | |
field_disputed | "encounter_type" | "start_at" | "end_at" | "status" | oui | |
correct_value | string | oui | |
supporting_evidence | string | oui | |
reason | string | oui | |
CorrectionStepCommand
| Nom | Type | Obligatoire | Description |
|---|
to_state | "source_contacted" | "amended_by_source" | "projection_refreshed" | "resolved" | oui | |
expected_version | integer | oui | |
reason | string | oui | |
source_response | "amended" | "declined" | non | |
EpisodeLinkCommand
| Nom | Type | Obligatoire | Description |
|---|
encounter_id | string | oui | |
episode_id | string | oui | |
care_setting | string | oui | |
link_reason | string | oui | |
effective_at | string | oui | |
HandoverCommand
| Nom | Type | Obligatoire | Description |
|---|
from_encounter_id | string | oui | |
to_encounter_id | string | oui | |
transfer_type | string | oui | |
HandoverAckCommand
| Nom | Type | Obligatoire | Description |
|---|
expected_version | integer | oui | |
ProjectCommand
| Nom | Type | Obligatoire | Description |
|---|
patient_id | string | oui | |
PolicyCommand
| Nom | Type | Obligatoire | Description |
|---|
duplicate_window_minutes | integer | oui | |
late_arrival_hours | integer | oui | |
approval_reference | string | oui | |
expected_version | integer | non | |
ExportCommand
| Nom | Type | Obligatoire | Description |
|---|
format | "csv" | "pdf" | oui | |
filters | object | non | Open object validated by the report filter rules (region, facility, type, status, jurisdiction, period_from, period_to); unknown keys 422 |
Error
| Nom | Type | Obligatoire | Description |
|---|
error | string | oui | |
message | string | non | |
details | any | non | |
CodeListBody.entries.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|
code | string | oui | |
label | string | oui | |
active | boolean | non | |