Skip to content

← All contracts

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

Download the contract (JSON)

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

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

NameInTypeRequiredDescription
idpathstringyesA path id that is not a UUID is 404 not_found.

Responses

CodeDescriptionMedia type
200Chart
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
409Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
GET/patients/{id}/timelineThe same chart as dated entries, most recent first, plus undated statements

Operation ID: getPatientTimeline

Authentication: bearer

Parameters

NameInTypeRequiredDescription
idpathstringyesA path id that is not a UUID is 404 not_found.

Responses

CodeDescriptionMedia type
200Timeline
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
409Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
POST/health-chart/rebuildAssemble a chart (F001, workflow W001)

Operation ID: rebuildChart

Authentication: bearer

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

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

CodeDescriptionMedia type
201Chart presented, with receipt
application/json: object
400Typed error
application/json: Error
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
409Typed error
application/json: Error
422Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
GET/health-chart/vocabulariesControlled lists, workflow states and the policy configuration in force

Operation ID: getVocabularies

Authentication: bearer

Responses

CodeDescriptionMedia type
200Vocabularies
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
GET/health-chart/viewsThe caller's own chart requests (metadata only)

Operation ID: listViews

Authentication: bearer

Parameters

NameInTypeRequiredDescription
pagequerystringnoInteger >= 1. Lists clamp an unreadable value to 1; reports refuse it with 422.
page_sizequerystringnoInteger 1..100. Lists clamp (default 25); reports default 50 and refuse values outside 1..100 with 422.

Responses

CodeDescriptionMedia type
200Page of views
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
GET/health-chart/views/{id}One of the caller's chart requests with sources and workflow history

Operation ID: getView

Authentication: bearer

Parameters

NameInTypeRequiredDescription
idpathstringyesA path id that is not a UUID is 404 not_found.

Responses

CodeDescriptionMedia type
200View
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
GET/health-chart/views/{id}/access-snapshotsAccess decisions taken for one chart view (audit-access side panel)

Operation ID: listAccessSnapshots

Authentication: bearer

Parameters

NameInTypeRequiredDescription
idpathstringyesA path id that is not a UUID is 404 not_found.

Responses

CodeDescriptionMedia type
200Snapshots
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
GET/health-chart/source-requestsThe caller's source requests

Operation ID: listSourceRequests

Authentication: bearer

Parameters

NameInTypeRequiredDescription
pagequerystringnoInteger >= 1. Lists clamp an unreadable value to 1; reports refuse it with 422.
page_sizequerystringnoInteger 1..100. Lists clamp (default 25); reports default 50 and refuse values outside 1..100 with 422.

Responses

CodeDescriptionMedia type
200Page of source requests
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
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

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

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

CodeDescriptionMedia type
201Source request with receipt
application/json: object
400Typed error
application/json: Error
401Typed error
application/json: Error
403Typed error
application/json: Error
409Typed error
application/json: Error
422Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
GET/health-chart/source-requests/{id}One source request with its history

Operation ID: getSourceRequest

Authentication: bearer

Parameters

NameInTypeRequiredDescription
idpathstringyesA path id that is not a UUID is 404 not_found.

Responses

CodeDescriptionMedia type
200Source request
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
GET/health-chart/discrepanciesCases in the caller's jurisdiction

Operation ID: listDiscrepancies

Authentication: bearer

Parameters

NameInTypeRequiredDescription
pagequerystringnoInteger >= 1. Lists clamp an unreadable value to 1; reports refuse it with 422.
page_sizequerystringnoInteger 1..100. Lists clamp (default 25); reports default 50 and refuse values outside 1..100 with 422.
statusquerystringnoOne of: conflict_detected, evidence_linked, clinical_review, resolved_or_disputed, history_preserved
clinical_riskquerystringnoOne of: low, moderate, high, critical
assigned_to_mequerystringnotrue | false

Responses

CodeDescriptionMedia type
200Page of cases
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
422Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
POST/health-chart/discrepanciesOpen a source discrepancy case (F002, workflow W002)

Operation ID: openDiscrepancy

Authentication: bearer

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

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

CodeDescriptionMedia type
201Case with receipt
application/json: object
400Typed error
application/json: Error
401Typed error
application/json: Error
403Typed error
application/json: Error
409Typed error
application/json: Error
422Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
GET/health-chart/discrepancies/{id}One case with its history

Operation ID: getDiscrepancy

Authentication: bearer

Parameters

NameInTypeRequiredDescription
idpathstringyesA path id that is not a UUID is 404 not_found.

Responses

CodeDescriptionMedia type
200Case
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
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

NameInTypeRequiredDescription
idpathstringyesA path id that is not a UUID is 404 not_found.
Idempotency-Keyheaderstringyes

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

