← Tous les contrats
OHN-62 Pre-consultation Questionnaires
- Version
- 1.3.0
- OpenAPI
- 3.1.0
- Source dans le dépôt
modules/OHN-62/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.
Department- and complaint-specific questionnaires supplied as versioned configuration by the jurisdiction or facility; patient capture before arrival (portal, phone /p, SMS link, USSD) or at check-in (kiosk, staff-assisted) in EN and FR; configured red-flag rules signalled to OHN-61; responses filed in OHN-13 as FHIR QuestionnaireResponse. No clinical question bank is part of this contract. Deployable: care-exchange. Module key: preconsult. Tables: ohn62_*. Every write needs Idempotency-Key; strict bodies (unknown keys 422).
Opérations
Autres opérations
GET/api/ohn/v1/pre-consult/definitionsList questionnaire definitions (jurisdiction scope, or the caller's facility)
Identifiant d’opération: OHN_62_API_001
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
jurisdiction_id | query | string (uuid) | oui | |
facility_id | query | string (uuid) | non | |
department_kind | query | "emergency" | "opd_general" | "eye" | "dental" | "maternity" | "paediatrics" | "cardiology" | "diabetes" | "ent" | "dermatology" | "mental_health" | "surgery" | … | non | |
state | query | "draft" | "active" | "retired" | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
422 | validation_failed (bad query) | |
POST/api/ohn/v1/pre-consult/definitionsLoad a definition as draft. Validates: unique link_ids, enable_when refers to an earlier item with a compatible answer type, options for choice items, unit for quantity, EN and FR text everywhere, red-flag conditions refer to existing items, complaint and body-site codes valid in OHN-23
Identifiant d’opération: OHN_62_API_002
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
scope | query | "jurisdiction" | "facility" | oui | |
jurisdiction_id | query | string (uuid) | oui | |
facility_id | query | string (uuid) | non | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | OK | |
401 | Unauthenticated | |
403 | preconsult_admin may only create facility scope for their own facility | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed (details per field) | |
502 | upstream_unavailable (OHN-23 or OHN-61 department check) | |
GET/api/ohn/v1/pre-consult/definitions/{definition_id}Get one definition (full, with red-flag rules)
Identifiant d’opération: OHN_62_API_003
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
definition_id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
422 | validation_failed (bad query) | |
POST/api/ohn/v1/pre-consult/definitions/{definition_id}/activateActivate an approved definition (state in_review with decision approved); retires the previous active version with the same key
Identifiant d’opération: OHN_62_API_004
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
definition_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 | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed or definition_not_approved (a real definition cannot use the demo approval_ref); review_required (no approved review), definition_expired; translation_not_reviewed (EN and FR must be reviewed for a non-demo definition); candidate_bank_not_activatable (a candidate-bank definition needs review, approval_ref and reviewed translations like any other) | |
POST/api/ohn/v1/pre-consult/definitions/{definition_id}/retireRetire a definition (open responses keep their version)
Identifiant d’opération: OHN_62_API_005
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
definition_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 | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed (details per field) | |
POST/api/ohn/v1/pre-consult/definitions/load-demoLoad and activate the SYNTHETIC demo questionnaires (eye, dental, general consultation, diabetes, cardiology). NOT clinically approved. Only when OHN62_ALLOW_DEMO_CONFIG=true and not production
Identifiant d’opération: OHN_62_API_006
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
jurisdiction_id | query | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
201 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | demo_config_disabled | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed (details per field) | |
GET/api/ohn/v1/pre-consult/complaintsPresenting complaints that have a questionnaire for a department (for the check-in picker)
Identifiant d’opération: OHN_62_API_007
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
department_id | query | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
422 | validation_failed (bad query) | |
GET/api/ohn/v1/pre-consult/departments/{department_id}/questionnaireResolve the active questionnaire: facility+department+complaint, then facility+department, then jurisdiction+department kind+complaint, then jurisdiction+department kind. 404 no_questionnaire when none (check-in continues without one)
Identifiant d’opération: OHN_62_API_008
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
department_id | path | string (uuid) | oui | |
complaint_system | query | "snomed_ct" | "local" | non | |
complaint_code | query | string | non | |
language | query | "en" | "fr" | non | |
visit_type | query | "new" | "follow_up" | "review" | non | |
age_months | query | integer | non | |
pregnancy_context | query | "anc" | "pnc" | non | |
audience | query | "patient" | "nurse" | "clinician" | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | no_questionnaire, or department not found | |
422 | validation_failed (bad query) | |
GET/api/ohn/v1/pre-consult/responsesList responses: by ticket, by patient, or by appointment (staff; OHN-16 evaluated with purpose treatment, every read audited)
Identifiant d’opération: OHN_62_API_010
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
ticket_id | query | string (uuid) | non | |
patient_id | query | string (uuid) | non | |
appointment_id | query | string (uuid) | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
422 | exactly one filter is required | |
POST/api/ohn/v1/pre-consult/responsesStart a response at check-in (kiosk or staff-assisted) or in the portal
Identifiant d’opération: OHN_62_API_009
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 | |
401 | Unauthenticated | |
403 | patient may start only for themselves (or an OHN-19 representative) | |
404 | no_questionnaire | |
409 | an in-progress response exists for this patient and department (details.response_id) | |
422 | validation_failed, private_capture_required (a private definition started on a kiosk), definition_not_applicable (ResponseStart.definition_id not active or not for this department) | |
GET/api/ohn/v1/pre-consult/responses/{response_id}Get a response (staff; patient sees own without red_flags)
Identifiant d’opération: OHN_62_API_011
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
response_id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
422 | validation_failed (bad query) | |
PUT/api/ohn/v1/pre-consult/responses/{response_id}/answersSave answers (partial saves allowed while in_progress). Answers to items hidden by enable_when are dropped
Identifiant d’opération: OHN_62_API_012
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
response_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 | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | answer_invalid: wrong type, option not in list, number outside configured min/max, text too long, unknown link_id; decline_not_allowed | |
POST/api/ohn/v1/pre-consult/responses/{response_id}/submitSubmit: checks required visible items, evaluates the configured red-flag rules, files a FHIR QuestionnaireResponse in OHN-13, and signals OHN-61 when linked to a ticket
Identifiant d’opération: OHN_62_API_013
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
response_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 | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed: details.missing lists required visible link_ids | |
POST/api/ohn/v1/pre-consult/responses/{response_id}/amendStaff amend after submission with reason (new OHN-13 document version; previous kept)
Identifiant d’opération: OHN_62_API_014
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
response_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 | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed (details per field) | |
POST/api/ohn/v1/pre-consult/responses/{response_id}/entered-in-errorMark a response entered in error (wrong patient); OHN-13 document is marked too
Identifiant d’opération: OHN_62_API_015
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
response_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 | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed (details per field) | |
POST/api/ohn/v1/pre-consult/invitationsInvite the patient to answer before arrival via OHN-53 (SMS link, USSD session or portal notice) for an OHN-54 appointment or an open ticket
Identifiant d’opération: OHN_62_API_016
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 | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | no_questionnaire | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed or channel_not_supported (ussd needs an ussd_compatible definition); department_id missing for an appointment invitation | |
502 | upstream_unavailable (OHN-53 or OHN-54) | |
POST/api/ohn/v1/pre-consult/invitations/{invitation_id}/revokeRevoke an invitation
Identifiant d’opération: OHN_62_API_017
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
invitation_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 | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed (details per field) | |
GET/api/ohn/v1/pre-consult/me/pendingPatient portal (OHN-31): my open invitations and drafts
Identifiant d’opération: OHN_62_API_018
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
422 | validation_failed (bad query) | |
GET/api/ohn/v1/pre-consult/public/sessions/{token}Phone /p page or SMS link: open the questionnaire by one-time token (no login). Rate-limited; token hashed at rest; no name or Health ID in the reply beyond the facility name
Identifiant d’opération: OHN_62_API_019
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
token | path | string | oui | |
language | query | "en" | "fr" | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
410 | invitation_expired or invitation_used | |
422 | validation_failed (bad query) | |
429 | rate limited | |
PUT/api/ohn/v1/pre-consult/public/sessions/{token}/answersSave answers by token
Identifiant d’opération: OHN_62_API_020
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
token | path | string | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
410 | invitation_expired or invitation_used | |
422 | validation_failed (details per field) | |
429 | rate limited | |
POST/api/ohn/v1/pre-consult/public/sessions/{token}/submitSubmit by token (the token is spent)
Identifiant d’opération: OHN_62_API_021
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
token | path | string | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
200 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
410 | invitation_expired or invitation_used | |
422 | validation_failed (details per field) | |
429 | rate limited | |
POST/api/ohn/v1/pre-consult/ussd/sessionsOHN-53 USSD gateway relay: next question/answer step of an ussd_compatible questionnaire
Identifiant d’opération: OHN_62_API_022
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 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
410 | invitation_expired or invitation_used | |
422 | validation_failed (details per field) | |
POST/api/ohn/v1/pre-consult/tickets/{ticket_id}/attachService call from OHN-61 at check-in: link the patient's submitted/in-progress response (same appointment, or same department within the configured window) to the ticket and return its red flags
Identifiant d’opération: OHN_62_API_023
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
ticket_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 | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | never returned for a missing questionnaire: none_configured is a 200 | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed (details per field) | |
GET/api/ohn/v1/pre-consult/reports/completionCompletion report OHN-62-R001: invited/started/submitted by department, definition and channel
Identifiant d’opération: OHN_62_API_024
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
facility_id | query | string (uuid) | oui | |
from | query | string (date) | oui | |
to | query | string (date) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
422 | validation_failed (bad query) | |
POST/api/ohn/v1/pre-consult/reports/completion/exportExport OHN-62-R001 as CSV/PDF watermarked via OHN-16 marks; counts under 5 suppressed
Identifiant d’opération: OHN_62_API_025
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 | File with X-OHN-Mark-Id header | text/csv: string
application/pdf: string (binary)
|
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed (details per field) | |
502 | upstream_unavailable (OHN-16 mark) | |
POST/api/ohn/v1/pre-consult/definitions/{definition_id}/request-reviewdraft -> in_review (author)
Identifiant d’opération: OHN_62_API_026
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
definition_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 | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed (details per field) | |
POST/api/ohn/v1/pre-consult/definitions/{definition_id}/reviewReview decision by a reviewer who is not the author (approved, or changes_requested -> back to draft)
Identifiant d’opération: OHN_62_API_027
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
definition_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 | |
401 | Unauthenticated | |
403 | self_review_forbidden | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed (details per field) | |
GET/api/ohn/v1/pre-consult/reports/questionnaire_versionsReport questionnaire_versions: usage_count, completion_rate, declined_questions, draft_or_expired by department, version and language
Identifiant d’opération: OHN_62_API_028
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
facility_id | query | string (uuid) | oui | |
from | query | string (date) | oui | |
to | query | string (date) | oui | |
department_id | query | string (uuid) | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
422 | validation_failed (bad query) | |
GET/api/ohn/v1/pre-consult/safety-screenResolve the active universal danger-sign screen (facility, then jurisdiction). 404 no_questionnaire when none is configured: check-in continues and the ticket shows safety_screen not_configured
Identifiant d’opération: OHN_62_API_029
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
facility_id | query | string (uuid) | oui | |
language | query | "en" | "fr" | non | |
age_months | query | integer | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | no_questionnaire | |
422 | validation_failed (bad query) | |
POST/api/ohn/v1/pre-consult/definitions/{definition_id}/suspendEmergency stop: an active definition stops resolving at once (next resolution level applies); reason required; resume = activate again
Identifiant d’opération: OHN_62_API_030
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
definition_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 | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed (details per field) | |
POST/api/ohn/v1/pre-consult/responses/{response_id}/staff-reviewStaff marks a submitted response accepted_for_triage or staff_review_required (shown to the triage officer)
Identifiant d’opération: OHN_62_API_031
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
response_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 | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed (details per field) | |
POST/api/ohn/v1/pre-consult/definitions/load-candidate-bankDEV/DEMO only (OHN62_ALLOW_DEMO_CONFIG): load the owner's 26-department candidate question bank as DRAFT definitions marked candidate_bank and NOT_CLINICALLY_APPROVED; nothing is activated
Identifiant d’opération: OHN_62_API_032
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
jurisdiction_id | query | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
201 | OK | |
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | demo_config_disabled | |
409 | version_conflict, invalid_transition or idempotency_mismatch | |
422 | validation_failed (details per field) | |
GET/api/ohn/v1/pre-consult/fhir/R4/QuestionnaireFHIR R4 search Questionnaire (Questionnaire: active approved definitions only; QuestionnaireResponse: patient, encounter, authored; OHN-16 evaluated)
Identifiant d’opération: OHN_62_API_033
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
patient | query | string | non | |
url | query | string | non | |
status | query | string | non | |
_count | query | integer | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | FHIR R4 resource or searchset Bundle | application/fhir+json: object
|
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
422 | validation_failed (bad query) | |
GET/api/ohn/v1/pre-consult/fhir/R4/Questionnaire/{resource_id}FHIR R4 read Questionnaire
Identifiant d’opération: OHN_62_API_034
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
resource_id | path | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | FHIR R4 resource or searchset Bundle | application/fhir+json: object
|
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
422 | validation_failed (bad query) | |
GET/api/ohn/v1/pre-consult/fhir/R4/QuestionnaireResponseFHIR R4 search QuestionnaireResponse (Questionnaire: active approved definitions only; QuestionnaireResponse: patient, encounter, authored; OHN-16 evaluated)
Identifiant d’opération: OHN_62_API_035
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
patient | query | string | non | |
url | query | string | non | |
status | query | string | non | |
_count | query | integer | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | FHIR R4 resource or searchset Bundle | application/fhir+json: object
|
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
422 | validation_failed (bad query) | |
GET/api/ohn/v1/pre-consult/fhir/R4/QuestionnaireResponse/{resource_id}FHIR R4 read QuestionnaireResponse
Identifiant d’opération: OHN_62_API_036
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
resource_id | path | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | FHIR R4 resource or searchset Bundle | application/fhir+json: object
|
401 | Unauthenticated | |
403 | Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing) | |
404 | Not found or outside scope (never discloses existence) | |
422 | validation_failed (bad query) | |
GET/health/ohn-62Liveness/readiness of the module
Identifiant d’opération: OHN_62_HEALTH
Réponses
| Code | Description | Type de média |
|---|
200 | OK | — |
Schémas
Error
| Nom | Type | Obligatoire | Description |
|---|
error | string | oui | Stable code: unauthenticated, forbidden, not_found, validation_failed, idempotency_key_required, idempotency_mismatch, version_conflict, invalid_transition, not_configured, no_questionnaire, demo_config_disabled, definition_not_approved, invitation_expired, invitation_used, answer_invalid, channel_not_supported, upstream_unavailable, consent_required, review_required, self_review_forbidden, definition_expired, decline_not_allowed, translation_not_reviewed, private_capture_required, definition_suspended, candidate_bank_not_activatable |
message | string | non | |
details | any | non | |
I18nText
| Nom | Type | Obligatoire | Description |
|---|
en | string | oui | |
fr | string | oui | |
Coding
| Nom | Type | Obligatoire | Description |
|---|
system | "snomed_ct" | "loinc" | "local" | oui | |
code | string | oui | |
display | string | non | |
AnswerOption
| Nom | Type | Obligatoire | Description |
|---|
code | string | oui | |
display | I18nText | oui | |
coding | Coding | non | |
EnableWhen
| Nom | Type | Obligatoire | Description |
|---|
question | string | oui | link_id of an earlier item |
operator | "exists" | "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "includes" | oui | |
answer | any | non | boolean, option code, number or date, matching the question's type |
Item
| Nom | Type | Obligatoire | Description |
|---|
link_id | string | oui | |
type | "boolean" | "single_choice" | "multiple_choice" | "quantity" | "date" | "scale" | "text" | "body_site" | "group" | "display" | oui | |
text | I18nText | oui | |
help | I18nText | non | |
required | boolean | non | |
options | array of AnswerOption | non | single_choice and multiple_choice |
unit | string | non | UCUM unit for quantity, e.g. mm[Hg], kg, mmol/L |
min | number | non | |
max | number | non | |
decimals | integer | non | |
scale | Item.scale | non | |
body_sites | array of AnswerOption | non | body_site: configured site list (SNOMED body structure codes validated with OHN-23 at load) |
max_length | integer | non | |
date_range | Item.date_range | non | |
enable_when | array of EnableWhen | non | |
enable_behavior | "all" | "any" | non | |
items | array of Item | non | children of a group |
coding | Coding | non | |
ussd_compatible | boolean | non | computed: boolean, single_choice (<=9 options), scale, quantity |
allow_decline | boolean | non | default true; false means a required item cannot be declined |
RedFlagRule
| Nom | Type | Obligatoire | Description |
|---|
id | string | oui | |
when | array of EnableWhen | oui | |
match | "all" | "any" | non | |
effect | "flag_officer" | "raise_priority" | "urgent_review" | oui | urgent_review: immediate staff review; OHN-61 raises an escalation (trigger danger_screen). Configured only; never a diagnosis or reassurance shown to the patient |
message | I18nText | oui | |
suggest_discriminator | string | non | optional OHN-61 scale discriminator id pre-selected for the officer to confirm; never assigns acuity |
on_unknown | "ignore" | "screen_incomplete" | non | safety screens default to screen_incomplete: an unknown or declined answer to a referenced item is never read as 'no'; OHN-61 shows 'screen incomplete' to staff |
QuestionnaireDocument
| Nom | Type | Obligatoire | Description |
|---|
title | I18nText | oui | |
department_kind | "emergency" | "opd_general" | "eye" | "dental" | "maternity" | "paediatrics" | "cardiology" | "diabetes" | "ent" | "dermatology" | "mental_health" | "surgery" | … | oui | |
department_id | string (uuid) | non | facility scope only: bind to one OHN-61 department |
complaint | Coding | non | |
complaint_label | I18nText | non | |
estimated_minutes | integer | non | |
items | array of Item | oui | |
red_flag_rules | array of RedFlagRule | oui | |
source_reference | string | non | |
valid_until | string (date) | non | |
kind | "department" | "safety_screen" | non | safety_screen: the universal danger-sign screen asked of every patient before department questions (department_kind is ignored); department: the default |
audience | "patient" | "nurse" | "clinician" | non | patient (pre-consultation, shown on patient channels), nurse (triage stage, staff views only) or clinician (consultation prompts, clinician view only); default patient |
visit_type | "new" | "follow_up" | "review" | non | |
age_band | QuestionnaireDocument.age_band | non | |
pregnancy_context | "anc" | "pnc" | non | |
capture_privacy | "standard" | "private" | non | private: never offered on a shared kiosk; staff-assisted only in a private room, or on the patient's own device |
translation_status | QuestionnaireDocument.translation_status | non | |
source_topic_tags | array of string | non | guideline topics the content was derived from (e.g. who_iitt, imci, who_pen); provenance only, not a claim of validation |
Definition
| Nom | Type | Obligatoire | Description |
|---|
id | string (uuid) | oui | |
scope | "jurisdiction" | "facility" | oui | |
jurisdiction_id | string (uuid) | non | |
facility_id | string | null (uuid) | non | |
key | string | non | department_kind[/department_id][/complaint system|code] |
version | integer | oui | |
state | "draft" | "in_review" | "active" | "retired" | "expired" | "suspended" | oui | |
approval_ref | string | null | non | |
synthetic_demo | boolean | oui | |
clinically_approved | boolean | non | |
activated_at | string | null (date-time) | non | |
document | QuestionnaireDocument | oui | |
row_version | integer | non | |
valid_until | string | null (date) | non | after this date the definition is expired and no longer resolves |
review | Definition.review.option-1 | null | non | |
created_by | string | non | |
warnings | array of string | non | non-blocking load warnings, e.g. patient questionnaire with more than 7 items visible by default |
candidate_bank | boolean | non | loaded from the owner's candidate question bank (v1.1); always NOT_CLINICALLY_APPROVED, draft only, can never be activated without review, approval_ref and reviewed translations |
Activate
| Nom | Type | Obligatoire | Description |
|---|
approval_ref | string | oui | |
expected_version | integer | oui | |
Reasoned
| Nom | Type | Obligatoire | Description |
|---|
expected_version | integer | oui | |
reason | string | oui | |
Resolved
| Nom | Type | Obligatoire | Description |
|---|
definition | RenderedDefinition | oui | |
matched_on | "facility_department_complaint" | "facility_department" | "jurisdiction_kind_complaint" | "jurisdiction_kind" | non | |
RenderedDefinition
| Nom | Type | Obligatoire | Description |
|---|
definition_id | string (uuid) | oui | |
version | integer | oui | |
language | "en" | "fr" | oui | |
title | string | oui | |
items | array of object | oui | Item with text/help/labels resolved to the language; red_flag_rules are never sent to patients |
synthetic_demo | boolean | oui | |
disclaimer | string | null | non | |
Answer
| Nom | Type | Obligatoire | Description |
|---|
link_id | string | oui | |
value_boolean | boolean | non | |
value_code | string | non | |
value_codes | array of string | non | |
value_number | number | non | |
value_date | string (date) | non | |
value_text | string | non | |
declined | boolean | non | the patient chose not to answer; no value field allowed |
decline_reason | "prefer_not_to_say" | "do_not_know" | "not_applicable" | non | |
ResponseStart
| Nom | Type | Obligatoire | Description |
|---|
patient_id | string (uuid) | oui | |
department_id | string (uuid) | oui | |
complaint | Coding | non | |
ticket_id | string (uuid) | non | |
appointment_id | string (uuid) | non | |
channel | "kiosk" | "staff_assisted" | "portal" | oui | |
language | "en" | "fr" | oui | |
definition_id | string (uuid) | non | optional (1.2.0): the definition the client resolved, e.g. GET /safety-screen Resolved.definition.definition_id to start the safety screen for a ticket, or a department definition resolved with visit_type/age_months/pregnancy_context. It must be active and apply to the department (the safety screen applies everywhere), else 422 definition_not_applicable. Without it the department questionnaire is resolved. A safety-screen response and a department response may be open together for the same patient and department. |
AnswersPut
| Nom | Type | Obligatoire | Description |
|---|
answers | array of Answer | oui | |
expected_version | integer | oui | |
Response
| Nom | Type | Obligatoire | Description |
|---|
id | string (uuid) | oui | |
definition_id | string (uuid) | oui | |
definition_version | integer | oui | |
patient_id | string (uuid) | oui | |
department_id | string (uuid) | oui | |
facility_id | string (uuid) | non | |
complaint | Coding | null | non | |
ticket_id | string | null (uuid) | non | |
appointment_id | string | null (uuid) | non | |
channel | "portal" | "phone_web" | "sms_link" | "ussd" | "kiosk" | "staff_assisted" | oui | |
language | "en" | "fr" | oui | |
entered_by | string | non | patient, representative or staff user id (staff_assisted/kiosk) |
status | "in_progress" | "submitted" | "amended" | "entered_in_error" | "expired" | "staff_review_required" | "accepted_for_triage" | oui | |
answers | array of Answer | oui | |
red_flags | array of Response.red_flags.item | non | staff views only; never returned on patient channels |
submitted_at | string | null (date-time) | non | |
document_id | string | null (uuid) | non | OHN-13 document holding the FHIR QuestionnaireResponse |
record_sync | "not_submitted" | "pending_upstream" | "filed" | "failed" | non | |
synthetic_demo | boolean | non | |
version | integer | oui | |
declined_link_ids | array of string | non | shown to staff as 'declined', never as a missing answer |
amendments | array of Response.amendments.item | non | append-only; the original answers are never overwritten |
Invitation
| Nom | Type | Obligatoire | Description |
|---|
id | string (uuid) | oui | |
patient_id | string (uuid) | oui | |
appointment_id | string | null (uuid) | non | |
ticket_id | string | null (uuid) | non | |
department_id | string (uuid) | non | |
channel | "sms_link" | "ussd" | "portal" | oui | |
language | "en" | "fr" | non | |
expires_at | string (date-time) | oui | |
state | "sent" | "opened" | "submitted" | "expired" | "revoked" | "delivery_failed" | oui | |
InvitationCreate
| Nom | Type | Obligatoire | Description |
|---|
appointment_id | string (uuid) | non | |
ticket_id | string (uuid) | non | |
channel | "sms_link" | "ussd" | "portal" | oui | |
language | "en" | "fr" | oui | |
department_id | string (uuid) | non | required with appointment_id unless ticket_id is given (an OHN-54 appointment has no OHN-61 department); must belong to the appointment's facility |
Attach
| Nom | Type | Obligatoire | Description |
|---|
patient_id | string (uuid) | oui | |
department_id | string (uuid) | oui | |
facility_id | string (uuid) | oui | |
appointment_id | string (uuid) | non | |
complaint | Coding | non | |
AttachResult
| Nom | Type | Obligatoire | Description |
|---|
questionnaire_available | boolean | oui | |
state | "none_configured" | "not_started" | "in_progress" | "submitted" | oui | |
response_ids | array of string (uuid) | oui | |
red_flags | array of AttachResult.red_flags.item | oui | |
ExportRequest
| Nom | Type | Obligatoire | Description |
|---|
facility_id | string (uuid) | oui | |
from | string (date) | oui | |
to | string (date) | oui | |
format | "csv" | "pdf" | oui | |
Versioned
| Nom | Type | Obligatoire | Description |
|---|
expected_version | integer | oui | |
AmendRequest
| Nom | Type | Obligatoire | Description |
|---|
answers | array of Answer | oui | |
reason | string | oui | |
expected_version | integer | oui | |
UssdStep
| Nom | Type | Obligatoire | Description |
|---|
session_ref | string | oui | |
msisdn_hash | string | oui | |
invitation_code | string | non | |
input | string | oui | |
UssdReply
| Nom | Type | Obligatoire | Description |
|---|
text | string | oui | |
end | boolean | oui | |
Review
| Nom | Type | Obligatoire | Description |
|---|
decision | "approved" | "changes_requested" | oui | |
comment | string | non | |
expected_version | integer | oui | |
StaffReview
| Nom | Type | Obligatoire | Description |
|---|
decision | "accepted_for_triage" | "staff_review_required" | oui | |
note | string | non | |
expected_version | integer | oui | |
Item.scale défini sur place
| Nom | Type | Obligatoire | Description |
|---|
min | integer | oui | |
max | integer | oui | |
step | integer | non | |
min_label | I18nText | non | |
max_label | I18nText | non | |
Item.date_range défini sur place
| Nom | Type | Obligatoire | Description |
|---|
not_after_today | boolean | non | |
not_before_years | integer | non | |
QuestionnaireDocument.age_band défini sur place
| Nom | Type | Obligatoire | Description |
|---|
min_months | integer | non | |
max_months | integer | non | |
QuestionnaireDocument.translation_status défini sur place
| Nom | Type | Obligatoire | Description |
|---|
en | "draft" | "reviewed" | oui | |
fr | "draft" | "reviewed" | oui | |
Definition.review.option-1 défini sur place
| Nom | Type | Obligatoire | Description |
|---|
requested_by | string | oui | |
requested_at | string (date-time) | oui | |
decision | "approved" | "changes_requested" | null | non | |
reviewed_by | string | null | non | |
reviewed_at | string | null (date-time) | non | |
comment | string | null | non | |
Response.red_flags.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|
rule_id | string | oui | |
effect | string | oui | |
message | I18nText | oui | |
suggest_discriminator | string | null | non | |
Response.amendments.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|
at | string (date-time) | oui | |
by | string | oui | |
reason | string | oui | |
document_version | integer | null | non | |
TokenSession.response défini sur place
| Nom | Type | Obligatoire | Description |
|---|
id | string (uuid) | oui | |
status | string | oui | |
answers | array of Answer | oui | |
version | integer | oui | |
AttachResult.red_flags.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|
rule_id | string | oui | |
effect | string | oui | |
message | I18nText | non | |
CompletionReport.rows.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|
department_id | string (uuid) | oui | |
definition_id | string (uuid) | non | |
invited | integer | oui | |
started | integer | oui | |
submitted | integer | oui | |
submitted_before_arrival | integer | non | |
by_channel | object | non | |
red_flags_raised | integer | non | |
VersionsReport.rows.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|
department_id | string (uuid) | oui | |
definition_id | string (uuid) | oui | |
version | integer | oui | |
language | "en" | "fr" | oui | |
state | string | non | |
usage_count | integer | non | responses started |
completion_rate | number | null | non | submitted / started |
declined_questions | integer | non | declined answers in submitted responses |
declined_by_item | object | non | |
draft_or_expired | boolean | non | |