Aller au contenu

← Tous les contrats

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)

Télécharger le contrat (YAML)

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

W003 quality rule deployment and F001

GET/api/ohn/v1/stewardship/vocabulariesControlled lists, workflow state machines and effective policy

Authentification: bearer

Réponses

CodeDescriptionType de média
200Vocabularies—
401Missing or invalid token
application/json: Error
403Denied by role
application/json: Error
GET/api/ohn/v1/stewardship/rulesList quality rules

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
statusqueryRuleStatenon
entity_typequeryEntityTypenon
in_forcequery"true"non
pagequeryintegernon
page_sizequeryintegernon

Réponses

CodeDescriptionType de média
200Page of rules
application/json: Page
422Domain validation failed
application/json: Error
POST/api/ohn/v1/stewardship/rulesOHN-34-F001 Data quality rule configuration (creates a draft)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Draft created
application/json: QualityRuleView
403Denied by role
application/json: Error
409Stale version
application/json: Error
422Domain validation failed
application/json: Error
GET/api/ohn/v1/stewardship/rules/{id}

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Rule with history—
404Not 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

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Transitioned
application/json: QualityRuleView
403Denied by role
application/json: Error
409Stale version
application/json: Error
422Domain validation failed
application/json: Error
503Dependency 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

NomEmplacementTypeObligatoireDescription
pagequeryintegernon
page_sizequeryintegernon

Réponses

CodeDescriptionType de média
200Page 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

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Evaluated; disposition accepted—
422Domain validation failed
application/json: Error
503Dependency unavailable or not configured; nothing accepted or fabricated
application/json: Error
GET/api/ohn/v1/stewardship/evaluations/{id}

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Evaluation with history—
404Not 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

NomEmplacementTypeObligatoireDescription
recordRefpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Disposition—
404Not found or non-disclosing refusal
application/json: Error
GET/api/ohn/v1/stewardship/issues

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
statusquery"open" | "resolved"non
severityquerySeveritynon
without_casequery"true"non
pagequeryintegernon
page_sizequeryintegernon

Réponses

CodeDescriptionType de média
200Page of issues—
GET/api/ohn/v1/stewardship/issues/{id}

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Issue—
404Not 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

NomEmplacementTypeObligatoireDescription
statusqueryCaseStatenon
priorityquerySeveritynon
openquery"true"non
overduequery"true"non
assigned_to_mequery"true"non
awaiting_my_verificationquery"true"non
pagequeryintegernon
page_sizequeryintegernon

Réponses

CodeDescriptionType de média
200Page of cases
application/json: Page
401Missing or invalid token
application/json: Error
403Denied by role
application/json: Error
422Domain validation failed
application/json: Error
429Rate limited (Retry-After)
application/json: Error
503Dependency 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

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Assigned
application/json: CaseView
201Case opened and assigned—
404Not found or non-disclosing refusal
application/json: Error
409Stale version
application/json: Error
422Domain validation failed
application/json: Error
GET/api/ohn/v1/stewardship/cases/{id}Case with issue, rule, quarantine, remediation receipts, acknowledgements and history

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Case detail—
404Not 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

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Transitioned—
403Denied by role
application/json: Error
409Stale version
application/json: Error
422Domain validation failed
application/json: Error
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

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Resolution recorded
application/json: CaseView
400Malformed request or missing Idempotency-Key
application/json: Error
401Missing or invalid token
application/json: Error
403Denied by role
application/json: Error
404Not found or non-disclosing refusal
application/json: Error
409Stale version
application/json: Error
422Domain validation failed
application/json: Error
429Rate limited (Retry-After)
application/json: Error
503Dependency 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

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Already acknowledged—
201Acknowledged—
409Stale 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

CodeDescriptionType de média
200Metrics—
401Missing or invalid token
application/json: Error
403Denied by role
application/json: Error
503Dependency unavailable or not configured; nothing accepted or fabricated
application/json: Error
GET/api/ohn/v1/stewardship/signoffsSign-off history (rule reviews/approvals/activations; case resolutions, verifications, rejections, closures)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
pagequeryintegernon
page_sizequeryintegernon

Réponses

CodeDescriptionType de média
200Page 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

NomEmplacementTypeObligatoireDescription
reportIdpath"OHN-34-R001" | "OHN-34-R002" | "OHN-34-R003"oui
facilityquerystring (uuid)nonR001 only
fromquerystringnonR001 and R003: ISO date or date-time
toquerystringnonR001 and R003: ISO date or date-time, exclusive
severityquerySeveritynonR002 only
sourcequerystring (uuid)nonR002 and R003
min_age_daysqueryintegernonR002 only: whole days 0 to 3650

Réponses

CodeDescriptionType de média
200Tabular report with definition—
404Not found or non-disclosing refusal
application/json: Error
422Domain validation failed
application/json: Error
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

