Aller au contenu

← 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

NomEmplacementTypeObligatoireDescription
review_statequerystringnon
statusquerystringnon
cursorquerystringnon

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/emergency-accessRequest emergency access (API-001; F001)

Identifiant d’opération: requestAccess

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête

  • application/json: object

Réponses

CodeDescriptionType de média
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/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—
404Not found / out of scope—
409Version conflict, illegal transition or idempotency mismatch
application/json: Error
422domain_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)
application/json: Error
429Rate limited—
503dependency_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

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/emergency-access/{id}Case with history, review and escalations (API-002)

Identifiant d’opération: getCase

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)ouiA value that is not a UUID is 404 not_found

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
429Rate limited—
503Dependency 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

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête

  • application/json: object

Réponses

CodeDescriptionType de média
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403section_not_in_scope, grant_terminated or grant_expired (each denied attempt is recorded)—
404Not found / out of scope—
409Version conflict, illegal transition or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/emergency-access/{id}/terminateTerminate a grant (F003)

Identifiant d’opération: terminateGrant

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête

  • application/json: object

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
409version_conflict (details.current_version) or illegal_transition (already terminated)
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/emergency-access/{id}/reviewRetrospective review (API-003; F002)

Identifiant d’opération: reviewCase

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête

  • application/json: object

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403separation_of_duties: a clinician cannot review their own access—
404Not found / out of scope—
409version_conflict, illegal_transition (not awaiting review) or grant_still_active
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/emergency-access/{id}/remediateRemediate a violation and close

Identifiant d’opération: remediateCase

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête

  • application/json: object

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
409version_conflict or illegal_transition (only a recorded violation can be remediated)
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/emergency-access/maintenance/expire-sweepTerminate grants past their time limit

Identifiant d’opération: expireSweep

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
409Version conflict, illegal transition or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/emergency-access/maintenance/drain-outboxDrain outbox (no sink => nothing marked delivered)

Identifiant d’opération: drainOutbox

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
409Version conflict, illegal transition or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency 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

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/emergency-access/policyRead policy (unconfigured = fail closed)

Identifiant d’opération: readPolicy

Authentification: bearer

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/emergency-access/policyWrite policy

Identifiant d’opération: writePolicy

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête

  • application/json: object

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
409Version conflict, illegal transition or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency 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

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency 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

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête

  • application/json: object

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
409Version conflict, illegal transition or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/emergency-access/report-catalogReport catalog

Identifiant d’opération: reportCatalog

Authentification: bearer

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/emergency-access/reports/{reportId}Run report

Identifiant d’opération: runReport

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpath"OHN-17-R001" | "OHN-17-R002" | "OHN-17-R003"oui
facilityquerystringnonuuid
reviewerquerystringnonuuid
actorquerystringnonuuid
statusquerystringnonpending|reviewed|justified|violation|remediated|closed
period_fromquerystringnonYYYY-MM-DD
period_toquerystringnonYYYY-MM-DD
cursorquerystringnon

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/emergency-access/reports/{reportId}/exportCreate signed single-use export

Identifiant d’opération: createExport

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpath"OHN-17-R001" | "OHN-17-R002" | "OHN-17-R003"oui
Idempotency-Keyheaderstringoui

Corps de la requête

  • application/json: object

Réponses

CodeDescriptionType de média
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
409Version conflict, illegal transition or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency 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

NomEmplacementTypeObligatoireDescription
tokenpathstringoui

Réponses

CodeDescriptionType de média
200OK: 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
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or domain denial—
404Not found / out of scope—
410export_expired or export_consumed
application/json: Error
429Rate limited—
500export_integrity_failed
application/json: Error
503Dependency unavailable (fails closed)—

Autres opérations

GET/health/ohn-17Liveness incl. DB and dependency modes

Identifiant d’opération: health

Réponses

CodeDescriptionType de média
200ok: {status, module, dependencies: {ohn06, ohn20}} with the mode of each dependency (synthetic, unconfigured or live)—
503unavailable—

Schémas

Error

NomTypeObligatoireDescription
errorstringoui
messagestringnon
detailsanynon

EmergencyRequest

NomTypeObligatoireDescription
patient_idstring (uuid)oui
facility_idstring (uuid)oui
clinician_idstring (uuid)ouiMust equal the authenticated clinician
clinical_emergencystringoui
requested_sectionsarray of stringoui
requested_duration_minutesintegeroui

Review

NomTypeObligatoireDescription
review_outcome"justified" | "violation"oui
justification_adequacy"adequate" | "inadequate"oui
evidence_refsstring (uuid)oui
remediationstringnonOptional narrative, trimmed, 10..8192 characters
expected_versionintegeroui

Remediate

NomTypeObligatoireDescription
remediationstringoui
expected_versionintegeroui

Terminate

NomTypeObligatoireDescription
termination_reasonstringoui
expected_versionintegerouiGrant version

Disclosure

NomTypeObligatoireDescription
sectionstringoui

Policy

NomTypeObligatoireDescription
max_duration_minutesinteger | nulloui
review_deadline_hoursinteger | nulloui
allowed_sectionsarray of stringoui
approval_referencestringoui

JurisdictionSettings

NomTypeObligatoireDescription
prehospital_break_glass_enabledbooleanouiAmbulance crews may use break-glass before reaching hospital in this jurisdiction. Default false.
legal_basis_referencestring | nullnonReference of the jurisdiction's legal decision; required when switching on.
expected_versionintegeroui0 when the jurisdiction has no setting yet.

ExportCommand

NomTypeObligatoireDescription
format"csv" | "pdf"oui
filtersReportFiltersnon

Report

Tabular report; at most 100 rows per page, next_cursor continues. Identifiers and codes only: no clinical narrative.

NomTypeObligatoireDescription
report_id"OHN-17-R001" | "OHN-17-R002" | "OHN-17-R003"non
titlestringnon
columnsarray of anynon
rowsarray of anynon
summaryobjectnon
state"rendered" | "no_authorized_data"non
generated_atstring (date-time)non
next_cursorstring | nullnon

ReportFilters

NomTypeObligatoireDescription
facilitystring (uuid)non
reviewerstring (uuid)non
actorstring (uuid)non
status"pending" | "reviewed" | "justified" | "violation" | "remediated" | "closed"non
period_fromstringnon
period_tostringnon