Aller au contenu

← Tous les contrats

OHN-28 Clinical Notification and Alert Routing

Version
1.0.1
OpenAPI
3.1.0
Source dans le dépôt
modules/OHN-28/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.

Safety-critical alert routing with verified receipt, escalation and retry. Default-deny; every POST needs an Idempotency-Key (8-128 characters of [A-Za-z0-9_.:-]); mutations use expected_version. Alert text and events carry codes and identifiers only. Authentication: a platform-gateway bearer token (Java: ES256, iss ohn-platform-gateway, aud ohn-28; the TypeScript baseline also accepts its own HS256 development token, iss ohn-28-notification, aud ohn-28-api) whose sub, jurisdiction and organization_id are UUIDs; role licensed_clinician or on_call_supervisor and purpose clinical_notification are both required (an unknown role or another purpose is an audited 403). The TypeScript-only development sign-in POST /clinical-notifications/synthetic-token is not part of this contract. Errors are JSON {error, message, details?} (Java: application/problem+json with the same fields plus type, title, status, detail, trace_id); a body that is not JSON is 400 malformed_request, one that is not application/json is 415 unsupported_media_type. Fail-closed rules: an alert is stored before it is routed and is never dropped; an unavailable dependency (OHN-06 standing, OHN-16 access decision, the delivery channel) leaves the alert open and pending (routing_blocked_reason) and the sweep retries it; an alert nobody can be paged for is needs_supervisor and raises clinical-notification.needs-supervisor.

Opérations

Autres opérations

GET/health/ohn-28Health (public, served at /health/ohn-28 outside the /api/ohn/v1 prefix)

Authentification: bearer

Réponses

CodeDescriptionType de média
200ok
application/json: Health
503database unavailable
GET/clinical-notificationsOHN-28-API-002 List alerts visible to the caller

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
statequerystringnon
severityquerystringnon
needs_supervisorquery"true" | "false"non
cursorquerystringnonOpaque; pages of 50. An unreadable cursor restarts at the first page.

Réponses

CodeDescriptionType de média
200Success
application/json: NotificationList
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
422Validation failed—
429Rate limited—
503Dependency unavailable—
POST/clinical-notificationsOHN-28-API-001 Route a clinical alert (W001)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Success
application/json: NotificationResult
400Idempotency-Key missing or malformed (idempotency_key_required), or the body is not valid JSON (malformed_request)—
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
409version_conflict (details.current_version), idempotency_key_reused, request_in_progress, illegal_transition, already_acknowledged, not_acknowledgeable, duplicate_event, conflict—
415unsupported_media_type: send application/json—
422Validation failed—
429Rate limited—
503Dependency unavailable—
GET/clinical-notifications/policiesList routing policies

Authentification: bearer

Réponses

CodeDescriptionType de média
200Success
application/json: PolicyList
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
422Validation failed—
429Rate limited—
503Dependency unavailable—
POST/clinical-notifications/policiesOHN-28-F001 Create a routing policy

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Success
application/json: PolicyResult
400Idempotency-Key missing or malformed (idempotency_key_required), or the body is not valid JSON (malformed_request)—
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
409version_conflict (details.current_version), idempotency_key_reused, request_in_progress, illegal_transition, already_acknowledged, not_acknowledgeable, duplicate_event, conflict—
415unsupported_media_type: send application/json—
422Validation failed—
429Rate limited—
503Dependency unavailable—
POST/clinical-notifications/policies/{id}/updateUpdate a routing policy (expected_version)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Success
application/json: PolicyResult
400Idempotency-Key missing or malformed (idempotency_key_required), or the body is not valid JSON (malformed_request)—
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
409version_conflict (details.current_version), idempotency_key_reused, request_in_progress, illegal_transition, already_acknowledged, not_acknowledgeable, duplicate_event, conflict—
415unsupported_media_type: send application/json—
422Validation failed—
429Rate limited—
503Dependency unavailable—
GET/clinical-notifications/code-lists/{list}Read a controlled code list

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
listpath"trigger_type" | "severity" | "target_role" | "channel"oui

