Aller au contenu

← Tous les contrats

OHN-31 Patient Health Record Portal

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

Default-deny: role AND purpose (patient_portal) must both match; the purpose is the token claim. Idempotency-Key (8-128 characters of A-Za-z0-9_.:-) is mandatory on every POST except the public share view. Sensitive actions need a fresh step-up (auth_time within the policy window). A missing policy or code list refuses (fail closed); a dependency that cannot be confirmed (identity, guardian authority, a clinical source) is 503 dependency_unavailable and nothing is shown or stored. Every request body and query is strict: an unknown key, a wrong type or a value outside its limits is 422 domain_validation_failed with details = { <top-level field>: <zod issue code | refinement message> } and "_": "unrecognized_keys" for unknown keys. Errors are application/problem+json that also carry the legacy {error, message, details} members.

Opérations

Autres opérations

GET/health/ohn-31Liveness and dependency modes

Authentification: bearer

Réponses

CodeDescriptionType de média
200ok: {status, module: "OHN-31", dependencies: {identity, delegation, chart, consent}} with each mode synthetic | unconfigured | live
application/json: object
503{status: "unavailable"} when the database does not answer—
POST/portal/synthetic-tokenTypeScript development sign-in (not served by the Java service: tokens are gateway tokens)obsolète

Authentification: bearer

Réponses

CodeDescriptionType de média
200token—
404not found—
GET/meSign in and bind identity (W001)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
x-ohn-acting-forheaderstring (uuid)nonguardian_proxy only: the patient being acted for

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/me/dashboardPatient dashboard KPIs

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
x-ohn-acting-forheaderstring (uuid)nonguardian_proxy only: the patient being acted for

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/me/recordsRecords with provenance and freshness

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
x-ohn-acting-forheaderstring (uuid)nonguardian_proxy only: the patient being acted for
session_idquerystring (uuid)non

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/me/critical-infoThe patient's own critical health information: blood group (LOINC 883-9), Rh (LOINC 10331-7) and configured haemoglobin genotype from verified laboratory results (via OHN-10 / OHN-11), with provenance and conflict warnings; plus allergies and active problems

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
x-ohn-acting-forheaderstring (uuid)nonguardian_proxy only: the patient being acted for

Réponses

