Skip to content

← All contracts

OHN-31 Patient Health Record Portal

Version
1.1.1
OpenAPI
3.1.0
Source in the repository
modules/OHN-31/api/openapi.json
Servers
https://opeshealthnetwork.com/api/ohn/v1
Authentication
bearer: http bearer

Download the contract (JSON)

Contracts are written in English.

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.

Operations

Other operations

GET/health/ohn-31Liveness and dependency modes

Authentication: bearer

Responses

CodeDescriptionMedia type
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)deprecated

Authentication: bearer

Responses

CodeDescriptionMedia type
200token—
404not found—
GET/meSign in and bind identity (W001)

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
x-ohn-acting-forheaderstring (uuid)noguardian_proxy only: the patient being acted for

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
x-ohn-acting-forheaderstring (uuid)noguardian_proxy only: the patient being acted for

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
x-ohn-acting-forheaderstring (uuid)noguardian_proxy only: the patient being acted for
session_idquerystring (uuid)no

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
x-ohn-acting-forheaderstring (uuid)noguardian_proxy only: the patient being acted for

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
x-ohn-acting-forheaderstring (uuid)noguardian_proxy only: the patient being acted for

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
x-ohn-acting-forheaderstring (uuid)noguardian_proxy only: the patient being acted for
cursorquerystringno

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
x-ohn-acting-forheaderstring (uuid)noguardian_proxy only: the patient being acted for
cursorquerystringno
request_typequerystringno

Responses

CodeDescriptionMedia type
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)

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes
x-ohn-acting-forheaderstring (uuid)noguardian_proxy only: the patient being acted for

Request body (required)

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
idpathstring (uuid)yes
x-ohn-acting-forheaderstring (uuid)noguardian_proxy only: the patient being acted for

Responses

CodeDescriptionMedia type
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)

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
idpathstring (uuid)yes
x-ohn-acting-forheaderstring (uuid)noguardian_proxy only: the patient being acted for

Responses

CodeDescriptionMedia type
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).

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes
idpathstring (uuid)yes
x-ohn-acting-forheaderstring (uuid)noguardian_proxy only: the patient being acted for

Request body (required)

Responses

CodeDescriptionMedia type
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.

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
tokenpathstringyes
x-ohn-acting-forheaderstring (uuid)noguardian_proxy only: the patient being acted for

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes
idpathstring (uuid)yes

Request body

  • application/json: object

Responses

CodeDescriptionMedia type
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)

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
tokenpathstringyesShort-lived signed download token issued by POST /me/chart/documents/{id}/link

Responses

CodeDescriptionMedia type
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)

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no

Responses

CodeDescriptionMedia type
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)

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
listpathstringyes

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes
listpathstringyes

Request body (required)

Responses

CodeDescriptionMedia type
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)

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes

Responses

CodeDescriptionMedia type
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)

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no

Responses

CodeDescriptionMedia type
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.").

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
reportIdpath"OHN-31-R001" | "OHN-31-R002" | "OHN-31-R003"yes
cursorquerystringno
countryquerystring (uuid)no
period_fromquerystring (date)no
period_toquerystring (date)no
patient_scopequerystring (uuid)no
date_range_fromquerystring (date)no
date_range_toquerystring (date)no
releasequerystringno
localequery"en" | "fr"no
viewportquery"mobile" | "tablet" | "desktop"no

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes
reportIdpathstringyes

Request body (required)

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
tokenpathstringyes

Responses

CodeDescriptionMedia type
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)

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
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)

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
tokenpathstringyes

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no

Responses

CodeDescriptionMedia type
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

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
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)

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no
Idempotency-Keyheaderstringyes
idpathstring (uuid)yes

Responses

CodeDescriptionMedia type
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.

Authentication: bearer

Request body (required)

Responses

CodeDescriptionMedia type
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)

Authentication: bearer

Parameters

NameInTypeRequiredDescription
x-ohn-purposeheader"patient_portal"no

Responses

CodeDescriptionMedia type
200Ok
application/json: Object
401unauthenticated—
403denied_by_policy (any role other than portal_steward)—
429rate_limited—
503dependency_unavailable / not_configured—

Schemas

Object

object

Prepare

NameTypeRequiredDescription
expected_versionintegeryes

Policy

NameTypeRequiredDescription
step_up_max_age_secondsintegeryes
access_link_ttl_minutesintegeryes
freshness_daysintegeryes
expected_versionintegerno
reasonstringyes

CodeListEntries

NameTypeRequiredDescription
entriesarray of CodeListEntries.entries.itemyes

AccessibilityObservation

NameTypeRequiredDescription
pagestringyes
releasestringyes
locale"en" | "fr"yes
viewport"mobile" | "tablet" | "desktop"yes
keyboard_failuresintegeryes
translation_gapsintegeryes
error_rate_permilleintegeryes

ExportCommand

NameTypeRequiredDescription
format"csv" | "pdf"yes
filtersReportFiltersno

ProfileCorrection

NameTypeRequiredDescription
request_type"profile_correction"yes
patient_refstring (uuid)yes
field_namestringyes
proposed_valuestringyes
supporting_evidencestring (uuid)yes
reasonstringyes

