Aller au contenu

← 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

NomEmplacementTypeObligatoireDescription
jurisdiction_idquerystring (uuid)oui
facility_idquerystring (uuid)non
department_kindquery"emergency" | "opd_general" | "eye" | "dental" | "maternity" | "paediatrics" | "cardiology" | "diabetes" | "ent" | "dermatology" | "mental_health" | "surgery" | …non
statequery"draft" | "active" | "retired"non

Réponses

CodeDescriptionType de média
200OK
application/json: array of Definition
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
422validation_failed (bad query)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui
scopequery"jurisdiction" | "facility"oui
jurisdiction_idquerystring (uuid)oui
facility_idquerystring (uuid)non

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: Definition
401Unauthenticated
application/json: Error
403preconsult_admin may only create facility scope for their own facility
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed (details per field)
application/json: Error
502upstream_unavailable (OHN-23 or OHN-61 department check)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
definition_idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200OK
application/json: Definition
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
422validation_failed (bad query)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
definition_idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: Definition
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_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)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
definition_idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: Definition
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed (details per field)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui
jurisdiction_idquerystring (uuid)oui

Réponses

CodeDescriptionType de média
201OK
application/json: array of Definition
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404demo_config_disabled
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed (details per field)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
department_idquerystring (uuid)oui

Réponses

CodeDescriptionType de média
200OK
application/json: array of Complaint
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
422validation_failed (bad query)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
department_idpathstring (uuid)oui
complaint_systemquery"snomed_ct" | "local"non
complaint_codequerystringnon
languagequery"en" | "fr"non
visit_typequery"new" | "follow_up" | "review"non
age_monthsqueryintegernon
pregnancy_contextquery"anc" | "pnc"non
audiencequery"patient" | "nurse" | "clinician"non

Réponses

CodeDescriptionType de média
200OK
application/json: Resolved
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404no_questionnaire, or department not found
application/json: Error
422validation_failed (bad query)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
ticket_idquerystring (uuid)non
patient_idquerystring (uuid)non
appointment_idquerystring (uuid)non

Réponses

CodeDescriptionType de média
200OK
application/json: array of Response
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
422exactly one filter is required
application/json: Error
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

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: Response
401Unauthenticated
application/json: Error
403patient may start only for themselves (or an OHN-19 representative)
application/json: Error
404no_questionnaire
application/json: Error
409an in-progress response exists for this patient and department (details.response_id)
application/json: Error
422validation_failed, private_capture_required (a private definition started on a kiosk), definition_not_applicable (ResponseStart.definition_id not active or not for this department)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
response_idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200OK
application/json: Response
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
422validation_failed (bad query)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
response_idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: Response
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422answer_invalid: wrong type, option not in list, number outside configured min/max, text too long, unknown link_id; decline_not_allowed
application/json: Error
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

NomEmplacementTypeObligatoireDescription
response_idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: Response
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed: details.missing lists required visible link_ids
application/json: Error
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

NomEmplacementTypeObligatoireDescription
response_idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: Response
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed (details per field)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
response_idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: Response
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed (details per field)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201OK
application/json: Invitation
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404no_questionnaire
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed or channel_not_supported (ussd needs an ussd_compatible definition); department_id missing for an appointment invitation
application/json: Error
502upstream_unavailable (OHN-53 or OHN-54)
application/json: Error
POST/api/ohn/v1/pre-consult/invitations/{invitation_id}/revokeRevoke an invitation

Identifiant d’opération: OHN_62_API_017

Authentification: bearer

Paramètres

NomEmplacementTypeObligatoireDescription
invitation_idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: Invitation
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed (details per field)
application/json: Error
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

CodeDescriptionType de média
200OK
application/json: PendingForMe
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
422validation_failed (bad query)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
tokenpathstringoui
languagequery"en" | "fr"non

Réponses

CodeDescriptionType de média
200OK
application/json: TokenSession
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
410invitation_expired or invitation_used
application/json: Error
422validation_failed (bad query)
application/json: Error
429rate limited
application/json: Error
PUT/api/ohn/v1/pre-consult/public/sessions/{token}/answersSave answers by token