Réponses

CodeDescriptionType de média
200Success
application/json: CodeList
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
422Validation failed—
429Rate limited—
503Dependency unavailable—
POST/clinical-notifications/code-lists/{list}Upsert code list entries

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
listpath"trigger_type" | "severity" | "target_role" | "channel"oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Success
application/json: CodeListUpsertResult
400Idempotency-Key missing or malformed (idempotency_key_required), or the body is not valid JSON (malformed_request)—
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
409version_conflict (details.current_version), idempotency_key_reused, request_in_progress, illegal_transition, already_acknowledged, not_acknowledgeable, duplicate_event, conflict—
415unsupported_media_type: send application/json—
422Validation failed—
429Rate limited—
503Dependency unavailable—
POST/clinical-notifications/maintenance/escalation-sweepOHN-28-W002 Run the escalation sweep (schedule every minute)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200Success
application/json: SweepResult
400Idempotency-Key missing or malformed (idempotency_key_required), or the body is not valid JSON (malformed_request)—
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
409version_conflict (details.current_version), idempotency_key_reused, request_in_progress, illegal_transition, already_acknowledged, not_acknowledgeable, duplicate_event, conflict—
415unsupported_media_type: send application/json—
422Validation failed—
429Rate limited—
503Dependency unavailable—
POST/clinical-notifications/maintenance/drain-outboxRelay outbox events to OHN-24 (stay pending without a sink)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200Success
application/json: OutboxResult
400Idempotency-Key missing or malformed (idempotency_key_required), or the body is not valid JSON (malformed_request)—
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
409version_conflict (details.current_version), idempotency_key_reused, request_in_progress, illegal_transition, already_acknowledged, not_acknowledgeable, duplicate_event, conflict—
415unsupported_media_type: send application/json—
422Validation failed—
429Rate limited—
503Dependency unavailable—
GET/clinical-notifications/report-catalogList reports

Authentification: bearer

Réponses

CodeDescriptionType de média
200Success
application/json: ReportCatalog
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
422Validation failed—
429Rate limited—
503Dependency unavailable—
GET/clinical-notifications/reports/{reportId}Run OHN-28-R001..R003

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpathstringoui
facilityquerystring (uuid)non
organizationquerystring (uuid)non
period_fromquerystring (date)non
period_toquerystring (date)non
severityquerystringnon
channelquerystringnon
cursorquerystringnon

Réponses

CodeDescriptionType de média
200Success
application/json: Report
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
422Validation failed: message "Report filter is not valid." (details keep the LAST issue per field) or "period_from is after period_to." (details.period_from after_period_to)—
429Rate limited—
503Dependency unavailable—
POST/clinical-notifications/reports/{reportId}/exportCreate a signed, single-use, 5-minute export (supervisors)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpathstringoui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Success
application/json: ExportReceipt
400Idempotency-Key missing or malformed (idempotency_key_required), or the body is not valid JSON (malformed_request)—
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
409version_conflict (details.current_version), idempotency_key_reused, request_in_progress, illegal_transition, already_acknowledged, not_acknowledgeable, duplicate_event, conflict—
415unsupported_media_type: send application/json—
422Validation failed—
429Rate limited—
503dependency_unavailable: the export signing key is not configured (or shorter than 32 characters)—
GET/clinical-notifications/exports/{token}Download an export once

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
tokenpathstringoui

Réponses

