Aller au contenu

← 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

CodeDescriptionType de média
200Success
application/json: object
404Not found or not disclosed
application/json: Error

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

CodeDescriptionType de média
200Success
application/json: object
404Not found or not disclosed
application/json: Error
POST/api/ohn/v1/documents/synthetic/setupConfigure synthetic upstream fakes

Identifiant d’opération: ohn13_syntheticSetup

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Success
application/json: object
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error

Documents

GET/api/ohn/v1/documentsDocument index (patient masked)

Identifiant d’opération: ohn13_listDocuments

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
statequerystringnon
document_typequerystringnon
patient_refquerystring (uuid)non
source_orgquerystring (uuid)non
cursorquerystringnon

Réponses

CodeDescriptionType de média
200Success
application/json: object
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
410Gone: link expired, used or revoked
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/documents/contextCaller principal and permitted actions

Identifiant d’opération: ohn13_context

Authentification: bearerAuth

Réponses

CodeDescriptionType de média
200Success
application/json: object
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
410Gone: link expired, used or revoked
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/documents/vocabularyControlled vocabularies

Identifiant d’opération: ohn13_vocabulary

Authentification: bearerAuth

Réponses

CodeDescriptionType de média
200Success
application/json: object
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
410Gone: link expired, used or revoked
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/documents/monitorIngest KPIs, 14-day trend and exceptions

Identifiant d’opération: ohn13_monitor

Authentification: bearerAuth

Réponses

CodeDescriptionType de média
200Success
application/json: object
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
410Gone: link expired, used or revoked
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
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

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Success
application/json: object
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
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

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Success
application/json: object
202Quarantined for content review
application/json: object
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/documents/{id}/metadataMetadata, scan, freshness and history (no content)

Identifiant d’opération: ohn13_getMetadata

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Success
application/json: object
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
410Gone: link expired, used or revoked
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/documents/{id}/integrity-checksIntegrity re-check history

Identifiant d’opération: ohn13_listIntegrityChecks

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Success
application/json: object
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
410Gone: link expired, used or revoked
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
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

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Success
application/json: object
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/documents/{id}/revokeRevoke; outstanding delivery links stop working

Identifiant d’opération: ohn13_revokeDocument

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Success
application/json: object
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/documents/{id}/verify-integrityRecompute digests and rescan every version

Identifiant d’opération: ohn13_verifyIntegrity

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Success
application/json: object
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error

Amendment

GET/api/ohn/v1/documents/amendmentsAmendment requests

Identifiant d’opération: ohn13_listAmendments

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
statequerystringnon

Réponses

CodeDescriptionType de média
200Success
application/json: object
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
410Gone: link expired, used or revoked
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
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

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Success
application/json: object
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/documents/{id}/versionsAll versions, oldest preserved

Identifiant d’opération: ohn13_listVersions

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Success
application/json: object
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
410Gone: link expired, used or revoked
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/documents/{id}/amendmentsRequest a version correction (F003)

Identifiant d’opération: ohn13_requestAmendment

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Success
application/json: object
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error

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

NomEmplacementTypeObligatoireDescription
tokenpathstringoui

Réponses

CodeDescriptionType de média
200Success; 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)
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
410Gone: link expired, used or revoked
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/documents/{id}/receiptsRetrieval receipts (access audit)

Identifiant d’opération: ohn13_listReceipts

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Success
application/json: object
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
410Gone: link expired, used or revoked
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/documents/{id}/retrieveRequest retrieval (F002, W002): delivery link or metadata

Identifiant d’opération: ohn13_retrieveDocument

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Success
application/json: object
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error

Reports

GET/api/ohn/v1/documents/reports/{reportId}Run OHN-13-R001..R003

Identifiant d’opération: ohn13_runReport

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpath"OHN-13-R001" | "OHN-13-R002" | "OHN-13-R003"oui
fromquerystringnonISO date-time with offset; a malformed filter answers 422 invalid_filter
toquerystringnonISO date-time with offset; a malformed filter answers 422 invalid_filter
facilityquerystringnonOrganisation id (uuid); validated by the report filter rules
sourcequerystringnonSource organisation id (uuid); validated by the report filter rules
document_typequerystringnon
typequerystringnon
statusquerystringnon
cursorquerystringnon