Identifiant d’opération: OHN_62_API_020

Paramètres

NomEmplacementTypeObligatoireDescription
tokenpathstringoui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: Response
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
410invitation_expired or invitation_used
application/json: Error
422validation_failed (details per field)
application/json: Error
429rate limited
application/json: Error
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

NomEmplacementTypeObligatoireDescription
tokenpathstringoui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: Response
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
410invitation_expired or invitation_used
application/json: Error
422validation_failed (details per field)
application/json: Error
429rate limited
application/json: Error
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

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: UssdReply
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
410invitation_expired or invitation_used
application/json: Error
422validation_failed (details per field)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
ticket_idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: AttachResult
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404never returned for a missing questionnaire: none_configured is a 200
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed (details per field)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
facility_idquerystring (uuid)oui
fromquerystring (date)oui
toquerystring (date)oui

Réponses

CodeDescriptionType de média
200OK
application/json: CompletionReport
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
422validation_failed (bad query)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200File with X-OHN-Mark-Id header
text/csv: string
application/pdf: string (binary)
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed (details per field)
application/json: Error
502upstream_unavailable (OHN-16 mark)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
definition_idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: Definition
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed (details per field)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
definition_idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: Definition
401Unauthenticated
application/json: Error
403self_review_forbidden
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed (details per field)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
facility_idquerystring (uuid)oui
fromquerystring (date)oui
toquerystring (date)oui
department_idquerystring (uuid)non

Réponses

CodeDescriptionType de média
200OK
application/json: VersionsReport
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
422validation_failed (bad query)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
facility_idquerystring (uuid)oui
languagequery"en" | "fr"non
age_monthsqueryintegernon

Réponses

CodeDescriptionType de média
200OK
application/json: Resolved
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404no_questionnaire
application/json: Error
422validation_failed (bad query)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
definition_idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: Definition
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed (details per field)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
response_idpathstring (uuid)oui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200OK
application/json: Response
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed (details per field)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui
jurisdiction_idquerystring (uuid)oui

Réponses

CodeDescriptionType de média
201OK
application/json: array of Definition
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404demo_config_disabled
application/json: Error
409version_conflict, invalid_transition or idempotency_mismatch
application/json: Error
422validation_failed (details per field)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
patientquerystringnon
urlquerystringnon
statusquerystringnon
_countqueryintegernon

Réponses

CodeDescriptionType de média
200FHIR R4 resource or searchset Bundle
application/fhir+json: object
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
422validation_failed (bad query)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
resource_idpathstringoui

Réponses

CodeDescriptionType de média
200FHIR R4 resource or searchset Bundle
application/fhir+json: object
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
422validation_failed (bad query)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
patientquerystringnon
urlquerystringnon
statusquerystringnon
_countqueryintegernon

Réponses

CodeDescriptionType de média
200FHIR R4 resource or searchset Bundle
application/fhir+json: object
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
422validation_failed (bad query)
application/json: Error
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

NomEmplacementTypeObligatoireDescription
resource_idpathstringoui

Réponses

CodeDescriptionType de média
200FHIR R4 resource or searchset Bundle
application/fhir+json: object
401Unauthenticated
application/json: Error
403Role or OHN-16 policy denies (consent_required when an OHN-15 consent is missing)
application/json: Error
404Not found or outside scope (never discloses existence)
application/json: Error
422validation_failed (bad query)
application/json: Error
GET/health/ohn-62Liveness/readiness of the module

Identifiant d’opération: OHN_62_HEALTH

Réponses

CodeDescriptionType de média
200OK—

Schémas

Error

NomTypeObligatoireDescription
errorstringouiStable 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
messagestringnon
detailsanynon

I18nText

NomTypeObligatoireDescription
enstringoui
frstringoui

Coding

NomTypeObligatoireDescription
system"snomed_ct" | "loinc" | "local"oui
codestringoui
displaystringnon

AnswerOption

NomTypeObligatoireDescription
codestringoui
displayI18nTextoui
codingCodingnon

