OHN-02 Health ID Management
- Version
- 1.0.0
- OpenAPI
- 3.1.0
- Source in the repository
modules/OHN-02/api/openapi.yaml- Servers
https://opeshealthnetwork.com/api/ohn/v1- Authentication
gatewayToken: http bearer (JWT)
Contracts are written in English.
Written from the observed behaviour of the TypeScript reference (backend/modules/ohn-02, 2026-11-17). The by-subject operation depends on OHN-03 through a port; until the service-token decision (OWNER-BLOCKERS B38) it fails closed with 503.
Operations
- health-ids (10)
- reports (5)
health-ids
POST/patients
Operation ID: issueHealthId
Authentication: gatewayToken
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body (required)
application/json:IssueHealthIdCommand
Responses
| Code | Description | Media type |
|---|---|---|
201 | Identity and first health id created | application/json: HealthIdentifier |
422 | application/problem+json with the legacy error code | application/problem+json: Problem |
503 | application/problem+json with the legacy error code | application/problem+json: Problem |
POST/patients/{id}/health-ids
Operation ID: issueAdditionalHealthId
Authentication: gatewayToken
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | |
Idempotency-Key | header | string | yes |
Request body (required)
application/json:IssueAdditionalIdCommand
Responses
| Code | Description | Media type |
|---|---|---|
201 | Additional id | application/json: HealthIdentifier |
404 | application/problem+json with the legacy error code | application/problem+json: Problem |
422 | application/problem+json with the legacy error code | application/problem+json: Problem |
GET/patients/by-subject/{subject}
Operation ID: getPatientBySubject
Authentication: gatewayToken
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
subject | path | string | yes |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Binding | application/json: SubjectBinding |
404 | application/problem+json with the legacy error code | application/problem+json: Problem |
503 | application/problem+json with the legacy error code | application/problem+json: Problem |
GET/health-ids
Operation ID: listHealthIds
Authentication: gatewayToken
Responses
| Code | Description | Media type |
|---|---|---|
200 | Identifiers with their patient | application/json: HealthIdentifierList |
POST/health-ids/resolve
Operation ID: resolveHealthId
Authentication: gatewayToken
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body (required)
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
200 | Patient reference | application/json: Resolution |
404 | application/problem+json with the legacy error code | application/problem+json: Problem |
422 | application/problem+json with the legacy error code | application/problem+json: Problem |
GET/health-ids/{id}/verify
Operation ID: verifyHealthId
Authentication: gatewayToken
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Active identifier | application/json: HealthIdentifier |
404 | application/problem+json with the legacy error code | application/problem+json: Problem |
POST/health-ids/{id}/recover
Operation ID: recoverHealthId
Authentication: gatewayToken
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | |
Idempotency-Key | header | string | yes |
Request body (required)
application/json:RecoveryCommand
Responses
POST/health-ids/{id}/status
Operation ID: changeHealthIdStatus
Authentication: gatewayToken
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | |
Idempotency-Key | header | string | yes |
Request body (required)
application/json:StatusChangeCommand
Responses
| Code | Description | Media type |
|---|---|---|
200 | Updated | application/json: HealthIdentifier |
404 | application/problem+json with the legacy error code | application/problem+json: Problem |
422 | application/problem+json with the legacy error code | application/problem+json: Problem |
GET/health-ids/{id}/history
Operation ID: getHealthIdHistory
Authentication: gatewayToken
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Status history oldest first | application/json: HistoryList |
GET/identifier-aliases
Operation ID: listIdentifierAliases
Authentication: gatewayToken
Responses
| Code | Description | Media type |
|---|---|---|
200 | Aliases | application/json: RecoveryList |
reports
GET/health-ids/reports
Operation ID: listReports
Authentication: gatewayToken
Responses
| Code | Description | Media type |
|---|---|---|
200 | Reports | application/json: ReportList |
403 | application/problem+json with the legacy error code | application/problem+json: Problem |
GET/health-ids/issuance-exceptions
Operation ID: listIssuanceExceptions
Authentication: gatewayToken
Responses
| Code | Description | Media type |
|---|---|---|
200 | Failed or retried issuances without identifiers | application/json: object |
403 | application/problem+json with the legacy error code | application/problem+json: Problem |
GET/health-ids/reports/{reportId}
Operation ID: runReport
Authentication: gatewayToken
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
reportId | path | string | yes | |
jurisdiction | query | string | no | |
channel | query | string | no | |
status | query | string | no | |
period_from | query | string | no | |
period_to | query | string | no | |
date | query | string | no | |
cursor | query | string | no |
Responses
| Code | Description | Media type |
|---|---|---|
200 | Report | application/json: Report |
403 | application/problem+json with the legacy error code | application/problem+json: Problem |
404 | application/problem+json with the legacy error code | application/problem+json: Problem |
422 | application/problem+json with the legacy error code | application/problem+json: Problem |
POST/health-ids/reports/{reportId}/export
Operation ID: exportReport
Authentication: gatewayToken
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
reportId | path | string | yes | |
Idempotency-Key | header | string | yes |
Request body (required)
application/json:ExportCommand
Responses
| Code | Description | Media type |
|---|---|---|
201 | Export created - single use and valid for five minutes | application/json: ExportReceipt |
404 | application/problem+json with the legacy error code | application/problem+json: Problem |
422 | application/problem+json with the legacy error code | application/problem+json: Problem |
GET/health-ids/report-exports/{token}
Operation ID: downloadReportExport
Authentication: gatewayToken
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
token | path | string | yes |
Responses
Schemas
Problem
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes | |
message | string | no | |
details | object | no | |
trace_id | string | no |
IssueHealthIdCommand
| Name | Type | Required | Description |
|---|---|---|---|
jurisdiction_id | string (uuid) | yes | |
patient_identity_ref | string (uuid) | yes | |
proofing_case_id | string (uuid) | yes | |
registration_channel | string | yes | |
language | string | yes | |
idempotency_key | string | no |
IssueAdditionalIdCommand
| Name | Type | Required | Description |
|---|---|---|---|
jurisdiction_id | string (uuid) | yes | |
verification_purpose | string | yes | |
requesting_facility_id | string (uuid) | yes | |
patient_disclosure_authority | string (uuid) | no |
HealthIdentifier
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | no | |
health_identity_id | string (uuid) | no | |
health_id | string | no | |
jurisdiction_id | string (uuid) | no | |
verification_purpose | string | no | |
requesting_facility_id | string (uuid) | no | |
patient_disclosure_authority | string | null | no | |
status | string | no | |
version | integer | no | |
created_at | string (date-time) | no | |
updated_at | string (date-time) | no | |
patient_id | string | null | no |
HealthIdentifierList
| Name | Type | Required | Description |
|---|---|---|---|
data | array of HealthIdentifier | no |
SubjectBinding
| Name | Type | Required | Description |
|---|---|---|---|
patient_id | string | no | |
health_id | string | null | no | |
status | "active" | "suspended" | no |
Resolution
| Name | Type | Required | Description |
|---|---|---|---|
patient_id | string | no | |
status | string | no |
RecoveryCommand
| Name | Type | Required | Description |
|---|---|---|---|
claimed_id | string | no | |
identity_evidence_ref | string (uuid) | yes | |
recovery_reason | string | yes | |
verified_contact | string | no | |
reviewer_id | string (uuid) | yes |
Recovery
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | no | |
health_identifier_id | string (uuid) | no | |
claimed_id | string | null | no | |
identity_evidence_ref | string (uuid) | no | |
recovery_reason | string | no | |
verified_contact | string | null | no | |
reviewer_id | string (uuid) | no | |
status | string | no | |
created_at | string (date-time) | no | |
updated_at | string (date-time) | no |
RecoveryList
| Name | Type | Required | Description |
|---|---|---|---|
data | array of Recovery | no |
StatusChangeCommand
| Name | Type | Required | Description |
|---|---|---|---|
requested_status | "suspended" | "retired" | "active" | yes | |
reason | string | yes | |
effective_at | string (date-time) | yes | |
approver_id | string (uuid) | yes |
HistoryEntry
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | no | |
health_identifier_id | string (uuid) | no | |
previous_status | string | no | |
new_status | string | no | |
reason | string | no | |
effective_at | string (date-time) | no | |
approver_id | string (uuid) | no | |
created_at | string (date-time) | no |
HistoryList
| Name | Type | Required | Description |
|---|---|---|---|
data | array of HistoryEntry | no |
ReportList
| Name | Type | Required | Description |
|---|---|---|---|
reports | array of ReportList.reports.item | no |
Report
| Name | Type | Required | Description |
|---|---|---|---|
report_id | string | yes | |
title | string | yes | |
columns | array of string | yes | |
rows | array of object | yes | |
summary | object | yes | |
state | "rendered" | "no_authorized_data" | yes | |
generated_at | string (date-time) | yes | |
next_cursor | string | null | yes |
ExportCommand
| Name | Type | Required | Description |
|---|---|---|---|
format | "csv" | "pdf" | yes | |
filters | object | no |
ExportReceipt
| Name | Type | Required | Description |
|---|---|---|---|
export_id | string (uuid) | no | |
report_id | string | no | |
format | string | no | |
rows | integer | no | |
expires_at | string (date-time) | no | |
single_use | boolean | no | |
download_path | string | no |
ReportList.reports.item defined inline
| Name | Type | Required | Description |
|---|---|---|---|
id | string | no | |
title | string | no |