@aehrc/smart-forms-renderer 0.33.1 → 0.34.1
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/lib/components/FormComponents/BooleanItem/BooleanField.d.ts +1 -2
- package/lib/components/FormComponents/BooleanItem/BooleanField.js +1 -1
- package/lib/components/FormComponents/BooleanItem/BooleanField.js.map +1 -1
- package/lib/components/FormComponents/BooleanItem/BooleanItem.js +3 -3
- package/lib/components/FormComponents/BooleanItem/BooleanItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.d.ts +1 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js +12 -5
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.d.ts +2 -2
- 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 +1 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js +3 -3
- package/lib/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.d.ts +2 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js +10 -19
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js +11 -8
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.js.map +1 -1
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.d.ts +1 -2
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.js +6 -4
- package/lib/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupAccordion.styles.d.ts +20 -0
- package/lib/components/FormComponents/GroupItem/GroupAccordion.styles.js +12 -0
- package/lib/components/FormComponents/GroupItem/GroupAccordion.styles.js.map +1 -0
- package/lib/components/FormComponents/GroupItem/GroupHeading.js +3 -2
- package/lib/components/FormComponents/GroupItem/GroupHeading.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItem.js +2 -15
- package/lib/components/FormComponents/GroupItem/GroupItem.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItem.styles.d.ts +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItemSwitcher.d.ts +1 -2
- package/lib/components/FormComponents/GroupItem/GroupItemView.d.ts +16 -0
- package/lib/components/FormComponents/GroupItem/GroupItemView.js +62 -0
- package/lib/components/FormComponents/GroupItem/GroupItemView.js.map +1 -0
- package/lib/components/FormComponents/ItemParts/ItemLabelText.js +20 -6
- package/lib/components/FormComponents/ItemParts/ItemLabelText.js.map +1 -1
- package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js +4 -2
- package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js.map +1 -1
- package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js +2 -37
- package/lib/components/FormComponents/RepeatGroup/RepeatGroup.js.map +1 -1
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupView.d.ts +20 -0
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupView.js +91 -0
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupView.js.map +1 -0
- package/lib/components/FormComponents/SingleItem/SingleItem.js +13 -4
- package/lib/components/FormComponents/SingleItem/SingleItem.js.map +1 -1
- package/lib/components/FormComponents/SingleItem/SingleNestedItems.js +11 -7
- package/lib/components/FormComponents/SingleItem/SingleNestedItems.js.map +1 -1
- package/lib/components/Renderer/FormBodySingleCollapsible.js +5 -4
- package/lib/components/Renderer/FormBodySingleCollapsible.js.map +1 -1
- package/lib/theme/overrides/Accordion.js +1 -1
- package/lib/theme/overrides/Accordion.js.map +1 -1
- package/lib/utils/choice.d.ts +4 -4
- package/lib/utils/choice.js +21 -12
- package/lib/utils/choice.js.map +1 -1
- package/lib/utils/itemControl.d.ts +1 -0
- package/lib/utils/itemControl.js +13 -0
- package/lib/utils/itemControl.js.map +1 -1
- package/lib/utils/qItem.d.ts +2 -0
- package/lib/utils/qItem.js +14 -0
- package/lib/utils/qItem.js.map +1 -1
- package/package.json +2 -1
- package/src/components/FormComponents/BooleanItem/BooleanField.tsx +2 -4
- package/src/components/FormComponents/BooleanItem/BooleanItem.tsx +0 -3
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerOptionItem.tsx +0 -3
- package/src/components/FormComponents/ChoiceItems/ChoiceCheckboxAnswerValueSetItem.tsx +0 -3
- package/src/components/FormComponents/ChoiceItems/ChoiceItemSwitcher.tsx +0 -3
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionFields.tsx +2 -12
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionItem.tsx +19 -7
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerOptionView.tsx +2 -10
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetFields.tsx +1 -3
- package/src/components/FormComponents/ChoiceItems/ChoiceRadioAnswerValueSetItem.tsx +1 -5
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionFields.tsx +37 -46
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionItem.tsx +19 -11
- package/src/components/FormComponents/ChoiceItems/ChoiceSelectAnswerOptionView.tsx +11 -7
- package/src/components/FormComponents/GroupItem/GroupAccordion.styles.ts +12 -0
- package/src/components/FormComponents/GroupItem/GroupHeading.tsx +3 -3
- package/src/components/FormComponents/GroupItem/GroupItem.tsx +15 -39
- package/src/components/FormComponents/GroupItem/GroupItemSwitcher.tsx +1 -1
- package/src/components/FormComponents/GroupItem/GroupItemView.tsx +163 -0
- package/src/components/FormComponents/ItemParts/ItemLabelText.tsx +22 -11
- package/src/components/FormComponents/ItemParts/ItemLabelWrapper.tsx +8 -1
- package/src/components/FormComponents/RepeatGroup/RepeatGroup.tsx +11 -82
- package/src/components/FormComponents/RepeatGroup/RepeatGroupView.tsx +202 -0
- package/src/components/FormComponents/SingleItem/SingleItem.tsx +40 -11
- package/src/components/FormComponents/SingleItem/SingleNestedItems.tsx +24 -19
- package/src/components/Renderer/FormBodySingleCollapsible.tsx +7 -9
- package/src/stories/assets/questionnaires/QAdvancedControlAppearance.ts +333 -3
- package/src/stories/assets/questionnaires/QAdvancedTextApperance.ts +29 -0
- package/src/stories/assets/questionnaires/QDisplay.ts +82 -0
- package/src/stories/assets/questionnaires/QGroupTableTester.ts +461 -0
- package/src/stories/assets/questionnaires/QMbs715Tester.ts +32888 -0
- package/src/stories/itemTypes/Display.stories.tsx +11 -1
- package/src/stories/sdc/AdvancedControlAppearance.stories.tsx +26 -1
- package/src/stories/sdc/AdvancedTextAppearance.stories.tsx +7 -0
- package/src/stories/storybookWrappers/BuildFormButtonForStorybook.tsx +7 -1
- package/src/stories/storybookWrappers/BuildFormButtonTesterWrapperForStorybook.tsx +7 -1
- package/src/stories/storybookWrappers/BuildFormWrapperForStorybook.tsx +7 -1
- package/src/stories/storybookWrappers/FormValidationTesterWrapperForStorybook.tsx +7 -1
- package/src/stories/storybookWrappers/PrePopWrapperForStorybook.tsx +7 -1
- package/src/stories/storybookWrappers/globals.ts +18 -0
- package/src/stories/testing/GroupTableTester.stories.tsx +39 -0
- package/src/stories/testing/Mbs715Tester.stories.tsx +57 -0
- package/src/theme/overrides/Accordion.ts +1 -1
- package/src/utils/choice.ts +28 -16
- package/src/utils/itemControl.ts +22 -0
- package/src/utils/qItem.ts +24 -0
|
@@ -26,7 +26,7 @@ export const qItemControl: Questionnaire = {
|
|
|
26
26
|
status: 'draft',
|
|
27
27
|
publisher: 'AEHRC CSIRO',
|
|
28
28
|
date: '2024-05-01',
|
|
29
|
-
url: 'https://smartforms.csiro.au/docs/advanced/
|
|
29
|
+
url: 'https://smartforms.csiro.au/docs/advanced/control/item-control',
|
|
30
30
|
item: [
|
|
31
31
|
{
|
|
32
32
|
linkId: 'item-control-instructions',
|
|
@@ -55,7 +55,7 @@ export const qChoiceOrientation: Questionnaire = {
|
|
|
55
55
|
status: 'draft',
|
|
56
56
|
publisher: 'AEHRC CSIRO',
|
|
57
57
|
date: '2024-05-08',
|
|
58
|
-
url: 'https://smartforms.csiro.au/docs/advanced/
|
|
58
|
+
url: 'https://smartforms.csiro.au/docs/advanced/control/choice-orientation',
|
|
59
59
|
contained: [
|
|
60
60
|
{
|
|
61
61
|
resourceType: 'ValueSet',
|
|
@@ -219,7 +219,7 @@ export const qSliderStepValue: Questionnaire = {
|
|
|
219
219
|
status: 'draft',
|
|
220
220
|
publisher: 'AEHRC CSIRO',
|
|
221
221
|
date: '2024-05-08',
|
|
222
|
-
url: 'https://smartforms.csiro.au/docs/advanced/
|
|
222
|
+
url: 'https://smartforms.csiro.au/docs/advanced/control/slider-step-value',
|
|
223
223
|
item: [
|
|
224
224
|
{
|
|
225
225
|
extension: [
|
|
@@ -292,3 +292,333 @@ export const qSliderStepValue: Questionnaire = {
|
|
|
292
292
|
}
|
|
293
293
|
]
|
|
294
294
|
};
|
|
295
|
+
|
|
296
|
+
export const qCollapsibleDefaultOpen: Questionnaire = {
|
|
297
|
+
resourceType: 'Questionnaire',
|
|
298
|
+
id: 'CollapsibleDefaultOpen',
|
|
299
|
+
name: 'CollapsibleDefaultOpen',
|
|
300
|
+
title: 'CollapsibleDefaultOpen',
|
|
301
|
+
version: '0.1.0',
|
|
302
|
+
status: 'draft',
|
|
303
|
+
publisher: 'AEHRC CSIRO',
|
|
304
|
+
date: '2024-05-08',
|
|
305
|
+
url: 'https://smartforms.csiro.au/docs/advanced/control/collapsible-1',
|
|
306
|
+
item: [
|
|
307
|
+
{
|
|
308
|
+
extension: [
|
|
309
|
+
{
|
|
310
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-collapsible',
|
|
311
|
+
valueCode: 'default-open'
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
url: 'http://hl7.org/fhir/StructureDefinition/variable',
|
|
315
|
+
valueExpression: {
|
|
316
|
+
name: 'height',
|
|
317
|
+
language: 'text/fhirpath',
|
|
318
|
+
expression: "item.where(linkId='patient-height').answer.value"
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
url: 'http://hl7.org/fhir/StructureDefinition/variable',
|
|
323
|
+
valueExpression: {
|
|
324
|
+
name: 'weight',
|
|
325
|
+
language: 'text/fhirpath',
|
|
326
|
+
expression: "item.where(linkId='patient-weight').answer.value"
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
],
|
|
330
|
+
linkId: 'bmi-collapsible',
|
|
331
|
+
text: 'BMI Calculation',
|
|
332
|
+
type: 'group',
|
|
333
|
+
repeats: false,
|
|
334
|
+
item: [
|
|
335
|
+
{
|
|
336
|
+
extension: [
|
|
337
|
+
{
|
|
338
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
|
|
339
|
+
valueCoding: {
|
|
340
|
+
system: 'http://unitsofmeasure.org',
|
|
341
|
+
code: 'cm',
|
|
342
|
+
display: 'cm'
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
],
|
|
346
|
+
linkId: 'patient-height',
|
|
347
|
+
text: 'Height',
|
|
348
|
+
type: 'decimal',
|
|
349
|
+
repeats: false,
|
|
350
|
+
readOnly: false
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
extension: [
|
|
354
|
+
{
|
|
355
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
|
|
356
|
+
valueCoding: {
|
|
357
|
+
system: 'http://unitsofmeasure.org',
|
|
358
|
+
code: 'kg',
|
|
359
|
+
display: 'kg'
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
linkId: 'patient-weight',
|
|
364
|
+
text: 'Weight',
|
|
365
|
+
type: 'decimal',
|
|
366
|
+
repeats: false,
|
|
367
|
+
readOnly: false
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
extension: [
|
|
371
|
+
{
|
|
372
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression',
|
|
373
|
+
valueExpression: {
|
|
374
|
+
description: 'BMI calculation',
|
|
375
|
+
language: 'text/fhirpath',
|
|
376
|
+
expression: '(%weight/((%height/100).power(2))).round(1)'
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
|
|
381
|
+
valueCoding: {
|
|
382
|
+
system: 'http://unitsofmeasure.org',
|
|
383
|
+
code: 'kg/m2',
|
|
384
|
+
display: 'kg/m2'
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
linkId: 'bmi-result',
|
|
389
|
+
text: 'Value',
|
|
390
|
+
type: 'decimal',
|
|
391
|
+
repeats: false,
|
|
392
|
+
readOnly: true
|
|
393
|
+
}
|
|
394
|
+
]
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
export const qCollapsibleDefaultClosed: Questionnaire = {
|
|
400
|
+
resourceType: 'Questionnaire',
|
|
401
|
+
id: 'CollapsibleDefaultClosed',
|
|
402
|
+
name: 'CollapsibleDefaultClosed',
|
|
403
|
+
title: 'CollapsibleDefaultClosed',
|
|
404
|
+
version: '0.1.0',
|
|
405
|
+
status: 'draft',
|
|
406
|
+
publisher: 'AEHRC CSIRO',
|
|
407
|
+
date: '2024-05-08',
|
|
408
|
+
url: 'https://smartforms.csiro.au/docs/advanced/control/collapsible-2',
|
|
409
|
+
item: [
|
|
410
|
+
{
|
|
411
|
+
extension: [
|
|
412
|
+
{
|
|
413
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-collapsible',
|
|
414
|
+
valueCode: 'default-closed'
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
url: 'http://hl7.org/fhir/StructureDefinition/variable',
|
|
418
|
+
valueExpression: {
|
|
419
|
+
name: 'height',
|
|
420
|
+
language: 'text/fhirpath',
|
|
421
|
+
expression: "item.where(linkId='patient-height').answer.value"
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
url: 'http://hl7.org/fhir/StructureDefinition/variable',
|
|
426
|
+
valueExpression: {
|
|
427
|
+
name: 'weight',
|
|
428
|
+
language: 'text/fhirpath',
|
|
429
|
+
expression: "item.where(linkId='patient-weight').answer.value"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
linkId: 'bmi-collapsible',
|
|
434
|
+
text: 'BMI Calculation',
|
|
435
|
+
type: 'group',
|
|
436
|
+
repeats: false,
|
|
437
|
+
item: [
|
|
438
|
+
{
|
|
439
|
+
extension: [
|
|
440
|
+
{
|
|
441
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
|
|
442
|
+
valueCoding: {
|
|
443
|
+
system: 'http://unitsofmeasure.org',
|
|
444
|
+
code: 'cm',
|
|
445
|
+
display: 'cm'
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
],
|
|
449
|
+
linkId: 'patient-height',
|
|
450
|
+
text: 'Height',
|
|
451
|
+
type: 'decimal',
|
|
452
|
+
repeats: false,
|
|
453
|
+
readOnly: false
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
extension: [
|
|
457
|
+
{
|
|
458
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
|
|
459
|
+
valueCoding: {
|
|
460
|
+
system: 'http://unitsofmeasure.org',
|
|
461
|
+
code: 'kg',
|
|
462
|
+
display: 'kg'
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
],
|
|
466
|
+
linkId: 'patient-weight',
|
|
467
|
+
text: 'Weight',
|
|
468
|
+
type: 'decimal',
|
|
469
|
+
repeats: false,
|
|
470
|
+
readOnly: false
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
extension: [
|
|
474
|
+
{
|
|
475
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression',
|
|
476
|
+
valueExpression: {
|
|
477
|
+
description: 'BMI calculation',
|
|
478
|
+
language: 'text/fhirpath',
|
|
479
|
+
expression: '(%weight/((%height/100).power(2))).round(1)'
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit',
|
|
484
|
+
valueCoding: {
|
|
485
|
+
system: 'http://unitsofmeasure.org',
|
|
486
|
+
code: 'kg/m2',
|
|
487
|
+
display: 'kg/m2'
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
],
|
|
491
|
+
linkId: 'bmi-result',
|
|
492
|
+
text: 'Value',
|
|
493
|
+
type: 'decimal',
|
|
494
|
+
repeats: false,
|
|
495
|
+
readOnly: true
|
|
496
|
+
}
|
|
497
|
+
]
|
|
498
|
+
}
|
|
499
|
+
]
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
export const qCollapsibleNested: Questionnaire = {
|
|
503
|
+
resourceType: 'Questionnaire',
|
|
504
|
+
id: 'CollapsibleNested',
|
|
505
|
+
name: 'CollapsibleNested',
|
|
506
|
+
title: 'CollapsibleNested',
|
|
507
|
+
version: '0.1.0',
|
|
508
|
+
status: 'draft',
|
|
509
|
+
publisher: 'AEHRC CSIRO',
|
|
510
|
+
date: '2024-05-08',
|
|
511
|
+
url: 'https://smartforms.csiro.au/docs/advanced/control/collapsible-3',
|
|
512
|
+
item: [
|
|
513
|
+
{
|
|
514
|
+
extension: [
|
|
515
|
+
{
|
|
516
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-collapsible',
|
|
517
|
+
valueCode: 'default-open'
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
linkId: 'f1262ade-843c-4eba-a86d-51a9c97d134b',
|
|
521
|
+
text: 'Home address',
|
|
522
|
+
type: 'group',
|
|
523
|
+
repeats: false,
|
|
524
|
+
item: [
|
|
525
|
+
{
|
|
526
|
+
extension: [
|
|
527
|
+
{
|
|
528
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
529
|
+
valueCodeableConcept: {
|
|
530
|
+
coding: [
|
|
531
|
+
{
|
|
532
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
533
|
+
code: 'check-box'
|
|
534
|
+
}
|
|
535
|
+
]
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
],
|
|
539
|
+
linkId: '311d83bb-f22e-4f60-9b50-b6e38dd2059b',
|
|
540
|
+
definition:
|
|
541
|
+
'http://hl7.org.au/fhir/StructureDefinition/au-address#Address.extension:noFixedAddress',
|
|
542
|
+
text: 'No fixed address',
|
|
543
|
+
type: 'boolean',
|
|
544
|
+
repeats: false
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
extension: [
|
|
548
|
+
{
|
|
549
|
+
url: 'http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-collapsible',
|
|
550
|
+
valueCode: 'default-open'
|
|
551
|
+
}
|
|
552
|
+
],
|
|
553
|
+
linkId: '4e0dc185-f83e-4027-b7a8-ecb543d42c6d',
|
|
554
|
+
type: 'group',
|
|
555
|
+
text: 'Address',
|
|
556
|
+
enableWhen: [
|
|
557
|
+
{
|
|
558
|
+
question: '311d83bb-f22e-4f60-9b50-b6e38dd2059b',
|
|
559
|
+
operator: '!=',
|
|
560
|
+
answerBoolean: true
|
|
561
|
+
}
|
|
562
|
+
],
|
|
563
|
+
repeats: true,
|
|
564
|
+
item: [
|
|
565
|
+
{
|
|
566
|
+
linkId: '2fee2d51-7828-4178-b8c1-35edd32ba338',
|
|
567
|
+
definition: 'http://hl7.org.au/fhir/StructureDefinition/au-address#Address.line',
|
|
568
|
+
text: 'Street address',
|
|
569
|
+
type: 'string',
|
|
570
|
+
repeats: false
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
linkId: 'ddb65ed1-f4b2-4730-af2a-2f98bc73c76f',
|
|
574
|
+
definition: 'http://hl7.org.au/fhir/StructureDefinition/au-address#Address.city',
|
|
575
|
+
text: 'City',
|
|
576
|
+
type: 'string',
|
|
577
|
+
repeats: false
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
extension: [
|
|
581
|
+
{
|
|
582
|
+
url: 'http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl',
|
|
583
|
+
valueCodeableConcept: {
|
|
584
|
+
coding: [
|
|
585
|
+
{
|
|
586
|
+
system: 'http://hl7.org/fhir/questionnaire-item-control',
|
|
587
|
+
code: 'drop-down'
|
|
588
|
+
}
|
|
589
|
+
]
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
],
|
|
593
|
+
linkId: 'd9a1236c-8d6e-4f20-a12a-9d5de5a1d0f6',
|
|
594
|
+
definition: 'http://hl7.org.au/fhir/StructureDefinition/au-address#Address.state',
|
|
595
|
+
text: 'State',
|
|
596
|
+
type: 'choice',
|
|
597
|
+
repeats: false,
|
|
598
|
+
answerValueSet:
|
|
599
|
+
'https://healthterminologies.gov.au/fhir/ValueSet/australian-states-territories-2'
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
extension: [
|
|
603
|
+
{
|
|
604
|
+
url: 'http://hl7.org/fhir/StructureDefinition/regex',
|
|
605
|
+
valueString: "matches('^[0-9]{4}$')"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
url: 'http://hl7.org/fhir/StructureDefinition/entryFormat',
|
|
609
|
+
valueString: '####'
|
|
610
|
+
}
|
|
611
|
+
],
|
|
612
|
+
linkId: '3f61a1ea-1c74-4f52-8519-432ce861a74f',
|
|
613
|
+
definition:
|
|
614
|
+
'http://hl7.org.au/fhir/StructureDefinition/au-address#Address.postalCode',
|
|
615
|
+
text: 'Postcode',
|
|
616
|
+
type: 'string',
|
|
617
|
+
repeats: false
|
|
618
|
+
}
|
|
619
|
+
]
|
|
620
|
+
}
|
|
621
|
+
]
|
|
622
|
+
}
|
|
623
|
+
]
|
|
624
|
+
};
|
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
import type { Questionnaire } from 'fhir/r4';
|
|
2
2
|
|
|
3
|
+
export const qRenderingStyleBooleanCheckboxItem: Questionnaire = {
|
|
4
|
+
resourceType: 'Questionnaire',
|
|
5
|
+
id: 'RenderingStyle-1',
|
|
6
|
+
name: 'RenderingStyle-1',
|
|
7
|
+
title: 'Rendering Style 1',
|
|
8
|
+
version: '0.1.0',
|
|
9
|
+
status: 'draft',
|
|
10
|
+
publisher: 'AEHRC CSIRO',
|
|
11
|
+
date: '2024-05-01',
|
|
12
|
+
url: 'https://smartforms.csiro.au/docs/advanced/text/rendering-style-1',
|
|
13
|
+
item: [
|
|
14
|
+
{
|
|
15
|
+
linkId: 'mark-complete',
|
|
16
|
+
text: 'Mark section as complete',
|
|
17
|
+
_text: {
|
|
18
|
+
extension: [
|
|
19
|
+
{
|
|
20
|
+
url: 'http://hl7.org/fhir/StructureDefinition/rendering-style',
|
|
21
|
+
valueString:
|
|
22
|
+
'padding: 0.75rem; margin-bottom: 1rem; font-size: 0.875rem; color: #2E7D32; border-radius: 0.5rem; background-color: #d5e5d6; font-weight: 700;'
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
type: 'boolean',
|
|
27
|
+
repeats: false
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
};
|
|
31
|
+
|
|
3
32
|
export const qRenderingXhtmlBooleanCheckboxItem: Questionnaire = {
|
|
4
33
|
resourceType: 'Questionnaire',
|
|
5
34
|
id: 'RenderingXhtml-1',
|
|
@@ -113,3 +113,85 @@ export const qDisplayCalculation: Questionnaire = {
|
|
|
113
113
|
}
|
|
114
114
|
]
|
|
115
115
|
};
|
|
116
|
+
|
|
117
|
+
export const qDisplayCalculationStyled: Questionnaire = {
|
|
118
|
+
resourceType: 'Questionnaire',
|
|
119
|
+
id: 'DisplayCalculationStyled',
|
|
120
|
+
name: 'DisplayCalculationStyled',
|
|
121
|
+
title: 'Display Calculation Styled',
|
|
122
|
+
version: '0.1.0',
|
|
123
|
+
status: 'draft',
|
|
124
|
+
publisher: 'AEHRC CSIRO',
|
|
125
|
+
date: '2024-05-01',
|
|
126
|
+
url: 'https://smartforms.csiro.au/docs/components/display/calculation-styled',
|
|
127
|
+
extension: [
|
|
128
|
+
{
|
|
129
|
+
url: 'http://hl7.org/fhir/StructureDefinition/variable',
|
|
130
|
+
valueExpression: {
|
|
131
|
+
name: 'gender',
|
|
132
|
+
language: 'text/fhirpath',
|
|
133
|
+
expression: "item.where(linkId = 'gender-controller').answer.valueCoding.code"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
item: [
|
|
138
|
+
{
|
|
139
|
+
linkId: 'gender-controller',
|
|
140
|
+
text: 'Gender',
|
|
141
|
+
type: 'choice',
|
|
142
|
+
repeats: false,
|
|
143
|
+
answerOption: [
|
|
144
|
+
{
|
|
145
|
+
valueCoding: {
|
|
146
|
+
system: 'http://hl7.org/fhir/administrative-gender',
|
|
147
|
+
code: 'female',
|
|
148
|
+
display: 'Female'
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
valueCoding: {
|
|
153
|
+
system: 'http://hl7.org/fhir/administrative-gender',
|
|
154
|
+
code: 'male',
|
|
155
|
+
display: 'Male'
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
valueCoding: {
|
|
160
|
+
system: 'http://hl7.org/fhir/administrative-gender',
|
|
161
|
+
code: 'other',
|
|
162
|
+
display: 'Other'
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
valueCoding: {
|
|
167
|
+
system: 'http://hl7.org/fhir/administrative-gender',
|
|
168
|
+
code: 'unknown',
|
|
169
|
+
display: 'Unknown'
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
linkId: 'gender-display',
|
|
176
|
+
type: 'display',
|
|
177
|
+
repeats: false,
|
|
178
|
+
_text: {
|
|
179
|
+
extension: [
|
|
180
|
+
{
|
|
181
|
+
url: 'http://hl7.org/fhir/StructureDefinition/cqf-expression',
|
|
182
|
+
valueExpression: {
|
|
183
|
+
language: 'text/fhirpath',
|
|
184
|
+
expression: "'Gender: '+ %gender"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
url: 'http://hl7.org/fhir/StructureDefinition/rendering-style',
|
|
189
|
+
valueString:
|
|
190
|
+
'padding: 0.75rem; margin-bottom: 1rem; font-size: 0.875rem; color: #2E7D32; border-radius: 0.5rem; background-color: #d5e5d6; font-weight: 700;'
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
text: ''
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
};
|