Aller au contenu

← 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

CodeDescriptionType de média
200OK
application/json: object
GET/config/versionsList configuration versions (care_governance_admin)

Authentification: bearer

Réponses

CodeDescriptionType de média
200OK
application/json: object
POST/config/versionsCreate a draft configuration

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: object
422Error
application/json: Error
POST/config/versions/load-demoLoad the SYNTHETIC demo configuration as a draft (non-production only)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
201OK
application/json: object
404Error
application/json: Error
POST/config/versions/{id}/activateActivate a draft (retires the current one)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
409Error
application/json: Error
422Error
application/json: Error
POST/cds/evaluateEvaluate the active rules for one patient (clinician

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Result
application/json: EvaluateResult
503Error
application/json: Error
GET/cds/alertsFacility alerts

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
statequery"open" | "acknowledged" | "dismissed"non
patient_idquerystring (uuid)non

Réponses

CodeDescriptionType de média
200OK
application/json: object
POST/cds/alerts/{id}/decisionAcknowledge or dismiss

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: object
409Error
application/json: Error
GET/programmes/registryRegistry for this facility (sensitive rows only for the care team)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
programme_codequery"hypertension" | "diabetes" | "hiv" | "tb"non
statequerystringnon

Réponses

CodeDescriptionType de média
200OK
application/json: object
GET/programmes/tracingMissed-visit tracing list

Authentification: bearer

Réponses

CodeDescriptionType de média
200OK
application/json: object
GET/programmes/indicatorsOutcome indicators

Authentification: bearer

Réponses

CodeDescriptionType de média
200OK
application/json: object
POST/programmes/enrolmentsEnrol (sensitive programmes need an OHN-15 permit)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: object
403Error
application/json: Error
GET/programmes/enrolments/{id}Care plan and history

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200OK
application/json: object
404Error
application/json: Error
POST/programmes/enrolments/{id}/visitsRecord a visit (VisitSchema)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
201OK
application/json: object
POST/programmes/enrolments/{id}/adherenceAdherence note (AdherenceSchema)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
201OK
application/json: object
POST/programmes/enrolments/{id}/tracingTracing attempt (TracingSchema)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
201OK
application/json: object
POST/programmes/enrolments/{id}/transitionsChange state (EnrolmentTransitionSchema)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200OK
application/json: object
409Error
application/json: Error
POST/programmes/enrolments/{id}/care-teamAdd a care-team member

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200OK
application/json: object
GET/me/programmesThe patient's own enrolments

Authentification: bearer

Réponses

CodeDescriptionType de média
200OK
application/json: object
POST/family/linksPropose a link with evidence (ProposeLinkSchema)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
201OK
application/json: object
409Error
application/json: Error
POST/family/links/{id}/consentsGrant

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200OK
application/json: object
404Error
application/json: Error
GET/family/historyFamily history (own; a relative's only with their sharing consent)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
patient_idquerystring (uuid)non

Réponses

CodeDescriptionType de média
200OK
application/json: object
404Error
application/json: Error
POST/family/historyAdd an entry coded via OHN-23 (FamilyHistorySchema)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
201OK
application/json: object
422Error
application/json: Error
POST/family/history/{id}/retractMark entered in error (source only)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200OK
application/json: object
403Error
application/json: Error
GET/genetic/consentsLatest carrier-screening consent per partner

Authentification: bearer

Réponses

CodeDescriptionType de média
200OK
application/json: object
POST/genetic/consentsPatient grants or withdraws consent with a named partner (GeneticConsentSchema)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
201OK
application/json: object
GET/genetic/couples/{a}/{b}/riskInheritance explanation for two mutually consenting partners (lab-verified genotypes only)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
apathstring (uuid)oui
bpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Result
application/json: Risk
403consent_required; nothing computed or fetched—
GET/genetic/counsellingCounselling sessions at this facility

Authentification: bearer

Réponses

CodeDescriptionType de média
200OK
application/json: object
POST/genetic/counsellingBook counselling (needs both consents)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
201OK
application/json: object
403Error
application/json: Error
POST/genetic/counselling/{id}/transitionsCompleted (with summary) or cancelled

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200OK
application/json: object
GET/reports/{reportId}OHN-55-R001 or R002

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpath"OHN-55-R001" | "OHN-55-R002"oui

Réponses

CodeDescriptionType de média
200OK
application/json: object
GET/reports/{reportId}/exportSigned CSV (X-OHN55-Signature)

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpathstringoui

Réponses

CodeDescriptionType de média
200CSV
text/csv
GET/auditAudit records (care_governance_admin)

Authentification: bearer

Réponses

CodeDescriptionType de média
200OK
application/json: object
POST/admin/outbox/relayRelay pending events to OHN-24

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Réponses

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

CodeDescriptionType de média
200ok
503database unavailable

Schémas

Error

NomTypeObligatoireDescription
errorstringoui
messagestringnon

CodeRef

NomTypeObligatoireDescription
systemstringoui
codestringoui

Evaluate

NomTypeObligatoireDescription
patient_idstring (uuid)oui
proposed_medicationsarray of CodeRefnon
rule_typesarray of "drug_allergy" | "overdue_vaccination" | "abnormal_result_unacknowledged" | "missed_chronic_followup"non
persistbooleannon

EvaluateResult

NomTypeObligatoireDescription
completebooleannonfalse when any rule could not be evaluated
findingsarray of objectnon
rulesarray of EvaluateResult.rules.itemnon
sourcesobjectnon
configEvaluateResult.confignon

Risk

NomTypeObligatoireDescription
availablebooleannon
explanationRisk.explanationnon

post-config-versions.request défini sur place

NomTypeObligatoireDescription
documentobjectoui

post-config-versions-id-activate.request défini sur place

NomTypeObligatoireDescription
approval_refstringoui
expected_versionintegeroui

post-cds-alerts-id-decision.request défini sur place

NomTypeObligatoireDescription
decision"acknowledge" | "dismiss"oui
reasonstringoui
expected_versionintegeroui

post-programmes-enrolments.request défini sur place

NomTypeObligatoireDescription
programme_code"hypertension" | "diabetes" | "hiv" | "tb"oui
patient_idstring (uuid)oui
enrolled_onstring (date)oui

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

NomTypeObligatoireDescription
status"ok"non
module"OHN-55"non
dependenciesobjectnon
writes_enabledbooleannon
export_signing_configuredbooleannon
auth_configuredbooleannon
synthetic_authbooleannon
demo_config_loadablebooleannon

get-health-ohn-55.response-503 défini sur place

NomTypeObligatoireDescription
status"unavailable"non
modulestringnon
dependenciesobjectnon

EvaluateResult.rules.item défini sur place

NomTypeObligatoireDescription
rule_idstringnon
status"evaluated" | "not_evaluated"non
reasonstringnon

EvaluateResult.config défini sur place

NomTypeObligatoireDescription
versionintegernon
synthetic_demobooleannon

Risk.explanation défini sur place

NomTypeObligatoireDescription
outcomesarray of Risk.explanation.outcomes.itemnon
counselling_requiredtruenon

Risk.explanation.outcomes.item défini sur place

NomTypeObligatoireDescription
genotypestringnon
labelstringnon
percentstringnon