← Tous les contrats
OHN-13 Clinical Document Registry
- Version
- 1.0.0
- OpenAPI
- 3.1.0
- Source dans le dépôt
modules/OHN-13/api/openapi.yaml- Serveurs
https://opeshealthnetwork.com
- Authentification
bearerAuth: http bearer (JWT)
Télécharger le contrat (YAML)
Les contrats sont rédigés en anglais.
Document ingestion with malware scanning and digest verification (W001), short-lived one-time retrieval with receipts (W002), and amendment with preserved versions (W003). Every POST requires an Idempotency-Key. Document bodies never appear in URLs, events, logs or reports; patient references are never returned.
Opérations
Health
GET/health/ohn-13Liveness and database check
Identifiant d’opération: ohn13_health
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
404 | Not found or not disclosed | |
Synthetic
POST/api/ohn/v1/documents/synthetic-tokenIssue a synthetic token (synthetic mode only)
Identifiant d’opération: ohn13_syntheticToken
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
404 | Not found or not disclosed | |
POST/api/ohn/v1/documents/synthetic/setupConfigure synthetic upstream fakes
Identifiant d’opération: ohn13_syntheticSetup
Authentification: bearerAuth
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 (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
Documents
GET/api/ohn/v1/documentsDocument index (patient masked)
Identifiant d’opération: ohn13_listDocuments
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
state | query | string | non | |
document_type | query | string | non | |
patient_ref | query | string (uuid) | non | |
source_org | query | string (uuid) | non | |
cursor | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
410 | Gone: link expired, used or revoked | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/documents/contextCaller principal and permitted actions
Identifiant d’opération: ohn13_context
Authentification: bearerAuth
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
410 | Gone: link expired, used or revoked | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/documents/vocabularyControlled vocabularies
Identifiant d’opération: ohn13_vocabulary
Authentification: bearerAuth
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
410 | Gone: link expired, used or revoked | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/documents/monitorIngest KPIs, 14-day trend and exceptions
Identifiant d’opération: ohn13_monitor
Authentification: bearerAuth
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
410 | Gone: link expired, used or revoked | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/documents/contentsStore content and scan it; returns storage_locator and sha256
Identifiant d’opération: ohn13_uploadContent
Authentification: bearerAuth
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 (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/documents/registerRegister a document (F001, W001): 201 indexed, 202 quarantined, 422 rejected
Identifiant d’opération: ohn13_registerDocument
Authentification: bearerAuth
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
|
202 | Quarantined for content review | application/json: object
|
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/documents/{id}/metadataMetadata, scan, freshness and history (no content)
Identifiant d’opération: ohn13_getMetadata
Authentification: bearerAuth
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
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
410 | Gone: link expired, used or revoked | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/documents/{id}/integrity-checksIntegrity re-check history
Identifiant d’opération: ohn13_listIntegrityChecks
Authentification: bearerAuth
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
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
410 | Gone: link expired, used or revoked | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/documents/{id}/quarantine-decisionRelease (suspicious only) or reject a quarantined document
Identifiant d’opération: ohn13_quarantineDecision
Authentification: bearerAuth
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 (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/documents/{id}/revokeRevoke; outstanding delivery links stop working
Identifiant d’opération: ohn13_revokeDocument
Authentification: bearerAuth
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 (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/documents/{id}/verify-integrityRecompute digests and rescan every version
Identifiant d’opération: ohn13_verifyIntegrity
Authentification: bearerAuth
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 (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
Amendment
GET/api/ohn/v1/documents/amendmentsAmendment requests
Identifiant d’opération: ohn13_listAmendments
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
state | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
410 | Gone: link expired, used or revoked | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/documents/amendments/{id}/decideSteward verifies (links new version, preserves old) or rejects
Identifiant d’opération: ohn13_decideAmendment
Authentification: bearerAuth
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 (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/documents/{id}/versionsAll versions, oldest preserved
Identifiant d’opération: ohn13_listVersions
Authentification: bearerAuth
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
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
410 | Gone: link expired, used or revoked | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/documents/{id}/amendmentsRequest a version correction (F003)
Identifiant d’opération: ohn13_requestAmendment
Authentification: bearerAuth
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 |
|---|
201 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
Retrieval
GET/api/ohn/v1/documents/deliveries/{token}One-time, requester-bound, 5-minute delivery of the document body
Identifiant d’opération: ohn13_deliverDocument
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
token | path | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success; the body is the stored document with its own media type; headers X-Content-SHA256 and Content-Security-Policy | application/pdf: string (binary)
text/plain: string (binary)
image/png: string (binary)
image/jpeg: string (binary)
application/fhir+json: string (binary)
application/xml: string (binary)
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
410 | Gone: link expired, used or revoked | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/documents/{id}/receiptsRetrieval receipts (access audit)
Identifiant d’opération: ohn13_listReceipts
Authentification: bearerAuth
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
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
410 | Gone: link expired, used or revoked | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/documents/{id}/retrieveRequest retrieval (F002, W002): delivery link or metadata
Identifiant d’opération: ohn13_retrieveDocument
Authentification: bearerAuth
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 |
|---|
201 | Success | application/json: object
|
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
Reports
GET/api/ohn/v1/documents/reports/{reportId}Run OHN-13-R001..R003
Identifiant d’opération: ohn13_runReport
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
reportId | path | "OHN-13-R001" | "OHN-13-R002" | "OHN-13-R003" | oui | |
from | query | string | non | ISO date-time with offset; a malformed filter answers 422 invalid_filter |
to | query | string | non | ISO date-time with offset; a malformed filter answers 422 invalid_filter |
facility | query | string | non | Organisation id (uuid); validated by the report filter rules |
source | query | string | non | Source organisation id (uuid); validated by the report filter rules |
document_type | query | string | non | |
type | query | string | non | |
status | query | string | non | |
cursor | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | application/json: object
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
410 | Gone: link expired, used or revoked | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/documents/reports/{reportId}/exportSigned, 5-minute, owner-only CSV or PDF export
Identifiant d’opération: ohn13_exportReport
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
reportId | path | "OHN-13-R001" | "OHN-13-R002" | "OHN-13-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 (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/documents/exports/{token}Download an export (audited)
Identifiant d’opération: ohn13_downloadExport
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
token | path | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success | text/csv: string (binary)
application/pdf: string (binary)
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
410 | Gone: link expired, used or revoked | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
Patient access
GET/api/ohn/v1/documents/patients/{patientRef}/patient-viewThe patient's own documents for the OHN-31 patient chart (role patient, purpose patient_access; own record only, otherwise 404; every read audited)
Identifiant d’opération: ohn13_patientDocumentView
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
patientRef | 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
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/documents/patients/{patientRef}/patient-view/{id}/retrieveA one-time delivery link for one of the patient's own documents (empty body)
Identifiant d’opération: ohn13_patientDocumentRetrieve
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
patientRef | path | string (uuid) | oui | |
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête
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 (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure or domain refusal | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/documents/patient-deliveries/{token}One-time, patient-bound delivery of the document body issued by the patient-view retrieve
Identifiant d’opération: ohn13_patientDeliverDocument
Authentification: bearerAuth
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
token | path | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | Success; the body is the stored document with its own media type; headers X-Content-SHA256 and Content-Security-Policy | application/pdf: string (binary)
text/plain: string (binary)
image/png: string (binary)
image/jpeg: string (binary)
application/fhir+json: string (binary)
application/xml: string (binary)
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
410 | Gone: link expired, used or revoked | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
Schémas
Error
| Nom | Type | Obligatoire | Description |
|---|
error | string | oui | |
message | string | non | |
details | any | non | |
Document
JSON document; shapes are listed in modules/OHN-13/data/schema.md
object
Receipt
| Nom | Type | Obligatoire | Description |
|---|
receipt_id | string (uuid) | oui | |
committed_at | string (date-time) | oui | |
aggregate_id | string (uuid) | oui | |
aggregate_type | string | oui | |
version | integer | oui | |
status | "committed" | "denied" | "pending" | oui | |
CommandResult
| Nom | Type | Obligatoire | Description |
|---|
receipt | Receipt | non | |
Versioned
| Nom | Type | Obligatoire | Description |
|---|
expected_version | integer | oui | |
Export
| Nom | Type | Obligatoire | Description |
|---|
format | "csv" | "pdf" | oui | |
filters | object | non | |
Reasoned
| Nom | Type | Obligatoire | Description |
|---|
expected_version | integer | oui | |
reason | string | oui | |
Content
| Nom | Type | Obligatoire | Description |
|---|
media_type | "application/pdf" | "text/plain" | "image/png" | "image/jpeg" | "application/fhir+json" | "application/xml" | oui | |
content_base64 | string | oui | At most 2 MB once decoded |
Register
OHN-13-F001 Document registry entry
| Nom | Type | Obligatoire | Description |
|---|
patient_ref | string (uuid) | oui | Restricted; never returned |
source_org | string (uuid) | oui | |
document_type | "discharge_summary" | "referral_letter" | "lab_report" | "imaging_report" | "prescription" | "consent_form" | "operative_note" | "clinic_letter" | oui | |
clinical_date | string (date) | oui | |
content_hash | string | oui | |
storage_locator | string (uuid) | oui | |
security_label | "normal" | "restricted" | "very_restricted" | oui | |
Retrieve
OHN-13-F002 Document retrieval request (document_id is the path id)
| Nom | Type | Obligatoire | Description |
|---|
clinical_purpose | "treatment" | "care_coordination" | "emergency_care" | oui | |
relationship_ref | string (uuid) | oui | |
requested_format | "original" | "metadata_only" | oui | |
Amendment
OHN-13-F003 Document version correction (document_id is the path id)
| Nom | Type | Obligatoire | Description |
|---|
replacement_ref | string (uuid) | oui | |
change_reason | string | oui | |
author_id | string (uuid) | oui | |
effective_at | string (date-time) | oui | |
QuarantineDecision
| Nom | Type | Obligatoire | Description |
|---|
expected_version | integer | oui | |
decision | "release" | "reject" | oui | |
reason | string | oui | |
AmendmentDecision
| Nom | Type | Obligatoire | Description |
|---|
expected_version | integer | oui | |
decision | "verify" | "reject" | oui | |
reason | string | oui | |
SyntheticToken
| Nom | Type | Obligatoire | Description |
|---|
principal_id | string (uuid) | oui | |
role | "clinical_document_steward" | "licensed_clinician" | "document_source" | "unauthorized_viewer" | "patient" | oui | |
jurisdiction | string (uuid) | oui | |
organization_id | string (uuid) | oui | |
purpose | "document_management" | "document_submission" | "treatment" | "care_coordination" | "emergency_care" | "patient_access" | oui | |
practitioner_id | string (uuid) | non | Optional OHN-06 health-worker id the gateway attests |
SyntheticSetup
| Nom | Type | Obligatoire | Description |
|---|
deny_patients | array of string (uuid) | non | |
deny_labels | array of "normal" | "restricted" | "very_restricted" | non | |
down | array of "OHN-01" | "OHN-16" | "OHN-42" | non | |
reset | boolean | non | |