CodeDescriptionType de média
200The export once (CSV or PDF); the link is single use, bound to the requesting principal, expires after five minutes and is checked against its HMAC-SHA256 signature
text/csv: string
application/pdf: string (binary)
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
410export_expired or export_consumed—
422Validation failed—
429Rate limited—
500export_integrity_failed: the stored export no longer matches its signature—
503Dependency unavailable—
GET/clinical-notifications/{id}Alert detail with provenance, deliveries, overrides and acknowledgment

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Success
application/json: NotificationDetail
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
422Validation failed—
429Rate limited—
503Dependency unavailable—
GET/clinical-notifications/{id}/historyWorkflow history (append-only)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Success
application/json: HistoryList
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
422Validation failed—
429Rate limited—
503Dependency unavailable—
GET/clinical-notifications/{id}/deliveriesDelivery attempts

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Success
application/json: DeliveryList
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
422Validation failed—
429Rate limited—
503Dependency unavailable—
POST/clinical-notifications/{id}/ackOHN-28-API-003 Acknowledge with read-back (F002)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Success
application/json: AckResult
400Idempotency-Key missing or malformed (idempotency_key_required), or the body is not valid JSON (malformed_request)—
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
409version_conflict (details.current_version), idempotency_key_reused, request_in_progress, illegal_transition, already_acknowledged, not_acknowledgeable, duplicate_event, conflict—
415unsupported_media_type: send application/json—
422Validation failed—
429Rate limited—
503Dependency unavailable—
POST/clinical-notifications/{id}/overrideOHN-28-F003 Supervisor escalation override

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Success
application/json: AckResult
400Idempotency-Key missing or malformed (idempotency_key_required), or the body is not valid JSON (malformed_request)—
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
409version_conflict (details.current_version), idempotency_key_reused, request_in_progress, illegal_transition, already_acknowledged, not_acknowledgeable, duplicate_event, conflict—
415unsupported_media_type: send application/json—
422Validation failed—
429Rate limited—
503Dependency unavailable—
POST/clinical-notifications/{id}/closeOHN-28-W003 Close an acknowledged alert

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Success
application/json: AckResult
400Idempotency-Key missing or malformed (idempotency_key_required), or the body is not valid JSON (malformed_request)—
401Unauthenticated—
403Denied by policy (audited)—
404Not found or not visible—
409version_conflict (details.current_version), idempotency_key_reused, request_in_progress, illegal_transition, already_acknowledged, not_acknowledgeable, duplicate_event, conflict—
415unsupported_media_type: send application/json—
422Validation failed—
429Rate limited—
503Dependency unavailable—

Schémas

NotificationCommand

NomTypeObligatoireDescription
patient_refstring (uuid)oui
trigger_typestringoui
severitystringoui
target_rolestringoui
source_refstring (uuid)oui

PolicyCommand

NomTypeObligatoireDescription
trigger_typestringoui
severitystringoui
target_rolestringoui
channelstringoui
ack_deadline_minutesintegeroui
escalation_chainarray of string (uuid)oui

PolicyUpdateCommand

NomTypeObligatoireDescription
channelstringoui
ack_deadline_minutesintegeroui
escalation_chainarray of string (uuid)oui
expected_versionintegeroui
reasonstringoui

AckCommand

NomTypeObligatoireDescription
recipient_idstring (uuid)oui
readback_confirmationbooleanoui
acknowledged_atstring (date-time)oui
notesstringoui
expected_versionintegeroui

OverrideCommand

NomTypeObligatoireDescription
reasonstringoui
alternate_recipientstring (uuid)oui
expirationstring (date-time)oui
expected_versionintegeroui

CloseCommand

NomTypeObligatoireDescription
reasonstringoui
expected_versionintegeroui

CodeListCommand

NomTypeObligatoireDescription
entriesarray of CodeListCommand.entries.itemoui

ExportCommand

NomTypeObligatoireDescription
format"csv" | "pdf"oui
filtersReportFiltersnon

Receipt

NomTypeObligatoireDescription
receipt_idstring (uuid)non
committed_atstring (date-time)non
aggregate_idstring (uuid)non
versionintegernon
status"committed" | "denied"non

Notification

