← Tous les contrats
OHN-17 Emergency Access and Break Glass
- Version
- 1.1.0
- OpenAPI
- 3.1.0
- Source dans le dépôt
modules/OHN-17/api/openapi.json- Serveurs
https://opeshealthnetwork.com/api/ohn/v1
- Authentification
bearer: http bearer
Télécharger le contrat (JSON)
Les contrats sont rédigés en anglais.
Base path /api/ohn/v1. Every POST requires Idempotency-Key; mutations use expected_version. Routes default-deny on role AND purpose (emergency_access). Break glass is fail closed: without a configured jurisdiction policy, or with an unreachable licence or patient check, nothing is granted. Pre-hospital break-glass (1.1.0, owner decision 2026-11-23): an ambulance crew's token carries purpose prehospital_emergency_access; its requests are refused with 403 prehospital_break_glass_disabled unless the jurisdiction's setting prehospital_break_glass_enabled is on (off by default in every jurisdiction). Only role jurisdiction_policy_steward with purpose jurisdiction_emergency_policy switches it (POST /emergency-access/jurisdiction-settings, legal basis reference required to switch on); every change is audited and recorded append-only. When on, the normal rules apply unchanged (reason, time limit, disclosure log, events, mandatory retrospective review); the case carries access_context prehospital.
Opérations
OHN-17
GET/emergency-accessReview queue / own cases (review_state, status, cursor)
Identifiant d’opération: listCases
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
review_state | query | string | non | |
status | query | string | non | |
cursor | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/emergency-accessRequest emergency access (API-001; F001)
Identifiant d’opération: requestAccess
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (denied_by_policy) or clinician_mismatch; prehospital_break_glass_disabled when an ambulance crew asks and the jurisdiction has not switched pre-hospital break-glass on | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | domain_validation_failed; policy_not_configured, patient_context_missing, or a denied case (clinician_license_inactive, clinician_membership_expired, sections_outside_policy, duration_exceeds_policy; details.case_id) | |
429 | Rate limited | — |
503 | dependency_unavailable: OHN-06 clinician standing or OHN-03 patient lookup is unconfigured or down; nothing is granted | — |
GET/emergency-access/activeActive grants
Identifiant d’opération: activeGrants
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/emergency-access/{id}Case with history, review and escalations (API-002)
Identifiant d’opération: getCase
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | A value that is not a UUID is 404 not_found |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/emergency-access/{id}/disclosuresRecord a section read under the grant (denied if out of scope or expired)
Identifiant d’opération: recordDisclosure
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | section_not_in_scope, grant_terminated or grant_expired (each denied attempt is recorded) | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/emergency-access/{id}/terminateTerminate a grant (F003)
Identifiant d’opération: terminateGrant
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
409 | version_conflict (details.current_version) or illegal_transition (already terminated) | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/emergency-access/{id}/reviewRetrospective review (API-003; F002)
Identifiant d’opération: reviewCase
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | separation_of_duties: a clinician cannot review their own access | — |
404 | Not found / out of scope | — |
409 | version_conflict, illegal_transition (not awaiting review) or grant_still_active | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/emergency-access/{id}/remediateRemediate a violation and close
Identifiant d’opération: remediateCase
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
409 | version_conflict or illegal_transition (only a recorded violation can be remediated) | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/emergency-access/maintenance/expire-sweepTerminate grants past their time limit
Identifiant d’opération: expireSweep
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/emergency-access/maintenance/drain-outboxDrain outbox (no sink => nothing marked 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 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/emergency-access/request-optionsWhat a clinician may request under the current rules (allowed sections, maximum duration; no approval reference)
Identifiant d’opération: readRequestOptions
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/emergency-access/policyRead policy (unconfigured = fail closed)
Identifiant d’opération: readPolicy
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/emergency-access/policyWrite policy
Identifiant d’opération: writePolicy
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/emergency-access/jurisdiction-settingsPer-jurisdiction settings: pre-hospital break-glass switch (no setting = off). Steward and emergency reviewer
Identifiant d’opération: readJurisdictionSettings
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/emergency-access/jurisdiction-settingsSwitch pre-hospital break-glass on or off (jurisdiction_policy_steward only; audited)
Identifiant d’opération: writeJurisdictionSettings
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/emergency-access/report-catalogReport catalog
Identifiant d’opération: reportCatalog
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/emergency-access/reports/{reportId}Run report
Identifiant d’opération: runReport
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
reportId | path | "OHN-17-R001" | "OHN-17-R002" | "OHN-17-R003" | oui | |
facility | query | string | non | uuid |
reviewer | query | string | non | uuid |
actor | query | string | non | uuid |
status | query | string | non | pending|reviewed|justified|violation|remediated|closed |
period_from | query | string | non | YYYY-MM-DD |
period_to | query | string | non | YYYY-MM-DD |
cursor | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/emergency-access/reports/{reportId}/exportCreate signed single-use export
Identifiant d’opération: createExport
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
reportId | path | "OHN-17-R001" | "OHN-17-R002" | "OHN-17-R003" | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/emergency-access/exports/{token}Download export (owner only, single use, 5 min)
Identifiant d’opération: fetchExport
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
token | path | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK: the export file as an attachment (Content-Type text/csv; charset=utf-8 or application/pdf; single use, 5 minutes, owner only) | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied (default deny) or domain denial | — |
404 | Not found / out of scope | — |
410 | export_expired or export_consumed | |
429 | Rate limited | — |
500 | export_integrity_failed | |
503 | Dependency unavailable (fails closed) | — |
Autres opérations
GET/health/ohn-17Liveness incl. DB and dependency modes
Identifiant d’opération: health
Réponses
| Code | Description | Type de média |
|---|
200 | ok: {status, module, dependencies: {ohn06, ohn20}} with the mode of each dependency (synthetic, unconfigured or live) | — |
503 | unavailable | — |
Schémas
Error
| Nom | Type | Obligatoire | Description |
|---|
error | string | oui | |
message | string | non | |
details | any | non | |
EmergencyRequest
| Nom | Type | Obligatoire | Description |
|---|
patient_id | string (uuid) | oui | |
facility_id | string (uuid) | oui | |
clinician_id | string (uuid) | oui | Must equal the authenticated clinician |
clinical_emergency | string | oui | |
requested_sections | array of string | oui | |
requested_duration_minutes | integer | oui | |
Review
| Nom | Type | Obligatoire | Description |
|---|
review_outcome | "justified" | "violation" | oui | |
justification_adequacy | "adequate" | "inadequate" | oui | |
evidence_refs | string (uuid) | oui | |
remediation | string | non | Optional narrative, trimmed, 10..8192 characters |
expected_version | integer | oui | |
Terminate
| Nom | Type | Obligatoire | Description |
|---|
termination_reason | string | oui | |
expected_version | integer | oui | Grant version |
Disclosure
| Nom | Type | Obligatoire | Description |
|---|
section | string | oui | |
Policy
| Nom | Type | Obligatoire | Description |
|---|
max_duration_minutes | integer | null | oui | |
review_deadline_hours | integer | null | oui | |
allowed_sections | array of string | oui | |
approval_reference | string | oui | |
JurisdictionSettings
| Nom | Type | Obligatoire | Description |
|---|
prehospital_break_glass_enabled | boolean | oui | Ambulance crews may use break-glass before reaching hospital in this jurisdiction. Default false. |
legal_basis_reference | string | null | non | Reference of the jurisdiction's legal decision; required when switching on. |
expected_version | integer | oui | 0 when the jurisdiction has no setting yet. |
ExportCommand
| Nom | Type | Obligatoire | Description |
|---|
format | "csv" | "pdf" | oui | |
filters | ReportFilters | non | |
Report
Tabular report; at most 100 rows per page, next_cursor continues. Identifiers and codes only: no clinical narrative.
| Nom | Type | Obligatoire | Description |
|---|
report_id | "OHN-17-R001" | "OHN-17-R002" | "OHN-17-R003" | non | |
title | string | non | |
columns | array of any | non | |
rows | array of any | non | |
summary | object | non | |
state | "rendered" | "no_authorized_data" | non | |
generated_at | string (date-time) | non | |
next_cursor | string | null | non | |
ReportFilters
| Nom | Type | Obligatoire | Description |
|---|
facility | string (uuid) | non | |
reviewer | string (uuid) | non | |
actor | string (uuid) | non | |
status | "pending" | "reviewed" | "justified" | "violation" | "remediated" | "closed" | non | |
period_from | string | non | |
period_to | string | non | |