← Tous les contrats
OHN-55 Care Programmes and Family Health
- Version
- 1.0.1
- OpenAPI
- 3.1.0
- Source dans le dépôt
modules/OHN-55/api/openapi.yaml- Serveurs
https://opeshealthnetwork.com/api/ohn/v1/care
- Authentification
bearer: http bearer (JWT)
Télécharger le contrat (YAML)
Les contrats sont rédigés en anglais.
Decision support, chronic programmes, family links, carrier screening support and family history: 35 operations under /api/ohn/v1/care plus GET /health/ohn-55.
Request bodies and query strings are strict (unknown fields are rejected): 422 domain_validation_failed, message "One or more fields are invalid.", details = {formErrors: [...], fieldErrors: {field: [messages]}} with zod's English messages;
an issue inside a nested object or array is listed under its top-level field (the care configuration document: fieldErrors.document). Unreadable JSON is 400 malformed_request.
Every write needs Idempotency-Key (1-255 characters, not blank): 400 missing_idempotency_key; the same key and body replays the first answer (Idempotent-Replay: true), another body is 409 idempotency_conflict, a request still running is 409 request_in_progress.
Tokens are issued by the platform gateway (ES256, issuer ohn-platform-gateway, audience ohn-55) with sub, role, jurisdiction, organization_id and purpose; a role that does not fit the purpose is 403 denied_by_policy, an unknown route 404 not_found, a role not listed for a route 403 denied_by_policy (audited as denied).
Roles and purposes: clinician/care_programmes, care_governance_admin/care_governance, patient/patient_access, cds_service/decision_support. The TypeScript-only synthetic sign-in (POST /synthetic-token) is not part of this contract.
Errors are {error, message, ...extra}: not_configured (503, setting names the missing configuration), dependency_unavailable (503, dependency names the upstream, nothing was stored), consent_required (403, consents), consent_denied (403), version_conflict and invalid_transition and duplicate (409), rate_limited (429).
Events are CloudEvents in the platform outbox (care.config.activated, care.alert.raised, care.alert.decided, care.enrolment.created, care.enrolment.changed, care.family_link.changed, care.counselling.changed, care.family_history.changed); see events/events.schema.json.
Opérations
Autres opérations
GET/configActive care configuration
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
GET/config/versionsList configuration versions (care_governance_admin)
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
POST/config/versionsCreate a draft configuration
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
422 | Error | |
POST/config/versions/load-demoLoad the SYNTHETIC demo configuration as a draft (non-production only)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
404 | Error | |
POST/config/versions/{id}/activateActivate a draft (retires the current one)
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)
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
409 | Error | |
422 | Error | |
POST/cds/evaluateEvaluate the active rules for one patient (clinician
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | Result | |
503 | Error | |
GET/cds/alertsFacility alerts
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
state | query | "open" | "acknowledged" | "dismissed" | non | |
patient_id | query | string (uuid) | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
POST/cds/alerts/{id}/decisionAcknowledge or dismiss
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)
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
409 | Error | |
GET/programmes/registryRegistry for this facility (sensitive rows only for the care team)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
programme_code | query | "hypertension" | "diabetes" | "hiv" | "tb" | non | |
state | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
GET/programmes/tracingMissed-visit tracing list
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
GET/programmes/indicatorsOutcome indicators
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
POST/programmes/enrolmentsEnrol (sensitive programmes need an OHN-15 permit)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
403 | Error | |
GET/programmes/enrolments/{id}Care plan 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 | OK | application/json: object
|
404 | Error | |
POST/programmes/enrolments/{id}/visitsRecord a visit (VisitSchema)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
POST/programmes/enrolments/{id}/adherenceAdherence note (AdherenceSchema)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
POST/programmes/enrolments/{id}/tracingTracing attempt (TracingSchema)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
POST/programmes/enrolments/{id}/transitionsChange state (EnrolmentTransitionSchema)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
409 | Error | |
POST/programmes/enrolments/{id}/care-teamAdd a care-team member
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
GET/me/programmesThe patient's own enrolments
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
GET/family/linksLinks of a patient (patients see their own)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
patient_id | query | string (uuid) | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
POST/family/linksPropose a link with evidence (ProposeLinkSchema)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
409 | Error | |
POST/family/links/{id}/consentsGrant
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
404 | Error | |
GET/family/historyFamily history (own; a relative's only with their sharing consent)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
patient_id | query | string (uuid) | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
404 | Error | |
POST/family/historyAdd an entry coded via OHN-23 (FamilyHistorySchema)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
422 | Error | |
POST/family/history/{id}/retractMark entered in error (source only)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
403 | Error | |
GET/genetic/consentsLatest carrier-screening consent per partner
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
POST/genetic/consentsPatient grants or withdraws consent with a named partner (GeneticConsentSchema)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
GET/genetic/couples/{a}/{b}/riskInheritance explanation for two mutually consenting partners (lab-verified genotypes only)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
a | path | string (uuid) | oui | |
b | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | Result | |
403 | consent_required; nothing computed or fetched | — |
GET/genetic/counsellingCounselling sessions at this facility
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
POST/genetic/counsellingBook counselling (needs both consents)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
201 | OK | application/json: object
|
403 | Error | |
POST/genetic/counselling/{id}/transitionsCompleted (with summary) or cancelled
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
GET/reports/{reportId}OHN-55-R001 or R002
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
reportId | path | "OHN-55-R001" | "OHN-55-R002" | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
GET/reports/{reportId}/exportSigned CSV (X-OHN55-Signature)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
reportId | path | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | CSV | text/csv
|
GET/auditAudit records (care_governance_admin)
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
POST/admin/outbox/relayRelay pending events to OHN-24
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | application/json: object
|
GET/health/ohn-55Public liveness with the wiring of every dependency (live, unconfigured, test_fake; OHN-24 is platform_outbox)
Réponses
| Code | Description | Type de média |
|---|
200 | ok | |
503 | database unavailable | |
Schémas
Error
| Nom | Type | Obligatoire | Description |
|---|
error | string | oui | |
message | string | non | |
CodeRef
| Nom | Type | Obligatoire | Description |
|---|
system | string | oui | |
code | string | oui | |
Evaluate
| Nom | Type | Obligatoire | Description |
|---|
patient_id | string (uuid) | oui | |
proposed_medications | array of CodeRef | non | |
rule_types | array of "drug_allergy" | "overdue_vaccination" | "abnormal_result_unacknowledged" | "missed_chronic_followup" | non | |
persist | boolean | non | |
post-config-versions.request défini sur place
| Nom | Type | Obligatoire | Description |
|---|
document | object | oui | |
post-config-versions-id-activate.request défini sur place
| Nom | Type | Obligatoire | Description |
|---|
approval_ref | string | oui | |
expected_version | integer | oui | |
post-cds-alerts-id-decision.request défini sur place
| Nom | Type | Obligatoire | Description |
|---|
decision | "acknowledge" | "dismiss" | oui | |
reason | string | oui | |
expected_version | integer | oui | |
post-programmes-enrolments.request défini sur place
| Nom | Type | Obligatoire | Description |
|---|
programme_code | "hypertension" | "diabetes" | "hiv" | "tb" | oui | |
patient_id | string (uuid) | oui | |
enrolled_on | string (date) | oui | |
get-health-ohn-55.response-200 défini sur place
| Nom | Type | Obligatoire | Description |
|---|
status | "ok" | non | |
module | "OHN-55" | non | |
dependencies | object | non | |
writes_enabled | boolean | non | |
export_signing_configured | boolean | non | |
auth_configured | boolean | non | |
synthetic_auth | boolean | non | |
demo_config_loadable | boolean | non | |
get-health-ohn-55.response-503 défini sur place
| Nom | Type | Obligatoire | Description |
|---|
status | "unavailable" | non | |
module | string | non | |
dependencies | object | non | |
EvaluateResult.rules.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|
rule_id | string | non | |
status | "evaluated" | "not_evaluated" | non | |
reason | string | non | |
EvaluateResult.config défini sur place
| Nom | Type | Obligatoire | Description |
|---|
version | integer | non | |
synthetic_demo | boolean | non | |
Risk.explanation défini sur place
Risk.explanation.outcomes.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|
genotype | string | non | |
label | string | non | |
percent | string | non | |