Skip to content

Commit 33a9c6f

Browse files
committed
Update fhir-analytics example
Change admin password to "admin" Add init bundle to load Questionnaire
1 parent c65f81f commit 33a9c6f

File tree

2 files changed

+358
-1
lines changed

2 files changed

+358
-1
lines changed

fhir-analytics/docker-compose.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ services:
1717
pull_policy: always
1818
depends_on:
1919
- aidbox-db
20+
volumes:
21+
- ./resources:/resources
2022
ports:
2123
- 8080:8080
2224
environment:
23-
AIDBOX_ADMIN_PASSWORD: password
25+
BOX_INIT_BUNDLE: 'file:///resources/init-bundle.json'
26+
AIDBOX_ADMIN_PASSWORD: admin
2427
AIDBOX_CLIENT_SECRET: secret
2528
AIDBOX_COMPLIANCE: enabled
2629
AIDBOX_CORRECT_AIDBOX_FORMAT: true
+354
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,354 @@
1+
{
2+
"type": "batch",
3+
"entry": [
4+
{
5+
"resource": {
6+
"resourceType": "Questionnaire",
7+
"title": "CVD Reference Form",
8+
"id": "cvd-reference-form",
9+
"status": "draft",
10+
"url": "http://forms.aidbox.io/questionnaire/cvd-form",
11+
"item": [
12+
{
13+
"item": [
14+
{
15+
"text": "Given",
16+
"type": "string",
17+
"linkId": "kG70nh3M",
18+
"extension": [
19+
{
20+
"url": "http://aidbox.io/questionnaire-itemColumnSize",
21+
"valueInteger": 4
22+
}
23+
]
24+
},
25+
{
26+
"text": "Family",
27+
"type": "string",
28+
"linkId": "kpiXBdPU",
29+
"extension": [
30+
{
31+
"url": "http://aidbox.io/questionnaire-itemColumnSize",
32+
"valueInteger": 4
33+
}
34+
]
35+
},
36+
{
37+
"text": "Gender",
38+
"type": "choice",
39+
"linkId": "Jw_kMVir",
40+
"extension": [
41+
{
42+
"url": "http://aidbox.io/questionnaire-itemColumnSize",
43+
"valueInteger": 4
44+
}
45+
],
46+
"answerOption": [
47+
{
48+
"valueCoding": {
49+
"code": "male",
50+
"display": "Male"
51+
}
52+
},
53+
{
54+
"valueCoding": {
55+
"code": "female",
56+
"display": "Female"
57+
}
58+
}
59+
]
60+
}
61+
],
62+
"text": "Patient",
63+
"type": "group",
64+
"linkId": "Zicv0gIs"
65+
},
66+
{
67+
"item": [
68+
{
69+
"text": "Height",
70+
"type": "quantity",
71+
"linkId": "height",
72+
"extension": [
73+
{
74+
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unitOption",
75+
"valueCoding": {
76+
"display": "cm"
77+
}
78+
}
79+
]
80+
},
81+
{
82+
"text": "Weight",
83+
"type": "quantity",
84+
"linkId": "weight",
85+
"extension": [
86+
{
87+
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unitOption",
88+
"valueCoding": {
89+
"display": "kg"
90+
}
91+
}
92+
]
93+
},
94+
{
95+
"code": [
96+
{
97+
"code": "60621009",
98+
"system": "http://snomed.info/sct",
99+
"display": "Body Mass Index "
100+
}
101+
],
102+
"item": [
103+
{
104+
"text": "BMI=[Wt(kg) / Ht(cm) / Ht(cm)] * 10000",
105+
"type": "display",
106+
"linkId": "S1FZst5d",
107+
"extension": [
108+
{
109+
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
110+
"valueCodeableConcept": {
111+
"coding": [
112+
{
113+
"code": "help"
114+
}
115+
]
116+
}
117+
}
118+
]
119+
}
120+
],
121+
"text": "BMI",
122+
"type": "decimal",
123+
"linkId": "Bx4DZWYr",
124+
"readOnly": true,
125+
"extension": [
126+
{
127+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression",
128+
"valueExpression": {
129+
"language": "text/fhirpath",
130+
"expression": "(%resource.repeat(item).where(linkId='weight').answer.value.value / \n%resource.repeat(item).where(linkId='height').answer.value.value.power(2)) * 10000"
131+
}
132+
},
133+
{
134+
"url": "http://hl7.org/fhir/StructureDefinition/maxValue",
135+
"valueDecimal": 4
136+
},
137+
{
138+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract",
139+
"valueBoolean": true
140+
},
141+
{
142+
"url": "http://aidbox.io/questionnaire-itemColumnSize",
143+
"valueInteger": 10
144+
}
145+
]
146+
},
147+
{
148+
"text": "Obesity",
149+
"type": "boolean",
150+
"linkId": "zZvgjBlR",
151+
"readOnly": true,
152+
"extension": [
153+
{
154+
"url": "http://aidbox.io/questionnaire-itemColumnSize",
155+
"valueInteger": 2
156+
},
157+
{
158+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression",
159+
"valueExpression": {
160+
"language": "text/fhirpath",
161+
"expression": "%resource.repeat(item).where(linkId='Bx4DZWYr').answer.value > 25.0"
162+
}
163+
}
164+
]
165+
}
166+
],
167+
"text": "Obesity",
168+
"type": "group",
169+
"linkId": "N6IfpJcM"
170+
},
171+
{
172+
"code": [
173+
{
174+
"code": "365981007",
175+
"system": "http://snomed.info/sct",
176+
"display": "Tobacco smoking behavior - finding"
177+
}
178+
],
179+
"text": "Smoking Status",
180+
"type": "choice",
181+
"linkId": "m17jd1Yn",
182+
"extension": [
183+
{
184+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract",
185+
"valueBoolean": true
186+
}
187+
],
188+
"answerOption": [
189+
{
190+
"valueCoding": {
191+
"code": "266919005",
192+
"system": "http://snomed.info/sct",
193+
"display": "Never smoked tobacco"
194+
}
195+
},
196+
{
197+
"valueCoding": {
198+
"code": "77176002",
199+
"system": "http://snomed.info/sct",
200+
"display": "Smoker"
201+
}
202+
},
203+
{
204+
"valueCoding": {
205+
"code": "43381005",
206+
"system": "http://snomed.info/sct",
207+
"display": "Passive smoker"
208+
}
209+
},
210+
{
211+
"valueCoding": {
212+
"code": "160617001",
213+
"system": "http://snomed.info/sct",
214+
"display": "Stopped smoking"
215+
}
216+
}
217+
]
218+
},
219+
{
220+
"text": "Alcohol Intake",
221+
"type": "choice",
222+
"linkId": "mBMblYF9",
223+
"answerOption": [
224+
{
225+
"valueCoding": {
226+
"code": "never-consumed",
227+
"display": "Never Consumed"
228+
}
229+
},
230+
{
231+
"valueCoding": {
232+
"code": "yes",
233+
"display": "Yes"
234+
}
235+
}
236+
]
237+
},
238+
{
239+
"item": [
240+
{
241+
"code": [
242+
{
243+
"code": "719848005",
244+
"system": "http://snomed.info/sct",
245+
"display": "Disorder caused by alcohol"
246+
}
247+
],
248+
"text": "In the past 6 months had 5 drinks in a row",
249+
"type": "choice",
250+
"linkId": "Ua0r9Pmh",
251+
"extension": [
252+
{
253+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract",
254+
"valueBoolean": true
255+
}
256+
],
257+
"enableWhen": [
258+
{
259+
"answerCoding": {
260+
"code": "male",
261+
"display": "Male"
262+
},
263+
"operator": "=",
264+
"question": "Jw_kMVir"
265+
}
266+
],
267+
"answerOption": [
268+
{
269+
"valueCoding": {
270+
"code": "373066001",
271+
"system": "http://snomed.info/sct",
272+
"display": "Yes"
273+
}
274+
},
275+
{
276+
"valueCoding": {
277+
"code": "373067005",
278+
"system": "http://snomed.info/sct",
279+
"display": "No"
280+
}
281+
}
282+
],
283+
"enableBehavior": "all"
284+
},
285+
{
286+
"code": [
287+
{
288+
"code": "719848005",
289+
"system": "http://snomed.info/sct",
290+
"display": "Disorder caused by alcohol"
291+
}
292+
],
293+
"text": "In the past 6 months had 4 drinks in a row",
294+
"type": "choice",
295+
"linkId": "8nvUb8xC",
296+
"extension": [
297+
{
298+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract",
299+
"valueBoolean": true
300+
}
301+
],
302+
"enableWhen": [
303+
{
304+
"answerCoding": {
305+
"code": "female",
306+
"display": "Female"
307+
},
308+
"operator": "=",
309+
"question": "Jw_kMVir"
310+
}
311+
],
312+
"answerOption": [
313+
{
314+
"valueCoding": {
315+
"code": "373066001",
316+
"system": "http://snomed.info/sct",
317+
"display": "Yes"
318+
}
319+
},
320+
{
321+
"valueCoding": {
322+
"code": "373067005",
323+
"system": "http://snomed.info/sct",
324+
"display": "No"
325+
}
326+
}
327+
],
328+
"enableBehavior": "all"
329+
}
330+
],
331+
"text": "Excessive Alcohol Intake",
332+
"type": "group",
333+
"linkId": "qyIwVBRd",
334+
"enableWhen": [
335+
{
336+
"answerCoding": {
337+
"code": "yes",
338+
"display": "Yes"
339+
},
340+
"operator": "=",
341+
"question": "mBMblYF9"
342+
}
343+
],
344+
"enableBehavior": "all"
345+
}
346+
]
347+
},
348+
"request": {
349+
"method": "PUT",
350+
"url": "/Questionnaire/cvd-reference-form"
351+
}
352+
}
353+
]
354+
}

0 commit comments

Comments
 (0)