Aller au contenu

← Tous les contrats

OHN-32 Clinician Network Access Portal

Version
1.0.1
OpenAPI
3.1.0
Source dans le dépôt
modules/OHN-32/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 (clinical_care_access); patient-linked calls need an MFA session. A clinical context is bound to one patient, facility and purpose. Reconciled with the observed TypeScript behaviour (docs/program/java/ohn-32-contract-changes.md). Query keys not declared are refused (422).

Opérations

OHN-32

GET/clinician/worklistWorklist: my active contexts and pending relationships (API-001)

Identifiant d’opération: worklist

Authentification: bearer

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/clinician/patient-resolveOpen a patient: MFA, licence and affiliation, proven relationship, policy scope (API-002; F001; W001)

1.0.1: for a relationship with basis patient_approved (patient-access contract 1.1.0), the context's allowed categories are the OHN-16 decision's categories intersected with the sections the patient granted (empty intersection: 403 denied_by_policy); declared relationships are unchanged. GET /clinician/patients/{id}/summary names the other requested sections as not_permitted_sections.

Identifiant d’opération: resolvePatient

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, ended/expired context, identity changed, or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/clinician/patients/{id}/summaryChart sections with provenance, freshness and warnings (API-003); re-validates the context

Identifiant d’opération: chartSummary

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
context_idquerystring (uuid)nonRequired; validated by the module (422 domain_validation_failed when missing).
sectionsquerystringnonComma-separated section codes
facility_idquerystring (uuid)non
purposequerystringnon

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/clinician/patients/{id}/sections/{section}/comparisonCompare the sources of one section (W002)

Identifiant d’opération: compareSources

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
sectionpathstringoui
context_idquerystring (uuid)nonRequired; validated by the module (422 domain_validation_failed when missing).

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/clinician/emergency-requestsEmergency path: justified, bounded, never silent (W003)

Identifiant d’opération: requestEmergency

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, ended/expired context, identity changed, or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/clinician/contextsMy contexts (supervisors: all in jurisdiction)

Identifiant d’opération: listContexts

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
statequery"active" | "ended"non
cursorquerystringnon

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/clinician/contexts/{id}Context with authorization basis and history

Identifiant d’opération: getContext

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/clinician/contexts/{id}/endEnd a context (logout, switched, completed). An emergency context also ends its OHN-17 grant; the answer then carries emergency_grant_released (false = OHN-17 unavailable, recorded as grant_release_pending; the grant ends at its own time limit)

Identifiant d’opération: endContext

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, ended/expired context, identity changed, or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/clinician/relationshipsRelationships (state)

Identifiant d’opération: listRelationships

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
statequerystringnon
cursorquerystringnon

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/clinician/relationshipsDeclare a care relationship (F002)

Identifiant d’opération: declareRelationship

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, ended/expired context, identity changed, or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/clinician/relationships/{id}/decisionApprove or reject a pending relationship (supervisor, not the declarer)

Identifiant d’opération: decideRelationship

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, ended/expired context, identity changed, or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/clinician/correction-referralsMy referrals

Identifiant d’opération: listReferrals

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
cursorquerystringnon

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/clinician/correction-referralsRefer a source discrepancy for correction (F003); delivery is not claimed

Identifiant d’opération: createReferral

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, ended/expired context, identity changed, or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/clinician/conflictsUnresolved source conflicts (supervisor)

