@aehrc/smart-forms-renderer 0.27.3 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.ts +2 -1
- package/.storybook/preview.ts +6 -1
- package/.swcrc +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.d.ts +3 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.js +9 -17
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js +12 -9
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.js +7 -9
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js +12 -8
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.d.ts +3 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js +14 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js +9 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.d.ts +3 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.js +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.d.ts +3 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js +16 -8
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js +7 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.d.ts +2 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js +2 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js +8 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.d.ts +3 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.js +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.js.map +1 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/DateTimeField.d.ts +2 -1
- package/lib/components/FormComponents/DateTimeItems/CustomDateTimeItem/DateTimeField.js.map +1 -1
- package/lib/components/FormComponents/DecimalItem/DecimalItem.js +3 -1
- package/lib/components/FormComponents/DecimalItem/DecimalItem.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/TabButtonsWrapper.js +20 -20
- package/lib/components/FormComponents/GroupItem/TabButtonsWrapper.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.d.ts +3 -2
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.js +7 -19
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js +40 -40
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js +15 -3
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.d.ts +2 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js +3 -3
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js +27 -26
- package/lib/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/StringItem/StringField.js +1 -1
- package/lib/components/FormComponents/StringItem/StringField.js.map +1 -1
- package/lib/hooks/useInitialiseRenderer.js +1 -1
- package/lib/hooks/useInitialiseRenderer.js.map +1 -1
- package/lib/hooks/useNextAndPreviousVisibleTabs.d.ts +7 -0
- package/lib/hooks/useNextAndPreviousVisibleTabs.js +63 -0
- package/lib/hooks/useNextAndPreviousVisibleTabs.js.map +1 -0
- package/lib/hooks/useNextPreviousVisibleTabs.d.ts +6 -0
- package/lib/hooks/useNextPreviousVisibleTabs.js +63 -0
- package/lib/hooks/useNextPreviousVisibleTabs.js.map +1 -0
- package/lib/hooks/useValidationFeedback.js +1 -1
- package/lib/index.d.ts +0 -7
- package/lib/index.js +0 -24
- package/lib/index.js.map +1 -1
- package/lib/utils/choice.d.ts +1 -7
- package/lib/utils/choice.js +10 -20
- package/lib/utils/choice.js.map +1 -1
- package/lib/utils/enableWhen.js +5 -7
- package/lib/utils/enableWhen.js.map +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/openChoice.d.ts +9 -4
- package/lib/utils/openChoice.js +47 -78
- package/lib/utils/openChoice.js.map +1 -1
- package/lib/utils/tabs.d.ts +0 -21
- package/lib/utils/tabs.js +0 -51
- package/lib/utils/tabs.js.map +1 -1
- package/lib/utils/validateQuestionnaire.js.map +1 -1
- package/package.json +9 -6
- package/src/components/FormComponents/ChoiceItems/CheckboxOptionList.tsx +82 -0
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionFields.tsx +23 -52
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx +15 -9
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetFields.tsx +17 -19
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx +13 -8
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.tsx +32 -4
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.tsx +12 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.tsx +10 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.tsx +29 -17
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.tsx +10 -4
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.tsx +4 -3
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.tsx +10 -2
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.tsx +8 -2
- package/src/components/FormComponents/DateTimeItems/CustomDateTimeItem/DateTimeField.tsx +2 -1
- package/src/components/FormComponents/DecimalItem/DecimalItem.tsx +15 -12
- package/src/components/FormComponents/GroupItem/TabButtonsWrapper.tsx +28 -25
- package/src/components/FormComponents/ItemParts/{RadioAnswerOptionButtons.tsx → RadioOptionList.tsx} +7 -7
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionFields.tsx +18 -50
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerOptionItem.tsx +70 -68
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetFields.tsx +110 -0
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceCheckboxAnswerValueSetItem.tsx +188 -0
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceItemSwitcher.tsx +46 -19
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionFields.tsx +5 -3
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerOptionItem.tsx +37 -29
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetFields.tsx +104 -0
- package/src/components/FormComponents/OpenChoiceItems/OpenChoiceRadioAnswerValueSetItem.tsx +156 -0
- package/src/components/FormComponents/StringItem/StringField.tsx +1 -1
- package/src/hooks/useInitialiseRenderer.ts +1 -1
- package/src/hooks/useNextAndPreviousVisibleTabs.ts +86 -0
- package/src/hooks/useOpenLabel.ts +43 -0
- package/src/hooks/useValidationFeedback.ts +1 -1
- package/src/index.ts +0 -21
- package/src/stories/BuildFormWrapper.tsx +57 -0
- package/src/stories/assets/questionnaires/QAdvancedAdditionalDisplayContent.ts +113 -0
- package/src/stories/assets/questionnaires/QAdvancedControlAppearance.ts +294 -0
- package/src/stories/assets/questionnaires/QAdvancedOther.ts +494 -0
- package/src/stories/assets/questionnaires/QAdvancedTextApperance.ts +216 -0
- package/src/stories/assets/questionnaires/QAttachment.ts +38 -0
- package/src/stories/assets/questionnaires/QBehaviorCalculations.ts +645 -0
- package/src/stories/assets/questionnaires/QBehaviorChoiceRestriction.ts +281 -0
- package/src/stories/assets/questionnaires/QBehaviorOther.ts +1149 -0
- package/src/stories/assets/questionnaires/QBehaviorValueConstraints.ts +508 -0
- package/src/stories/assets/questionnaires/QBoolean.ts +130 -0
- package/src/stories/assets/questionnaires/QChoice.ts +493 -0
- package/src/stories/assets/questionnaires/QDate.ts +56 -0
- package/src/stories/assets/questionnaires/QDateTime.ts +56 -0
- package/src/stories/assets/questionnaires/QDecimal.ts +56 -0
- package/src/stories/assets/questionnaires/QDisplay.ts +38 -0
- package/src/stories/assets/questionnaires/QGroup.ts +52 -0
- package/src/stories/assets/questionnaires/QInteger.ts +119 -0
- package/src/stories/assets/questionnaires/QItemControlDisplay.ts +557 -0
- package/src/stories/assets/questionnaires/QItemControlGroup.ts +633 -0
- package/src/stories/assets/questionnaires/QItemControlQuestion.ts +1271 -0
- package/src/stories/assets/questionnaires/QOpenChoice.ts +151 -0
- package/src/stories/assets/questionnaires/QQuantity.ts +44 -0
- package/src/stories/assets/questionnaires/QReference.ts +38 -0
- package/src/stories/assets/questionnaires/QSingleItems.ts +251 -0
- package/src/stories/assets/questionnaires/QString.ts +131 -0
- package/src/stories/assets/questionnaires/QText.ts +169 -0
- package/src/stories/assets/questionnaires/QTime.ts +38 -0
- package/src/stories/assets/questionnaires/QUrl.ts +38 -0
- package/src/stories/assets/questionnaires/index.ts +44 -0
- package/src/stories/itemTypes/Attachment.stories.tsx +39 -0
- package/src/stories/{MedicalHistoryTable.stories.tsx → itemTypes/Boolean.stories.tsx} +24 -26
- package/src/stories/itemTypes/Choice.stories.tsx +78 -0
- package/src/stories/itemTypes/Date.stories.tsx +46 -0
- package/src/stories/itemTypes/DateTime.stories.tsx +45 -0
- package/src/stories/itemTypes/Decimal.stories.tsx +56 -0
- package/src/stories/itemTypes/Display.stories.tsx +39 -0
- package/src/stories/itemTypes/Group.stories.tsx +39 -0
- package/src/stories/itemTypes/Integer.stories.tsx +55 -0
- package/src/stories/itemTypes/OpenChoice.stories.tsx +64 -0
- package/src/stories/itemTypes/Quantity.stories.tsx +39 -0
- package/src/stories/itemTypes/Reference.stories.tsx +39 -0
- package/src/stories/itemTypes/String.stories.tsx +51 -0
- package/src/stories/itemTypes/Text.stories.tsx +51 -0
- package/src/stories/itemTypes/Time.stories.tsx +39 -0
- package/src/stories/itemTypes/Url.stories.tsx +39 -0
- package/src/stories/sdc/AdvancedAdditionalDisplayContent.stories.tsx +51 -0
- package/src/stories/sdc/AdvancedControlAppearance.stories.tsx +51 -0
- package/src/stories/sdc/AdvancedOther.stories.tsx +76 -0
- package/src/stories/sdc/AdvancedTextAppearance.stories.tsx +76 -0
- package/src/stories/sdc/BehaviorCalculations.stories.tsx +69 -0
- package/src/stories/sdc/BehaviorChoiceRestriction.stories.tsx +76 -0
- package/src/stories/sdc/BehaviorOther.stories.tsx +90 -0
- package/src/stories/sdc/BehaviorValueConstraints.stories.tsx +88 -0
- package/src/stories/sdc/ItemControlDisplay.stories.tsx +69 -0
- package/src/stories/sdc/ItemControlGroup.stories.tsx +62 -0
- package/src/stories/sdc/ItemControlQuestion.stories.tsx +118 -0
- package/src/tests/enableWhen.test.ts +112 -0
- package/src/tests/test-data/enable-when-items-sample.json +3848 -0
- package/src/tests/test-data/initial-answers-sample.json +16 -0
- package/src/tests/test-data/linked-questions-map.json +217 -0
- package/src/tests/test-data/questionnaire-response-sample.json +650 -0
- package/src/utils/buildForm.ts +23 -0
- package/src/utils/choice.ts +16 -23
- package/src/utils/enableWhen.ts +5 -7
- package/src/utils/index.ts +1 -0
- package/src/utils/openChoice.ts +83 -98
- package/src/utils/tabs.ts +0 -75
- package/src/utils/validateQuestionnaire.ts +18 -6
- package/vite.config.ts +23 -0
- package/doctor-storybook.log +0 -18
- package/src/stories/SmartFormsRenderer.stories.ts +0 -139
- package/src/stories/assets/QItems-and-QRItems/QR_GTableMedicalHistory.json +0 -80
- package/src/stories/assets/QItems-and-QRItems/Q_GTableMedicalHistory.json +0 -109
- package/src/stories/assets/Qs-and-QRs/Q715.json +0 -15086
- package/src/stories/assets/Qs-and-QRs/QDev715.json +0 -16081
- package/src/stories/assets/Qs-and-QRs/QTestGrid.json +0 -411
- package/src/stories/assets/Qs-and-QRs/R715.json +0 -311
- package/src/stories/assets/Qs-and-QRs/RTestGrid.json +0 -34
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Commonwealth Scientific and Industrial Research
|
|
3
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { Questionnaire, QuestionnaireResponse } from 'fhir/r4';
|
|
19
|
+
|
|
20
|
+
export const qChoiceAnswerOptionBasic: Questionnaire = {
|
|
21
|
+
resourceType: 'Questionnaire',
|
|
22
|
+
id: 'ChoiceAnswerOptionBasic',
|
|
23
|
+
name: 'ChoiceAnswerOptionBasic',
|
|
24
|
+
title: 'Choice AnswerOption Basic',
|
|
25
|
+
version: '0.1.0',
|
|
26
|
+
status: 'draft',
|
|
27
|
+
publisher: 'AEHRC CSIRO',
|
|
28
|
+
date: '2024-05-01',
|
|
29
|
+
url: 'https://smartforms.csiro.au/docs/components/choice/answeroption-basic',
|
|
30
|
+
item: [
|
|
31
|
+
{
|
|
32
|
+
linkId: 'smoking-status',
|
|
33
|
+
text: 'Smoking status',
|
|
34
|
+
type: 'choice',
|
|
35
|
+
repeats: false,
|
|
36
|
+
answerOption: [
|
|
37
|
+
{
|
|
38
|
+
valueCoding: {
|
|
39
|
+
system: 'http://snomed.info/sct',
|
|
40
|
+
code: '266919005',
|
|
41
|
+
display: 'Never smoked'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
valueCoding: {
|
|
46
|
+
system: 'http://snomed.info/sct',
|
|
47
|
+
code: '77176002',
|
|
48
|
+
display: 'Smoker'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
valueCoding: {
|
|
53
|
+
system: 'http://snomed.info/sct',
|
|
54
|
+
code: '8517006',
|
|
55
|
+
display: 'Ex-smoker'
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
valueCoding: {
|
|
60
|
+
system: 'http://snomed.info/sct',
|
|
61
|
+
code: '16090371000119103',
|
|
62
|
+
display: 'Exposure to second hand tobacco smoke'
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
valueString: 'Wants to quit'
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
valueString: 'Other tobacco use'
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const qrChoiceAnswerOptionBasicResponse: QuestionnaireResponse = {
|
|
77
|
+
resourceType: 'QuestionnaireResponse',
|
|
78
|
+
status: 'in-progress',
|
|
79
|
+
item: [
|
|
80
|
+
{
|
|
81
|
+
linkId: 'smoking-status',
|
|
82
|
+
text: 'Smoking status',
|
|
83
|
+
answer: [
|
|
84
|
+
{
|
|
85
|
+
valueCoding: {
|
|
86
|
+
system: 'http://snomed.info/sct',
|
|
87
|
+
code: '16090371000119103',
|
|
88
|
+
display: 'Exposure to second hand tobacco smoke'
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
questionnaire: 'https://smartforms.csiro.au/docs/components/choice/answeroption-basic'
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const qChoiceAnswerValueSetBasic: Questionnaire = {
|
|
98
|
+
resourceType: 'Questionnaire',
|
|
99
|
+
id: 'ChoiceAnswerValueSetBasic',
|
|
100
|
+
name: 'ChoiceAnswerValueSetBasic',
|
|
101
|
+
title: 'Choice AnswerValueSet Basic',
|
|
102
|
+
version: '0.1.0',
|
|
103
|
+
status: 'draft',
|
|
104
|
+
publisher: 'AEHRC CSIRO',
|
|
105
|
+
date: '2024-05-01',
|
|
106
|
+
url: 'https://smartforms.csiro.au/docs/components/choice/answervalueset-basic',
|
|
107
|
+
item: [
|
|
108
|
+
{
|
|
109
|
+
linkId: 'gender',
|
|
110
|
+
text: 'Gender',
|
|
111
|
+
type: 'choice',
|
|
112
|
+
repeats: false,
|
|
113
|
+
answerValueSet: 'http://hl7.org/fhir/ValueSet/administrative-gender'
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export const qrChoiceAnswerValueSetBasicResponse: QuestionnaireResponse = {
|
|
119
|
+
resourceType: 'QuestionnaireResponse',
|
|
120
|
+
status: 'in-progress',
|
|
121
|
+
item: [
|
|
122
|
+
{
|
|
123
|
+
linkId: 'gender',
|
|
124
|
+
text: 'Gender',
|
|
125
|
+
answer: [
|
|
126
|
+
{
|
|
127
|
+
valueCoding: {
|
|
128
|
+
system: 'http://hl7.org/fhir/administrative-gender',
|
|
129
|
+
code: 'female',
|
|
130
|
+
display: 'Female'
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
questionnaire: 'https://smartforms.csiro.au/docs/components/choice/answervalueset-basic'
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export const qChoiceAnswerOptionCalculation: Questionnaire = {
|
|
140
|
+
resourceType: 'Questionnaire',
|
|
141
|
+
id: 'ChoiceAnswerOptionCalculation',
|
|
142
|
+
name: 'ChoiceAnswerOptionCalculation',
|
|
143
|
+
title: 'Choice AnswerOption Calculation',
|
|
144
|
+
version: '0.1.0',
|
|
145
|
+
status: 'draft',
|
|
146
|
+
publisher: 'AEHRC CSIRO',
|
|
147
|
+
date: '2024-05-01',
|
|
148
|
+
url: 'https://smartforms.csiro.au/docs/components/choice/answeroption-calculation',
|
|
149
|
+
extension: [
|
|
150
|
+
{
|
|
151
|
+
url: 'http://hl7.org/fhir/StructureDefinition/variable',
|
|
152
|
+
valueExpression: {
|
|
153
|
+
name: 'painLevel',
|
|
154
|
+
language: 'text/fhirpath',
|
|
155
|
+
expression: "item.where(linkId = 'pain-level').answer.value"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
item: [
|
|
160
|
+
{
|
|
161
|
+
extension: [
|
|
162
|
+
{
|
|
163
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
164
|
+
valueCodeableConcept: {
|
|
165
|
+
coding: [
|
|
166
|
+
{
|
|
167
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
168
|
+
code: 'slider'
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-sliderStepValue',
|
|
175
|
+
valueInteger: 1
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
url: 'http://hl7.org/fhir/StructureDefinition/minValue',
|
|
179
|
+
valueInteger: 0
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
url: 'http://hl7.org/fhir/StructureDefinition/maxValue',
|
|
183
|
+
valueInteger: 10
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
linkId: 'pain-level',
|
|
187
|
+
text: 'Pain level',
|
|
188
|
+
type: 'integer',
|
|
189
|
+
repeats: false,
|
|
190
|
+
item: [
|
|
191
|
+
{
|
|
192
|
+
extension: [
|
|
193
|
+
{
|
|
194
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
195
|
+
valueCodeableConcept: {
|
|
196
|
+
coding: [
|
|
197
|
+
{
|
|
198
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
199
|
+
code: 'lower'
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
linkId: 'pain-level-lower',
|
|
206
|
+
text: 'No pain',
|
|
207
|
+
type: 'display'
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
extension: [
|
|
211
|
+
{
|
|
212
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
213
|
+
valueCodeableConcept: {
|
|
214
|
+
coding: [
|
|
215
|
+
{
|
|
216
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
217
|
+
code: 'upper'
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
linkId: 'pain-level-upper',
|
|
224
|
+
text: 'Unbearable pain',
|
|
225
|
+
type: 'display'
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
extension: [
|
|
231
|
+
{
|
|
232
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
233
|
+
valueCodeableConcept: {
|
|
234
|
+
coding: [
|
|
235
|
+
{
|
|
236
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
237
|
+
code: 'radio-button'
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation',
|
|
244
|
+
valueCode: 'horizontal'
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression',
|
|
248
|
+
valueExpression: {
|
|
249
|
+
language: 'text/fhirpath',
|
|
250
|
+
expression: "iif(%painLevel.empty(), '', iif(%painLevel < 5, 'Y', 'N'))"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
linkId: 'pain-low',
|
|
255
|
+
text: 'Low pain (Level < 5)',
|
|
256
|
+
type: 'choice',
|
|
257
|
+
repeats: false,
|
|
258
|
+
readOnly: true,
|
|
259
|
+
answerOption: [
|
|
260
|
+
{
|
|
261
|
+
valueCoding: {
|
|
262
|
+
system: 'http://terminology.hl7.org/CodeSystem/v2-0532',
|
|
263
|
+
code: 'Y',
|
|
264
|
+
display: 'Yes'
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
valueCoding: {
|
|
269
|
+
system: 'http://terminology.hl7.org/CodeSystem/v2-0532',
|
|
270
|
+
code: 'N',
|
|
271
|
+
display: 'No'
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
export const qChoiceAnswerValueSetCalculation: Questionnaire = {
|
|
280
|
+
resourceType: 'Questionnaire',
|
|
281
|
+
id: 'ChoiceAnswerValueSetCalculation',
|
|
282
|
+
name: 'ChoiceAnswerValueSetCalculation',
|
|
283
|
+
title: 'Choice AnswerValueSet Calculation',
|
|
284
|
+
version: '0.1.0',
|
|
285
|
+
status: 'draft',
|
|
286
|
+
publisher: 'AEHRC CSIRO',
|
|
287
|
+
date: '2024-05-01',
|
|
288
|
+
url: 'https://smartforms.csiro.au/docs/components/choice/answervalueset-calculation',
|
|
289
|
+
contained: [
|
|
290
|
+
{
|
|
291
|
+
resourceType: 'ValueSet',
|
|
292
|
+
id: 'australian-states-territories-2',
|
|
293
|
+
meta: {
|
|
294
|
+
profile: [
|
|
295
|
+
'http://hl7.org/fhir/StructureDefinition/shareablevalueset',
|
|
296
|
+
'https://healthterminologies.gov.au/fhir/StructureDefinition/composed-value-set-4'
|
|
297
|
+
]
|
|
298
|
+
},
|
|
299
|
+
url: 'https://healthterminologies.gov.au/fhir/ValueSet/australian-states-territories-2',
|
|
300
|
+
identifier: [
|
|
301
|
+
{
|
|
302
|
+
system: 'urn:ietf:rfc:3986',
|
|
303
|
+
value: 'urn:oid:1.2.36.1.2001.1004.201.10026'
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
version: '2.0.2',
|
|
307
|
+
name: 'AustralianStatesAndTerritories',
|
|
308
|
+
title: 'Australian States and Territories',
|
|
309
|
+
status: 'active',
|
|
310
|
+
experimental: false,
|
|
311
|
+
date: '2020-05-31',
|
|
312
|
+
publisher: 'Australian Digital Health Agency',
|
|
313
|
+
contact: [
|
|
314
|
+
{
|
|
315
|
+
telecom: [
|
|
316
|
+
{
|
|
317
|
+
system: 'email',
|
|
318
|
+
value: 'help@digitalhealth.gov.au'
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
description:
|
|
324
|
+
'The Australian States and Territories value set includes values that represent the Australian states and territories.',
|
|
325
|
+
copyright:
|
|
326
|
+
'Copyright © 2018 Australian Digital Health Agency - All rights reserved. Except for the material identified below, this content is licensed under a Creative Commons Attribution 4.0 International License. See https://creativecommons.org/licenses/by/4.0/. \n\nThis resource includes material that is based on Australian Institute of Health and Welfare material. \n\nAll copies of this resource must include this copyright statement and all information contained in this statement.',
|
|
327
|
+
compose: {
|
|
328
|
+
include: [
|
|
329
|
+
{
|
|
330
|
+
system:
|
|
331
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
332
|
+
concept: [
|
|
333
|
+
{
|
|
334
|
+
code: 'ACT'
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
code: 'NSW'
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
code: 'NT'
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
code: 'OTHER'
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
code: 'QLD'
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
code: 'SA'
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
code: 'TAS'
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
code: 'VIC'
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
code: 'WA'
|
|
359
|
+
}
|
|
360
|
+
]
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
},
|
|
364
|
+
expansion: {
|
|
365
|
+
identifier: 'e9439195-c1d8-4069-a349-98c1d552a351',
|
|
366
|
+
timestamp: '2023-06-20T04:20:58+00:00',
|
|
367
|
+
total: 9,
|
|
368
|
+
offset: 0,
|
|
369
|
+
parameter: [
|
|
370
|
+
{
|
|
371
|
+
name: 'version',
|
|
372
|
+
valueUri:
|
|
373
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1|1.1.3'
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
name: 'count',
|
|
377
|
+
valueInteger: 2147483647
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
name: 'offset',
|
|
381
|
+
valueInteger: 0
|
|
382
|
+
}
|
|
383
|
+
],
|
|
384
|
+
contains: [
|
|
385
|
+
{
|
|
386
|
+
system:
|
|
387
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
388
|
+
code: 'ACT',
|
|
389
|
+
display: 'Australian Capital Territory'
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
system:
|
|
393
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
394
|
+
code: 'NSW',
|
|
395
|
+
display: 'New South Wales'
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
system:
|
|
399
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
400
|
+
code: 'NT',
|
|
401
|
+
display: 'Northern Territory'
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
system:
|
|
405
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
406
|
+
code: 'OTHER',
|
|
407
|
+
display: 'Other territories'
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
system:
|
|
411
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
412
|
+
code: 'QLD',
|
|
413
|
+
display: 'Queensland'
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
system:
|
|
417
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
418
|
+
code: 'SA',
|
|
419
|
+
display: 'South Australia'
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
system:
|
|
423
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
424
|
+
code: 'TAS',
|
|
425
|
+
display: 'Tasmania'
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
system:
|
|
429
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
430
|
+
code: 'VIC',
|
|
431
|
+
display: 'Victoria'
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
system:
|
|
435
|
+
'https://healthterminologies.gov.au/fhir/CodeSystem/australian-states-territories-1',
|
|
436
|
+
code: 'WA',
|
|
437
|
+
display: 'Western Australia'
|
|
438
|
+
}
|
|
439
|
+
]
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
],
|
|
443
|
+
extension: [
|
|
444
|
+
{
|
|
445
|
+
url: 'http://hl7.org/fhir/StructureDefinition/variable',
|
|
446
|
+
valueExpression: {
|
|
447
|
+
name: 'stateCode',
|
|
448
|
+
language: 'text/fhirpath',
|
|
449
|
+
expression: "item.where(linkId = 'state-controller').answer.value"
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
],
|
|
453
|
+
item: [
|
|
454
|
+
{
|
|
455
|
+
linkId: 'state-controller-instructions',
|
|
456
|
+
text: 'Feel free to play around with the following state codes: ACT, NSW, NT, OTHER, QLD, SA, TAS, VIC, WA',
|
|
457
|
+
_text: {
|
|
458
|
+
extension: [
|
|
459
|
+
{
|
|
460
|
+
url: 'http://hl7.org/fhir/StructureDefinition/rendering-xhtml',
|
|
461
|
+
valueString:
|
|
462
|
+
'<div xmlns="http://www.w3.org/1999/xhtml">\r\n <div style="font-size:0.875em">Feel free to play around with the following state codes:</div>\r\n <ul style="font-size:0.875em">\r\n <li>ACT</li>\r\n <li>NSW</li>\r\n <li>NT</li>\r\n <li>OTHER</li>\r\n <li>QLD</li>\r\n <li>SA</li>\r\n <li>TAS</li>\r\n <li>VIC</li>\r\n <li>WA</li>\r\n </ul>\r\n </div>'
|
|
463
|
+
}
|
|
464
|
+
]
|
|
465
|
+
},
|
|
466
|
+
type: 'display',
|
|
467
|
+
repeats: false
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
linkId: 'state-controller',
|
|
471
|
+
text: 'State (string)',
|
|
472
|
+
type: 'string',
|
|
473
|
+
repeats: false
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
extension: [
|
|
477
|
+
{
|
|
478
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression',
|
|
479
|
+
valueExpression: {
|
|
480
|
+
language: 'text/fhirpath',
|
|
481
|
+
expression: '%stateCode'
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
],
|
|
485
|
+
linkId: 'state-choice',
|
|
486
|
+
text: 'State (choice)',
|
|
487
|
+
type: 'choice',
|
|
488
|
+
repeats: false,
|
|
489
|
+
readOnly: true,
|
|
490
|
+
answerValueSet: '#australian-states-territories-2'
|
|
491
|
+
}
|
|
492
|
+
]
|
|
493
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Commonwealth Scientific and Industrial Research
|
|
3
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { Questionnaire } from 'fhir/r4';
|
|
19
|
+
import type { QuestionnaireResponse } from 'fhir/r4';
|
|
20
|
+
|
|
21
|
+
export const qDateBasic: Questionnaire = {
|
|
22
|
+
resourceType: 'Questionnaire',
|
|
23
|
+
id: 'DateBasic',
|
|
24
|
+
name: 'DateBasic',
|
|
25
|
+
title: 'Date Basic',
|
|
26
|
+
version: '0.1.0',
|
|
27
|
+
status: 'draft',
|
|
28
|
+
publisher: 'AEHRC CSIRO',
|
|
29
|
+
date: '2024-05-01',
|
|
30
|
+
url: 'https://smartforms.csiro.au/docs/components/date/basic',
|
|
31
|
+
item: [
|
|
32
|
+
{
|
|
33
|
+
linkId: 'dob',
|
|
34
|
+
type: 'date',
|
|
35
|
+
repeats: false,
|
|
36
|
+
text: 'Date of birth'
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const qrDateBasicResponse: QuestionnaireResponse = {
|
|
42
|
+
resourceType: 'QuestionnaireResponse',
|
|
43
|
+
status: 'in-progress',
|
|
44
|
+
item: [
|
|
45
|
+
{
|
|
46
|
+
linkId: 'dob',
|
|
47
|
+
text: 'Date of birth',
|
|
48
|
+
answer: [
|
|
49
|
+
{
|
|
50
|
+
valueDate: '1990-01-01'
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
questionnaire: 'https://smartforms.csiro.au/docs/components/date/basic'
|
|
56
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Commonwealth Scientific and Industrial Research
|
|
3
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { Questionnaire } from 'fhir/r4';
|
|
19
|
+
import type { QuestionnaireResponse } from 'fhir/r4';
|
|
20
|
+
|
|
21
|
+
export const qDateTimeBasic: Questionnaire = {
|
|
22
|
+
resourceType: 'Questionnaire',
|
|
23
|
+
id: 'DateTimeBasic',
|
|
24
|
+
name: 'DateTimeBasic',
|
|
25
|
+
title: 'DateTime Basic',
|
|
26
|
+
version: '0.1.0',
|
|
27
|
+
status: 'draft',
|
|
28
|
+
publisher: 'AEHRC CSIRO',
|
|
29
|
+
date: '2024-05-01',
|
|
30
|
+
url: 'https://smartforms.csiro.au/docs/components/datetime/basic',
|
|
31
|
+
item: [
|
|
32
|
+
{
|
|
33
|
+
linkId: 'dob',
|
|
34
|
+
type: 'dateTime',
|
|
35
|
+
repeats: false,
|
|
36
|
+
text: 'Datetime of birth'
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const qrDateTimeBasicResponse: QuestionnaireResponse = {
|
|
42
|
+
resourceType: 'QuestionnaireResponse',
|
|
43
|
+
status: 'in-progress',
|
|
44
|
+
item: [
|
|
45
|
+
{
|
|
46
|
+
linkId: 'dob',
|
|
47
|
+
text: 'Date of birth',
|
|
48
|
+
answer: [
|
|
49
|
+
{
|
|
50
|
+
valueDateTime: '1990-01-01T00:53:00Z'
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
questionnaire: 'https://smartforms.csiro.au/docs/components/datetime/basic'
|
|
56
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Commonwealth Scientific and Industrial Research
|
|
3
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { Questionnaire } from 'fhir/r4';
|
|
19
|
+
import type { QuestionnaireResponse } from 'fhir/r4';
|
|
20
|
+
|
|
21
|
+
export const qDecimalBasic: Questionnaire = {
|
|
22
|
+
resourceType: 'Questionnaire',
|
|
23
|
+
id: 'DecimalBasic',
|
|
24
|
+
name: 'DecimalBasic',
|
|
25
|
+
title: 'Decimal Basic',
|
|
26
|
+
version: '0.1.0',
|
|
27
|
+
status: 'draft',
|
|
28
|
+
publisher: 'AEHRC CSIRO',
|
|
29
|
+
date: '2024-05-01',
|
|
30
|
+
url: 'https://smartforms.csiro.au/docs/components/decimal/basic',
|
|
31
|
+
item: [
|
|
32
|
+
{
|
|
33
|
+
linkId: 'weight',
|
|
34
|
+
type: 'decimal',
|
|
35
|
+
repeats: false,
|
|
36
|
+
text: 'Weight in kg'
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const qrDecimalBasicResponse: QuestionnaireResponse = {
|
|
42
|
+
resourceType: 'QuestionnaireResponse',
|
|
43
|
+
status: 'in-progress',
|
|
44
|
+
item: [
|
|
45
|
+
{
|
|
46
|
+
linkId: 'weight',
|
|
47
|
+
text: 'Weight in kg',
|
|
48
|
+
answer: [
|
|
49
|
+
{
|
|
50
|
+
valueDecimal: 80.3
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
questionnaire: 'https://smartforms.csiro.au/docs/components/decimal/basic'
|
|
56
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Commonwealth Scientific and Industrial Research
|
|
3
|
+
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { Questionnaire } from 'fhir/r4';
|
|
19
|
+
|
|
20
|
+
export const qDisplayBasic: Questionnaire = {
|
|
21
|
+
resourceType: 'Questionnaire',
|
|
22
|
+
id: 'DisplayBasic',
|
|
23
|
+
name: 'DisplayBasic',
|
|
24
|
+
title: 'Display Basic',
|
|
25
|
+
version: '0.1.0',
|
|
26
|
+
status: 'draft',
|
|
27
|
+
publisher: 'AEHRC CSIRO',
|
|
28
|
+
date: '2024-05-01',
|
|
29
|
+
url: 'https://smartforms.csiro.au/docs/components/display/basic',
|
|
30
|
+
item: [
|
|
31
|
+
{
|
|
32
|
+
linkId: 'information-display',
|
|
33
|
+
type: 'display',
|
|
34
|
+
repeats: false,
|
|
35
|
+
text: 'You can use the display item to show information to the user.'
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
};
|