OHN-34 Data Quality and Stewardship API
- Version
- 1.0.1
- OpenAPI
- 3.1.0
- Source dans le dépôt
modules/OHN-34/api/openapi.yaml- Serveurs
https://opeshealthnetwork.com- Authentification
bearer: http bearer (JWT)
Les contrats sont rédigés en anglais.
Accountable human workflows for incomplete, contradictory, disputed and low-quality registry or clinical data. Every protected call needs a bearer token (a gateway-issued ES256 token: issuer ohn-platform-gateway, audience ohn-34; the purpose and organization_id are claims), a permitted purpose, the local default-deny role matrix and an OHN-16 policy permit. Every POST needs an Idempotency-Key (same key + same body replays the original response with `Idempotent-Replay: true`; same key + other body is 409). Tenancy (jurisdiction, organisation) always comes from the token, never from the request body.
Opérations
- rules (5)
- evaluations (6)
- cases (6)
- reports (5)
- Autres opérations (1)
rules
W003 quality rule deployment and F001
GET/api/ohn/v1/stewardship/vocabulariesControlled lists, workflow state machines and effective policy
GET/api/ohn/v1/stewardship/rulesList quality rules
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
status | query | RuleState | non | |
entity_type | query | EntityType | non | |
in_force | query | "true" | non | |
page | query | integer | non | |
page_size | query | integer | non |
Réponses
POST/api/ohn/v1/stewardship/rulesOHN-34-F001 Data quality rule configuration (creates a draft)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:QualityRuleCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Draft created | application/json: QualityRuleView |
403 | Denied by role | application/json: Error |
409 | Stale version | application/json: Error |
422 | Domain validation failed | application/json: Error |
GET/api/ohn/v1/stewardship/rules/{id}
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string (uuid) | oui |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Rule with history | — |
404 | Not found or non-disclosing refusal | application/json: Error |
POST/api/ohn/v1/stewardship/rules/{id}/transitionsW003 draft → sample_benchmarked → reviewed → approved → active
sample_benchmarked (data_steward, needs `sample`), reviewed (clinical_reviewer, not the author), approved (data_steward, not the author; a `quarantine` rule also needs OHN34_MAX_QUARANTINE_FAILURE_RATE configured and a benchmark failure rate at or below it), active (data_steward; retires the earlier active version of the same rule key).
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:RuleTransitionCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Transitioned | application/json: QualityRuleView |
403 | Denied by role | application/json: Error |
409 | Stale version | application/json: Error |
422 | Domain validation failed | application/json: Error |
503 | Dependency unavailable or not configured; nothing accepted or fabricated | application/json: Error |
evaluations
W001 data quality evaluation
GET/api/ohn/v1/stewardship/evaluations
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
page | query | integer | non | |
page_size | query | integer | non |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Page of evaluations | — |
POST/api/ohn/v1/stewardship/evaluationsW001 submit a record for evaluation (contract ohn34.record-evaluation v1.0.0; field values are never stored)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:EvaluationCommand
Réponses
GET/api/ohn/v1/stewardship/evaluations/{id}
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string (uuid) | oui |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Evaluation with history | — |
404 | Not found or non-disclosing refusal | application/json: Error |
GET/api/ohn/v1/stewardship/records/{recordRef}/dispositionWhether a record is held (quarantined) and how many open issues it has; record owners must honour it
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
recordRef | path | string (uuid) | oui |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Disposition | — |
404 | Not found or non-disclosing refusal | application/json: Error |
GET/api/ohn/v1/stewardship/issues
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
status | query | "open" | "resolved" | non | |
severity | query | Severity | non | |
without_case | query | "true" | non | |
page | query | integer | non | |
page_size | query | integer | non |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Page of issues | — |
GET/api/ohn/v1/stewardship/issues/{id}
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string (uuid) | oui |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Issue | — |
404 | Not found or non-disclosing refusal | application/json: Error |
cases
W002 stewardship case
GET/api/ohn/v1/stewardship/casesOHN-34-API-001 list stewardship cases (queues)
Identifiant d’opération: ohn-34_get_api-ohn-v1-stewardship-cases
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
status | query | CaseState | non | |
priority | query | Severity | non | |
open | query | "true" | non | |
overdue | query | "true" | non | |
assigned_to_me | query | "true" | non | |
awaiting_my_verification | query | "true" | non | |
page | query | integer | non | |
page_size | query | integer | non |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Page of cases | application/json: Page |
401 | Missing or invalid token | application/json: Error |
403 | Denied by role | application/json: Error |
422 | Domain validation failed | application/json: Error |
429 | Rate limited (Retry-After) | application/json: Error |
503 | Dependency unavailable or not configured; nothing accepted or fabricated | application/json: Error |
POST/api/ohn/v1/stewardship/casesOHN-34-F002 Stewardship case assignment (opens the case if needed; reassigns while `assigned`)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:CaseAssignmentCommand
Réponses
GET/api/ohn/v1/stewardship/cases/{id}Case with issue, rule, quarantine, remediation receipts, acknowledgements and history
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string (uuid) | oui |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Case detail | — |
404 | Not found or non-disclosing refusal | application/json: Error |
POST/api/ohn/v1/stewardship/cases/{id}/transitionsW002 investigated (assignee) → verified (named clinical reviewer; approved or rejected → back to investigated) → closed (data steward)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:CaseTransitionCommand
Réponses
POST/api/ohn/v1/stewardship/cases/{id}/resolveOHN-34-API-002 / F003 Quality resolution approval request (investigated → source_corrected)
Only the assignee; the named clinical approver must be someone else. OHN-34 never overwrites the source record.
Identifiant d’opération: ohn-34_post_api-ohn-v1-stewardship-cases-id-resolve
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:ResolutionCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Resolution recorded | application/json: CaseView |
400 | Malformed request or missing Idempotency-Key | application/json: Error |
401 | Missing or invalid token | application/json: Error |
403 | Denied by role | application/json: Error |
404 | Not found or non-disclosing refusal | application/json: Error |
409 | Stale version | application/json: Error |
422 | Domain validation failed | application/json: Error |
429 | Rate limited (Retry-After) | application/json: Error |
503 | Dependency unavailable or not configured; nothing accepted or fabricated | application/json: Error |
POST/api/ohn/v1/stewardship/cases/{id}/acknowledgementsA named affected consumer (OHN-03, OHN-08) acknowledges a closed case's outcome
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:post-api-ohn-v1-stewardship-cases-id-acknowledgements.request
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Already acknowledged | — |
201 | Acknowledged | — |
409 | Stale version | application/json: Error |
reports
R001-R003
GET/api/ohn/v1/stewardship/metricsOHN-34-API-003 governance metrics (counts only, no record references)
Identifiant d’opération: ohn-34_get_api-ohn-v1-stewardship-metrics
Authentification: bearer
Réponses
GET/api/ohn/v1/stewardship/signoffsSign-off history (rule reviews/approvals/activations; case resolutions, verifications, rejections, closures)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
page | query | integer | non | |
page_size | query | integer | non |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Page of sign-offs | — |
GET/api/ohn/v1/stewardship/reports/{reportId}Run R001 (filters facility, from, to), R002 (severity, source, min_age_days) or R003 (source, from, to)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
reportId | path | "OHN-34-R001" | "OHN-34-R002" | "OHN-34-R003" | oui | |
facility | query | string (uuid) | non | R001 only |
from | query | string | non | R001 and R003: ISO date or date-time |
to | query | string | non | R001 and R003: ISO date or date-time, exclusive |
severity | query | Severity | non | R002 only |
source | query | string (uuid) | non | R002 and R003 |
min_age_days | query | integer | non | R002 only: whole days 0 to 3650 |
Réponses
POST/api/ohn/v1/stewardship/reports/{reportId}/exportAudited CSV/PDF export signed with HMAC-SHA256 (503 not_configured without an export signing key of 32 or more characters); link valid 15 minutes
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
reportId | path | "OHN-34-R001" | "OHN-34-R002" | "OHN-34-R003" | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:post-api-ohn-v1-stewardship-reports-reportid-export.request
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Export receipt with download_path | — |
503 | Dependency unavailable or not configured; nothing accepted or fabricated | application/json: Error |
GET/api/ohn/v1/stewardship/exports/{id}/downloadDownload an export; only its creator, in the same jurisdiction, before expiry (410 after)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string (uuid) | oui |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | File | — |
404 | Not found or non-disclosing refusal | application/json: Error |
410 | Expired | — |
Autres opérations
Schémas
Error
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
error | string | oui | |
message | string | non | |
fields | object | non | |
current_state | string | non | |
current_version | integer | non | |
dependency | string | non | |
next_state | string | null | non | invalid_transition: the only state the aggregate can move to |
failure_rate | number | null | non | benchmark_failure_rate_too_high |
limit | number | non | benchmark_failure_rate_too_high: the configured maximum |
case_id | string (uuid) | non | case_in_progress |
details | object | non | A 422 from the strict body reader: the first failing check per top-level field as a zod issue code (invalid_type, too_small, too_big, invalid_string, invalid_enum_value, invalid_union), unknown keys under _ as unrecognized_keys; a failing report filter or query value under its name as its message. |
type | string | non | Platform problem+json (RFC 9457) fields next to the reference ones |
title | string | non | |
status | integer | non | |
detail | string | non | |
trace_id | string | non |
Health
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
status | "ok" | "unavailable" | non | |
module | "OHN-34" | non | |
version | string | non | |
synthetic_gateways | boolean | non | true only when the synthetic OHN-16 and OHN-23 doubles are switched on (never in production) |
dependencies | object | non | OHN-16 and OHN-23: synthetic, unconfigured or live; OHN-03 and OHN-08: inbound-contract; OHN-18: local-audit |
Page
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
items | array of any | oui | |
total | integer | oui | |
page | integer | oui | |
page_size | integer | oui | |
provenance | Provenance | non |
Provenance
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
source | string | non | |
source_version | string | non | |
generated_at | string (date-time) | non | |
dependency_adapters | object | non |
Receipt
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
receipt_id | string (uuid) | non | |
committed_at | string (date-time) | non | |
aggregate_id | string | non | |
aggregate_type | string | non | |
version | integer | non | |
status | "committed" | non | |
event_delivery | "pending" | "not_applicable" | non | |
event_id | string | null | non |
EntityType
"patient_identity" | "clinical_statement" | "facility" | "health_worker"
Severity
"low" | "moderate" | "high" | "critical"
FailureAction
"flag" | "open_case" | "quarantine"
RuleState
"draft" | "sample_benchmarked" | "reviewed" | "approved" | "active"
CaseState
"issue_detected" | "assigned" | "investigated" | "source_corrected" | "verified" | "closed"
QualityRuleCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
entity_type | EntityType | oui | |
field_or_rule | string | oui | A field name, or JSON {"kind":"required|one_of|not_future|code_valid","field":...} |
severity | Severity | oui | |
jurisdiction_id | string (uuid) | oui | Must equal the token jurisdiction (403 otherwise) |
rule_version | string | oui | |
action_on_failure | FailureAction | oui |
QualityRuleView
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | non | |
rule_key | string | non | |
definition | object | non | |
status | RuleState | non | |
next_state | string | null | non | |
benchmark | QualityRuleView.benchmark | non | |
in_force | boolean | non | |
version | integer | non | |
receipt | Receipt | non |
RuleTransitionCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
expected_version | integer | oui | |
to_state | RuleState | oui | |
reason | string | non | |
sample | array of object | non |
EvaluationCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
entity_type | EntityType | oui | |
record_ref | string (uuid) | oui | |
source_system_id | string (uuid) | oui | |
facility_id | string (uuid) | non | |
fields | object | oui |
CaseAssignmentCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
issue_ref | string (uuid) | oui | |
assignee_id | string (uuid) | oui | |
priority | Severity | oui | |
resolution_due_at | string (date-time) | oui | Must be in the future |
resolution_plan | string | oui |
CaseTransitionCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
expected_version | integer | oui | |
to_state | "investigated" | "verified" | "closed" | oui | |
findings | string | non | |
decision | "approved" | "rejected" | non | |
reason | string | non | |
affected_consumers | array of "OHN-03" | "OHN-08" | non |
ResolutionCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
case_id | string (uuid) | oui | |
source_evidence_ref | string (uuid) | oui | |
proposed_resolution | string | oui | |
clinical_approver | string (uuid) | oui | |
decision | "corrected_at_source" | "disputed" | "no_change_required" | oui | |
expected_version | integer | oui |
CaseView
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | non | |
status | CaseState | non | |
next_state | string | null | non | |
assignee_id | string | null | non | |
priority | string | null | non | |
resolution_due_at | string | null (date-time) | non | |
overdue | boolean | non | |
decision | string | null | non | |
clinical_approver | string | null | non | |
rejections | integer | non | |
affected_consumers | array of string | non | |
version | integer | non | |
receipt | Receipt | non |
post-api-ohn-v1-stewardship-cases-id-acknowledgements.request défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
consumer | "OHN-03" | "OHN-08" | oui |
post-api-ohn-v1-stewardship-reports-reportid-export.request défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
format | "csv" | "pdf" | oui | |
filters | object | non | Only the filters of the report; any other key is 422 |
QualityRuleView.benchmark défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
sample_size | integer | non | |
failed | integer | non | |
failure_rate | number | non |