CodeDescriptionMedia type
200Updated case with history and receipt
application/json: object
400Typed error
application/json: Error
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
409Typed error
application/json: Error
422Typed error
application/json: Error
429Typed error
application/json: Error
503Typed 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

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

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

CodeDescriptionMedia type
200Already processed
application/json: object
201Revocation processed
application/json: object
400Typed error
application/json: Error
401Typed error
application/json: Error
403Typed error
application/json: Error
409Typed error
application/json: Error
422Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
GET/health-chart/revocationsRevocations handled in the jurisdiction, with history (steward only)

Operation ID: listRevocations

Authentication: bearer

Parameters

NameInTypeRequiredDescription
pagequerystringnoInteger >= 1. Lists clamp an unreadable value to 1; reports refuse it with 422.
page_sizequerystringnoInteger 1..100. Lists clamp (default 25); reports default 50 and refuse values outside 1..100 with 422.

Responses

CodeDescriptionMedia type
200Page of revocations
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
GET/health-chart/revocation-noticesNotices for charts the caller had open whose access was withdrawn

Operation ID: listRevocationNotices

Authentication: bearer

Parameters

NameInTypeRequiredDescription
pendingquerystringnotrue | false

Responses

CodeDescriptionMedia type
200Notices
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
POST/health-chart/revocation-notices/{id}/acknowledgeAcknowledge a notice; the revocation reaches user_notified when all are acknowledged

Operation ID: acknowledgeRevocationNotice

Authentication: bearer

Parameters

NameInTypeRequiredDescription
idpathstringyesA path id that is not a UUID is 404 not_found.
Idempotency-Keyheaderstringyes

Responses

CodeDescriptionMedia type
200Acknowledged with receipt
application/json: object
400Typed error
application/json: Error
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
409Typed error
application/json: Error
422Typed error
application/json: Error
429Typed error
application/json: Error
503Typed 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

NameInTypeRequiredDescription
reportIdpath"OHN-08-R001" | "OHN-08-R002" | "OHN-08-R003"yesAny other value is 404 not_found.
jurisdictionquerystringnouuid
providerquerystringnouuid
facilityquerystringnouuid
severityquerystringnoOne of: low, moderate, high, critical
resolutionquerystringnoOne of: unresolved, all
servicequerystringnoOne of: assemble, read, source_request
period_fromquerystringnodate-time
period_toquerystringnodate-time
pagequerystringnoInteger >= 1. Lists clamp an unreadable value to 1; reports refuse it with 422.
page_sizequerystringnoInteger 1..100. Lists clamp (default 25); reports default 50 and refuse values outside 1..100 with 422.

Responses

CodeDescriptionMedia type
200Report
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
422Typed error
application/json: Error
429Typed error
application/json: Error
503Typed error
application/json: Error
POST/health-chart/reports/{reportId}/exportCreate a signed, single-use, five-minute CSV or PDF export

Operation ID: exportReport

Authentication: bearer

Parameters

NameInTypeRequiredDescription
reportIdpath"OHN-08-R001" | "OHN-08-R002" | "OHN-08-R003"yesAny other value is 404 not_found.
Idempotency-Keyheaderstringyes

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

CodeDescriptionMedia type
201Export receipt with download_path
application/json: object
400Typed error
application/json: Error
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
409Typed error
application/json: Error
422Typed error
application/json: Error
429Typed error
application/json: Error
503Typed 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

NameInTypeRequiredDescription
idpathstringyesA path id that is not a UUID is 404 not_found.

Responses

CodeDescriptionMedia type
200text/csv or application/pdf
application/json: object
401Typed error
application/json: Error
403Typed error
application/json: Error
404Typed error
application/json: Error
410Typed error
application/json: Error
429Typed error
application/json: Error
500Typed error
application/json: Error
503Typed error
application/json: Error

Schemas

Error

NameTypeRequiredDescription
errorstringyesunauthenticated, 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
messagestringno
dependencystringno
detailsobjectnoField 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

NameTypeRequiredDescription
health_idstringyes
facility_idstringyes
clinical_purposeClinicalPurposeyesMust equal the purpose in the bearer token
relationship_refstringyes
record_scope"full_chart" | "allergies" | "medications" | "problems" | "immunizations" | "results" | "procedures" | "encounters"yes
date_fromstringno
date_tostringno

DiscrepancyCaseCommand

NameTypeRequiredDescription
patient_idstringyes
source_record_idsstringyes2 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_riskClinicalRiskyes
assigneestringyes
notesstringno

DiscrepancyTransitionCommand

NameTypeRequiredDescription
expected_versionintegeryes
to_stateDiscrepancyStateyes
reasonstringno
evidence_refsarray of stringno
outcome"resolved" | "disputed"no

SourceRequestCommand