NomTypeObligatoireDescription
idstring (uuid)non
state"received" | "target_resolved" | "sent" | "acknowledged" | "escalated" | "escalation_exhausted" | "unroutable" | "closed"non
severitystringnon
trigger_typestringnon
target_rolestringnon
channelstringnon
criticalbooleannon
levelintegernon
ack_deadline_minutesintegernon
current_recipientstring | null (uuid)non
deadline_atstring | null (date-time)non
first_sent_atstring | null (date-time)non
acked_atstring | null (date-time)non
acked_bystring | null (uuid)non
closed_atstring | null (date-time)non
source_refstring (uuid)non
versionintegernon
created_atstring (date-time)non
updated_atstring (date-time)non
jurisdiction_idstring (uuid)non
organization_idstring (uuid)non
pending_reconciliationbooleannontrue while the alert has not reached a recipient (received, target_resolved) or its next page is blocked by a dependency outage
routing_blocked_reasonstring | nullnon1.0.1: dependency_unavailable:OHN-06 | OHN-16 | channel while a dependency outage blocks routing or escalation; null otherwise. An alert somebody holds keeps its state, level and holder during the outage.
needs_supervisorbooleannonescalation_exhausted or unroutable: nobody could be paged; supervisors must act
patient_ref_maskedstringnonpresent in lists, intake and mutation answers and in the detail view; the detail view adds patient_ref only when OHN-16 permits
provenanceNotification.provenancenon

NotificationResult

NomTypeObligatoireDescription
notificationNotificationnon
delivery_attemptsintegernon
skipped_recipientsintegernon
receiptReceiptnon

NotificationList

NomTypeObligatoireDescription
itemsarray of Notificationnon
next_cursorstring | nullnon
as_ofstringnon

NotificationDetail

NomTypeObligatoireDescription
idstring (uuid)non
state"received" | "target_resolved" | "sent" | "acknowledged" | "escalated" | "escalation_exhausted" | "unroutable" | "closed"non
severitystringnon
trigger_typestringnon
target_rolestringnon
channelstringnon
criticalbooleannon
levelintegernon
ack_deadline_minutesintegernon
current_recipientstring | null (uuid)non
deadline_atstring | null (date-time)non
first_sent_atstring | null (date-time)non
acked_atstring | null (date-time)non
acked_bystring | null (uuid)non
closed_atstring | null (date-time)non
source_refstring (uuid)non
versionintegernon
created_atstring (date-time)non
updated_atstring (date-time)non
jurisdiction_idstring (uuid)non
organization_idstring (uuid)non
pending_reconciliationbooleannontrue while the alert has not reached a recipient (received, target_resolved) or its next page is blocked by a dependency outage
routing_blocked_reasonstring | nullnon1.0.1: dependency_unavailable:OHN-06 | OHN-16 | channel while a dependency outage blocks routing or escalation; null otherwise. An alert somebody holds keeps its state, level and holder during the outage.
needs_supervisorbooleannonescalation_exhausted or unroutable: nobody could be paged; supervisors must act
patient_ref_maskedstringnonpresent in lists, intake and mutation answers and in the detail view; the detail view adds patient_ref only when OHN-16 permits
provenanceNotificationDetail.provenancenon
patient_refstring | null (uuid)non
patient_access"permitted" | "withheld" | "unavailable"non
readback_requiredbooleannon
recipients_chainarray of string (uuid)non
deliveriesarray of Deliverynon
overridesarray of NotificationDetail.overrides.itemnon
acknowledgementNotificationDetail.acknowledgementnon

AckResult

NomTypeObligatoireDescription
notificationNotificationnon
receiptReceiptnon

Policy

NomTypeObligatoireDescription
idstring (uuid)non
trigger_typestringnon
severitystringnon
target_rolestringnon
channelstringnon
ack_deadline_minutesintegernon
escalation_chainarray of string (uuid)non
versionintegernon
updated_bystring (uuid)non
updated_atstring (date-time)non
jurisdiction_idstring (uuid)non
organization_idstring (uuid)non

PolicyResult

NomTypeObligatoireDescription
policyPolicynon
receiptReceiptnon

PolicyList

NomTypeObligatoireDescription
itemsarray of Policynon

CodeList

NomTypeObligatoireDescription
liststringnon
itemsarray of objectnon

CodeListUpsertResult

NomTypeObligatoireDescription
liststringnon
upsertedintegernon
receiptReceiptnon

SweepResult

