Created
September 14, 2023 10:31
-
-
Save hithacker/6f68e0cd58569a47ec7594e631f74974 to your computer and use it in GitHub Desktop.
Question Schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const schema = { | |
"categories": [ | |
{ | |
"id": 1, | |
"label": "Help us access the intensity of your situation" | |
}, | |
{ | |
"id": 2, | |
"label": "Help us access your gut sensitivity" | |
}, | |
{ | |
"id": 3, | |
"label": "Impact on your quality of life and movement" | |
} | |
], | |
"visibilityRules": [ | |
{ | |
"sourceId": 1, | |
"operator": "EQUALS", //EQUALS, NOT_EQUALS | |
"value": "Yes", | |
"targetId": [2, 3] | |
}, | |
{ | |
"sourceId": 4, | |
"operator": "EQUALS", //EQUALS, NOT_EQUALS | |
"value": "Yes", | |
"targetId": [5] | |
} | |
], | |
"questions": [ | |
{ | |
"id": 1, | |
"question": "Do you currently suffer from abdominal pain?", | |
"subtext": "", | |
"type": "SingleSelect", | |
"choices": [ | |
"Yes", | |
"No" | |
], | |
"scoring": false, | |
"categoryId": 1 | |
}, | |
{ | |
"id": 2, | |
"question": "How severe is your abdominal pain?", | |
"subtext": "", | |
"type": "Slider", | |
"range": [ | |
0, | |
100 | |
], | |
"labels": ["no pain", "not very severe", "quite severe", "severe", "very severe"], | |
"scoring": true, | |
"categoryId": 1 | |
}, | |
{ | |
"id": 3, | |
"question": "Please enter the number of days that you get the pain in every 10 days", | |
"subtext": "", | |
"type": "number", | |
"scaleFactor": 10, | |
"scoring": true, | |
"categoryId": 1 | |
}, | |
{ | |
"id": 4, | |
"question": "Do you currently suffer from abdominal distension?", | |
"subtext": "*women please ignore distension related to periods", | |
"type": "SingleSelect", | |
"choices": [ | |
"Yes", | |
"No" | |
], | |
"scoring": false, | |
"categoryId": 2 | |
}, | |
{ | |
"id": 5, | |
"question": "How severe is your abdominal distension?", | |
"subtext": "", | |
"type": "Slider", | |
"range": [ | |
0, | |
100 | |
], | |
"labels": ["no distension", "not very severe", "quite severe", "severe", "very severe"], | |
"scoring": true, | |
"categoryId": 2 | |
}, | |
{ | |
"id": 6, | |
"question": "How satisfied are you with your bowel habit", | |
"subtext": "", | |
"type": "SliderWithIcon", | |
"range": [ | |
0, | |
100 | |
], | |
"labels": [{name: "very happy", "image": ""}, {name: "quite happy", "image": ""}, {name: "A bit unhappy", "image": ""}, {name: "very dissatisfied", "image": ""}], | |
"scoring": true, | |
"categoryId": 2 | |
}, | |
{ | |
"id": 7, | |
"question": "Please indicate with a cross how much is IBS affecting your quality of life?", | |
"subtext": "", | |
"type": "Slider", | |
"range": [ | |
0, | |
100 | |
], | |
"labels": ["not at all", "not much", "quite a lot", "completely"], | |
"scoring": true, | |
"categoryId": 3 | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment