Aller au contenu

← Tous les contrats

OHN-22 Legacy Healthcare Integration

Version
1.0.0
OpenAPI
3.1.0
Source dans le dépôt
modules/OHN-22/api/openapi.json
Serveurs
https://opeshealthnetwork.com/api/ohn/v1
Authentification
bearer: http bearer

Télécharger le contrat (JSON)

Les contrats sont rédigés en anglais.

Base path /api/ohn/v1. Every POST requires Idempotency-Key; mutations use expected_version. Routes default-deny on role AND purpose (legacy_integration). Request bodies are limited to 256 KB. Dependencies (OHN-23 terminology, OHN-21 contract, OHN-03 identity) are called over their contracts and fail closed with 503 dependency_unavailable. The TypeScript-only synthetic sign-in (POST /legacy/synthetic-token) is not part of this contract; tokens come from the platform gateway (purpose legacy_integration).

Opérations

OHN-22

GET/legacy/adaptersAdapter catalog

Identifiant d’opération: listAdapters

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
standardquerystringnon
qquerystringnoncase-insensitive name contains
cursorquerystringnon

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/adaptersRegister adapter (API-001; F001)

Identifiant d’opération: registerAdapter

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/legacy/adapters/{id}Adapter with mappings

Identifiant d’opération: getAdapter

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/adapters/{id}/mappingsDraft a mapping version with rules (F002)

Identifiant d’opération: createMapping

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/legacy/mappings/{id}Mapping with rules and history

Identifiant d’opération: getMapping

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/mappings/{id}/rulesAdd a rule to a draft mapping

Identifiant d’opération: addRule

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/mappings/{id}/samplesDry-run a sample message; passing advances draft to sampled

Identifiant d’opération: sampleMapping

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/mappings/{id}/transitionsMapping release transition (W002)

Identifiant d’opération: transitionMapping

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/legacy/messagesMessages / dead-letter queue (status, dlq_state, adapter_id)

Identifiant d’opération: listMessages

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
statusquerystringnon
dlq_statequerystringnon
adapter_idquerystring (uuid)non
cursorquerystringnon

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/messagesIngest a legacy message (API-002; W001). 201 for a new message (published, quarantined or rejected); a duplicate redelivery returns 200 with duplicate=true; same id with other content is 409 message_id_conflict

Identifiant d’opération: ingestMessage

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Duplicate redelivery of the same external_message_id and content: no second result, the attempt is recorded (duplicate=true)
application/json: object
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/legacy/messages/{id}Message with attempts, errors, history (API-003)

Identifiant d’opération: getMessage

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/messages/{id}/triageTriage a failed message

Identifiant d’opération: triage

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/messages/{id}/correctAttach a corrected payload (clinical_mapper only; original retained)

Identifiant d’opération: correct

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/messages/{id}/retryReplay a failed message (F003; never re-publishes a published one)

Identifiant d’opération: retry

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/legacy/unit-conversionsUnit conversions

Identifiant d’opération: listUnits

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
statequery"proposed" | "approved" | "rejected"non

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/unit-conversionsPropose a unit conversion

Identifiant d’opération: proposeUnit

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/unit-conversions/{id}/decisionApprove/reject a unit conversion (proposer cannot decide)

Identifiant d’opération: decideUnit

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/legacy/code-lists/{list}Read code list

Identifiant d’opération: listCodes

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
listpath"message_standard" | "transport"oui

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/code-lists/{list}Upsert code list entries

Identifiant d’opération: upsertCodes

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
listpath"message_standard" | "transport"oui
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/maintenance/drain-outboxDrain outbox (no sink => nothing marked delivered)

Identifiant d’opération: drainOutbox

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/legacy/report-catalogReport catalog

Identifiant d’opération: reportCatalog

Authentification: bearer

Réponses

CodeDescriptionType de média
200OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/legacy/reports/{reportId}Run report

Identifiant d’opération: runReport

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
adapterquerystring (uuid)non
partnerquerystring (uuid)non
standardquerystringnon
reasonquerystringnon
statusquerystringnon
period_fromquerystringnon
period_toquerystringnon
cursorquerystringnon
reportIdpath"OHN-22-R001" | "OHN-22-R002" | "OHN-22-R003"oui

Réponses

CodeDescriptionType de média
200OK
application/json: Report
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
POST/legacy/reports/{reportId}/exportCreate signed single-use export

Identifiant d’opération: createExport

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpath"OHN-22-R001" | "OHN-22-R002" | "OHN-22-R003"oui
Idempotency-Keyheaderstringoui8 to 128 characters of A-Z a-z 0-9 _ . : -. A 5xx answer releases the key; a replay answers with Idempotent-Replay: true.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: object
400Malformed / missing Idempotency-Key—
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
409Version conflict, illegal transition, already published or idempotency mismatch
application/json: Error
413Request body larger than 256 KB (payload_too_large)—
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—
GET/legacy/exports/{token}Download export (the requesting principal only, single use, 5 minutes). Any other caller or token is 404

Identifiant d’opération: fetchExport

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
tokenpathstringoui

