← All contracts
OHN-41 FHIR Repository and Profile Registry
- Version
- 1.1.0
- OpenAPI
- 3.1.0
- Source in the repository
modules/OHN-41/api/openapi.yaml- Servers
https://opeshealthnetwork.com
- Authentication
bearerAuth: http bearer (JWT)
Download the contract (YAML)
Contracts are written in English.
Governed FHIR R4 persistence with immutable version history, profile release governance (W001), optimistic versioned storage (W002) and quarantine of invalid resources (W003). Every POST requires an Idempotency-Key. Errors use {error, message, details}. 401 unauthenticated, 403 policy_denied, 404 not disclosed, 409 stale_version / invalid_transition / idempotency_key_reused, 422 domain_validation_failed and domain refusals, 429 with Retry-After, 503 jurisdiction_unavailable / dependency_unavailable (the body also names the `dependency`, e.g. OHN-16). Also: 400 malformed_request and idempotency_key_required, 413 payload_too_large (body over 512 KB), 410 export_expired. The Java service answers problem+json that adds type, title, status, detail and trace_id to {error, message, details}; validation details are zod's flatten() shape {formErrors, fieldErrors}. Tokens come from the platform gateway (ES256, audience ohn-41); /synthetic-token exists only in the TypeScript baseline.
Operations
Health
GET/health/ohn-41Liveness and database check
Operation ID: ohn41_health
Responses
| Code | Description | Media type |
|---|
200 | Success | |
404 | Not found or not disclosed | |
Synthetic
POST/api/ohn/v1/fhir/synthetic-tokenIssue a synthetic token (TypeScript baseline in synthetic mode only; not served by the Java service, tokens come from the gateway)
Operation ID: ohn41_syntheticToken
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
404 | Not found or not disclosed | |
POST/api/ohn/v1/fhir/synthetic/setupConfigure the synthetic upstream fakes (synthetic mode only)
Operation ID: ohn41_syntheticSetup
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
Repository
GET/api/ohn/v1/fhir/capabilitiesFHIR R4 CapabilityStatement for the caller partition
Operation ID: ohn41_capabilities
Authentication: bearerAuth
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/fhir/repository/statusRepository configuration, counts and guidance
Operation ID: ohn41_repositoryStatus
Authentication: bearerAuth
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/fhir/contextCaller principal and permitted actions
Operation ID: ohn41_context
Authentication: bearerAuth
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/fhir/vocabularyControlled vocabularies used by forms
Operation ID: ohn41_vocabulary
Authentication: bearerAuth
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
Profiles
GET/api/ohn/v1/fhir/profilesList profile releases in the jurisdiction
Operation ID: ohn41_listProfiles
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
state | query | string | no | |
resource_type | query | string | no | |
package_id | query | string | no | |
cursor | query | string | no | |
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/profilesSubmit a profile release (F001)
Operation ID: ohn41_createProfile
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/fhir/profiles/{id}Profile release with history and compatibility runs
Operation ID: ohn41_getProfile
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/fhir/profiles/{id}/compatibilityBreaking changes versus the release in force
Operation ID: ohn41_profileCompatibility
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/profiles/{id}/resolve-dependenciescandidate -> dependency_resolved (dependencies approved, bindings licensed)
Operation ID: ohn41_resolveDependencies
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/profiles/{id}/validatedependency_resolved -> validated (compatibility run)
Operation ID: ohn41_validateProfile
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/profiles/{id}/approvevalidated -> approved (independent reviewer)
Operation ID: ohn41_approveProfile
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/profiles/{id}/activateapproved -> active; emits fhir.profile.published
Operation ID: ohn41_activateProfile
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/profiles/{id}/rejectReject a release before activation
Operation ID: ohn41_rejectProfile
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/profiles/{id}/retireRetire an active, unpinned release
Operation ID: ohn41_retireProfile
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/fhir/profile-packs(v1.1, ADR-0005) Profile pack by reference - "package_id", "package_id|version" or the id of any active release in the pack
Operation ID: ohn41_getProfilePack
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
ref | query | string | yes | |
Responses
| Code | Description | Media type |
|---|
200 | All active releases of one package version in the caller's jurisdiction | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
Pins
GET/api/ohn/v1/fhir/pinsPackage pins in the jurisdiction
Operation ID: ohn41_listPins
Authentication: bearerAuth
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/pinsPin an active release for its resource type
Operation ID: ohn41_pinRelease
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/pins/{id}/unpinRemove a pin
Operation ID: ohn41_unpin
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
Partitions
GET/api/ohn/v1/fhir/partitionsPartition of the caller organization
Operation ID: ohn41_listPartitions
Authentication: bearerAuth
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/partitionsCreate the organization partition
Operation ID: ohn41_createPartition
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/partitions/{id}/suspendSuspend writes to a partition
Operation ID: ohn41_suspendPartition
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/partitions/{id}/purge-expiredDelete superseded versions older than the partition retention period (current versions are kept)
Operation ID: ohn41_purgeExpired
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
Resources
GET/api/ohn/v1/fhir/resourcesResource heads (metadata only)
Operation ID: ohn41_listResources
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
resource_type | query | string | no | |
logical_id | query | string | no | |
cursor | query | string | no | |
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/resourcesCreate or update a resource (W002); invalid input is quarantined (W003)
Operation ID: ohn41_writeResource
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/fhir/resources/{id}/historyVersion history metadata, no bodies
Operation ID: ohn41_resourceHistory
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/resources/inspectRead one version (F002); patient-linked bodies need an OHN-16 permit
Operation ID: ohn41_inspectVersion
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/transactions(v1.1, ADR-0005) Atomic multi-resource commit - every entry is stored or none is
Each entry passes the full W002 pipeline inside one database transaction. Intra-bundle references to an entry full_url are resolved to Type/id. A refusal answers 422 with outcome rolled_back, the failing entry index and reason, and is not stored as an idempotent response so the same bundle can be retried after the cause is fixed. A dependency outage answers 503 and nothing is written.
Operation ID: ohn41_commitTransaction
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | Committed; one result per entry, in entry order | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Rolled back (outcome rolled_back) or request validation failed (error domain_validation_failed); nothing was stored | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/resources/read(v1.1, ADR-0005) Read the current version of one resource; same checks as inspect
Operation ID: ohn41_readCurrent
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Current version with freshness and an audit receipt | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/resources/compareDiff two versions
Operation ID: ohn41_compareVersions
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
Quarantine
GET/api/ohn/v1/fhir/outcomesQuarantine records
Operation ID: ohn41_listOutcomes
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
state | query | string | no | |
resource_type | query | string | no | |
cursor | query | string | no | |
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/fhir/outcomes/{id}Quarantine record with history and appeals
Operation ID: ohn41_getOutcome
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/outcomes/{id}/notify-sourcequarantined -> source_notified
Operation ID: ohn41_notifySource
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/outcomes/{id}/correctSubmitter supplies a corrected body
Operation ID: ohn41_correctOutcome
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/outcomes/{id}/revalidatecorrected -> revalidated (commits) or back to quarantined
Operation ID: ohn41_revalidateOutcome
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/outcomes/{id}/discardClose a quarantine record without storing
Operation ID: ohn41_discardOutcome
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/fhir/appealsValidation failure appeals
Operation ID: ohn41_listAppeals
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
state | query | string | no | |
cursor | query | string | no | |
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/appealsAppeal a failed rule (F003)
Operation ID: ohn41_createAppeal
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/appeals/{id}/decideAssigned reviewer upholds or overturns
Operation ID: ohn41_decideAppeal
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
Reports
GET/api/ohn/v1/fhir/reports/{reportId}Run OHN-41-R001..R003
Operation ID: ohn41_runReport
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
reportId | path | "OHN-41-R001" | "OHN-41-R002" | "OHN-41-R003" | yes | |
jurisdiction | query | string (uuid) | no | |
country | query | string (uuid) | no | |
source | query | string (uuid) | no | |
from | query | string (date-time) | no | |
to | query | string (date-time) | no | |
package | query | string | no | |
resource_type | query | string | no | |
review_state | query | string | no | |
cursor | query | string | no | |
Responses
| Code | Description | Media type |
|---|
200 | Success | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
POST/api/ohn/v1/fhir/reports/{reportId}/exportCreate a signed, 5-minute, owner-only CSV or PDF export
Operation ID: ohn41_exportReport
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
reportId | path | "OHN-41-R001" | "OHN-41-R002" | "OHN-41-R003" | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | Success | |
400 | Malformed request or missing Idempotency-Key | |
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
409 | Stale version, invalid transition, conflict or reused idempotency key | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
GET/api/ohn/v1/fhir/exports/{token}Download an export (audited)
Operation ID: ohn41_downloadExport
Authentication: bearerAuth
Parameters
| Name | In | Type | Required | Description |
|---|
token | path | string | yes | |
Responses
| Code | Description | Media type |
|---|
200 | Success | text/csv: string
application/pdf: string (binary)
|
401 | Unauthenticated | |
403 | Denied by policy (audited) | |
404 | Not found or not disclosed | |
422 | Validation failure, domain refusal or quarantined resource | |
429 | Rate limited; see Retry-After | |
503 | Jurisdiction service or another dependency unavailable; nothing changed | |
Schemas
Error
| Name | Type | Required | Description |
|---|
error | string | yes | |
message | string | no | |
details | any | no | |
Document
JSON document; shapes are listed in modules/OHN-41/data/schema.md
object
Receipt
| Name | Type | Required | Description |
|---|
receipt_id | string (uuid) | yes | |
committed_at | string (date-time) | yes | |
aggregate_id | string (uuid) | yes | |
aggregate_type | string | yes | |
version | integer | yes | |
status | "committed" | "denied" | "pending" | yes | |
CommandResult
| Name | Type | Required | Description |
|---|
receipt | Receipt | no | |
delivery | "committed" | "pending_downstream_confirmation" | no | |
CapabilityStatement
| Name | Type | Required | Description |
|---|
resourceType | "CapabilityStatement" | yes | |
status | "active" | yes | |
kind | "instance" | yes | |
fhirVersion | "4.0.1" | yes | |
implementationGuide | array of string | no | |
rest | array of object | yes | |
Versioned
| Name | Type | Required | Description |
|---|
expected_version | integer | yes | |
Reasoned
| Name | Type | Required | Description |
|---|
expected_version | integer | yes | |
reason | string | yes | |
Approve
| Name | Type | Required | Description |
|---|
expected_version | integer | yes | |
acknowledge_breaking_changes | boolean | no | |
ReleaseCreate
OHN-41-F001 FHIR profile release
| Name | Type | Required | Description |
|---|
profile_canonical | string (uri) | yes | http(s)://<base>/StructureDefinition/<name> |
package_id | string | yes | |
package_version | string | yes | |
resource_type | "Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location" | yes | |
country_scope | string | yes | |
release_evidence | string (uuid) | yes | |
rules | Rules | yes | |
dependencies | array of ReleaseCreate.dependencies.item | no | |
Pin
| Name | Type | Required | Description |
|---|
release_id | string (uuid) | yes | |
reason | string | yes | |
Partition
| Name | Type | Required | Description |
|---|
name | string | yes | |
resource_types | array of "Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location" | yes | |
retention_days | integer | yes | |
ResourceWrite
| Name | Type | Required | Description |
|---|
resource_type | "Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location" | yes | |
logical_id | string | yes | |
resource | object | yes | FHIR R4 JSON resource |
patient_ref | string (uuid) | no | Required for patient-linked types |
expected_version_id | integer | no | Omit to create; current version id to update |
ProfilePack
| Name | Type | Required | Description |
|---|
api_version | "1.1.0" | yes | |
ref | string | yes | |
id | string | yes | package_id|version |
name | string | yes | |
version | string | yes | |
profiles | array of ProfilePack.profiles.item | yes | |
Transaction
| Name | Type | Required | Description |
|---|
transaction_id | string | yes | |
patient_ref | string (uuid) | no | Required when any entry is patient-linked |
entries | array of Transaction.entries.item | yes | |
TransactionRolledBack
| Name | Type | Required | Description |
|---|
api_version | "1.1.0" | yes | |
outcome | "rolled_back" | yes | |
transaction_id | string | yes | |
failed_index | integer | yes | |
reason | string | yes | A validator rule code, partition_not_configured, profile_not_pinned, policy_denied, patient_context_missing, resource_exists, stale_version, duplicate_full_url, put_requires_logical_id, post_must_not_name_logical_id or duplicate_resource_in_transaction |
issues | array of object | yes | |
entries_committed | 0 | yes | |
receipt | Receipt | yes | |
ReadCurrent
| Name | Type | Required | Description |
|---|
resource_type | "Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location" | yes | |
logical_id | string | yes | |
jurisdiction_id | string (uuid) | yes | |
access_purpose | string | yes | |
Inspect
OHN-41-F002 FHIR resource version inspection
| Name | Type | Required | Description |
|---|
resource_type | "Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location" | yes | |
logical_id | string | yes | |
jurisdiction_id | string (uuid) | yes | |
access_purpose | "repository_administration" | "conformance_review" | "treatment" | "care_coordination" | "public_health" | yes | |
version_id | string | yes | |
Compare
| Name | Type | Required | Description |
|---|
resource_type | "Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location" | yes | |
logical_id | string | yes | |
jurisdiction_id | string (uuid) | yes | |
access_purpose | "repository_administration" | "conformance_review" | "treatment" | "care_coordination" | "public_health" | yes | |
from_version_id | string | yes | |
to_version_id | string | yes | |
Correction
| Name | Type | Required | Description |
|---|
expected_version | integer | yes | |
resource | object | yes | |
Appeal
OHN-41-F003 FHIR validation failure appeal
| Name | Type | Required | Description |
|---|
resource_ref | string (uuid) | yes | Quarantine record id |
profile_ref | string (uuid) | yes | |
rule_code | string | yes | |
source_evidence | string (uuid) | yes | |
reviewer | string (uuid) | yes | |
AppealDecision
| Name | Type | Required | Description |
|---|
expected_version | integer | yes | |
decision | "upheld" | "overturned" | yes | |
reason | string | yes | |
Export
| Name | Type | Required | Description |
|---|
format | "csv" | "pdf" | yes | |
filters | object | no | |
SyntheticToken
| Name | Type | Required | Description |
|---|
principal_id | string (uuid) | yes | |
role | "fhir_administrator" | "conformance_reviewer" | "fhir_source_system" | "unauthorized_viewer" | yes | |
jurisdiction | string (uuid) | yes | |
organization_id | string (uuid) | yes | |
purpose | "repository_administration" | "conformance_review" | "treatment" | "care_coordination" | "public_health" | yes | |
SyntheticSetup
| Name | Type | Required | Description |
|---|
deny_patients | array of string (uuid) | no | |
unlicensed_systems | array of string (uri) | no | |
inactive_jurisdictions | array of string (uuid) | no | |
down | array of "OHN-01" | "OHN-16" | "OHN-23" | "OHN-18" | no | |
reset | boolean | no | |
Rules.fixed.item defined inline
| Name | Type | Required | Description |
|---|
path | string | yes | |
values | array of string | yes | |
Rules.bindings.item defined inline
| Name | Type | Required | Description |
|---|
path | string | yes | |
system | string (uri) | yes | |
ReleaseCreate.dependencies.item defined inline
| Name | Type | Required | Description |
|---|
package_id | string | yes | |
version | string | yes | |
ProfilePack.profiles.item defined inline
| Name | Type | Required | Description |
|---|
resource_type | string | yes | |
canonical | string (uri) | yes | |
required | array of string | yes | |
release_id | string (uuid) | yes | |
Transaction.entries.item defined inline
| Name | Type | Required | Description |
|---|
full_url | string | yes | |
method | "POST" | "PUT" | yes | |
resource_type | "Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location" | yes | |
logical_id | string | no | PUT only; POST ids are assigned by the server |
resource | object | yes | |
TransactionCommitted.results.item defined inline
| Name | Type | Required | Description |
|---|
full_url | string | yes | |
status | "201 Created" | "200 OK" | yes | |
location | string | yes | |
resource_type | string | yes | |
logical_id | string | yes | |
version_id | string | yes | |
etag | string | yes | |
last_modified | string (date-time) | yes | |
provenance_ref | string | null | no | |