NomEmplacementTypeObligatoireDescription
reportIdpath"OHN-34-R001" | "OHN-34-R002" | "OHN-34-R003"oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Export receipt with download_path—
503Dependency 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

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200File—
404Not found or non-disclosing refusal
application/json: Error
410Expired—

Autres opérations

GET/health/ohn-34Module health (database reachable, dependency adapter modes)

Réponses

CodeDescriptionType de média
200Healthy
application/json: Health
503Database unreachable
application/json: Health

Schémas

Error

NomTypeObligatoireDescription
errorstringoui
messagestringnon
fieldsobjectnon
current_statestringnon
current_versionintegernon
dependencystringnon
next_statestring | nullnoninvalid_transition: the only state the aggregate can move to
failure_ratenumber | nullnonbenchmark_failure_rate_too_high
limitnumbernonbenchmark_failure_rate_too_high: the configured maximum
case_idstring (uuid)noncase_in_progress
detailsobjectnonA 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.
typestringnonPlatform problem+json (RFC 9457) fields next to the reference ones
titlestringnon
statusintegernon
detailstringnon
trace_idstringnon

Health

NomTypeObligatoireDescription
status"ok" | "unavailable"non
module"OHN-34"non
versionstringnon
synthetic_gatewaysbooleannontrue only when the synthetic OHN-16 and OHN-23 doubles are switched on (never in production)
dependenciesobjectnonOHN-16 and OHN-23: synthetic, unconfigured or live; OHN-03 and OHN-08: inbound-contract; OHN-18: local-audit

Page

NomTypeObligatoireDescription
itemsarray of anyoui
totalintegeroui
pageintegeroui
page_sizeintegeroui
provenanceProvenancenon

Provenance

NomTypeObligatoireDescription
sourcestringnon
source_versionstringnon
generated_atstring (date-time)non
dependency_adaptersobjectnon

Receipt

NomTypeObligatoireDescription
receipt_idstring (uuid)non
committed_atstring (date-time)non
aggregate_idstringnon
aggregate_typestringnon
versionintegernon
status"committed"non
event_delivery"pending" | "not_applicable"non
event_idstring | nullnon

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

NomTypeObligatoireDescription
entity_typeEntityTypeoui
field_or_rulestringouiA field name, or JSON {"kind":"required|one_of|not_future|code_valid","field":...}
severitySeverityoui
jurisdiction_idstring (uuid)ouiMust equal the token jurisdiction (403 otherwise)
rule_versionstringoui
action_on_failureFailureActionoui

QualityRuleView

NomTypeObligatoireDescription
idstring (uuid)non
rule_keystringnon
definitionobjectnon
statusRuleStatenon
next_statestring | nullnon
benchmarkQualityRuleView.benchmarknon
in_forcebooleannon
versionintegernon
receiptReceiptnon

RuleTransitionCommand

NomTypeObligatoireDescription
expected_versionintegeroui
to_stateRuleStateoui
reasonstringnon
samplearray of objectnon

EvaluationCommand

NomTypeObligatoireDescription
entity_typeEntityTypeoui
record_refstring (uuid)oui
source_system_idstring (uuid)oui
facility_idstring (uuid)non
fieldsobjectoui

CaseAssignmentCommand

NomTypeObligatoireDescription
issue_refstring (uuid)oui
assignee_idstring (uuid)oui
prioritySeverityoui
resolution_due_atstring (date-time)ouiMust be in the future
resolution_planstringoui

CaseTransitionCommand

NomTypeObligatoireDescription
expected_versionintegeroui
to_state"investigated" | "verified" | "closed"oui
findingsstringnon
decision"approved" | "rejected"non
reasonstringnon
affected_consumersarray of "OHN-03" | "OHN-08"non

ResolutionCommand

NomTypeObligatoireDescription
case_idstring (uuid)oui
source_evidence_refstring (uuid)oui
proposed_resolutionstringoui
clinical_approverstring (uuid)oui
decision"corrected_at_source" | "disputed" | "no_change_required"oui
expected_versionintegeroui

CaseView

NomTypeObligatoireDescription
idstring (uuid)non
statusCaseStatenon
next_statestring | nullnon
assignee_idstring | nullnon
prioritystring | nullnon
resolution_due_atstring | null (date-time)non
overduebooleannon
decisionstring | nullnon
clinical_approverstring | nullnon
rejectionsintegernon
affected_consumersarray of stringnon
versionintegernon
receiptReceiptnon

post-api-ohn-v1-stewardship-cases-id-acknowledgements.request défini sur place

NomTypeObligatoireDescription
consumer"OHN-03" | "OHN-08"oui

post-api-ohn-v1-stewardship-reports-reportid-export.request défini sur place

NomTypeObligatoireDescription
format"csv" | "pdf"oui
filtersobjectnonOnly the filters of the report; any other key is 422

QualityRuleView.benchmark défini sur place

NomTypeObligatoireDescription
sample_sizeintegernon
failedintegernon
failure_ratenumbernon