Identifiant d’opération: listConflicts

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
riskquery"high" | "standard"non
referral_statequery"none" | "referred"non
cursorquerystringnon

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/clinician/policyRead policy (unset = 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, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/clinician/policyWrite policy

Identifiant d’opération: writePolicy

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, ended/expired context, identity changed, or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/clinician/code-lists/{list}Read code list

Identifiant d’opération: listCodes

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
listpath"care_purpose" | "relationship_basis" | "requested_category" | "clinical_urgency"oui

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/clinician/code-lists/{list}Upsert code list entries

Identifiant d’opération: upsertCodes

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
listpath"care_purpose" | "relationship_basis" | "requested_category" | "clinical_urgency"oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, ended/expired context, identity changed, or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/clinician/maintenance/context-sweepClose contexts past their expiry

Identifiant d’opération: contextSweep

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, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, ended/expired context, identity changed, or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/clinician/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, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, ended/expired context, identity changed, or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/clinician/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, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/clinician/reports/{reportId}Run report

Identifiant d’opération: runReport

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpath"OHN-32-R001" | "OHN-32-R002" | "OHN-32-R003"oui
facilityquerystring (uuid)non
riskquery"high" | "standard"non
period_fromquerystringnon
period_toquerystringnon
cursorquerystringnon

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/clinician/reports/{reportId}/exportCreate signed single-use export

Identifiant d’opération: createExport

Authentification: bearer

Paramètres

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

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, ended/expired context, identity changed, or idempotency mismatch
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/clinician/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
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied, MFA required, no care relationship, context mismatch, or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—

Autres opérations

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

Identifiant d’opération: health

Réponses

CodeDescriptionType de média
200ok—
503unavailable—

Schémas

Error

NomTypeObligatoireDescription
errorstringoui
messagestringnon
detailsanynon

Resolve

NomTypeObligatoireDescription
patient_id_or_identifierstringouiNever stored in clear; only a hash is kept
facility_idstring (uuid)oui
encounter_or_relationship_refstring (uuid)ouiAn active care relationship of the caller at this facility
care_purposestringoui
device_refstringnon

Relationship

NomTypeObligatoireDescription
patient_refstring (uuid)oui
facility_idstring (uuid)oui
requested_categorystringoui
relationship_basisstringoui
case_referencestring (uuid)oui
reasonstringoui

RelationshipDecision

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

Referral

NomTypeObligatoireDescription
context_idstring (uuid)oui
source_record_refstring (uuid)oui
discrepancystringoui
clinical_urgencystringoui
source_contactstring (uuid)oui

Emergency

NomTypeObligatoireDescription
patient_id_or_identifierstringoui
facility_idstring (uuid)oui
case_referencestring (uuid)oui
justificationstringoui
requested_sectionsarray of stringoui
duration_minutesintegeroui
device_refstringnon

EndContext

NomTypeObligatoireDescription
reason"logout" | "switched" | "completed"oui

Policy

All six keys must be present in the body (module-enforced, 422 otherwise); the five numeric/list fields may be null, meaning "not configured" (fail closed). They are not listed in required only because the server code generator would then reject null.

NomTypeObligatoireDescription
relationship_hoursinteger | nullnon
context_minutesinteger | nullnon
emergency_max_minutesinteger | nullnon
stale_after_hoursinteger | nullnon
high_risk_sectionsarray of stringnon
approval_referencestringoui

CodeListUpsert

NomTypeObligatoireDescription
entriesarray of CodeListUpsert.entries.itemoui

ExportCommand

NomTypeObligatoireDescription
format"csv" | "pdf"oui
filtersReportFiltersnon

ChartView

NomTypeObligatoireDescription
context_idstring (uuid)non
patient_idstring (uuid)non
emergencybooleannon
banner"emergency_access" | nullnon
record_completebooleannonFalse whenever any section is incomplete, empty or in conflict
has_conflictsbooleannon
sectionsarray of ChartView.sections.itemnon
not_permitted_sectionsarray of stringnon

Report

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

ReportFilters

NomTypeObligatoireDescription
facilitystring (uuid)non
risk"high" | "standard"non
period_fromstringnon
period_tostringnon

CodeListUpsert.entries.item défini sur place

NomTypeObligatoireDescription
codestringoui
label_enstringoui
label_frstringoui
activebooleannon

ChartView.sections.item défini sur place

NomTypeObligatoireDescription
sectionstringnon
completebooleannon
freshness"current" | "stale" | "unknown"non
warning"sources_conflict" | "incomplete" | "no_source" | "stale" | "age_unknown" | nullnon
sourcesarray of anynonEach source keeps its provenance, as-of time and version