Skip to content

← 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

CodeDescriptionMedia type
200Success
application/json: Document
404Not found or not disclosed
application/json: Error

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

CodeDescriptionMedia type
200Success
application/json: CommandResult
404Not found or not disclosed
application/json: Error
POST/api/ohn/v1/fhir/synthetic/setupConfigure the synthetic upstream fakes (synthetic mode only)

Operation ID: ohn41_syntheticSetup

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error

Repository

GET/api/ohn/v1/fhir/capabilitiesFHIR R4 CapabilityStatement for the caller partition

Operation ID: ohn41_capabilities

Authentication: bearerAuth

Responses

CodeDescriptionMedia type
200Success
application/json: CapabilityStatement
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/fhir/repository/statusRepository configuration, counts and guidance

Operation ID: ohn41_repositoryStatus

Authentication: bearerAuth

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/fhir/contextCaller principal and permitted actions

Operation ID: ohn41_context

Authentication: bearerAuth

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/fhir/vocabularyControlled vocabularies used by forms

Operation ID: ohn41_vocabulary

Authentication: bearerAuth

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error

Profiles

GET/api/ohn/v1/fhir/profilesList profile releases in the jurisdiction

Operation ID: ohn41_listProfiles

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
statequerystringno
resource_typequerystringno
package_idquerystringno
cursorquerystringno

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/profilesSubmit a profile release (F001)

Operation ID: ohn41_createProfile

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
201Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/fhir/profiles/{id}Profile release with history and compatibility runs

Operation ID: ohn41_getProfile

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/fhir/profiles/{id}/compatibilityBreaking changes versus the release in force

Operation ID: ohn41_profileCompatibility

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/profiles/{id}/resolve-dependenciescandidate -> dependency_resolved (dependencies approved, bindings licensed)

Operation ID: ohn41_resolveDependencies

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/profiles/{id}/validatedependency_resolved -> validated (compatibility run)

Operation ID: ohn41_validateProfile

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/profiles/{id}/approvevalidated -> approved (independent reviewer)

Operation ID: ohn41_approveProfile

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/profiles/{id}/activateapproved -> active; emits fhir.profile.published

Operation ID: ohn41_activateProfile

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/profiles/{id}/rejectReject a release before activation

Operation ID: ohn41_rejectProfile

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/profiles/{id}/retireRetire an active, unpinned release

Operation ID: ohn41_retireProfile

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
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

NameInTypeRequiredDescription
refquerystringyes

Responses

CodeDescriptionMedia type
200All active releases of one package version in the caller's jurisdiction
application/json: ProfilePack
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error

Pins

GET/api/ohn/v1/fhir/pinsPackage pins in the jurisdiction

Operation ID: ohn41_listPins

Authentication: bearerAuth

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/pinsPin an active release for its resource type

Operation ID: ohn41_pinRelease

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

Request body (required)

  • application/json: Pin

Responses

CodeDescriptionMedia type
201Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/pins/{id}/unpinRemove a pin

Operation ID: ohn41_unpin

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error

Partitions

GET/api/ohn/v1/fhir/partitionsPartition of the caller organization

Operation ID: ohn41_listPartitions

Authentication: bearerAuth

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/partitionsCreate the organization partition

Operation ID: ohn41_createPartition

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
201Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/partitions/{id}/suspendSuspend writes to a partition

Operation ID: ohn41_suspendPartition

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
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

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error

Resources

GET/api/ohn/v1/fhir/resourcesResource heads (metadata only)

Operation ID: ohn41_listResources

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
resource_typequerystringno
logical_idquerystringno
cursorquerystringno

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/resourcesCreate or update a resource (W002); invalid input is quarantined (W003)

Operation ID: ohn41_writeResource

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
201Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/fhir/resources/{id}/historyVersion history metadata, no bodies

Operation ID: ohn41_resourceHistory

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
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

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
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

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
201Committed; one result per entry, in entry order
application/json: TransactionCommitted
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Rolled back (outcome rolled_back) or request validation failed (error domain_validation_failed); nothing was stored
application/json: TransactionRolledBack | Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
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

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Current version with freshness and an audit receipt
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/resources/compareDiff two versions

Operation ID: ohn41_compareVersions

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error

Quarantine

GET/api/ohn/v1/fhir/outcomesQuarantine records

Operation ID: ohn41_listOutcomes

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
statequerystringno
resource_typequerystringno
cursorquerystringno

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/fhir/outcomes/{id}Quarantine record with history and appeals