Réponses

CodeDescriptionType de média
200The export file (CSV or PDF), once
text/csv: string
application/pdf: string (binary)
401Unauthenticated—
403Role/purpose denied (default deny) or separation of duties—
404Not found / out of scope—
410export_expired (after 5 minutes) or export_consumed (already downloaded)
application/json: Error
422Validation or domain refusal
application/json: Error
429Rate limited—
503Dependency unavailable (fails closed)—

Autres opérations

GET/health/ohn-22Liveness incl. database ping and dependency modes (public; served at the root, not under /api/ohn/v1)

Identifiant d’opération: health

Réponses

CodeDescriptionType de média
200ok
503unavailable—

Schémas

Error

NomTypeObligatoireDescription
errorstringoui
messagestringnon
detailsanynonValidation: {field: issue code} (invalid_type, too_small, too_big, invalid_string, invalid_enum_value, unrecognized_keys under "_"), or a domain object

Adapter

NomTypeObligatoireDescription
adapter_namestringoui
message_standardstringouiMust exist in the jurisdiction message_standard code list
source_orgstring (uuid)oui
target_servicestring (uuid)oui
transportstringouiMust exist in the jurisdiction transport code list

Rule

NomTypeObligatoireDescription
source_fieldstringouiHL7 v2 address, e.g. PID-5.1 or OBX[2]-5
target_fhir_pathstringouiA path of the canonical FHIR contract, e.g. Patient.identifier; checked against OHN-21 at sign-off
transform_expressionstringouiOne of: copy, trim, upper, lower, hl7_date, number, code, unit(FROM,TO). Not executable code.
terminology_refstring (uuid)oui
fallback_action"reject" | "quarantine" | "omit"oui
mandatorybooleannonA mandatory rule may not use fallback omit

MappingCreate

NomTypeObligatoireDescription
version_labelstringoui
rulesarray of Ruleoui

AddRule

NomTypeObligatoireDescription
ruleRuleoui
expected_versionintegeroui

Sample

NomTypeObligatoireDescription
sample_messagestringoui

MappingTransition

NomTypeObligatoireDescription
to_state"draft" | "clinical_review" | "contract_verified" | "active"oui
expected_versionintegeroui
reasonstringoui

Message

NomTypeObligatoireDescription
adapter_idstring (uuid)oui
external_message_idstringoui
payloadstringouiHL7 v2 text. The service accepts request bodies up to 256 KB (413 payload_too_large above that), so the effective limit is lower than maxLength.

Triage

NomTypeObligatoireDescription
investigated_reasonstringoui
expected_versionintegeroui

Correct

NomTypeObligatoireDescription
corrected_payloadstringoui
reasonstringoui
expected_versionintegeroui

Retry

NomTypeObligatoireDescription
investigated_reasonstringoui
validated_mapping_versionstringouiLabel of the adapter active mapping; any other label is refused (409 mapping_version_mismatch)
operator_refstring (uuid)ouiMust equal the authenticated operator
expected_versionintegeroui

UnitProposal

NomTypeObligatoireDescription
from_unitstringoui
to_unitstringouiMust differ from from_unit
factor_numeratorstringouiPositive decimal
factor_denominatorstringouiPositive decimal
reference_notestringoui

UnitDecision

NomTypeObligatoireDescription
decision"approved" | "rejected"oui
reasonstringoui
expected_versionintegeroui

CodeListUpsert

NomTypeObligatoireDescription
entriesarray of CodeListUpsert.entries.itemoui

ExportCommand

NomTypeObligatoireDescription
format"csv" | "pdf"oui
filtersReportFiltersnon

Report

NomTypeObligatoireDescription
report_id"OHN-22-R001" | "OHN-22-R002" | "OHN-22-R003"non
titlestringnon
columnsarray of anynon
rowsarray of anynon
summaryobjectnon
state"rendered" | "no_authorized_data"non
generated_atstring (date-time)non
next_cursorstring | nullnon

ReportFilters

NomTypeObligatoireDescription
adapterstring (uuid)non
partnerstring (uuid)nonsource_org of the adapter
standardstringnon
reasonstringnonR002 failure reason code
statusstringnonR003 outcome
period_fromstringnon
period_tostringnonNot before period_from (422 after_period_to)

Receipt

NomTypeObligatoireDescription
receipt_idstring (uuid)non
committed_atstring (date-time)non
aggregate_idstring (uuid)non
versionintegernon
status"committed" | "denied"non

get-health-ohn-22.response-200 défini sur place

NomTypeObligatoireDescription
status"ok"non
module"OHN-22"non
dependenciesget-health-ohn-22.response-200.dependenciesnon

get-health-ohn-22.response-200.dependencies défini sur place

NomTypeObligatoireDescription
ohn23"live" | "unconfigured"non
ohn21"live" | "unconfigured"non
identity"live" | "unconfigured"non

CodeListUpsert.entries.item défini sur place

NomTypeObligatoireDescription
codestringoui
label_enstringoui
label_frstringoui
activebooleannon