CodeDescriptionType de média
200Critical information. items[].status is recorded | not_recorded | conflict | not_configured | needs_review; values are never guessed.
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/me/consentsConsents held in OHN-15

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
x-ohn-acting-forheaderstring (uuid)nonguardian_proxy only: the patient being acted for

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/me/disclosuresDisclosure history of this portal

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
x-ohn-acting-forheaderstring (uuid)nonguardian_proxy only: the patient being acted for
cursorquerystringnon

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/me/rights-requestsList own rights requests

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
x-ohn-acting-forheaderstring (uuid)nonguardian_proxy only: the patient being acted for
cursorquerystringnon
request_typequerystringnon

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
POST/me/rights-requestsSubmit a rights request (F001 correction, F002 consent preference, F003 record access, F004 security update)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui
x-ohn-acting-forheaderstring (uuid)nonguardian_proxy only: the patient being acted for

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Ok
application/json: Object
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
409version_conflict / idempotency_key_reused / illegal_transition—
413payload_too_large (a body over 256 KB)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/me/rights-requests/{id}Rights request detail

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
idpathstring (uuid)oui
x-ohn-acting-forheaderstring (uuid)nonguardian_proxy only: the patient being acted for

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
404not_found (not a route, not a UUID, or not this person's)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/me/rights-requests/{id}/historyWorkflow history (W002/W003)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
idpathstring (uuid)oui
x-ohn-acting-forheaderstring (uuid)nonguardian_proxy only: the patient being acted for

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
404not_found (not a route, not a UUID, or not this person's)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
POST/me/rights-requests/{id}/preparePrepare the copy for a record access request (W003), from the OHN-31 chart aggregation

identity_checked -> export_prepared -> available_short_term. Refused with 503 (request unchanged, audited) when a source of a requested section cannot be read: no partial copy. Optional OHN-08 supplement only with OHN31_RECORD_COPY_OHN08=true (ADR-0014).

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui
idpathstring (uuid)oui
x-ohn-acting-forheaderstring (uuid)nonguardian_proxy only: the patient being acted for

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
404not_found (not a route, not a UUID, or not this person's)—
409version_conflict / idempotency_key_reused / illegal_transition—
413payload_too_large (a body over 256 KB)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/me/downloads/{token}Download the copy prepared for a record access request (single use, short-lived, owner only)

ADR-0014: the copy is built from the OHN-31 chart aggregation (GET /me/chart sources) with the jurisdiction chart policy applied (withheld and not-yet-released entries are counted with the reason, never included), restricted to the requested record categories and date range. Format follows the request delivery_format: pdf (application/pdf), json (OHN-31 record copy 1.0.0), fhir_bundle / fhir / fhir_r4 (FHIR R4 document Bundle). The first successful download consumes the link (the request moves to expired and the content is removed); a second use answers 404.

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
tokenpathstringoui
x-ohn-acting-forheaderstring (uuid)nonguardian_proxy only: the patient being acted for

Réponses

CodeDescriptionType de média
200The file. Header X-OHN-Content-SHA256 carries the SHA-256 of the base64 content stored for the integrity check.
application/pdf: string
application/json: Object
application/fhir+json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
404not_found (unknown, another person’s, or already used link)—
410link_expired—
422domain_validation_failed / not_configured—
429rate_limited—
500export_integrity_failed (the stored content failed its hash or signature; nothing is released)—
503dependency_unavailable—
GET/me/chartOwn chart (or the represented person's): every section from the clinical modules with site names and dates; withheld items replaced by a reason and a count; sources that cannot be read are marked, never guessed

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
POST/me/chart/documents/{id}/linkIssue a short-lived, single-person download link for an own document

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui
idpathstring (uuid)oui

Corps de la requête

  • application/json: object

Réponses

CodeDescriptionType de média
201Ok
application/json: Object
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
404not_found (not a route, not a UUID, or not this person's)—
409version_conflict / idempotency_key_reused / illegal_transition—
413payload_too_large (a body over 256 KB)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/me/chart/downloads/{token}Download a document through its short-lived link (only the person it was issued to)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
tokenpathstringouiShort-lived signed download token issued by POST /me/chart/documents/{id}/link

Réponses

CodeDescriptionType de média
200The document (attachment)
application/octet-stream: string (binary)
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
404not_found (not a route, not a UUID, or not this person's)—
410link_expired / export_expired / export_consumed—
422domain_validation_failed / not_configured—
429rate_limited—
500export_integrity_failed (the stored content failed its hash or signature; nothing is released)—
503dependency_unavailable—
GET/portal/chart-policyRead the jurisdiction chart policy (result release delay, withholding rules)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
POST/portal/chart-policySet the jurisdiction chart policy (portal steward only; versioned, with a reason)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201The policy view (configured, basis, version, updated_by, updated_at, reason, policy) and the receipt
application/json: Object
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
409version_conflict / idempotency_key_reused / illegal_transition—
413payload_too_large (a body over 256 KB)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/portal/policyRead portal policy

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
POST/portal/policyCreate or change portal policy

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201The policy (version 1, or version + 1 with the right expected_version) and the receipt
application/json: Object
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
409version_conflict / idempotency_key_reused / illegal_transition—
413payload_too_large (a body over 256 KB)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/portal/code-lists/{list}Read a code list

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
listpathstringoui

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
404not_found (not a route, not a UUID, or not this person's)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
POST/portal/code-lists/{list}Upsert code list entries

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui
listpathstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
404not_found (not a route, not a UUID, or not this person's)—
409version_conflict / idempotency_key_reused / illegal_transition—
413payload_too_large (a body over 256 KB)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
POST/portal/accessibility-observationsRecord an accessibility observation (R003 source)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Ok
application/json: Object
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
409version_conflict / idempotency_key_reused / illegal_transition—
413payload_too_large (a body over 256 KB)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
POST/portal/maintenance/expire-sweepExpire past-due download links and drop content

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
409version_conflict / idempotency_key_reused / illegal_transition—
413payload_too_large (a body over 256 KB)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
POST/portal/maintenance/reconcileRetry consent preferences committed while OHN-15 was down

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
409version_conflict / idempotency_key_reused / illegal_transition—
413payload_too_large (a body over 256 KB)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
POST/portal/maintenance/drain-outboxRelay the outbox to OHN-24 (nothing is marked delivered without a sink)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
409version_conflict / idempotency_key_reused / illegal_transition—
413payload_too_large (a body over 256 KB)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/portal/report-catalogReport catalog

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/portal/reports/{reportId}Run OHN-31-R001..R003

R001/R002: a patient role sees only their own bound patient (the identity is re-verified); a portal steward sees organisation aggregates with masked references. R003 is for the portal steward. period_* apply to R001, date_range_* to R002. Any other query key is 422 (details._ = unrecognized_keys; message "Report filter is not valid.").

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
reportIdpath"OHN-31-R001" | "OHN-31-R002" | "OHN-31-R003"oui
cursorquerystringnon
countryquerystring (uuid)non
period_fromquerystring (date)non
period_toquerystring (date)non
patient_scopequerystring (uuid)non
date_range_fromquerystring (date)non
date_range_toquerystring (date)non
releasequerystringnon
localequery"en" | "fr"non
viewportquery"mobile" | "tablet" | "desktop"non

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
404not_found (not a route, not a UUID, or not this person's)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
POST/portal/reports/{reportId}/exportCreate a signed, single-use, 5-minute CSV/PDF export

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui
reportIdpathstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Ok
application/json: Object
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
404not_found (not a route, not a UUID, or not this person's)—
409version_conflict / idempotency_key_reused / illegal_transition—
413payload_too_large (a body over 256 KB)—
422domain_validation_failed / not_configured—
429rate_limited—
503dependency_unavailable—
GET/portal/exports/{token}Download an export once

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
tokenpathstringoui

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / step_up_required / guardian_* / identity_*—
404not_found (not a route, not a UUID, or not this person's)—
410link_expired / export_expired / export_consumed—
422domain_validation_failed / not_configured—
429rate_limited—
500export_integrity_failed (the stored content failed its hash or signature; nothing is released)—
503dependency_unavailable—
POST/me/exportsGenerate "My health summary" (PDF) or a FHIR R4 IPS Bundle from live sources; returns a single-use short-lived link (ADR-0012)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Created
application/json: RecordExportCreated
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / self_only / identity_*—
409patient_record_not_found—
413payload_too_large (a body over 256 KB)—
422domain_validation_failed / not_configured (portal policy)—
429rate_limited—
503dependency_unavailable / not_configured (signing key)—
GET/me/exports/{token}Download an export once (owner only). Headers X-OHN-Content-SHA256 and X-OHN-Signature (HMAC-SHA256)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
tokenpathstringoui

Réponses

CodeDescriptionType de média
200The file
application/pdf: string (binary)
application/fhir+json: object
401unauthenticated—
403denied_by_policy / self_only / identity_*—
404not_found (unknown, used, or another patient's)—
410link_expired—
429rate_limited—
500export_integrity_failed (the stored content failed its hash or signature; nothing is released)—
503dependency_unavailable / not_configured (signing key)—
GET/me/share-optionsSections, durations and active OHN-05 facilities a patient can share with

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / self_only / identity_*—
429rate_limited—
503dependency_unavailable / not_configured (signing key)—
GET/me/sharesThe patient's shares (active, revoked, expired), without tokens

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy / self_only / identity_*—
429rate_limited—
503dependency_unavailable / not_configured (signing key)—
POST/me/sharesCreate a time-limited read-only share (link and QR); a named facility is recorded as an OHN-15 consent

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Created
application/json: ShareCreated
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / self_only / identity_*—
409idempotency_key_reused / request_in_progress / version_conflict / illegal_transition—
413payload_too_large (a body over 256 KB)—
422domain_validation_failed / consent_not_recorded—
429rate_limited—
503dependency_unavailable / not_configured (signing key)—
POST/me/shares/{id}/revokeRevoke a share at once; the OHN-15 consent is revoked too (or marked revocation_pending while OHN-15 is unreachable)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non
Idempotency-Keyheaderstringoui
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
400idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-)—
401unauthenticated—
403denied_by_policy / self_only / identity_*—
404not_found—
409idempotency_key_reused / request_in_progress / version_conflict / illegal_transition—
413payload_too_large (a body over 256 KB)—
429rate_limited—
503dependency_unavailable / not_configured (signing key)—
POST/portal/shared/viewPublic read-only view of a share. No OHN-31 sign-in; a facility share needs an OHN-38 session of clinical staff at that facility. Cache-Control no-store, X-Robots-Tag noindex. Rate limited per address and per token.

ADR-0012 public view: no OHN-31 sign-in, the token travels in the body. Rate limited per address and per token (default 30 per minute; 429 with Retry-After). Answers: 200 the shared record; 401 facility_sign_in_required (a facility share needs the viewer's own sign-in; the Java service cannot resolve the viewer, OWNER-BLOCKERS B772, so it always answers 401); 403 not_named_facility / facility_not_active; 404 share_not_found; 410 share_revoked / share_expired / share_unavailable (the patient's identity no longer binds); 503 dependency_unavailable. Responses carry X-Robots-Tag: noindex, nofollow, noarchive and Referrer-Policy: no-referrer.

Authentification: bearer

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Ok
application/json: SharedView
401facility_sign_in_required—
403not_named_facility / facility_not_active—
404share_not_found—
410share_revoked / share_expired / share_unavailable—
429rate_limited—
503dependency_unavailable—
GET/portal/dashboardPortal dashboard for the portal steward: organisation activity counts, request states and types, 14-day trend, stuck requests (masked references)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
x-ohn-purposeheader"patient_portal"non

Réponses

CodeDescriptionType de média
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy (any role other than portal_steward)—
429rate_limited—
503dependency_unavailable / not_configured—

Schémas

Object

object

Prepare

NomTypeObligatoireDescription
expected_versionintegeroui

Policy

NomTypeObligatoireDescription
step_up_max_age_secondsintegeroui
access_link_ttl_minutesintegeroui
freshness_daysintegeroui
expected_versionintegernon
reasonstringoui

CodeListEntries

NomTypeObligatoireDescription
entriesarray of CodeListEntries.entries.itemoui

AccessibilityObservation

NomTypeObligatoireDescription
pagestringoui
releasestringoui
locale"en" | "fr"oui
viewport"mobile" | "tablet" | "desktop"oui
keyboard_failuresintegeroui
translation_gapsintegeroui
error_rate_permilleintegeroui

ExportCommand

NomTypeObligatoireDescription
format"csv" | "pdf"oui
filtersReportFiltersnon

ProfileCorrection

NomTypeObligatoireDescription
request_type"profile_correction"oui
patient_refstring (uuid)oui
field_namestringoui
proposed_valuestringoui
supporting_evidencestring (uuid)oui
reasonstringoui

ConsentPreference

NomTypeObligatoireDescription
request_type"consent_preference"oui
patient_refstring (uuid)oui
scopestringoui
recipientstring (uuid)oui
actionstringoui
confirmationstring (uuid)oui

RecordAccess

NomTypeObligatoireDescription
request_type"record_access"oui
patient_refstring (uuid)oui
record_categoriesarray of stringoui
time_range_startstring (date)non
time_range_endstring (date)non
delivery_formatstringoui

SecurityUpdate

NomTypeObligatoireDescription
request_type"security_update"oui
principal_idstring (uuid)oui
authenticator_actionstringoui
current_proofstring (uuid)oui
recovery_optionstringnon

RightsRequest

ProfileCorrection | ConsentPreference | RecordAccess | SecurityUpdate

RecordExportCommand

NomTypeObligatoireDescription
format"pdf" | "fhir_ips"oui

RecordExportCreated

NomTypeObligatoireDescription
exportRecordExportCreated.exportoui
linkRecordExportCreated.linkoui
noticestringoui
receiptObjectoui

ShareCommand

NomTypeObligatoireDescription
scope"summary" | "sections"ouisummary = critical_information, allergies, problems, medications
sectionsarray of "critical_information" | "allergies" | "problems" | "medications" | "results" | "immunizations" | "encounters"nonRequired for scope=sections, forbidden for summary.
duration"1h" | "24h" | "7d"oui
recipientShareCommand.recipient.option-1 | ShareCommand.recipient.option-2oui

Share

NomTypeObligatoireDescription
idstring (uuid)non
scopestringnon
sectionsarray of stringnon
section_labelsarray of stringnon
recipientobjectnon
state"active" | "revoked" | "expired"non
created_atstring (date-time)non
expires_atstring (date-time)non
revoked_atstring | null (date-time)non
viewsintegernon
last_viewed_atstring | null (date-time)non
consentShare.consentnon
versionintegernon

ShareCreated

NomTypeObligatoireDescription
shareSharenon
linkShareCreated.linknon
noticestringnon
receiptObjectnon

SharedViewCommand

Any other key is ignored; a token that is not 43 characters of A-Za-z0-9_- is 404 share_not_found.

NomTypeObligatoireDescription
tokenstringnon

SharedView

NomTypeObligatoireDescription
shared_by_patienttruenon
bannerstringnon
shareobjectnon
viewerobjectnon
patientSharedView.patientnon
generated_atstring (date-time)non
criticalobject | nullnon
sectionsarray of objectnon
noticestringnon
receipt_idstring (uuid)non

WithholdingRule

NomTypeObligatoireDescription
codestringoui
label_enstringoui
label_frstringoui
basis"legal_requirement" | "clinical_policy"ouilegal_requirement fails closed: an entry of a listed section that carries no code to check is withheld.
sectionsarray of "visits" | "problems" | "allergies" | "medicines" | "results" | "vaccinations" | "documents" | "referrals" | "appointments" | "programmes"oui
matchWithholdingRule.matchouiAt least one matcher with at least one entry (else refinement at_least_one_matcher). codes and code_prefixes match "system|code".
reason_enstringoui
reason_frstringoui

ChartPolicyCommand

NomTypeObligatoireDescription
result_release_delay_hoursintegeroui
delay_report_typesarray of stringnonEmpty = every report type.
withholding_rulesarray of WithholdingRulenonEach rule needs its own code (else details.withholding_rules = duplicate_code).
expected_versionintegernonRequired to change an existing policy (422 expected_version=required; 409 version_conflict).
reasonstringoui

ReportFilters

NomTypeObligatoireDescription
countrystring (uuid)non
period_fromstring (date)non
period_tostring (date)non
patient_scopestring (uuid)non
date_range_fromstring (date)non
date_range_tostring (date)non
releasestringnon
locale"en" | "fr"non
viewport"mobile" | "tablet" | "desktop"non

get-me-critical-info.response-200 défini sur place

NomTypeObligatoireDescription
patient_refstring (uuid)oui
blood_groupstring | nullnon
itemsarray of objectoui
warningsarray of objectoui
allergiesarray of objectnon
active_problemsarray of objectnon
receiptobjectnon

CodeListEntries.entries.item défini sur place

NomTypeObligatoireDescription
codestringoui
label_enstringoui
label_frstringoui
activebooleannon
criticalbooleannon

RecordExportCreated.export défini sur place

NomTypeObligatoireDescription
idstring (uuid)non
format"pdf" | "fhir_ips"non
state"available" | "downloaded" | "expired"non
expires_atstring (date-time)non
content_sha256stringnon
size_bytesintegernon

ShareCommand.recipient.option-1 défini sur place

NomTypeObligatoireDescription
kind"anyone_with_link"oui

ShareCommand.recipient.option-2 défini sur place

NomTypeObligatoireDescription
kind"facility"oui
facility_idstring (uuid)ouiAn active OHN-05 facility. Recorded as an OHN-15 consent directive; no consent, no share.

Share.consent défini sur place

NomTypeObligatoireDescription
refstringnon
sync"recorded" | "revoked" | "revocation_pending"non

SharedView.patient défini sur place

NomTypeObligatoireDescription
namestringnon
birth_datestring | nullnon
sex_at_birthstring | nullnon
health_idstring | nullnon

WithholdingRule.match défini sur place

At least one matcher with at least one entry (else refinement at_least_one_matcher). codes and code_prefixes match "system|code".

NomTypeObligatoireDescription
codesarray of stringnon
code_prefixesarray of stringnon
security_labelsarray of stringnon
document_typesarray of stringnon
report_typesarray of stringnon
programme_codesarray of stringnon