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
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 (39)
Other operations
GET/health/ohn-31Liveness and dependency modes
Authentication: bearer
Responses
| Code | Description | Media type |
|---|---|---|
200 | ok: {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
| Code | Description | Media type |
|---|---|---|
200 | token | — |
404 | not found | — |
GET/meSign in and bind identity (W001)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
x-ohn-acting-for | header | string (uuid) | no | guardian_proxy only: the patient being acted for |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
GET/me/dashboardPatient dashboard KPIs
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
x-ohn-acting-for | header | string (uuid) | no | guardian_proxy only: the patient being acted for |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
GET/me/recordsRecords with provenance and freshness
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
x-ohn-acting-for | header | string (uuid) | no | guardian_proxy only: the patient being acted for |
session_id | query | string (uuid) | no |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
x-ohn-acting-for | header | string (uuid) | no | guardian_proxy only: the patient being acted for |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Critical information. items[].status is recorded | not_recorded | conflict | not_configured | needs_review; values are never guessed. | application/json: get-me-critical-info.response-200 |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
GET/me/consentsConsents held in OHN-15
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
x-ohn-acting-for | header | string (uuid) | no | guardian_proxy only: the patient being acted for |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
GET/me/disclosuresDisclosure history of this portal
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
x-ohn-acting-for | header | string (uuid) | no | guardian_proxy only: the patient being acted for |
cursor | query | string | no |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
GET/me/rights-requestsList own rights requests
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
x-ohn-acting-for | header | string (uuid) | no | guardian_proxy only: the patient being acted for |
cursor | query | string | no | |
request_type | query | string | no |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
POST/me/rights-requestsSubmit a rights request (F001 correction, F002 consent preference, F003 record access, F004 security update)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
Idempotency-Key | header | string | yes | |
x-ohn-acting-for | header | string (uuid) | no | guardian_proxy only: the patient being acted for |
Request body (required)
application/json:RightsRequest
Responses
| Code | Description | Media type |
|---|---|---|
201 | Ok | application/json: Object |
400 | idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-) | — |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
409 | version_conflict / idempotency_key_reused / illegal_transition | — |
413 | payload_too_large (a body over 256 KB) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
GET/me/rights-requests/{id}Rights request detail
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
id | path | string (uuid) | yes | |
x-ohn-acting-for | header | string (uuid) | no | guardian_proxy only: the patient being acted for |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
404 | not_found (not a route, not a UUID, or not this person's) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
GET/me/rights-requests/{id}/historyWorkflow history (W002/W003)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
id | path | string (uuid) | yes | |
x-ohn-acting-for | header | string (uuid) | no | guardian_proxy only: the patient being acted for |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
404 | not_found (not a route, not a UUID, or not this person's) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
Idempotency-Key | header | string | yes | |
id | path | string (uuid) | yes | |
x-ohn-acting-for | header | string (uuid) | no | guardian_proxy only: the patient being acted for |
Request body (required)
application/json:Prepare
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
400 | idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-) | — |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
404 | not_found (not a route, not a UUID, or not this person's) | — |
409 | version_conflict / idempotency_key_reused / illegal_transition | — |
413 | payload_too_large (a body over 256 KB) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
token | path | string | yes | |
x-ohn-acting-for | header | string (uuid) | no | guardian_proxy only: the patient being acted for |
Responses
| Code | Description | Media type |
|---|---|---|
200 | The file. Header X-OHN-Content-SHA256 carries the SHA-256 of the base64 content stored for the integrity check. | application/pdf: stringapplication/json: Objectapplication/fhir+json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
404 | not_found (unknown, another person’s, or already used link) | — |
410 | link_expired | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
500 | export_integrity_failed (the stored content failed its hash or signature; nothing is released) | — |
503 | dependency_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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
POST/me/chart/documents/{id}/linkIssue a short-lived, single-person download link for an own document
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
Idempotency-Key | header | string | yes | |
id | path | string (uuid) | yes |
Request body
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
201 | Ok | application/json: Object |
400 | idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-) | — |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
404 | not_found (not a route, not a UUID, or not this person's) | — |
409 | version_conflict / idempotency_key_reused / illegal_transition | — |
413 | payload_too_large (a body over 256 KB) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
GET/me/chart/downloads/{token}Download a document through its short-lived link (only the person it was issued to)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
token | path | string | yes | Short-lived signed download token issued by POST /me/chart/documents/{id}/link |
Responses
| Code | Description | Media type |
|---|---|---|
200 | The document (attachment) | application/octet-stream: string (binary) |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
404 | not_found (not a route, not a UUID, or not this person's) | — |
410 | link_expired / export_expired / export_consumed | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
500 | export_integrity_failed (the stored content failed its hash or signature; nothing is released) | — |
503 | dependency_unavailable | — |
GET/portal/chart-policyRead the jurisdiction chart policy (result release delay, withholding rules)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
POST/portal/chart-policySet the jurisdiction chart policy (portal steward only; versioned, with a reason)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
Idempotency-Key | header | string | yes |
Request body (required)
application/json:ChartPolicyCommand
Responses
| Code | Description | Media type |
|---|---|---|
201 | The policy view (configured, basis, version, updated_by, updated_at, reason, policy) and the receipt | application/json: Object |
400 | idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-) | — |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
409 | version_conflict / idempotency_key_reused / illegal_transition | — |
413 | payload_too_large (a body over 256 KB) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
GET/portal/policyRead portal policy
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
POST/portal/policyCreate or change portal policy
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
Idempotency-Key | header | string | yes |
Request body (required)
application/json:Policy
Responses
| Code | Description | Media type |
|---|---|---|
201 | The policy (version 1, or version + 1 with the right expected_version) and the receipt | application/json: Object |
400 | idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-) | — |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
409 | version_conflict / idempotency_key_reused / illegal_transition | — |
413 | payload_too_large (a body over 256 KB) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
GET/portal/code-lists/{list}Read a code list
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
list | path | string | yes |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
404 | not_found (not a route, not a UUID, or not this person's) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
POST/portal/code-lists/{list}Upsert code list entries
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
Idempotency-Key | header | string | yes | |
list | path | string | yes |
Request body (required)
application/json:CodeListEntries
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
400 | idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-) | — |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
404 | not_found (not a route, not a UUID, or not this person's) | — |
409 | version_conflict / idempotency_key_reused / illegal_transition | — |
413 | payload_too_large (a body over 256 KB) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
POST/portal/accessibility-observationsRecord an accessibility observation (R003 source)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
Idempotency-Key | header | string | yes |
Request body (required)
application/json:AccessibilityObservation
Responses
| Code | Description | Media type |
|---|---|---|
201 | Ok | application/json: Object |
400 | idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-) | — |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
409 | version_conflict / idempotency_key_reused / illegal_transition | — |
413 | payload_too_large (a body over 256 KB) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
POST/portal/maintenance/expire-sweepExpire past-due download links and drop content
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
Idempotency-Key | header | string | yes |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
400 | idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-) | — |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
409 | version_conflict / idempotency_key_reused / illegal_transition | — |
413 | payload_too_large (a body over 256 KB) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
POST/portal/maintenance/reconcileRetry consent preferences committed while OHN-15 was down
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
Idempotency-Key | header | string | yes |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
400 | idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-) | — |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
409 | version_conflict / idempotency_key_reused / illegal_transition | — |
413 | payload_too_large (a body over 256 KB) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
POST/portal/maintenance/drain-outboxRelay the outbox to OHN-24 (nothing is marked delivered without a sink)
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
Idempotency-Key | header | string | yes |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
400 | idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-) | — |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
409 | version_conflict / idempotency_key_reused / illegal_transition | — |
413 | payload_too_large (a body over 256 KB) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
GET/portal/report-catalogReport catalog
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
reportId | path | "OHN-31-R001" | "OHN-31-R002" | "OHN-31-R003" | yes | |
cursor | query | string | no | |
country | query | string (uuid) | no | |
period_from | query | string (date) | no | |
period_to | query | string (date) | no | |
patient_scope | query | string (uuid) | no | |
date_range_from | query | string (date) | no | |
date_range_to | query | string (date) | no | |
release | query | string | no | |
locale | query | "en" | "fr" | no | |
viewport | query | "mobile" | "tablet" | "desktop" | no |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
404 | not_found (not a route, not a UUID, or not this person's) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
POST/portal/reports/{reportId}/exportCreate a signed, single-use, 5-minute CSV/PDF export
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
Idempotency-Key | header | string | yes | |
reportId | path | string | yes |
Request body (required)
application/json:ExportCommand
Responses
| Code | Description | Media type |
|---|---|---|
201 | Ok | application/json: Object |
400 | idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-) | — |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
404 | not_found (not a route, not a UUID, or not this person's) | — |
409 | version_conflict / idempotency_key_reused / illegal_transition | — |
413 | payload_too_large (a body over 256 KB) | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
503 | dependency_unavailable | — |
GET/portal/exports/{token}Download an export once
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
token | path | string | yes |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy / step_up_required / guardian_* / identity_* | — |
404 | not_found (not a route, not a UUID, or not this person's) | — |
410 | link_expired / export_expired / export_consumed | — |
422 | domain_validation_failed / not_configured | — |
429 | rate_limited | — |
500 | export_integrity_failed (the stored content failed its hash or signature; nothing is released) | — |
503 | dependency_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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
Idempotency-Key | header | string | yes |
Request body (required)
application/json:RecordExportCommand
Responses
| Code | Description | Media type |
|---|---|---|
201 | Created | application/json: RecordExportCreated |
400 | idempotency_key_required (missing, shorter than 8 or longer than 128 characters, or characters outside A-Za-z0-9_.:-) | — |
401 | unauthenticated | — |
403 | denied_by_policy / self_only / identity_* | — |
409 | patient_record_not_found | — |
413 | payload_too_large (a body over 256 KB) | — |
422 | domain_validation_failed / not_configured (portal policy) | — |
429 | rate_limited | — |
503 | dependency_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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no | |
token | path | string | yes |
Responses
| Code | Description | Media type |
|---|---|---|
200 | The file | application/pdf: string (binary)application/fhir+json: object |
401 | unauthenticated | — |
403 | denied_by_policy / self_only / identity_* | — |
404 | not_found (unknown, used, or another patient's) | — |
410 | link_expired | — |
429 | rate_limited | — |
500 | export_integrity_failed (the stored content failed its hash or signature; nothing is released) | — |
503 | dependency_unavailable / not_configured (signing key) | — |
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-ohn-purpose | header | "patient_portal" | no |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Ok | application/json: Object |
401 | unauthenticated | — |
403 | denied_by_policy (any role other than portal_steward) | — |
429 | rate_limited | — |
503 | dependency_unavailable / not_configured | — |
Schemas
Object
object
Prepare
| Name | Type | Required | Description |
|---|---|---|---|
expected_version | integer | yes |
Policy
| Name | Type | Required | Description |
|---|---|---|---|
step_up_max_age_seconds | integer | yes | |
access_link_ttl_minutes | integer | yes | |
freshness_days | integer | yes | |
expected_version | integer | no | |
reason | string | yes |
CodeListEntries
| Name | Type | Required | Description |
|---|---|---|---|
entries | array of CodeListEntries.entries.item | yes |
AccessibilityObservation
| Name | Type | Required | Description |
|---|---|---|---|
page | string | yes | |
release | string | yes | |
locale | "en" | "fr" | yes | |
viewport | "mobile" | "tablet" | "desktop" | yes | |
keyboard_failures | integer | yes | |
translation_gaps | integer | yes | |
error_rate_permille | integer | yes |
ExportCommand
| Name | Type | Required | Description |
|---|---|---|---|
format | "csv" | "pdf" | yes | |
filters | ReportFilters | no |
ProfileCorrection
| Name | Type | Required | Description |
|---|---|---|---|
request_type | "profile_correction" | yes | |
patient_ref | string (uuid) | yes | |
field_name | string | yes | |
proposed_value | string | yes | |
supporting_evidence | string (uuid) | yes | |
reason | string | yes |
ConsentPreference
| Name | Type | Required | Description |
|---|---|---|---|
request_type | "consent_preference" | yes | |
patient_ref | string (uuid) | yes | |
scope | string | yes | |
recipient | string (uuid) | yes | |
action | string | yes | |
confirmation | string (uuid) | yes |
RecordAccess
| Name | Type | Required | Description |
|---|---|---|---|
request_type | "record_access" | yes | |
patient_ref | string (uuid) | yes | |
record_categories | array of string | yes | |
time_range_start | string (date) | no | |
time_range_end | string (date) | no | |
delivery_format | string | yes |
SecurityUpdate
| Name | Type | Required | Description |
|---|---|---|---|
request_type | "security_update" | yes | |
principal_id | string (uuid) | yes | |
authenticator_action | string | yes | |
current_proof | string (uuid) | yes | |
recovery_option | string | no |
RightsRequest
ProfileCorrection | ConsentPreference | RecordAccess | SecurityUpdate
RecordExportCommand
| Name | Type | Required | Description |
|---|---|---|---|
format | "pdf" | "fhir_ips" | yes |
RecordExportCreated
| Name | Type | Required | Description |
|---|---|---|---|
export | RecordExportCreated.export | yes | |
link | RecordExportCreated.link | yes | |
notice | string | yes | |
receipt | Object | yes |
WithholdingRule
| Name | Type | Required | Description |
|---|---|---|---|
code | string | yes | |
label_en | string | yes | |
label_fr | string | yes | |
basis | "legal_requirement" | "clinical_policy" | yes | legal_requirement fails closed: an entry of a listed section that carries no code to check is withheld. |
sections | array of "visits" | "problems" | "allergies" | "medicines" | "results" | "vaccinations" | "documents" | "referrals" | "appointments" | "programmes" | yes | |
match | WithholdingRule.match | yes | At least one matcher with at least one entry (else refinement at_least_one_matcher). codes and code_prefixes match "system|code". |
reason_en | string | yes | |
reason_fr | string | yes |
ChartPolicyCommand
| Name | Type | Required | Description |
|---|---|---|---|
result_release_delay_hours | integer | yes | |
delay_report_types | array of string | no | Empty = every report type. |
withholding_rules | array of WithholdingRule | no | Each rule needs its own code (else details.withholding_rules = duplicate_code). |
expected_version | integer | no | Required to change an existing policy (422 expected_version=required; 409 version_conflict). |
reason | string | yes |
ReportFilters
| Name | Type | Required | Description |
|---|---|---|---|
country | string (uuid) | no | |
period_from | string (date) | no | |
period_to | string (date) | no | |
patient_scope | string (uuid) | no | |
date_range_from | string (date) | no | |
date_range_to | string (date) | no | |
release | string | no | |
locale | "en" | "fr" | no | |
viewport | "mobile" | "tablet" | "desktop" | no |
get-me-critical-info.response-200 defined inline
| Name | Type | Required | Description |
|---|---|---|---|
patient_ref | string (uuid) | yes | |
blood_group | string | null | no | |
items | array of object | yes | |
warnings | array of object | yes | |
allergies | array of object | no | |
active_problems | array of object | no | |
receipt | object | no |
CodeListEntries.entries.item defined inline
| Name | Type | Required | Description |
|---|---|---|---|
code | string | yes | |
label_en | string | yes | |
label_fr | string | yes | |
active | boolean | no | |
critical | boolean | no |
RecordExportCreated.export defined inline
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | no | |
format | "pdf" | "fhir_ips" | no | |
state | "available" | "downloaded" | "expired" | no | |
expires_at | string (date-time) | no | |
content_sha256 | string | no | |
size_bytes | integer | no |
RecordExportCreated.link defined inline
| Name | Type | Required | Description |
|---|---|---|---|
download_path | string | no | GET with the patient bearer token; works once; at most 15 minutes and never longer than the portal policy link lifetime. |
expires_at | string (date-time) | no | |
single_use | true | no |
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".
| Name | Type | Required | Description |
|---|---|---|---|
codes | array of string | no | |
code_prefixes | array of string | no | |
security_labels | array of string | no | |
document_types | array of string | no | |
report_types | array of string | no | |
programme_codes | array of string | no |