EnableWhen

NomTypeObligatoireDescription
questionstringouilink_id of an earlier item
operator"exists" | "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "includes"oui
answeranynonboolean, option code, number or date, matching the question's type

Item

NomTypeObligatoireDescription
link_idstringoui
type"boolean" | "single_choice" | "multiple_choice" | "quantity" | "date" | "scale" | "text" | "body_site" | "group" | "display"oui
textI18nTextoui
helpI18nTextnon
requiredbooleannon
optionsarray of AnswerOptionnonsingle_choice and multiple_choice
unitstringnonUCUM unit for quantity, e.g. mm[Hg], kg, mmol/L
minnumbernon
maxnumbernon
decimalsintegernon
scaleItem.scalenon
body_sitesarray of AnswerOptionnonbody_site: configured site list (SNOMED body structure codes validated with OHN-23 at load)
max_lengthintegernon
date_rangeItem.date_rangenon
enable_whenarray of EnableWhennon
enable_behavior"all" | "any"non
itemsarray of Itemnonchildren of a group
codingCodingnon
ussd_compatiblebooleannoncomputed: boolean, single_choice (<=9 options), scale, quantity
allow_declinebooleannondefault true; false means a required item cannot be declined

RedFlagRule

NomTypeObligatoireDescription
idstringoui
whenarray of EnableWhenoui
match"all" | "any"non
effect"flag_officer" | "raise_priority" | "urgent_review"ouiurgent_review: immediate staff review; OHN-61 raises an escalation (trigger danger_screen). Configured only; never a diagnosis or reassurance shown to the patient
messageI18nTextoui
suggest_discriminatorstringnonoptional OHN-61 scale discriminator id pre-selected for the officer to confirm; never assigns acuity
on_unknown"ignore" | "screen_incomplete"nonsafety 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