ConsentPreference

NameTypeRequiredDescription
request_type"consent_preference"yes
patient_refstring (uuid)yes
scopestringyes
recipientstring (uuid)yes
actionstringyes
confirmationstring (uuid)yes

RecordAccess

NameTypeRequiredDescription
request_type"record_access"yes
patient_refstring (uuid)yes
record_categoriesarray of stringyes
time_range_startstring (date)no
time_range_endstring (date)no
delivery_formatstringyes

SecurityUpdate

NameTypeRequiredDescription
request_type"security_update"yes
principal_idstring (uuid)yes
authenticator_actionstringyes
current_proofstring (uuid)yes
recovery_optionstringno

RightsRequest

ProfileCorrection | ConsentPreference | RecordAccess | SecurityUpdate

RecordExportCommand

NameTypeRequiredDescription
format"pdf" | "fhir_ips"yes

RecordExportCreated

NameTypeRequiredDescription
exportRecordExportCreated.exportyes
linkRecordExportCreated.linkyes
noticestringyes
receiptObjectyes

ShareCommand

NameTypeRequiredDescription
scope"summary" | "sections"yessummary = critical_information, allergies, problems, medications
sectionsarray of "critical_information" | "allergies" | "problems" | "medications" | "results" | "immunizations" | "encounters"noRequired for scope=sections, forbidden for summary.
duration"1h" | "24h" | "7d"yes
recipientShareCommand.recipient.option-1 | ShareCommand.recipient.option-2yes

Share

NameTypeRequiredDescription
idstring (uuid)no
scopestringno
sectionsarray of stringno
section_labelsarray of stringno
recipientobjectno
state"active" | "revoked" | "expired"no
created_atstring (date-time)no
expires_atstring (date-time)no
revoked_atstring | null (date-time)no
viewsintegerno
last_viewed_atstring | null (date-time)no
consentShare.consentno
versionintegerno

ShareCreated

NameTypeRequiredDescription
shareShareno
linkShareCreated.linkno
noticestringno
receiptObjectno

SharedViewCommand

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

NameTypeRequiredDescription
tokenstringno

SharedView

NameTypeRequiredDescription
shared_by_patienttrueno
bannerstringno
shareobjectno
viewerobjectno
patientSharedView.patientno
generated_atstring (date-time)no
criticalobject | nullno
sectionsarray of objectno
noticestringno
receipt_idstring (uuid)no

WithholdingRule

NameTypeRequiredDescription
codestringyes
label_enstringyes
label_frstringyes
basis"legal_requirement" | "clinical_policy"yeslegal_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"yes
matchWithholdingRule.matchyesAt least one matcher with at least one entry (else refinement at_least_one_matcher). codes and code_prefixes match "system|code".
reason_enstringyes
reason_frstringyes

ChartPolicyCommand

NameTypeRequiredDescription
result_release_delay_hoursintegeryes
delay_report_typesarray of stringnoEmpty = every report type.
withholding_rulesarray of WithholdingRulenoEach rule needs its own code (else details.withholding_rules = duplicate_code).
expected_versionintegernoRequired to change an existing policy (422 expected_version=required; 409 version_conflict).
reasonstringyes

ReportFilters

NameTypeRequiredDescription
countrystring (uuid)no
period_fromstring (date)no
period_tostring (date)no
patient_scopestring (uuid)no
date_range_fromstring (date)no
date_range_tostring (date)no
releasestringno
locale"en" | "fr"no
viewport"mobile" | "tablet" | "desktop"no

get-me-critical-info.response-200 defined inline

NameTypeRequiredDescription
patient_refstring (uuid)yes
blood_groupstring | nullno
itemsarray of objectyes
warningsarray of objectyes
allergiesarray of objectno
active_problemsarray of objectno
receiptobjectno

CodeListEntries.entries.item defined inline

NameTypeRequiredDescription
codestringyes
label_enstringyes
label_frstringyes
activebooleanno
criticalbooleanno

RecordExportCreated.export defined inline

NameTypeRequiredDescription
idstring (uuid)no
format"pdf" | "fhir_ips"no
state"available" | "downloaded" | "expired"no
expires_atstring (date-time)no
content_sha256stringno
size_bytesintegerno

ShareCommand.recipient.option-1 defined inline

NameTypeRequiredDescription
kind"anyone_with_link"yes

ShareCommand.recipient.option-2 defined inline

NameTypeRequiredDescription
kind"facility"yes
facility_idstring (uuid)yesAn active OHN-05 facility. Recorded as an OHN-15 consent directive; no consent, no share.

Share.consent defined inline

NameTypeRequiredDescription
refstringno
sync"recorded" | "revoked" | "revocation_pending"no

SharedView.patient defined inline

NameTypeRequiredDescription
namestringno
birth_datestring | nullno
sex_at_birthstring | nullno
health_idstring | nullno

WithholdingRule.match defined inline

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

NameTypeRequiredDescription
codesarray of stringno
code_prefixesarray of stringno
security_labelsarray of stringno
document_typesarray of stringno
report_typesarray of stringno
programme_codesarray of stringno