Operation ID: ohn41_getOutcome

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/outcomes/{id}/notify-sourcequarantined -> source_notified

Operation ID: ohn41_notifySource

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/outcomes/{id}/correctSubmitter supplies a corrected body

Operation ID: ohn41_correctOutcome

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/outcomes/{id}/revalidatecorrected -> revalidated (commits) or back to quarantined

Operation ID: ohn41_revalidateOutcome

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/outcomes/{id}/discardClose a quarantine record without storing

Operation ID: ohn41_discardOutcome

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/fhir/appealsValidation failure appeals

Operation ID: ohn41_listAppeals

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
statequerystringno
cursorquerystringno

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/appealsAppeal a failed rule (F003)

Operation ID: ohn41_createAppeal

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
201Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
POST/api/ohn/v1/fhir/appeals/{id}/decideAssigned reviewer upholds or overturns

Operation ID: ohn41_decideAppeal

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error

Reports

GET/api/ohn/v1/fhir/reports/{reportId}Run OHN-41-R001..R003

Operation ID: ohn41_runReport

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
reportIdpath"OHN-41-R001" | "OHN-41-R002" | "OHN-41-R003"yes
jurisdictionquerystring (uuid)no
countryquerystring (uuid)no
sourcequerystring (uuid)no
fromquerystring (date-time)no
toquerystring (date-time)no
packagequerystringno
resource_typequerystringno
review_statequerystringno
cursorquerystringno

Responses

CodeDescriptionMedia type
200Success
application/json: Document
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
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

NameInTypeRequiredDescription
reportIdpath"OHN-41-R001" | "OHN-41-R002" | "OHN-41-R003"yes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
201Success
application/json: CommandResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
409Stale version, invalid transition, conflict or reused idempotency key
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error
GET/api/ohn/v1/fhir/exports/{token}Download an export (audited)

Operation ID: ohn41_downloadExport

Authentication: bearerAuth

Parameters

NameInTypeRequiredDescription
tokenpathstringyes

Responses

CodeDescriptionMedia type
200Success
text/csv: string
application/pdf: string (binary)
401Unauthenticated
application/json: Error
403Denied by policy (audited)
application/json: Error
404Not found or not disclosed
application/json: Error
422Validation failure, domain refusal or quarantined resource
application/json: Error
429Rate limited; see Retry-After
application/json: Error
503Jurisdiction service or another dependency unavailable; nothing changed
application/json: Error

Schemas

Error

NameTypeRequiredDescription
errorstringyes
messagestringno
detailsanyno

Document

JSON document; shapes are listed in modules/OHN-41/data/schema.md

object

Receipt

NameTypeRequiredDescription
receipt_idstring (uuid)yes
committed_atstring (date-time)yes
aggregate_idstring (uuid)yes
aggregate_typestringyes
versionintegeryes
status"committed" | "denied" | "pending"yes

CommandResult

NameTypeRequiredDescription
receiptReceiptno
delivery"committed" | "pending_downstream_confirmation"no

CapabilityStatement

NameTypeRequiredDescription
resourceType"CapabilityStatement"yes
status"active"yes
kind"instance"yes
fhirVersion"4.0.1"yes
implementationGuidearray of stringno
restarray of objectyes

Versioned

NameTypeRequiredDescription
expected_versionintegeryes

Reasoned

NameTypeRequiredDescription
expected_versionintegeryes
reasonstringyes

Approve

NameTypeRequiredDescription
expected_versionintegeryes
acknowledge_breaking_changesbooleanno

Rules

NameTypeRequiredDescription
requiredarray of stringno
fixedarray of Rules.fixed.itemno
bindingsarray of Rules.bindings.itemno

ReleaseCreate

OHN-41-F001 FHIR profile release

NameTypeRequiredDescription
profile_canonicalstring (uri)yeshttp(s)://<base>/StructureDefinition/<name>
package_idstringyes
package_versionstringyes
resource_type"Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location"yes
country_scopestringyes
release_evidencestring (uuid)yes
rulesRulesyes
dependenciesarray of ReleaseCreate.dependencies.itemno

Pin

NameTypeRequiredDescription
release_idstring (uuid)yes
reasonstringyes

Partition

NameTypeRequiredDescription
namestringyes
resource_typesarray of "Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location"yes
retention_daysintegeryes

ResourceWrite

