OHN-08 Shared Health Record / Health Chart
- Version
- 1.0.0
- OpenAPI
- 3.1.0
- Source in the repository
modules/OHN-08/api/openapi.json- Servers
https://opeshealthnetwork.com/api/ohn/v1- Authentication
bearer: http bearer
Contracts are written in English.
A policy-filtered, source-attributed longitudinal view assembled from the systems that hold the record. OHN-08 never replaces those systems and never presents a chart as complete. Default deny; bearer authentication; every mutating request needs an Idempotency-Key header. Access is evaluated when a chart is assembled and again on every read. Dependencies (OHN-02, 15, 16, 23, 40, 41, 42) are reached through versioned interfaces that fail closed (503) when unavailable. Reconciled with the observed behaviour of the TypeScript reference (docs/program/java/ohn-08-contract-changes.md).
Operations
- OHN-08 (21)
OHN-08
GET/patients/{id}/health-chartThe caller's current chart for the patient, grouped by section
Returns the most recent chart the caller assembled for this patient. Access is re-evaluated; if it was withdrawn the cached projection is purged (W003) and 403 access_revoked is returned. No business state changes; the read is audited.
Operation ID: getPatientHealthChart
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A path id that is not a UUID is 404 not_found. |
Responses
GET/patients/{id}/timelineThe same chart as dated entries, most recent first, plus undated statements
Operation ID: getPatientTimeline
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A path id that is not a UUID is 404 not_found. |
Responses
POST/health-chart/rebuildAssemble a chart (F001, workflow W001)
Operation ID: rebuildChart
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body
JSON object validated by the controller against ChartQueryCommand (every bad field is reported together; unknown fields are refused with 422).
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
201 | Chart presented, with receipt | application/json: object |
400 | Typed error | application/json: Error |
401 | Typed error | application/json: Error |
403 | Typed error | application/json: Error |
404 | Typed error | application/json: Error |
409 | Typed error | application/json: Error |
422 | Typed error | application/json: Error |
429 | Typed error | application/json: Error |
503 | Typed error | application/json: Error |
GET/health-chart/vocabulariesControlled lists, workflow states and the policy configuration in force
GET/health-chart/viewsThe caller's own chart requests (metadata only)
Operation ID: listViews
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | string | no | Integer >= 1. Lists clamp an unreadable value to 1; reports refuse it with 422. |
page_size | query | string | no | Integer 1..100. Lists clamp (default 25); reports default 50 and refuse values outside 1..100 with 422. |
Responses
GET/health-chart/views/{id}One of the caller's chart requests with sources and workflow history
Operation ID: getView
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A path id that is not a UUID is 404 not_found. |
Responses
GET/health-chart/views/{id}/access-snapshotsAccess decisions taken for one chart view (audit-access side panel)
Operation ID: listAccessSnapshots
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A path id that is not a UUID is 404 not_found. |
Responses
GET/health-chart/source-requestsThe caller's source requests
Operation ID: listSourceRequests
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | string | no | Integer >= 1. Lists clamp an unreadable value to 1; reports refuse it with 422. |
page_size | query | string | no | Integer 1..100. Lists clamp (default 25); reports default 50 and refuse values outside 1..100 with 422. |
Responses
POST/health-chart/source-requestsRe-read named sections from one located source and refresh them in the current chart (F003)
201 carries the terminal state: delivered or unavailable (source_not_located, source_unreachable, source_integrity_rejected). 409 chart_required when the caller holds no usable chart for the patient.
Operation ID: requestSource
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body
JSON object validated by the controller against SourceRequestCommand (every bad field is reported together; unknown fields are refused with 422).
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
201 | Source request with receipt | application/json: object |
400 | Typed error | application/json: Error |
401 | Typed error | application/json: Error |
403 | Typed error | application/json: Error |
409 | Typed error | application/json: Error |
422 | Typed error | application/json: Error |
429 | Typed error | application/json: Error |
503 | Typed error | application/json: Error |
GET/health-chart/source-requests/{id}One source request with its history
Operation ID: getSourceRequest
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A path id that is not a UUID is 404 not_found. |
Responses
GET/health-chart/discrepanciesCases in the caller's jurisdiction
Operation ID: listDiscrepancies
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | string | no | Integer >= 1. Lists clamp an unreadable value to 1; reports refuse it with 422. |
page_size | query | string | no | Integer 1..100. Lists clamp (default 25); reports default 50 and refuse values outside 1..100 with 422. |
status | query | string | no | One of: conflict_detected, evidence_linked, clinical_review, resolved_or_disputed, history_preserved |
clinical_risk | query | string | no | One of: low, moderate, high, critical |
assigned_to_me | query | string | no | true | false |
Responses
POST/health-chart/discrepanciesOpen a source discrepancy case (F002, workflow W002)
Operation ID: openDiscrepancy
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body
JSON object validated by the controller against DiscrepancyCaseCommand (every bad field is reported together; unknown fields are refused with 422).
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
201 | Case with receipt | application/json: object |
400 | Typed error | application/json: Error |
401 | Typed error | application/json: Error |
403 | Typed error | application/json: Error |
409 | Typed error | application/json: Error |
422 | Typed error | application/json: Error |
429 | Typed error | application/json: Error |
503 | Typed error | application/json: Error |
GET/health-chart/discrepancies/{id}One case with its history
Operation ID: getDiscrepancy
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A path id that is not a UUID is 404 not_found. |
Responses
POST/health-chart/discrepancies/{id}/transitionsMove a case to the next state
conflict_detected > evidence_linked (needs evidence_refs) > clinical_review (assigned reviewer or steward) > resolved_or_disputed (licensed clinician other than the opener; needs outcome and reason) > history_preserved. 409 stale_version or invalid_transition; 403 not_assignee, clinician_required or independent_review_required. Refusals change nothing and are audited.
Operation ID: transitionDiscrepancy
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A path id that is not a UUID is 404 not_found. |
Idempotency-Key | header | string | yes |
Request body
JSON object validated by the controller against DiscrepancyTransitionCommand (every bad field is reported together; unknown fields are refused with 422).
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
200 | Updated case with history and receipt | application/json: object |
400 | Typed error | application/json: Error |
401 | Typed error | application/json: Error |
403 | Typed error | application/json: Error |
404 | Typed error | application/json: Error |
409 | Typed error | application/json: Error |
422 | Typed error | application/json: Error |
429 | Typed error | application/json: Error |
503 | Typed error | application/json: Error |
POST/health-chart/revocation-signalsDeliver a consent revocation (workflow W003); platform service or steward only
Purges every cached chart projection of the patient in the jurisdiction and creates a notice for each affected principal. Redelivery of the same signal_id returns 200 with duplicate=true.
Operation ID: deliverRevocationSignal
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body
JSON object validated by the controller against RevocationSignalCommand (every bad field is reported together; unknown fields are refused with 422).
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
200 | Already processed | application/json: object |
201 | Revocation processed | application/json: object |
400 | Typed error | application/json: Error |
401 | Typed error | application/json: Error |
403 | Typed error | application/json: Error |
409 | Typed error | application/json: Error |
422 | Typed error | application/json: Error |
429 | Typed error | application/json: Error |
503 | Typed error | application/json: Error |
GET/health-chart/revocationsRevocations handled in the jurisdiction, with history (steward only)
Operation ID: listRevocations
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | string | no | Integer >= 1. Lists clamp an unreadable value to 1; reports refuse it with 422. |
page_size | query | string | no | Integer 1..100. Lists clamp (default 25); reports default 50 and refuse values outside 1..100 with 422. |
Responses
GET/health-chart/revocation-noticesNotices for charts the caller had open whose access was withdrawn
Operation ID: listRevocationNotices
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
pending | query | string | no | true | false |
Responses
POST/health-chart/revocation-notices/{id}/acknowledgeAcknowledge a notice; the revocation reaches user_notified when all are acknowledged
Operation ID: acknowledgeRevocationNotice
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A path id that is not a UUID is 404 not_found. |
Idempotency-Key | header | string | yes |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Acknowledged with receipt | application/json: object |
400 | Typed error | application/json: Error |
401 | Typed error | application/json: Error |
403 | Typed error | application/json: Error |
404 | Typed error | application/json: Error |
409 | Typed error | application/json: Error |
422 | Typed error | application/json: Error |
429 | Typed error | application/json: Error |
503 | Typed error | application/json: Error |
GET/health-chart/reports/{reportId}Reports OHN-08-R001 (source completeness), R002 (discrepancy audit), R003 (access and response performance)
Operation ID: getReport
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
reportId | path | "OHN-08-R001" | "OHN-08-R002" | "OHN-08-R003" | yes | Any other value is 404 not_found. |
jurisdiction | query | string | no | uuid |
provider | query | string | no | uuid |
facility | query | string | no | uuid |
severity | query | string | no | One of: low, moderate, high, critical |
resolution | query | string | no | One of: unresolved, all |
service | query | string | no | One of: assemble, read, source_request |
period_from | query | string | no | date-time |
period_to | query | string | no | date-time |
page | query | string | no | Integer >= 1. Lists clamp an unreadable value to 1; reports refuse it with 422. |
page_size | query | string | no | Integer 1..100. Lists clamp (default 25); reports default 50 and refuse values outside 1..100 with 422. |
Responses
POST/health-chart/reports/{reportId}/exportCreate a signed, single-use, five-minute CSV or PDF export
Operation ID: exportReport
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
reportId | path | "OHN-08-R001" | "OHN-08-R002" | "OHN-08-R003" | yes | Any other value is 404 not_found. |
Idempotency-Key | header | string | yes |
Request body
JSON object validated by the controller against ExportCommand (every bad field is reported together; unknown fields are refused with 422).
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
201 | Export receipt with download_path | application/json: object |
400 | Typed error | application/json: Error |
401 | Typed error | application/json: Error |
403 | Typed error | application/json: Error |
404 | Typed error | application/json: Error |
409 | Typed error | application/json: Error |
422 | Typed error | application/json: Error |
429 | Typed error | application/json: Error |
503 | Typed error | application/json: Error |
GET/health-chart/exports/{id}/downloadDownload an export once (requester only)
200 returns text/csv or application/pdf with Content-Disposition attachment; single use (second download 410 export_consumed), expires after five minutes (410 export_expired), requester only (404 for anyone else).
Operation ID: downloadExport
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A path id that is not a UUID is 404 not_found. |
Responses
| Code | Description | Media type |
|---|---|---|
200 | text/csv or application/pdf | application/json: object |
401 | Typed error | application/json: Error |
403 | Typed error | application/json: Error |
404 | Typed error | application/json: Error |
410 | Typed error | application/json: Error |
429 | Typed error | application/json: Error |
500 | Typed error | application/json: Error |
503 | Typed error | application/json: Error |
Schemas
Error
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes | unauthenticated, denied_by_policy, access_revoked, not_found, chart_expired, chart_required, chart_disabled, stale_version, invalid_transition, not_assignee, clinician_required, independent_review_required, idempotency_conflict, request_in_progress, missing_idempotency_key, domain_validation_failed, rate_limited, dependency_unavailable, export_expired, export_consumed, export_integrity_failed |
message | string | no | |
dependency | string | no | |
details | object | no | Field problems (field -> code) or extra facts such as dependency, current_state, current_version, next_state |
Section
"allergies" | "medications" | "problems" | "immunizations" | "results" | "procedures" | "encounters"
ClinicalPurpose
"treatment" | "emergency_care" | "care_coordination" | "clinical_data_stewardship"
ClinicalRisk
"low" | "moderate" | "high" | "critical"
DiscrepancyState
"conflict_detected" | "evidence_linked" | "clinical_review" | "resolved_or_disputed" | "history_preserved"
ChartQueryCommand
| Name | Type | Required | Description |
|---|---|---|---|
health_id | string | yes | |
facility_id | string | yes | |
clinical_purpose | ClinicalPurpose | yes | Must equal the purpose in the bearer token |
relationship_ref | string | yes | |
record_scope | "full_chart" | "allergies" | "medications" | "problems" | "immunizations" | "results" | "procedures" | "encounters" | yes | |
date_from | string | no | |
date_to | string | no |
DiscrepancyCaseCommand
| Name | Type | Required | Description |
|---|---|---|---|
patient_id | string | yes | |
source_record_ids | string | yes | 2 to 50 identifiers separated by new lines, commas or semicolons |
discrepancy_type | "conflicting_status" | "conflicting_value" | "duplicate_record" | "wrong_patient_suspected" | "outdated_information" | "missing_information" | "other" | yes | |
clinical_risk | ClinicalRisk | yes | |
assignee | string | yes | |
notes | string | no |
DiscrepancyTransitionCommand
| Name | Type | Required | Description |
|---|---|---|---|
expected_version | integer | yes | |
to_state | DiscrepancyState | yes | |
reason | string | no | |
evidence_refs | array of string | no | |
outcome | "resolved" | "disputed" | no |
SourceRequestCommand
| Name | Type | Required | Description |
|---|---|---|---|
record_locator_ref | string | yes | |
source_endpoint_ref | string | yes | |
requested_sections | string | yes | Section names separated by commas or spaces |
patient_context | string | yes | |
purpose | ClinicalPurpose | yes |
RevocationSignalCommand
| Name | Type | Required | Description |
|---|---|---|---|
signal_id | string | yes | |
patient_id | string | yes | |
consent_ref | string | yes | |
revoked_at | string | yes |
ExportCommand
| Name | Type | Required | Description |
|---|---|---|---|
format | "csv" | "pdf" | yes | |
filters | object | no | Report filters; same rules and strict keys as the report query parameters (string or number values) |
Receipt
| Name | Type | Required | Description |
|---|---|---|---|
receipt_id | string (uuid) | yes | |
committed_at | string (date-time) | yes | |
aggregate_id | string | yes | |
aggregate_type | string | yes | |
version | integer | yes | |
status | "committed" | yes | |
event_delivery | "pending" | "not_applicable" | yes | |
event_id | string | null | yes |
Source
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
view_id | string (uuid) | no | |
record_locator_ref | string (uuid) | no | |
source_endpoint_ref | string (uuid) | no | |
source_system_id | string (uuid) | yes | |
facility_id | string (uuid) | yes | |
availability | "reachable" | "unreachable" | "integrity_rejected" | yes | |
freshness | "fresh" | "stale" | "unknown" | "threshold_not_configured" | yes | |
last_updated_at | string | null (date-time) | yes | |
retrieved_at | string (date-time) | yes | |
sections_requested | array of Section | no | |
fact_count | integer | no | |
rejected_count | integer | no |
Fact
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
section | Section | yes | |
source_record_id | string | yes | |
concept | Fact.concept | yes | |
status_as_stated | string | null | yes | As stated by the source at recorded_at; never upgraded to 'current' |
value | string | null | no | |
recorded_at | string | null (date-time) | yes | |
terminology | "validated" | "not_recognised" | "not_verified" | yes | |
conflict | boolean | yes | Another source states a different status for the same concept |
open_case_ids | array of string (uuid) | yes | |
source | Fact.source | yes |
View
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
patient_id | string | null | no | |
health_id | string | no | |
facility_id | string | no | |
clinical_purpose | string | no | |
relationship_ref | string | no | |
record_scope | string | no | |
date_from | string | null | no | |
date_to | string | null | no | |
status | "patient_resolved" | "policy_authorized" | "sources_discovered" | "records_validated" | "chart_presented" | yes | |
outcome | "in_progress" | "presented" | "denied" | "unavailable" | yes | |
refusal_reason | string | null | no | |
completeness | "complete_for_located_sources" | "partial" | "no_sources_registered" | null | no | |
warnings | array of string | no | |
sections_disclosed | array of Section | no | |
fact_count | integer | no | |
assembled_at | string | null | no | |
expires_at | string | null | no | |
invalidated_at | string | null | no | |
invalidation_reason | string | null | no | |
version | integer | yes |
Chart
| Name | Type | Required | Description |
|---|---|---|---|
view | View | yes | |
notices | array of "not_the_complete_record" | "absence_of_information_is_not_absence_of_condition" | "status_is_as_stated_by_source" | yes | |
sections | array of Chart.sections.item | yes | Only sections the caller may see; a withheld section is not listed at all |
sources | array of Source | yes | |
discrepancies | Chart.discrepancies | yes | |
receipt | Receipt | no |
Timeline
DiscrepancyCase
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
patient_id | string | yes | |
facility_id | string | null | no | |
source_record_ids | array of string | yes | |
discrepancy_type | string | yes | |
clinical_risk | ClinicalRisk | yes | |
assignee | string | yes | |
notes | string | null | no | |
concept | string | null | no | |
status | DiscrepancyState | yes | |
next_state | string | null | no | |
evidence_refs | array of string | no | |
outcome | "resolved" | "disputed" | null | no | |
outcome_reason | string | null | no | |
decided_by | string | null | no | |
version | integer | yes | |
receipt | Receipt | no |
Report
| Name | Type | Required | Description |
|---|---|---|---|
report_id | string | yes | |
title | string | no | |
columns | array of string | yes | |
rows | array of object | yes | |
total | integer | yes | |
page | integer | no | |
page_size | integer | no | |
summary | object | no | |
warnings | array of "small_cohort_suppressed" | "staleness_threshold_not_configured" | no | |
state | "rendered" | "no_authorized_data" | "partial_with_source_warning" | yes | |
generated_at | string (date-time) | yes |
Fact.concept defined inline
| Name | Type | Required | Description |
|---|---|---|---|
system | string | yes | |
code | string | yes | |
display | string | yes |
Fact.source defined inline
| Name | Type | Required | Description |
|---|---|---|---|
attribution_id | string | yes | |
source_system_id | string | yes | |
facility_id | string | yes | |
last_updated_at | string | null | yes | |
freshness | string | yes |
Chart.sections.item defined inline
Chart.discrepancies defined inline
| Name | Type | Required | Description |
|---|---|---|---|
conflicting_statements | integer | no | |
open_cases | array of object | no |