NameTypeRequiredDescription
record_locator_refstringyes
source_endpoint_refstringyes
requested_sectionsstringyesSection names separated by commas or spaces
patient_contextstringyes
purposeClinicalPurposeyes

RevocationSignalCommand

NameTypeRequiredDescription
signal_idstringyes
patient_idstringyes
consent_refstringyes
revoked_atstringyes

ExportCommand

NameTypeRequiredDescription
format"csv" | "pdf"yes
filtersobjectnoReport filters; same rules and strict keys as the report query parameters (string or number values)

Receipt

NameTypeRequiredDescription
receipt_idstring (uuid)yes
committed_atstring (date-time)yes
aggregate_idstringyes
aggregate_typestringyes
versionintegeryes
status"committed"yes
event_delivery"pending" | "not_applicable"yes
event_idstring | nullyes

Source

NameTypeRequiredDescription
idstring (uuid)yes
view_idstring (uuid)no
record_locator_refstring (uuid)no
source_endpoint_refstring (uuid)no
source_system_idstring (uuid)yes
facility_idstring (uuid)yes
availability"reachable" | "unreachable" | "integrity_rejected"yes
freshness"fresh" | "stale" | "unknown" | "threshold_not_configured"yes
last_updated_atstring | null (date-time)yes
retrieved_atstring (date-time)yes
sections_requestedarray of Sectionno
fact_countintegerno
rejected_countintegerno

Fact

NameTypeRequiredDescription
idstring (uuid)yes
sectionSectionyes
source_record_idstringyes
conceptFact.conceptyes
status_as_statedstring | nullyesAs stated by the source at recorded_at; never upgraded to 'current'
valuestring | nullno
recorded_atstring | null (date-time)yes
terminology"validated" | "not_recognised" | "not_verified"yes
conflictbooleanyesAnother source states a different status for the same concept
open_case_idsarray of string (uuid)yes
sourceFact.sourceyes

View

NameTypeRequiredDescription
idstring (uuid)yes
patient_idstring | nullno
health_idstringno
facility_idstringno
clinical_purposestringno
relationship_refstringno
record_scopestringno
date_fromstring | nullno
date_tostring | nullno
status"patient_resolved" | "policy_authorized" | "sources_discovered" | "records_validated" | "chart_presented"yes
outcome"in_progress" | "presented" | "denied" | "unavailable"yes
refusal_reasonstring | nullno
completeness"complete_for_located_sources" | "partial" | "no_sources_registered" | nullno
warningsarray of stringno
sections_disclosedarray of Sectionno
fact_countintegerno
assembled_atstring | nullno
expires_atstring | nullno
invalidated_atstring | nullno
invalidation_reasonstring | nullno
versionintegeryes

Chart

NameTypeRequiredDescription
viewViewyes
noticesarray of "not_the_complete_record" | "absence_of_information_is_not_absence_of_condition" | "status_is_as_stated_by_source"yes
sectionsarray of Chart.sections.itemyesOnly sections the caller may see; a withheld section is not listed at all
sourcesarray of Sourceyes
discrepanciesChart.discrepanciesyes
receiptReceiptno

Timeline

NameTypeRequiredDescription
viewViewyes
noticesarray of stringyes
entriesarray of Factyes
undatedarray of Factyes
sourcesarray of Sourceyes

DiscrepancyCase

NameTypeRequiredDescription
idstring (uuid)yes
patient_idstringyes
facility_idstring | nullno
source_record_idsarray of stringyes
discrepancy_typestringyes
clinical_riskClinicalRiskyes
assigneestringyes
notesstring | nullno
conceptstring | nullno
statusDiscrepancyStateyes
next_statestring | nullno
evidence_refsarray of stringno
outcome"resolved" | "disputed" | nullno
outcome_reasonstring | nullno
decided_bystring | nullno
versionintegeryes
receiptReceiptno

Report

NameTypeRequiredDescription
report_idstringyes
titlestringno
columnsarray of stringyes
rowsarray of objectyes
totalintegeryes
pageintegerno
page_sizeintegerno
summaryobjectno
warningsarray of "small_cohort_suppressed" | "staleness_threshold_not_configured"no
state"rendered" | "no_authorized_data" | "partial_with_source_warning"yes
generated_atstring (date-time)yes

Fact.concept defined inline

NameTypeRequiredDescription
systemstringyes
codestringyes
displaystringyes

Fact.source defined inline

NameTypeRequiredDescription
attribution_idstringyes
source_system_idstringyes
facility_idstringyes
last_updated_atstring | nullyes
freshnessstringyes

Chart.sections.item defined inline

NameTypeRequiredDescription
sectionSectionyes
state"information_available" | "no_information_retrieved"yes
factsarray of Factyes

Chart.discrepancies defined inline

NameTypeRequiredDescription
conflicting_statementsintegerno
open_casesarray of objectno