Questionnaires
Submit a standardized mdhub questionnaire (PHQ-9, GAD-7, MADRS) by raw scores
Submits a standardized questionnaire identified by mdhubType using only an array of integer scores. The server fetches the authoritative questionnaire schema from mdhub by mdhubType and maps each entry in responses to the appropriate response label (Likert scale items for PHQ-9 and GAD-7, option indexes for MADRS).
Lengths and ranges:
- mdhub-phq-9: 9 integers, each 0..3
- mdhub-gad-7: 7 integers, each 0..3
- mdhub-madrs: 10 integers, each 0..6
Validation runs against the actual questionnaire stored in mdhub, so wrong array length or out-of-range entries return a 400 with detailed issues[].
Once stored, an AI summary and a numeric score are generated automatically.
post/questionnaires/submit-mdhub
Request body
Example request
{
"patientId": "abc123",
"mdhubType": "mdhub-gad-7",
"responses": [
0,
2,
1,
3,
1,
0,
2
]
}Response
Questionnaire submitted successfully
Example response
{
"patientQuestionnaireId": "pq_123abc"
}Changes
No recorded changes to this endpoint across all 1 revision of this API.