Réponses

CodeDescriptionType de média
200Success
application/json: object
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
410Gone: link expired, used or revoked
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
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

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

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Success
application/json: object
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/documents/exports/{token}Download an export (audited)

Identifiant d’opération: ohn13_downloadExport

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
tokenpathstringoui

Réponses

CodeDescriptionType de média
200Success
text/csv: string (binary)
application/pdf: string (binary)
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
410Gone: link expired, used or revoked
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error

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

NomEmplacementTypeObligatoireDescription
patientRefpathstring (uuid)ouiThe patient's own OHN-03 id (must equal the token subject)

Réponses

CodeDescriptionType de média
200Success
application/json: object
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
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

NomEmplacementTypeObligatoireDescription
patientRefpathstring (uuid)oui
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête

  • application/json: object

Réponses

CodeDescriptionType de média
201Success
application/json: object
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure or domain refusal
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
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

NomEmplacementTypeObligatoireDescription
tokenpathstringoui

Réponses

CodeDescriptionType de média
200Success; 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)
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
410Gone: link expired, used or revoked
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error

Schémas

Error

NomTypeObligatoireDescription
errorstringoui
messagestringnon
detailsanynon

Document

JSON document; shapes are listed in modules/OHN-13/data/schema.md

object

Receipt

NomTypeObligatoireDescription
receipt_idstring (uuid)oui
committed_atstring (date-time)oui
aggregate_idstring (uuid)oui
aggregate_typestringoui
versionintegeroui
status"committed" | "denied" | "pending"oui

CommandResult

NomTypeObligatoireDescription
receiptReceiptnon

Empty

object

Versioned

NomTypeObligatoireDescription
expected_versionintegeroui

Export

NomTypeObligatoireDescription
format"csv" | "pdf"oui
filtersobjectnon

Reasoned

NomTypeObligatoireDescription
expected_versionintegeroui
reasonstringoui

Content

NomTypeObligatoireDescription
media_type"application/pdf" | "text/plain" | "image/png" | "image/jpeg" | "application/fhir+json" | "application/xml"oui
content_base64stringouiAt most 2 MB once decoded

Register

OHN-13-F001 Document registry entry

NomTypeObligatoireDescription
patient_refstring (uuid)ouiRestricted; never returned
source_orgstring (uuid)oui
document_type"discharge_summary" | "referral_letter" | "lab_report" | "imaging_report" | "prescription" | "consent_form" | "operative_note" | "clinic_letter"oui
clinical_datestring (date)oui
content_hashstringoui
storage_locatorstring (uuid)oui
security_label"normal" | "restricted" | "very_restricted"oui

Retrieve

OHN-13-F002 Document retrieval request (document_id is the path id)

NomTypeObligatoireDescription
clinical_purpose"treatment" | "care_coordination" | "emergency_care"oui
relationship_refstring (uuid)oui
requested_format"original" | "metadata_only"oui

Amendment

OHN-13-F003 Document version correction (document_id is the path id)

NomTypeObligatoireDescription
replacement_refstring (uuid)oui
change_reasonstringoui
author_idstring (uuid)oui
effective_atstring (date-time)oui

QuarantineDecision

NomTypeObligatoireDescription
expected_versionintegeroui
decision"release" | "reject"oui
reasonstringoui

AmendmentDecision

NomTypeObligatoireDescription
expected_versionintegeroui
decision"verify" | "reject"oui
reasonstringoui

SyntheticToken

NomTypeObligatoireDescription
principal_idstring (uuid)oui
role"clinical_document_steward" | "licensed_clinician" | "document_source" | "unauthorized_viewer" | "patient"oui
jurisdictionstring (uuid)oui
organization_idstring (uuid)oui
purpose"document_management" | "document_submission" | "treatment" | "care_coordination" | "emergency_care" | "patient_access"oui
practitioner_idstring (uuid)nonOptional OHN-06 health-worker id the gateway attests

SyntheticSetup

NomTypeObligatoireDescription
deny_patientsarray of string (uuid)non
deny_labelsarray of "normal" | "restricted" | "very_restricted"non
downarray of "OHN-01" | "OHN-16" | "OHN-42"non
resetbooleannon