still_pending counts alerts the sweep could not route because a dependency is unavailable (or could not process); they stay open and are retried

NomTypeObligatoireDescription
examinedintegernon
escalatedintegernon
retriedintegernon
exhaustedintegernon
skipped_conflictintegernon
still_pendingintegernon

OutboxResult

NomTypeObligatoireDescription
deliveredintegernon
pendingintegernon

HistoryList

NomTypeObligatoireDescription
itemsarray of HistoryList.items.itemnon

DeliveryList

NomTypeObligatoireDescription
itemsarray of Deliverynon

ReportCatalog

NomTypeObligatoireDescription
reportsarray of objectnon

Report

NomTypeObligatoireDescription
report_idstringnon
titlestringnon
columnsarray of stringnon
rowsarray of objectnon
summaryobjectnon
state"rendered" | "no_authorized_data"non
generated_atstringnon
next_cursorstring | nullnon

ExportReceipt

NomTypeObligatoireDescription
export_idstring (uuid)non
report_idstringnon
formatstringnon
rowsintegernon
expires_atstringnon
single_usebooleannon
download_pathstringnon

ExportFile

string (binary)

Delivery

NomTypeObligatoireDescription
idstring (uuid)non
recipient_idstring (uuid)non
channelstringnon
levelintegernon
status"sent" | "failed" | "undeliverable" | "stale_contact"non
error_codestring | nullnon
transport_refstring | nullnon
atstring (date-time)non

ReportFilters

NomTypeObligatoireDescription
facilitystring (uuid)non
organizationstring (uuid)non
period_fromstring (date)non
period_tostring (date)non
severitystringnon
channelstringnon

Health

NomTypeObligatoireDescription
status"ok"non
module"OHN-28"non
dependenciesHealth.dependenciesnon
overdue_unsweptintegernon1.0.1 (Java): open alerts whose deadline passed more than sweep_grace_minutes ago without the sweep reaching them; above zero means the sweep scheduler has stopped
sweep_grace_minutesintegernon

Error

NomTypeObligatoireDescription
errorstringoui
messagestringnon
detailsobjectnonvalidation: {field: zod issue code} (first issue per field; a refinement reports its message; unknown keys under "_"); version_conflict: {current_version}; duplicate_event: {notification_id}

get-health-ohn-28.response-503 défini sur place

NomTypeObligatoireDescription
status"unavailable"non

CodeListCommand.entries.item défini sur place

NomTypeObligatoireDescription
codestringoui
label_enstringoui
label_frstringoui
activebooleannon
criticalbooleannona severity flagged critical needs read-back to be acknowledged

Notification.provenance défini sur place

NomTypeObligatoireDescription
source_system_idstring (uuid)non
provenance_refstring (uuid)non
source_versionintegernon
as_ofstring (date-time)non

NotificationDetail.provenance défini sur place

NomTypeObligatoireDescription
source_system_idstring (uuid)non
provenance_refstring (uuid)non
source_versionintegernon
as_ofstring (date-time)non

NotificationDetail.overrides.item défini sur place

NomTypeObligatoireDescription
idstring (uuid)non
alternate_recipientstring (uuid)non
expirationstring (date-time)non
created_bystring (uuid)non
created_atstring (date-time)non

NotificationDetail.acknowledgement défini sur place

NomTypeObligatoireDescription
recipient_idstring (uuid)non
readback_confirmationbooleannon
acknowledged_atstring (date-time)non
notesstring | nullnononly for the acknowledger and supervisors

HistoryList.items.item défini sur place

NomTypeObligatoireDescription
workflow"OHN-28-W001" | "OHN-28-W002" | "OHN-28-W003"non
from_statestring | nullnon
to_statestringnon
versionintegernon
actor_idstring (uuid)non
reasonstringnon
atstring (date-time)non

Health.dependencies défini sur place

NomTypeObligatoireDescription
worker"live" | "unconfigured" | "synthetic"non
access"live" | "unconfigured" | "synthetic"non
channel"live" | "unconfigured" | "synthetic"non