NomTypeObligatoireDescription
titleI18nTextoui
department_kind"emergency" | "opd_general" | "eye" | "dental" | "maternity" | "paediatrics" | "cardiology" | "diabetes" | "ent" | "dermatology" | "mental_health" | "surgery" | …oui
department_idstring (uuid)nonfacility scope only: bind to one OHN-61 department
complaintCodingnon
complaint_labelI18nTextnon
estimated_minutesintegernon
itemsarray of Itemoui
red_flag_rulesarray of RedFlagRuleoui
source_referencestringnon
valid_untilstring (date)non
kind"department" | "safety_screen"nonsafety_screen: the universal danger-sign screen asked of every patient before department questions (department_kind is ignored); department: the default
audience"patient" | "nurse" | "clinician"nonpatient (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_bandQuestionnaireDocument.age_bandnon
pregnancy_context"anc" | "pnc"non
capture_privacy"standard" | "private"nonprivate: never offered on a shared kiosk; staff-assisted only in a private room, or on the patient's own device
translation_statusQuestionnaireDocument.translation_statusnon
source_topic_tagsarray of stringnonguideline topics the content was derived from (e.g. who_iitt, imci, who_pen); provenance only, not a claim of validation

Definition

NomTypeObligatoireDescription
idstring (uuid)oui
scope"jurisdiction" | "facility"oui
jurisdiction_idstring (uuid)non
facility_idstring | null (uuid)non
keystringnondepartment_kind[/department_id][/complaint system|code]
versionintegeroui
state"draft" | "in_review" | "active" | "retired" | "expired" | "suspended"oui
approval_refstring | nullnon
synthetic_demobooleanoui
clinically_approvedbooleannon
activated_atstring | null (date-time)non
documentQuestionnaireDocumentoui
row_versionintegernon
valid_untilstring | null (date)nonafter this date the definition is expired and no longer resolves
reviewDefinition.review.option-1 | nullnon
created_bystringnon
warningsarray of stringnonnon-blocking load warnings, e.g. patient questionnaire with more than 7 items visible by default
candidate_bankbooleannonloaded 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

NomTypeObligatoireDescription
approval_refstringoui
expected_versionintegeroui

Reasoned

NomTypeObligatoireDescription
expected_versionintegeroui
reasonstringoui

Resolved

NomTypeObligatoireDescription
definitionRenderedDefinitionoui
matched_on"facility_department_complaint" | "facility_department" | "jurisdiction_kind_complaint" | "jurisdiction_kind"non

RenderedDefinition

NomTypeObligatoireDescription
definition_idstring (uuid)oui
versionintegeroui
language"en" | "fr"oui
titlestringoui
itemsarray of objectouiItem with text/help/labels resolved to the language; red_flag_rules are never sent to patients
synthetic_demobooleanoui
disclaimerstring | nullnon

Complaint

NomTypeObligatoireDescription
codingCodingoui
labelI18nTextoui

Answer

NomTypeObligatoireDescription
link_idstringoui
value_booleanbooleannon
value_codestringnon
value_codesarray of stringnon
value_numbernumbernon
value_datestring (date)non
value_textstringnon
declinedbooleannonthe patient chose not to answer; no value field allowed
decline_reason"prefer_not_to_say" | "do_not_know" | "not_applicable"non

ResponseStart

NomTypeObligatoireDescription
patient_idstring (uuid)oui
department_idstring (uuid)oui
complaintCodingnon
ticket_idstring (uuid)non
appointment_idstring (uuid)non
channel"kiosk" | "staff_assisted" | "portal"oui
language"en" | "fr"oui
definition_idstring (uuid)nonoptional (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

NomTypeObligatoireDescription
answersarray of Answeroui
expected_versionintegeroui

Response

NomTypeObligatoireDescription
idstring (uuid)oui
definition_idstring (uuid)oui
definition_versionintegeroui
patient_idstring (uuid)oui
department_idstring (uuid)oui
facility_idstring (uuid)non
complaintCoding | nullnon
ticket_idstring | null (uuid)non
appointment_idstring | null (uuid)non
channel"portal" | "phone_web" | "sms_link" | "ussd" | "kiosk" | "staff_assisted"oui
language"en" | "fr"oui
entered_bystringnonpatient, representative or staff user id (staff_assisted/kiosk)
status"in_progress" | "submitted" | "amended" | "entered_in_error" | "expired" | "staff_review_required" | "accepted_for_triage"oui
answersarray of Answeroui
red_flagsarray of Response.red_flags.itemnonstaff views only; never returned on patient channels
submitted_atstring | null (date-time)non
document_idstring | null (uuid)nonOHN-13 document holding the FHIR QuestionnaireResponse
record_sync"not_submitted" | "pending_upstream" | "filed" | "failed"non
synthetic_demobooleannon
versionintegeroui
declined_link_idsarray of stringnonshown to staff as 'declined', never as a missing answer
amendmentsarray of Response.amendments.itemnonappend-only; the original answers are never overwritten

Invitation

NomTypeObligatoireDescription
idstring (uuid)oui
patient_idstring (uuid)oui
appointment_idstring | null (uuid)non
ticket_idstring | null (uuid)non
department_idstring (uuid)non
channel"sms_link" | "ussd" | "portal"oui
language"en" | "fr"non
expires_atstring (date-time)oui
state"sent" | "opened" | "submitted" | "expired" | "revoked" | "delivery_failed"oui

InvitationCreate

NomTypeObligatoireDescription
appointment_idstring (uuid)non
ticket_idstring (uuid)non
channel"sms_link" | "ussd" | "portal"oui
language"en" | "fr"oui
department_idstring (uuid)nonrequired with appointment_id unless ticket_id is given (an OHN-54 appointment has no OHN-61 department); must belong to the appointment's facility

TokenSession

NomTypeObligatoireDescription
definitionRenderedDefinitionoui
responseTokenSession.responseoui
facility_namestringnon
appointment_atstring | null (date-time)non

Attach

NomTypeObligatoireDescription
patient_idstring (uuid)oui
department_idstring (uuid)oui
facility_idstring (uuid)oui
appointment_idstring (uuid)non
complaintCodingnon

AttachResult

NomTypeObligatoireDescription
questionnaire_availablebooleanoui
state"none_configured" | "not_started" | "in_progress" | "submitted"oui
response_idsarray of string (uuid)oui
red_flagsarray of AttachResult.red_flags.itemoui

PendingForMe

NomTypeObligatoireDescription
itemsarray of PendingForMe.items.itemoui

ExportRequest

NomTypeObligatoireDescription
facility_idstring (uuid)oui
fromstring (date)oui
tostring (date)oui
format"csv" | "pdf"oui

CompletionReport

NomTypeObligatoireDescription
fromstring (date)oui
tostring (date)oui
rowsarray of CompletionReport.rows.itemoui

Versioned

NomTypeObligatoireDescription
expected_versionintegeroui

AmendRequest

NomTypeObligatoireDescription
answersarray of Answeroui
reasonstringoui
expected_versionintegeroui

UssdStep

NomTypeObligatoireDescription
session_refstringoui
msisdn_hashstringoui
invitation_codestringnon
inputstringoui

UssdReply

NomTypeObligatoireDescription
textstringoui
endbooleanoui

Review

NomTypeObligatoireDescription
decision"approved" | "changes_requested"oui
commentstringnon
expected_versionintegeroui

VersionsReport

NomTypeObligatoireDescription
fromstring (date)oui
tostring (date)oui
rowsarray of VersionsReport.rows.itemoui

StaffReview

NomTypeObligatoireDescription
decision"accepted_for_triage" | "staff_review_required"oui
notestringnon
expected_versionintegeroui

Item.scale défini sur place

NomTypeObligatoireDescription
minintegeroui
maxintegeroui
stepintegernon
min_labelI18nTextnon
max_labelI18nTextnon

Item.date_range défini sur place

NomTypeObligatoireDescription
not_after_todaybooleannon
not_before_yearsintegernon

QuestionnaireDocument.age_band défini sur place

NomTypeObligatoireDescription
min_monthsintegernon
max_monthsintegernon

QuestionnaireDocument.translation_status défini sur place

NomTypeObligatoireDescription
en"draft" | "reviewed"oui
fr"draft" | "reviewed"oui

Definition.review.option-1 défini sur place

NomTypeObligatoireDescription
requested_bystringoui
requested_atstring (date-time)oui
decision"approved" | "changes_requested" | nullnon
reviewed_bystring | nullnon
reviewed_atstring | null (date-time)non
commentstring | nullnon

Response.red_flags.item défini sur place

NomTypeObligatoireDescription
rule_idstringoui
effectstringoui
messageI18nTextoui
suggest_discriminatorstring | nullnon

Response.amendments.item défini sur place

NomTypeObligatoireDescription
atstring (date-time)oui
bystringoui
reasonstringoui
document_versioninteger | nullnon

TokenSession.response défini sur place

NomTypeObligatoireDescription
idstring (uuid)oui
statusstringoui
answersarray of Answeroui
versionintegeroui

AttachResult.red_flags.item défini sur place

NomTypeObligatoireDescription
rule_idstringoui
effectstringoui
messageI18nTextnon

PendingForMe.items.item défini sur place

NomTypeObligatoireDescription
invitation_idstring (uuid)oui
response_idstring | null (uuid)non
appointment_idstring | null (uuid)non
appointment_atstring | null (date-time)non
facility_namestringnon
department_namestringoui
statusstringoui

CompletionReport.rows.item défini sur place

NomTypeObligatoireDescription
department_idstring (uuid)oui
definition_idstring (uuid)non
invitedintegeroui
startedintegeroui
submittedintegeroui
submitted_before_arrivalintegernon
by_channelobjectnon
red_flags_raisedintegernon

VersionsReport.rows.item défini sur place

NomTypeObligatoireDescription
department_idstring (uuid)oui
definition_idstring (uuid)oui
versionintegeroui
language"en" | "fr"oui
statestringnon
usage_countintegernonresponses started
completion_ratenumber | nullnonsubmitted / started
declined_questionsintegernondeclined answers in submitted responses
declined_by_itemobjectnon
draft_or_expiredbooleannon