NameTypeRequiredDescription
resource_type"Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location"yes
logical_idstringyes
resourceobjectyesFHIR R4 JSON resource
patient_refstring (uuid)noRequired for patient-linked types
expected_version_idintegernoOmit to create; current version id to update

ProfilePack

NameTypeRequiredDescription
api_version"1.1.0"yes
refstringyes
idstringyespackage_id|version
namestringyes
versionstringyes
profilesarray of ProfilePack.profiles.itemyes

Transaction

NameTypeRequiredDescription
transaction_idstringyes
patient_refstring (uuid)noRequired when any entry is patient-linked
entriesarray of Transaction.entries.itemyes

TransactionCommitted

NameTypeRequiredDescription
api_version"1.1.0"yes
outcome"committed"yes
transaction_idstringyes
resultsarray of TransactionCommitted.results.itemyes
receiptReceiptyes

TransactionRolledBack

NameTypeRequiredDescription
api_version"1.1.0"yes
outcome"rolled_back"yes
transaction_idstringyes
failed_indexintegeryes
reasonstringyesA 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
issuesarray of objectyes
entries_committed0yes
receiptReceiptyes

ReadCurrent

NameTypeRequiredDescription
resource_type"Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location"yes
logical_idstringyes
jurisdiction_idstring (uuid)yes
access_purposestringyes

Inspect

OHN-41-F002 FHIR resource version inspection

NameTypeRequiredDescription
resource_type"Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location"yes
logical_idstringyes
jurisdiction_idstring (uuid)yes
access_purpose"repository_administration" | "conformance_review" | "treatment" | "care_coordination" | "public_health"yes
version_idstringyes

Compare

NameTypeRequiredDescription
resource_type"Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location"yes
logical_idstringyes
jurisdiction_idstring (uuid)yes
access_purpose"repository_administration" | "conformance_review" | "treatment" | "care_coordination" | "public_health"yes
from_version_idstringyes
to_version_idstringyes

Correction

NameTypeRequiredDescription
expected_versionintegeryes
resourceobjectyes

Appeal

OHN-41-F003 FHIR validation failure appeal

NameTypeRequiredDescription
resource_refstring (uuid)yesQuarantine record id
profile_refstring (uuid)yes
rule_codestringyes
source_evidencestring (uuid)yes
reviewerstring (uuid)yes

AppealDecision

NameTypeRequiredDescription
expected_versionintegeryes
decision"upheld" | "overturned"yes
reasonstringyes

Export

NameTypeRequiredDescription
format"csv" | "pdf"yes
filtersobjectno

SyntheticToken

NameTypeRequiredDescription
principal_idstring (uuid)yes
role"fhir_administrator" | "conformance_reviewer" | "fhir_source_system" | "unauthorized_viewer"yes
jurisdictionstring (uuid)yes
organization_idstring (uuid)yes
purpose"repository_administration" | "conformance_review" | "treatment" | "care_coordination" | "public_health"yes

SyntheticSetup

NameTypeRequiredDescription
deny_patientsarray of string (uuid)no
unlicensed_systemsarray of string (uri)no
inactive_jurisdictionsarray of string (uuid)no
downarray of "OHN-01" | "OHN-16" | "OHN-23" | "OHN-18"no
resetbooleanno

Rules.fixed.item defined inline

NameTypeRequiredDescription
pathstringyes
valuesarray of stringyes

Rules.bindings.item defined inline

NameTypeRequiredDescription
pathstringyes
systemstring (uri)yes

ReleaseCreate.dependencies.item defined inline

NameTypeRequiredDescription
package_idstringyes
versionstringyes

ProfilePack.profiles.item defined inline

NameTypeRequiredDescription
resource_typestringyes
canonicalstring (uri)yes
requiredarray of stringyes
release_idstring (uuid)yes

Transaction.entries.item defined inline

NameTypeRequiredDescription
full_urlstringyes
method"POST" | "PUT"yes
resource_type"Patient" | "Observation" | "Condition" | "AllergyIntolerance" | "MedicationStatement" | "Immunization" | "Encounter" | "DiagnosticReport" | "Organization" | "Practitioner" | "Location"yes
logical_idstringnoPUT only; POST ids are assigned by the server
resourceobjectyes

TransactionCommitted.results.item defined inline

NameTypeRequiredDescription
full_urlstringyes
status"201 Created" | "200 OK"yes
locationstringyes
resource_typestringyes
logical_idstringyes
version_idstringyes
etagstringyes
last_modifiedstring (date-time)yes
provenance_refstring | nullno