From cb8a35b87e3130f8e0f717947cd152024f533fd1 Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Fri, 24 Nov 2023 09:23:08 +1030 Subject: [PATCH 01/12] Change delete button to remove button for repeat items --- .../RepeatGroup/DeleteItemButton.tsx | 2 +- ...eteItemButton.tsx => RemoveItemButton.tsx} | 8 +- .../FormComponents/RepeatItem/RepeatField.tsx | 4 +- .../FormComponents/Tables/GroupTable.tsx | 8 +- ...eleteRowButton.tsx => RemoveRowButton.tsx} | 8 +- .../stories/MedicalHistoryTable.stories.tsx | 50 + .../src/stories/SmartFormsRenderer.stories.ts | 12 +- .../stories/assets/GTableMedicalHistory.json | 109 + .../src/stories/assets/QDev715.json | 16081 ++++++++++++++++ 9 files changed, 16266 insertions(+), 16 deletions(-) rename packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/{DeleteItemButton.tsx => RemoveItemButton.tsx} (88%) rename packages/smart-forms-renderer/src/components/FormComponents/Tables/{DeleteRowButton.tsx => RemoveRowButton.tsx} (90%) create mode 100644 packages/smart-forms-renderer/src/stories/MedicalHistoryTable.stories.tsx create mode 100644 packages/smart-forms-renderer/src/stories/assets/GTableMedicalHistory.json create mode 100644 packages/smart-forms-renderer/src/stories/assets/QDev715.json diff --git a/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/DeleteItemButton.tsx b/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/DeleteItemButton.tsx index 3527dd87f..41f5f4788 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/DeleteItemButton.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/DeleteItemButton.tsx @@ -34,7 +34,7 @@ function DeleteItemButton(props: DeleteItemButtonProps) { const isDisabled = nullableQrItem === null || numOfRepeatGroups === 1 || readOnly; return ( - + diff --git a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/DeleteItemButton.tsx b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RemoveItemButton.tsx similarity index 88% rename from packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/DeleteItemButton.tsx rename to packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RemoveItemButton.tsx index a8b9e402f..0f6a5a617 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/DeleteItemButton.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RemoveItemButton.tsx @@ -21,20 +21,20 @@ import IconButton from '@mui/material/IconButton'; import RemoveCircleOutlineIcon from '@mui/icons-material/RemoveCircleOutline'; import type { QuestionnaireResponseItemAnswer } from 'fhir/r4'; -interface DeleteItemButtonProps { +interface RemoveItemButtonProps { answer: QuestionnaireResponseItemAnswer | null; numOfRepeatAnswers: number; readOnly: boolean; onDeleteAnswer: () => void; } -function DeleteItemButton(props: DeleteItemButtonProps) { +function RemoveItemButton(props: RemoveItemButtonProps) { const { answer, numOfRepeatAnswers, readOnly, onDeleteAnswer } = props; const isDisabled = answer === null || numOfRepeatAnswers === 1 || readOnly; return ( - + @@ -44,4 +44,4 @@ function DeleteItemButton(props: DeleteItemButtonProps) { ); } -export default DeleteItemButton; +export default RemoveItemButton; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatField.tsx b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatField.tsx index c9d9cb3af..bedfd212c 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatField.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatField.tsx @@ -29,7 +29,7 @@ import type { PropsWithQrItemChangeHandler, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface'; -import DeleteItemButton from './DeleteItemButton'; +import RemoveItemButton from './RemoveItemButton'; import useReadOnly from '../../../hooks/useReadOnly'; interface RepeatFieldProps @@ -71,7 +71,7 @@ function RepeatField(props: RepeatFieldProps) { /> {showMinimalView ? null : ( - handleRowChange(newQrGroup, index)} /> - void; } -function DeleteRowButton(props: DeleteRowButtonProps) { +function RemoveRowButton(props: RemoveRowButtonProps) { const { nullableQrItem, numOfRows, readOnly, onDeleteItem } = props; const isDisabled = nullableQrItem === null || numOfRows === 1 || readOnly; return ( - + @@ -47,4 +47,4 @@ function DeleteRowButton(props: DeleteRowButtonProps) { ); } -export default DeleteRowButton; +export default RemoveRowButton; diff --git a/packages/smart-forms-renderer/src/stories/MedicalHistoryTable.stories.tsx b/packages/smart-forms-renderer/src/stories/MedicalHistoryTable.stories.tsx new file mode 100644 index 000000000..9397ddb32 --- /dev/null +++ b/packages/smart-forms-renderer/src/stories/MedicalHistoryTable.stories.tsx @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Commonwealth Scientific and Industrial Research + * Organisation (CSIRO) ABN 41 687 119 230. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { Meta, StoryObj } from '@storybook/react'; +import { GroupTable } from '../components'; +import GTableMedicalHistoryJson from './assets/GTableMedicalHistory.json'; +import { QuestionnaireItem } from 'fhir/r4'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; + +// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export +const meta = { + title: 'Component/GroupTable', + component: GroupTable, + // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs + tags: [], + decorators: [ + (Story) => {Story()} + ] +} satisfies Meta; + +const GTableMedicalHistory = GTableMedicalHistoryJson as QuestionnaireItem; + +export default meta; +type Story = StoryObj; + +// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args + +export const MedicalHistoryTable: Story = { + args: { + qItem: GTableMedicalHistory, + qrItems: [], + groupCardElevation: 1, + parentIsReadOnly: false, + onQrRepeatGroupChange: () => {} + } +}; diff --git a/packages/smart-forms-renderer/src/stories/SmartFormsRenderer.stories.ts b/packages/smart-forms-renderer/src/stories/SmartFormsRenderer.stories.ts index 9b06565cc..5e31c9b30 100644 --- a/packages/smart-forms-renderer/src/stories/SmartFormsRenderer.stories.ts +++ b/packages/smart-forms-renderer/src/stories/SmartFormsRenderer.stories.ts @@ -22,20 +22,24 @@ import Q715Json from './assets/Q715.json'; import R715Json from './assets/R715.json'; import QTestGridJson from './assets/QTestGrid.json'; import RTestGridJson from './assets/RTestGrid.json'; +import QDev715Json from './assets/QDev715.json'; // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export const meta = { title: 'Component/SmartFormsRenderer', component: SmartFormsRenderer, // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs - tags: ['autodocs'] + tags: [] } satisfies Meta; const Q715 = Q715Json as Questionnaire; const R715 = R715Json as QuestionnaireResponse; + const QTestGrid = QTestGridJson as Questionnaire; const RTestGrid = RTestGridJson as QuestionnaireResponse; +const QDev715 = QDev715Json as Questionnaire; + export default meta; type Story = StoryObj; @@ -54,6 +58,12 @@ export const Form715WithResponse: Story = { } }; +export const FormDev715: Story = { + args: { + questionnaire: QDev715 + } +}; + export const FormTestGrid: Story = { args: { questionnaire: QTestGrid diff --git a/packages/smart-forms-renderer/src/stories/assets/GTableMedicalHistory.json b/packages/smart-forms-renderer/src/stories/assets/GTableMedicalHistory.json new file mode 100644 index 000000000..9a6e2f5df --- /dev/null +++ b/packages/smart-forms-renderer/src/stories/assets/GTableMedicalHistory.json @@ -0,0 +1,109 @@ +{ + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "gtable" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", + "valueExpression": { + "name": "ConditionRepeat", + "language": "text/fhirpath", + "expression": "%Condition.entry.resource" + } + } + ], + "linkId": "92bd7d05-9b5e-4cf9-900b-703f361dad9d", + "text": "Medical history and current problems list", + "type": "group", + "repeats": true, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "autocomplete" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ConditionRepeat.code.select((coding.where(system='http://snomed.info/sct') | coding.where(system!='http://snomed.info/sct').first() | text ).first())" + } + } + ], + "linkId": "59b1900a-4f85-4a8c-b9cd-3fe2fd76f27e", + "text": "Condition", + "type": "open-choice", + "answerValueSet": "#MedicalHistory" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "drop-down" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ConditionRepeat.clinicalStatus.coding" + } + } + ], + "linkId": "88bcfad7-386b-4d87-b34b-2e50482e4d2c", + "text": "Clinical Status", + "type": "choice", + "answerValueSet": "http://hl7.org/fhir/ValueSet/condition-clinical" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ConditionRepeat.onset.ofType(dateTime)" + } + } + ], + "linkId": "6ae641ad-95bb-4cdc-8910-5a52077e492c", + "text": "Onset Date", + "type": "date" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ConditionRepeat.recordedDate" + } + } + ], + "linkId": "18b9e159-2ed7-4047-82b7-deb2a171de4f", + "text": "Recorded Date", + "type": "date" + } + ] +} diff --git a/packages/smart-forms-renderer/src/stories/assets/QDev715.json b/packages/smart-forms-renderer/src/stories/assets/QDev715.json new file mode 100644 index 000000000..1783750b1 --- /dev/null +++ b/packages/smart-forms-renderer/src/stories/assets/QDev715.json @@ -0,0 +1,16081 @@ +{ + "resourceType": "Questionnaire", + "id": "Dev715", + "meta": { + "versionId": "1", + "lastUpdated": "2023-11-22T05:26:24.909+00:00", + "source": "#yzhA0V8sR6kjv61v", + "profile": [ + "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-render", + "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-pop-exp", + "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-modular" + ] + }, + "contained": [ + { + "resourceType": "ValueSet", + "id": "YesNoNA", + "url": "https://smartforms.csiro.au/ig/ValueSet/YesNoNA", + "name": "YesNoNA", + "title": "Yes/No/NA", + "status": "draft", + "experimental": false, + "description": "Concepts for Yes, No and Not applicable", + "compose": { + "include": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0532", + "concept": [ + { + "code": "Y", + "display": "Yes" + }, + { + "code": "N", + "display": "No" + }, + { + "code": "NA", + "display": "N/A" + } + ] + } + ] + }, + "expansion": { + "identifier": "urn:uuid:5baa5444-e553-4412-a08c-9ce93d3271e0", + "timestamp": "2023-09-01T11:16:50+10:00", + "total": 3, + "parameter": [ + { + "name": "version", + "valueUri": "http://terminology.hl7.org/CodeSystem/v2-0532|2.1.0" + }, + { + "name": "used-codesystem", + "valueUri": "http://terminology.hl7.org/CodeSystem/v2-0532|2.1.0" + } + ], + "contains": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0532", + "code": "Y", + "display": "Yes" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0532", + "code": "N", + "display": "No" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0532", + "code": "NA", + "display": "N/A" + } + ] + } + }, + { + "resourceType": "ValueSet", + "id": "AboriginalTorresStraitIslander", + "url": "https://smartforms.csiro.au/ig/ValueSet/AboriginalTorresStraitIslander", + "name": "AboriginalTorresStraitIslander", + "title": "Aboriginal and/or Torres Strait Islander", + "status": "draft", + "experimental": false, + "description": "The Aboriginal and/or Torres Strait Islander value set includes the Australian Indigenous statuses for Indigenous people.", + "compose": { + "include": [ + { + "system": "https://healthterminologies.gov.au/fhir/CodeSystem/australian-indigenous-status-1", + "concept": [ + { + "code": "1", + "display": "Aboriginal" + }, + { + "code": "2", + "display": "Torres Strait Islander" + }, + { + "code": "3", + "display": "Aboriginal and Torres Strait Islander" + } + ] + } + ] + }, + "expansion": { + "identifier": "e2b013bd-1725-4299-a7a5-53635d42f1be", + "timestamp": "2022-10-20T11:38:45+10:00", + "total": 3, + "offset": 0, + "parameter": [ + { + "name": "version", + "valueUri": "https://healthterminologies.gov.au/fhir/CodeSystem/australian-indigenous-status-1|1.0.3" + }, + { + "name": "count", + "valueInteger": 2147483647 + }, + { + "name": "offset", + "valueInteger": 0 + } + ], + "contains": [ + { + "system": "https://healthterminologies.gov.au/fhir/CodeSystem/australian-indigenous-status-1", + "code": "1", + "display": "Aboriginal but not Torres Strait Islander origin" + }, + { + "system": "https://healthterminologies.gov.au/fhir/CodeSystem/australian-indigenous-status-1", + "code": "2", + "display": "Torres Strait Islander but not Aboriginal origin" + }, + { + "system": "https://healthterminologies.gov.au/fhir/CodeSystem/australian-indigenous-status-1", + "code": "3", + "display": "Both Aboriginal and Torres Strait Islander origin" + } + ] + } + }, + { + "resourceType": "ValueSet", + "id": "PrimaryCarerParentGrandparent", + "url": "https://smartforms.csiro.au/ig/ValueSet/PrimaryCarerParentGrandparent", + "name": "PrimaryCarerParentGrandparent", + "title": "Primary Carer Of Parent Or Grandparent", + "status": "draft", + "experimental": false, + "description": "The Primary Carer Of Parent Or Grandparent value set includes values that can indicate whether a primary carer is one of the parents or a grandparent.", + "compose": { + "include": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", + "concept": [ + { + "code": "MTH" + }, + { + "code": "FTH" + }, + { + "code": "GRPRN" + } + ] + }, + { + "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", + "concept": [ + { + "code": "NA" + } + ] + } + ] + }, + "expansion": { + "identifier": "2809c2fa-28ec-4def-9b16-93a611d29da3", + "timestamp": "2022-10-20T11:42:30+10:00", + "total": 4, + "offset": 0, + "parameter": [ + { + "name": "version", + "valueUri": "http://terminology.hl7.org/CodeSystem/v3-RoleCode|2018-08-12" + }, + { + "name": "version", + "valueUri": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor|2018-08-12" + }, + { + "name": "count", + "valueInteger": 2147483647 + }, + { + "name": "offset", + "valueInteger": 0 + } + ], + "contains": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", + "version": "2018-08-12", + "code": "MTH", + "display": "mother" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", + "version": "2018-08-12", + "code": "FTH", + "display": "father" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", + "version": "2018-08-12", + "code": "GRPRN", + "display": "grandparent" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", + "version": "2018-08-12", + "code": "NA", + "display": "not applicable" + } + ] + } + }, + { + "resourceType": "ValueSet", + "id": "YesNo", + "url": "https://smartforms.csiro.au/ig/ValueSet/YesNo", + "name": "YesNo", + "title": "Yes/No", + "status": "draft", + "experimental": false, + "description": "Concepts for Yes and No", + "compose": { + "include": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0532", + "concept": [ + { + "code": "Y", + "display": "Yes" + }, + { + "code": "N", + "display": "No" + } + ] + } + ] + }, + "expansion": { + "identifier": "urn:uuid:06bfacf3-ef16-4470-86a0-a2a22f49ff91", + "timestamp": "2023-09-01T11:15:01+10:00", + "total": 2, + "parameter": [ + { + "name": "version", + "valueUri": "http://terminology.hl7.org/CodeSystem/v2-0532|2.1.0" + }, + { + "name": "used-codesystem", + "valueUri": "http://terminology.hl7.org/CodeSystem/v2-0532|2.1.0" + } + ], + "contains": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0532", + "code": "Y", + "display": "Yes" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0532", + "code": "N", + "display": "No" + } + ] + } + }, + { + "resourceType": "ValueSet", + "id": "MedicalHistory", + "url": "https://smartforms.csiro.au/ig/ValueSet/MedicalHistory", + "name": "MedicalHistory", + "title": "Medical History", + "status": "draft", + "experimental": false, + "description": "The Medical History value set includes values that may be used to represent medical history, operations and hospital admissions.", + "compose": { + "include": [ + { + "system": "http://snomed.info/sct", + "filter": [ + { + "property": "constraint", + "op": "=", + "value": "^32570581000036105|Problem/Diagnosis reference set| OR ^32570141000036105|Procedure foundation reference set|" + } + ] + } + ] + } + }, + { + "resourceType": "ValueSet", + "id": "MedicalHistoryShortListInfants", + "url": "https://smartforms.csiro.au/ig/ValueSet/MedicalHistoryShortListInfants", + "name": "MedicalHistoryShortListInfants", + "title": "Medical History Short List for Infants", + "status": "draft", + "experimental": false, + "description": "The Medical History Short List for Infants value set includes values to represent conditions for use in a pick list for the MBS 715 Health Check for Infants.", + "compose": { + "include": [ + { + "system": "http://snomed.info/sct", + "concept": [ + { + "code": "609496007" + }, + { + "code": "199745000" + }, + { + "code": "80113008" + }, + { + "code": "32485007" + }, + { + "code": "50417007" + }, + { + "code": "49727002" + }, + { + "code": "129127001" + }, + { + "code": "38394007" + }, + { + "code": "78868004" + }, + { + "code": "247253001" + }, + { + "code": "43381005" + }, + { + "code": "195528001" + }, + { + "code": "312591002" + } + ] + } + ] + }, + "expansion": { + "identifier": "06bd5f41-3c10-4cdb-a304-b8127d72957f", + "timestamp": "2022-10-20T09:50:13+10:00", + "total": 13, + "offset": 0, + "parameter": [ + { + "name": "version", + "valueUri": "http://snomed.info/sct|http://snomed.info/sct/32506021000036107/version/20220930" + }, + { + "name": "count", + "valueInteger": 2147483647 + }, + { + "name": "offset", + "valueInteger": 0 + } + ], + "contains": [ + { + "system": "http://snomed.info/sct", + "code": "609496007", + "display": "Complication occurring during pregnancy" + }, + { + "system": "http://snomed.info/sct", + "code": "199745000", + "display": "Complication occurring during labour and delivery" + }, + { + "system": "http://snomed.info/sct", + "code": "80113008", + "display": "Complication of the puerperium" + }, + { + "system": "http://snomed.info/sct", + "code": "32485007", + "display": "Hospital admission" + }, + { + "system": "http://snomed.info/sct", + "code": "50417007", + "display": "Lower respiratory tract infection" + }, + { + "system": "http://snomed.info/sct", + "code": "49727002", + "display": "Cough" + }, + { + "system": "http://snomed.info/sct", + "code": "129127001", + "display": "Ear infection" + }, + { + "system": "http://snomed.info/sct", + "code": "38394007", + "display": "Chronic otitis media with perforation" + }, + { + "system": "http://snomed.info/sct", + "code": "78868004", + "display": "Chronic mucoid otitis media" + }, + { + "system": "http://snomed.info/sct", + "code": "247253001", + "display": "Ventilation tube in tympanic membrane" + }, + { + "system": "http://snomed.info/sct", + "code": "43381005", + "display": "Passive smoker" + }, + { + "system": "http://snomed.info/sct", + "code": "195528001", + "display": "Acute rheumatic fever" + }, + { + "system": "http://snomed.info/sct", + "code": "312591002", + "display": "Acute rheumatic heart disease" + } + ] + } + }, + { + "resourceType": "ValueSet", + "id": "MedicalHistoryShortListPrimarySchool", + "url": "https://smartforms.csiro.au/ig/ValueSet/MedicalHistoryShortListPrimarySchool", + "name": "MedicalHistoryShortListPrimarySchool", + "title": "Medical History Short List for Primary School Children", + "status": "draft", + "experimental": false, + "description": "The Medical History Short List for Primary School Children value set includes values to represent conditions for use in a pick list for the MBS 715 Health Check for Primary School Children.", + "compose": { + "include": [ + { + "system": "http://snomed.info/sct", + "concept": [ + { + "code": "50417007" + }, + { + "code": "49727002" + }, + { + "code": "129127001" + }, + { + "code": "38394007" + }, + { + "code": "78868004" + }, + { + "code": "247253001" + }, + { + "code": "129823000" + }, + { + "code": "195528001" + }, + { + "code": "312591002" + }, + { + "code": "43381005" + }, + { + "code": "32485007" + } + ] + } + ] + }, + "expansion": { + "identifier": "455f4b6f-5083-4f56-8995-5ec798e47cc4", + "timestamp": "2022-10-20T09:54:05+10:00", + "total": 11, + "offset": 0, + "parameter": [ + { + "name": "version", + "valueUri": "http://snomed.info/sct|http://snomed.info/sct/32506021000036107/version/20220930" + }, + { + "name": "count", + "valueInteger": 2147483647 + }, + { + "name": "offset", + "valueInteger": 0 + } + ], + "contains": [ + { + "system": "http://snomed.info/sct", + "code": "50417007", + "display": "Lower respiratory tract infection" + }, + { + "system": "http://snomed.info/sct", + "code": "49727002", + "display": "Cough" + }, + { + "system": "http://snomed.info/sct", + "code": "129127001", + "display": "Ear infection" + }, + { + "system": "http://snomed.info/sct", + "code": "38394007", + "display": "Chronic otitis media with perforation" + }, + { + "system": "http://snomed.info/sct", + "code": "78868004", + "display": "Chronic mucoid otitis media" + }, + { + "system": "http://snomed.info/sct", + "code": "247253001", + "display": "Ventilation tube in tympanic membrane" + }, + { + "system": "http://snomed.info/sct", + "code": "129823000", + "display": "Childhood growth AND/OR development alteration" + }, + { + "system": "http://snomed.info/sct", + "code": "195528001", + "display": "Acute rheumatic fever" + }, + { + "system": "http://snomed.info/sct", + "code": "312591002", + "display": "Acute rheumatic heart disease" + }, + { + "system": "http://snomed.info/sct", + "code": "43381005", + "display": "Passive smoker" + }, + { + "system": "http://snomed.info/sct", + "code": "32485007", + "display": "Hospital admission" + } + ] + } + }, + { + "resourceType": "ValueSet", + "id": "MedicalHistoryShortListAdolescents", + "url": "https://smartforms.csiro.au/ig/ValueSet/MedicalHistoryShortListAdolescents", + "name": "MedicalHistoryShortListAdolescents", + "title": "Medical History Short List for Adolescents", + "status": "draft", + "experimental": false, + "description": "The Medical History Short List for Adolescents value set includes values to represent conditions for use in a pick list for the MBS 715 Health Check for Adolescents.", + "compose": { + "include": [ + { + "system": "http://snomed.info/sct", + "concept": [ + { + "code": "129127001" + }, + { + "code": "300228004" + }, + { + "code": "195967001" + }, + { + "code": "38341003" + }, + { + "code": "84757009" + }, + { + "code": "25064002" + }, + { + "code": "37796009" + }, + { + "code": "73211009" + }, + { + "code": "23685000" + }, + { + "code": "90708001" + }, + { + "code": "413307004" + } + ] + } + ] + }, + "expansion": { + "identifier": "5b0bb9f4-1ca3-47e2-bb1d-91cad5454ce4", + "timestamp": "2022-10-20T09:45:56+10:00", + "total": 11, + "offset": 0, + "parameter": [ + { + "name": "version", + "valueUri": "http://snomed.info/sct|http://snomed.info/sct/32506021000036107/version/20220930" + }, + { + "name": "count", + "valueInteger": 2147483647 + }, + { + "name": "offset", + "valueInteger": 0 + } + ], + "contains": [ + { + "system": "http://snomed.info/sct", + "code": "129127001", + "display": "Ear infection" + }, + { + "system": "http://snomed.info/sct", + "code": "300228004", + "display": "Hearing problem" + }, + { + "system": "http://snomed.info/sct", + "code": "195967001", + "display": "Asthma" + }, + { + "system": "http://snomed.info/sct", + "code": "38341003", + "display": "Hypertension" + }, + { + "system": "http://snomed.info/sct", + "code": "84757009", + "display": "Epilepsy" + }, + { + "system": "http://snomed.info/sct", + "code": "25064002", + "display": "Headache" + }, + { + "system": "http://snomed.info/sct", + "code": "37796009", + "display": "Migraine" + }, + { + "system": "http://snomed.info/sct", + "code": "73211009", + "display": "Diabetes mellitus" + }, + { + "system": "http://snomed.info/sct", + "code": "23685000", + "display": "Rheumatic heart disease" + }, + { + "system": "http://snomed.info/sct", + "code": "90708001", + "display": "Kidney disease" + }, + { + "system": "http://snomed.info/sct", + "code": "413307004", + "display": "Mental health problem" + } + ] + } + }, + { + "resourceType": "ValueSet", + "id": "MedicalHistoryShortListAdultsAndOlderPeople", + "url": "https://smartforms.csiro.au/ig/ValueSet/MedicalHistoryShortListAdultsAndOlderPeople", + "name": "MedicalHistoryShortListAdultsAndOlderPeople", + "title": "Medical History Short List for Adults and Older People", + "status": "draft", + "experimental": false, + "description": "The Medical History Short List for Adults and Older People value set includes values to represent conditions for use in a pick list for the MBS 715 Health Check for Adults and Older People.", + "compose": { + "include": [ + { + "system": "http://snomed.info/sct", + "concept": [ + { + "code": "44054006" + }, + { + "code": "38341003" + }, + { + "code": "22298006" + }, + { + "code": "230690007" + }, + { + "code": "90708001" + }, + { + "code": "15188001" + }, + { + "code": "84757009" + }, + { + "code": "195967001" + }, + { + "code": "13645005" + }, + { + "code": "23685000" + }, + { + "code": "66071002" + }, + { + "code": "82271004" + }, + { + "code": "413307004" + } + ] + } + ] + }, + "expansion": { + "identifier": "1998291e-ed8a-49f2-ac11-9e6056efd7f3", + "timestamp": "2022-10-20T09:48:19+10:00", + "total": 13, + "offset": 0, + "parameter": [ + { + "name": "version", + "valueUri": "http://snomed.info/sct|http://snomed.info/sct/32506021000036107/version/20220930" + }, + { + "name": "count", + "valueInteger": 2147483647 + }, + { + "name": "offset", + "valueInteger": 0 + } + ], + "contains": [ + { + "system": "http://snomed.info/sct", + "code": "44054006", + "display": "Type 2 diabetes mellitus" + }, + { + "system": "http://snomed.info/sct", + "code": "38341003", + "display": "Hypertension" + }, + { + "system": "http://snomed.info/sct", + "code": "22298006", + "display": "Myocardial infarction" + }, + { + "system": "http://snomed.info/sct", + "code": "230690007", + "display": "Stroke" + }, + { + "system": "http://snomed.info/sct", + "code": "90708001", + "display": "Kidney disease" + }, + { + "system": "http://snomed.info/sct", + "code": "15188001", + "display": "Hearing loss" + }, + { + "system": "http://snomed.info/sct", + "code": "84757009", + "display": "Epilepsy" + }, + { + "system": "http://snomed.info/sct", + "code": "195967001", + "display": "Asthma" + }, + { + "system": "http://snomed.info/sct", + "code": "13645005", + "display": "COPD" + }, + { + "system": "http://snomed.info/sct", + "code": "23685000", + "display": "Rheumatic heart disease" + }, + { + "system": "http://snomed.info/sct", + "code": "66071002", + "display": "Hepatitis B" + }, + { + "system": "http://snomed.info/sct", + "code": "82271004", + "display": "Head injury" + }, + { + "system": "http://snomed.info/sct", + "code": "413307004", + "display": "Mental health problem" + } + ] + } + }, + { + "resourceType": "ValueSet", + "id": "condition-clinical", + "meta": { + "profile": ["http://hl7.org/fhir/StructureDefinition/shareablevalueset"] + }, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", + "valueCode": "pc" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", + "valueInteger": 3 + } + ], + "url": "http://hl7.org/fhir/ValueSet/condition-clinical", + "identifier": [ + { + "system": "urn:ietf:rfc:3986", + "value": "urn:oid:2.16.840.1.113883.4.642.3.164" + } + ], + "version": "4.3.0", + "name": "ConditionClinicalStatusCodes", + "title": "Condition Clinical Status Codes", + "status": "draft", + "experimental": false, + "publisher": "FHIR Project team", + "contact": [ + { + "telecom": [ + { + "system": "url", + "value": "http://hl7.org/fhir" + } + ] + } + ], + "description": "Preferred value set for Condition Clinical Status.", + "copyright": "Copyright © 2011+ HL7. Creative Commons 'No Rights Reserved' (CC0)", + "compose": { + "include": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical" + } + ] + }, + "expansion": { + "identifier": "5d4bed14-061a-42c4-853d-e6a624c4f483", + "timestamp": "2022-10-20T09:32:48+10:00", + "total": 6, + "offset": 0, + "parameter": [ + { + "name": "version", + "valueUri": "http://terminology.hl7.org/CodeSystem/condition-clinical|4.0.1" + }, + { + "name": "count", + "valueInteger": 2147483647 + }, + { + "name": "offset", + "valueInteger": 0 + } + ], + "contains": [ + { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "active", + "display": "Active" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "inactive", + "display": "Inactive" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "recurrence", + "display": "Recurrence" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "relapse", + "display": "Relapse" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "remission", + "display": "Remission" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "resolved", + "display": "Resolved" + } + ] + } + }, + { + "resourceType": "ValueSet", + "id": "YesNoNotAskedDeclined", + "url": "https://smartforms.csiro.au/ig/ValueSet/YesNoNotAskedDeclined", + "name": "YesNoNotAskedDeclined", + "title": "Yes/No/Not Asked/Asked But Declined", + "status": "draft", + "experimental": false, + "description": "Concepts for Yes, No, Not Asked and Asked But Declined", + "compose": { + "include": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0532", + "concept": [ + { + "code": "Y", + "display": "Yes" + }, + { + "code": "N", + "display": "No" + }, + { + "code": "NASK", + "display": "Not Asked" + } + ] + }, + { + "system": "http://terminology.hl7.org/CodeSystem/data-absent-reason", + "concept": [ + { + "code": "asked-declined", + "display": "Asked But Declined" + } + ] + } + ] + }, + "expansion": { + "identifier": "urn:uuid:8eda7c3c-cc35-49fa-ac6c-c0e4f0a4e203", + "timestamp": "2023-09-01T11:17:57+10:00", + "total": 4, + "parameter": [ + { + "name": "version", + "valueUri": "http://terminology.hl7.org/CodeSystem/data-absent-reason|5.0.0-ballot" + }, + { + "name": "used-codesystem", + "valueUri": "http://terminology.hl7.org/CodeSystem/data-absent-reason|5.0.0-ballot" + }, + { + "name": "version", + "valueUri": "http://terminology.hl7.org/CodeSystem/v2-0532|2.1.0" + }, + { + "name": "used-codesystem", + "valueUri": "http://terminology.hl7.org/CodeSystem/v2-0532|2.1.0" + } + ], + "contains": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0532", + "version": "2.1.0", + "code": "Y", + "display": "Yes" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0532", + "version": "2.1.0", + "code": "N", + "display": "No" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0532", + "version": "2.1.0", + "code": "NASK", + "display": "Not Asked" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/data-absent-reason", + "version": "5.0.0-ballot", + "code": "asked-declined", + "display": "Asked But Declined" + } + ] + } + }, + { + "resourceType": "ValueSet", + "id": "pronouns", + "meta": { + "profile": ["http://hl7.org/fhir/StructureDefinition/shareablevalueset"] + }, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg", + "valueCode": "pa" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm", + "valueInteger": 1 + } + ], + "url": "http://terminology.hl7.org/ValueSet/pronouns", + "identifier": [ + { + "system": "urn:ietf:rfc:3986", + "value": "urn:oid:2.16.840.1.113883.4.642.3.3290" + } + ], + "version": "1.0.0", + "name": "PersonalPronouns", + "title": "Personal Pronouns", + "status": "active", + "experimental": false, + "date": "2023-07-17T22:16:15-06:00", + "publisher": "FHIR Project team", + "contact": [ + { + "telecom": [ + { + "system": "url", + "value": "http://hl7.org/fhir" + } + ] + } + ], + "description": "Codes that indicate the pronouns to be used when communicating with or about an individual.", + "copyright": "This material contains content from LOINC (http://loinc.org). LOINC is copyright © 1995-2020, Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc", + "compose": { + "include": [ + { + "system": "http://loinc.org", + "concept": [ + { + "code": "LA29518-0", + "display": "he/him/his/his/himself" + }, + { + "code": "LA29519-8", + "display": "she/her/her/hers/herself" + }, + { + "code": "LA29520-6", + "display": "they/them/their/theirs/themselves" + } + ] + } + ] + }, + "expansion": { + "identifier": "urn:uuid:220b830c-6a1b-43e7-81e0-ccf92485fcdf", + "timestamp": "2023-10-17T10:42:37+10:00", + "total": 3, + "parameter": [ + { + "name": "version", + "valueUri": "http://loinc.org|2.76" + }, + { + "name": "used-codesystem", + "valueUri": "http://loinc.org|2.76" + } + ], + "contains": [ + { + "system": "http://loinc.org", + "code": "LA29518-0", + "display": "he/him/his/his/himself" + }, + { + "system": "http://loinc.org", + "code": "LA29519-8", + "display": "she/her/her/hers/herself" + }, + { + "system": "http://loinc.org", + "code": "LA29520-6", + "display": "they/them/their/theirs/themselves" + } + ] + } + } + ], + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "QuestionnaireResponseLatestCompleted", + "language": "application/x-fhir-query", + "expression": "QuestionnaireResponse?status=completed&_count=1&_sort=-authored&patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "QuestionnaireResponseLatest", + "language": "application/x-fhir-query", + "expression": "QuestionnaireResponse?_count=1&_sort=-authored&patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "Condition", + "language": "application/x-fhir-query", + "expression": "Condition?patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "ObsSex", + "language": "application/x-fhir-query", + "expression": "Observation?code=1515311000168102&status=final&_count=1&_sort=-date&patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "ObsTobaccoSmokingStatus", + "language": "application/x-fhir-query", + "expression": "Observation?code=72166-2&_count=1&_sort=-date&patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "ObsBodyHeight", + "language": "application/x-fhir-query", + "expression": "Observation?code=8302-2&_count=1&_sort=-date&patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "ObsBodyWeight", + "language": "application/x-fhir-query", + "expression": "Observation?code=29463-7&_count=1&_sort=-date&patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "ObsBMI", + "language": "application/x-fhir-query", + "expression": "Observation?code=39156-5&_count=1&_sort=-date&patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "ObsHeadCircumference", + "language": "application/x-fhir-query", + "expression": "Observation?code=9843-4&_count=1&_sort=-date&patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "ObsWaistCircumference", + "language": "application/x-fhir-query", + "expression": "Observation?code=8280-0&_count=1&_sort=-date&patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "ObsBloodPressure", + "language": "application/x-fhir-query", + "expression": "Observation?code=85354-9&_count=1&_sort=-date&patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "ObsHeartRate", + "language": "application/x-fhir-query", + "expression": "Observation?code=8867-4&_count=1&_sort=-date&patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "ObsTotalCholesterol", + "language": "application/x-fhir-query", + "expression": "Observation?code=14647-2&_count=1&_sort=-date&patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "ObsHDLCholesterol", + "language": "application/x-fhir-query", + "expression": "Observation?code=14646-4&_count=1&_sort=-date&patient={{%patient.id}}" + } + }, + { + "url": "https://smartforms.csiro.au/ig/StructureDefinition/ContainedResourceReference", + "valueReference": { + "reference": "#YesNoNA" + } + }, + { + "url": "https://smartforms.csiro.au/ig/StructureDefinition/ContainedResourceReference", + "valueReference": { + "reference": "#YesNo" + } + }, + { + "url": "https://smartforms.csiro.au/ig/StructureDefinition/ContainedResourceReference", + "valueReference": { + "reference": "#YesNoNotAskedDeclined" + } + }, + { + "url": "https://smartforms.csiro.au/ig/StructureDefinition/ContainedResourceReference", + "valueReference": { + "reference": "#MedicalHistory" + } + }, + { + "url": "https://smartforms.csiro.au/ig/StructureDefinition/ContainedResourceReference", + "valueReference": { + "reference": "#MedicalHistoryShortListInfants" + } + }, + { + "url": "https://smartforms.csiro.au/ig/StructureDefinition/ContainedResourceReference", + "valueReference": { + "reference": "#MedicalHistoryShortListPrimarySchool" + } + }, + { + "url": "https://smartforms.csiro.au/ig/StructureDefinition/ContainedResourceReference", + "valueReference": { + "reference": "#MedicalHistoryShortListAdolescents" + } + }, + { + "url": "https://smartforms.csiro.au/ig/StructureDefinition/ContainedResourceReference", + "valueReference": { + "reference": "#MedicalHistoryShortListAdultsAndOlderPeople" + } + }, + { + "url": "https://smartforms.csiro.au/ig/StructureDefinition/ContainedResourceReference", + "valueReference": { + "reference": "#condition-clinical" + } + }, + { + "url": "https://smartforms.csiro.au/ig/StructureDefinition/ContainedResourceReference", + "valueReference": { + "reference": "#AboriginalTorresStraitIslander" + } + }, + { + "url": "https://smartforms.csiro.au/ig/StructureDefinition/ContainedResourceReference", + "valueReference": { + "reference": "#PrimaryCarerParentGrandparent" + } + }, + { + "url": "https://smartforms.csiro.au/ig/StructureDefinition/ContainedResourceReference", + "valueReference": { + "reference": "#pronouns" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext", + "extension": [ + { + "url": "name", + "valueCoding": { + "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext", + "code": "patient" + } + }, + { + "url": "type", + "valueCode": "Patient" + }, + { + "url": "description", + "valueString": "The patient that is to be used to pre-populate the form" + } + ] + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext", + "extension": [ + { + "url": "name", + "valueCoding": { + "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext", + "code": "user" + } + }, + { + "url": "type", + "valueCode": "Practitioner" + }, + { + "url": "description", + "valueString": "The practitioner user that is to be used to pre-populate the form" + } + ] + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/AboutTheHealthCheck" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/Consent" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/PatientDetails" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/CurrentPriorities" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/MedicalHistoryCurrentProblems" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/RegularMedications" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/AllergiesAdverseReactions" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/FamilyHistory" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/SocialAndEmotionalWellbeing" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/SocialHistoryChild" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/HomeAndFamily" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/LearningAndDevelopment" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/LearningAndWork" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/Mood" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/MemoryAndThinking" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/ChronicDiseaseAgeing" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/ScreeningPrograms" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/HealthyEating" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/PhysicalActivityAndScreenTime" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/RedFlagsEarlyIdentificationGuide" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/SubstanceUse" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/Gambling" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/SexualHealth" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/EyeHealth" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/EarHealthAndHearing" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/OralAndDentalHealth" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/Skin" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/Immunisation" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/Examination" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/AbsoluteCVDRiskCalculation" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/Investigations" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/HealthPrioritiesSummary" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom", + "valueCanonical": "http://www.health.gov.au/assessments/mbs/715/FinalisingHealthCheck" + } + ], + "url": "http://www.health.gov.au/assessments/mbs/715", + "version": "0.1.0-dev", + "name": "DEV715", + "title": "DEV715", + "status": "draft", + "experimental": false, + "subjectType": ["Patient"], + "date": "2022-05-24", + "description": "DEV715", + "jurisdiction": [ + { + "coding": [ + { + "system": "urn:iso:std:iso:3166", + "code": "AU" + } + ] + } + ], + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "version": "1.0.0", + "code": "tab-container" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "PostalAddress", + "language": "text/fhirpath", + "expression": "%patient.address.where(type='postal')" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "weight", + "language": "text/fhirpath", + "expression": "item.where(linkId='c587e3b6-b91a-40dc-9a16-179342d001e9').item.where(linkId='53d5d5a6-3198-4bec-92ac-03fe7d77fb68').item.where(linkId='97ed4c86-8820-4e4d-9234-0e0e8b6ca44a').item.where(linkId='443bd584-684a-449c-ab6e-9d07da4df9fa').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "height", + "language": "text/fhirpath", + "expression": "item.where(linkId='c587e3b6-b91a-40dc-9a16-179342d001e9').item.where(linkId='53d5d5a6-3198-4bec-92ac-03fe7d77fb68').item.where(linkId='6226a5c5-b5c3-4ebb-a689-2b286322cfe0').item.where(linkId='7035c7e7-ada3-4c6b-9ea8-f39666f5d4ea').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "age", + "language": "text/fhirpath", + "expression": "item.where(linkId='5b224753-9365-44e3-823b-9c17e7394005').item.where(linkId='e2a16e4d-2765-4b61-b286-82cfc6356b30').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "sex", + "language": "text/fhirpath", + "expression": "item.where(linkId='5b224753-9365-44e3-823b-9c17e7394005').item.where(linkId='56ef44bb-3d1d-4972-aad1-834b69185d61').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "smoker", + "language": "text/fhirpath", + "expression": "item.where(linkId='14a9fb5f-5b0e-4862-b143-08a11cd3ebf0').item.where(linkId='515eda6e-973a-4b10-910a-0d4bf4f2efff').item.where(linkId='b639a3a8-f476-4cc8-b5c7-f5d2abb23511').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "postcode", + "language": "text/fhirpath", + "expression": "item.where(linkId='5b224753-9365-44e3-823b-9c17e7394005').item.where(linkId='f1262ade-843c-4eba-a86d-51a9c97d134b').item.where(linkId='4e0dc185-f83e-4027-b7a8-ecb543d42c6d').item.where(linkId='3f61a1ea-1c74-4f52-8519-432ce861a74f').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryCurrentPriorities", + "language": "text/fhirpath", + "expression": "item.where(linkId='b3a3eee2-f340-452e-9d05-d1f54f677b81').item.where(linkId='7cd424e5-7672-4e99-8a99-30b1fb3043fd').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryMedicalHistory", + "language": "text/fhirpath", + "expression": "item.where(linkId='28d5dbe4-1e65-487c-847a-847f544a6a91').item.where(linkId='62774152-8a6e-4449-af9f-87bdce8b9bf5').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryRegularMedications", + "language": "text/fhirpath", + "expression": "item.where(linkId='7dfe7c6a-ca7f-4ddf-9241-a7b918a9695a').item.where(linkId='aa9ff2ed-bcd2-406d-a9ff-89c201df2605').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryAllergiesAdverseReactions", + "language": "text/fhirpath", + "expression": "item.where(linkId='d4e4db07-a795-4a30-bd0f-9c109f96a22b').item.where(linkId='3e689aeb-69a1-4a9b-93bd-50377511dd9b').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryFamilyHistory", + "language": "text/fhirpath", + "expression": "item.where(linkId='01f67f0b-e3be-48d8-a2ad-4c54f469cd13').item.where(linkId='49ee4583-c608-41d4-a1e9-c06cf4292369').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummarySocialEmotionalWellbeing", + "language": "text/fhirpath", + "expression": "item.where(linkId='0a3c9c93-5836-4a5b-93e5-d7de559e053a').item.where(linkId='b5a00aad-2a8b-4ac3-87b2-4a5920ca22ee').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummarySocialHistory", + "language": "text/fhirpath", + "expression": "item.where(linkId='a5cc8a8f-89cf-470c-a6bd-ce9da2f64ee9').item.where(linkId='76d51512-b94a-4092-b3ae-a656fbb9c360').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryHomeFamily", + "language": "text/fhirpath", + "expression": "item.where(linkId='819b3305-bf93-4502-9986-242ea2ae5f43').item.where(linkId='08d2e80e-3bb4-4f67-8b1c-090b1ace225a').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryLearningDevelopment", + "language": "text/fhirpath", + "expression": "item.where(linkId='3e7d7246-98f8-4803-b063-8405ac30b086').item.where(linkId='5ab80929-5901-431d-bf68-67d532f5fa58').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryLearningWorkAdults", + "language": "text/fhirpath", + "expression": "item.where(linkId='5437e30d-8a0a-4785-974e-00a10d2a1df0').item.where(linkId='3569e514-a74b-4343-b31b-3395e58d991a').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryLearningWorkOlder", + "language": "text/fhirpath", + "expression": "item.where(linkId='dec713ae-246a-4961-95c9-0626bfebfed2').item.where(linkId='ed6f7800-e22a-4639-9d11-faf845513500').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryMood", + "language": "text/fhirpath", + "expression": "item.where(linkId='9559242e-9ffe-4e1f-a9fc-86d1fa62c4b9').item.where(linkId='db9a8650-42a2-4bd3-8066-7e09394120d5').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryMemoryThinking", + "language": "text/fhirpath", + "expression": "item.where(linkId='1bd58e7b-2cb7-45fb-965f-d5fa33d0bb4c').item.where(linkId='1f0e7fde-e964-4f36-9151-dbdc5e145f94').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryChronicDiseaseAgeing", + "language": "text/fhirpath", + "expression": "item.where(linkId='c5da020c-c4f3-437c-b658-ea7e7667514d').item.where(linkId='7292070b-8944-4a40-bcf6-9aaf1721e986').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryScreeningPrograms", + "language": "text/fhirpath", + "expression": "item.where(linkId='9674ffa0-2ad9-4ca3-80e6-e8bb0670a802').item.where(linkId='70f82c4b-d1f9-44d5-9903-bd7097799c05').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryHealthyEating", + "language": "text/fhirpath", + "expression": "item.where(linkId='ae7a3801-9491-4b1f-820c-678236d18f56').item.where(linkId='301789b0-8c6a-470d-8787-0ac6597e3bea').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryPhysicalActivityScreenTimeNotOlder", + "language": "text/fhirpath", + "expression": "item.where(linkId='74736baa-455b-41d2-af98-fb65cd463e97').item.where(linkId='ccbd7fbf-0d40-4cb3-82b3-ad2c7cc7bba2').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryPhysicalActivityScreenTimeOlder", + "language": "text/fhirpath", + "expression": "item.where(linkId='d56234a0-aafd-4c22-96c9-00ead8424f0b').item.where(linkId='25b8b8fd-adb1-48ab-aeae-528603668c4b').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummarySubstanceUse", + "language": "text/fhirpath", + "expression": "item.where(linkId='14a9fb5f-5b0e-4862-b143-08a11cd3ebf0').item.where(linkId='f8e1cc1f-f1a1-4eb3-8255-77d600f52831').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryGambling", + "language": "text/fhirpath", + "expression": "item.where(linkId='a7bb0dd2-4b2d-49c2-9da6-3cb0a4dd9240').item.where(linkId='2ab74c97-55d9-4fd9-968f-8962d62ea573').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummarySexualHealthAdolescents", + "language": "text/fhirpath", + "expression": "item.where(linkId='4b49c291-6e93-4b7e-be3b-15ef8bc207ad').item.where(linkId='b41572ba-cf36-4cec-addf-cb0b47fea63f').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummarySexualHealthAdults", + "language": "text/fhirpath", + "expression": "item.where(linkId='589b53a4-ceb2-41c0-850a-69438f9fd1cc').item.where(linkId='efd0735c-c379-471f-83bb-93b0392093aa').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummarySexualHealthOlder", + "language": "text/fhirpath", + "expression": "item.where(linkId='02048954-e9d7-424e-8c7b-6a3c495d7ce4').item.where(linkId='e9936322-e6fe-4cf7-ab61-22846a8fbb95').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryEyeHealth", + "language": "text/fhirpath", + "expression": "item.where(linkId='961da481-1698-4a1d-962b-a9c2185e335a').item.where(linkId='8dcdc04c-7655-4b47-88eb-8425f0cdc0d0').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryEarHealthHearing", + "language": "text/fhirpath", + "expression": "item.where(linkId='de71bbd0-178c-4974-9c75-55d5a48c66f7').item.where(linkId='ac87b23a-b022-4d62-9e82-1c56583bca34').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryOralDentalHealth", + "language": "text/fhirpath", + "expression": "item.where(linkId='bde9ab00-a20f-4a7c-9266-11f53f60c65f').item.where(linkId='875574fa-9769-42ca-8381-9e80c3e5233d').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummarySkin", + "language": "text/fhirpath", + "expression": "item.where(linkId='7d4772cb-a1cd-49d9-853f-883ccd8343a6').item.where(linkId='88d23fa4-df88-43ab-a1d0-69315d55c3bf').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryImmunisation", + "language": "text/fhirpath", + "expression": "item.where(linkId='205677d6-17c7-4285-a7c4-61aa02b6c816').item.where(linkId='bcd1c9f2-889e-41e5-8c2b-a70221c5cec5').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryExamination", + "language": "text/fhirpath", + "expression": "item.where(linkId='c587e3b6-b91a-40dc-9a16-179342d001e9').item.where(linkId='fcbfa6e1-c101-4675-969d-aa11027859c2').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryAbsoluteCVDRisk", + "language": "text/fhirpath", + "expression": "item.where(linkId='d95abe99-8ef2-4b97-bc88-a2901e2ebc9c').item.where(linkId='f8022f3f-21fe-42c0-8abd-95f24e2e37e5').answer.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "HealthPrioritiesSummaryInvestigations", + "language": "text/fhirpath", + "expression": "item.where(linkId='918f7f32-cdaf-4742-b33a-8254eda2d8bd').item.where(linkId='96a8d946-6078-4c85-9de8-3bf18d2c8150').answer.value" + } + } + ], + "linkId": "fd5af92e-c248-497a-8007-ee0952ccd4d9", + "type": "group", + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/variable", + "valueExpression": { + "name": "QuestionnaireResponseLatestCompleted", + "language": "application/x-fhir-query", + "expression": "QuestionnaireResponse?status=completed&_count=1&_sort=-authored&patient={{%patient.id}}" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + } + ], + "linkId": "2e82032a-dc28-45f2-916e-862303d39fe5", + "text": "About the health check", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-1", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-1", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-1", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-1", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "RecordUpdate-About", + "text": "Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there first.", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there first.\r\n
" + } + ] + }, + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "3da318f1-a5dd-4c8f-b258-99d83872a4f2", + "text": "Eligible for health check", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA", + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-display-category", + "code": "instructions" + } + ] + } + } + ], + "linkId": "04f00512-888b-424e-ba76-9bd6fd8da682", + "text": "not claimed 715 or 228 in past nine months", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%QuestionnaireResponseLatest.entry.resource.where(status='in-progress').exists()" + } + } + ], + "linkId": "5960c096-d5f7-4745-bd74-44ff2775bde9", + "text": "Health check already in progress?", + "type": "boolean", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%QuestionnaireResponseLatestCompleted.entry.resource.authored" + } + } + ], + "linkId": "01418489-1ec4-4c3b-b96a-7c14c3e21cfe", + "text": "Date of last completed health check", + "type": "date", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "today()" + } + } + ], + "linkId": "63fe14f3-2374-4382-bce7-180e2747c97f", + "text": "Date this health check commenced", + "type": "date", + "repeats": false + }, + { + "linkId": "MarkComplete-1", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + } + ], + "linkId": "1016f79d-9756-4daf-b6ee-29add134b34f", + "text": "Consent", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-30", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-30", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-30", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-30", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "d1e1ab3d-1c6c-430b-8ae7-af56b8f0af55", + "text": "Consent given after discussion of process and benefits of a health check", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "7fa8bc57-f3f9-4ddc-bf9b-12a9b9885dbd", + "text": "Consent given by parent/primary carer after discussion of process and benefits of a health check", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 24" + } + } + ], + "linkId": "80a6a405-49a4-44fb-bff3-212902096b95", + "text": "Parent/primary caregiver present", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "c72933c7-349f-4fef-94ff-c424c69da6f3", + "text": "Parent/primary caregiver is present for health check?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "linkId": "b7d116f9-0425-4cf1-8cde-fbf4dfaee550", + "text": "Relationship to child", + "type": "string", + "enableWhen": [ + { + "question": "c72933c7-349f-4fef-94ff-c424c69da6f3", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": true + } + ] + }, + { + "linkId": "d8c88bff-75ea-476f-8f83-e9b72fc9e1a0", + "text": "Consent for sharing of information", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "057483ce-f265-46df-a1c5-7a18d492c1ba", + "text": "Consent given for sharing of information with relevant healthcare providers?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "linkId": "43517c44-5cd2-4d9a-9f18-d6bf8124f4ae", + "text": "Who/details", + "type": "text", + "enableWhen": [ + { + "question": "057483ce-f265-46df-a1c5-7a18d492c1ba", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "today()" + } + } + ], + "linkId": "84162f36-f4af-4509-b178-ef2a3849d0b6", + "text": "Date", + "type": "date", + "required": true, + "repeats": false + }, + { + "linkId": "0f92eb2d-4629-4215-96f8-46722a2efa73", + "text": "Doctor", + "type": "string", + "repeats": false + }, + { + "linkId": "8b94a129-3aab-4d13-bb6d-7a748f5c41e5", + "text": "Nurse", + "type": "string", + "repeats": false + }, + { + "linkId": "2a517291-e2f1-4f66-ad1f-ae5b091d2f8a", + "text": "Aboriginal and/or Torres Strait Islander Health Worker / Health Practitioner", + "type": "string", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 5" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other, please specify" + } + ], + "linkId": "5bbfb4a3-a667-4ef2-98c2-76e76da55c03", + "text": "Location of health check", + "type": "open-choice", + "repeats": false, + "answerOption": [ + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "257585005", + "display": "Clinic" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "264362003", + "display": "Home" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "257698009", + "display": "School" + } + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other, please specify" + } + ], + "linkId": "9a51c056-021d-445d-8eaa-2123a69aa9c2", + "text": "Location of health check", + "type": "open-choice", + "repeats": false, + "answerOption": [ + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "257585005", + "display": "Clinic" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "264362003", + "display": "Home" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "413817003", + "display": "Early learning centre" + } + } + ] + }, + { + "linkId": "MarkComplete-30", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "linkId": "5b224753-9365-44e3-823b-9c17e7394005", + "text": "Patient Details", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-32", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-32", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-32", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-32", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "RecordUpdate-Patient", + "text": "Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there first.", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there first.\r\n
" + } + ] + }, + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%patient.name.where(use='official').select((family | (given | prefix).join(' ')).join(', ').where($this != '') | text) | %patient.name.select((family | (given | prefix).join(' ')).join(', ').where($this != '') | text)).first()" + } + } + ], + "linkId": "17596726-34cf-4133-9960-7081e1d63558", + "text": "Name", + "type": "string", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%patient.name.where(use='usual').select((family | (given | prefix).join(' ')).join(', ').where($this != '') | text)).first()" + } + } + ], + "linkId": "57093a06-62f7-4b8b-8cb4-2c9f451ac851", + "text": "Preferred name", + "type": "string", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.extension.where(url='http://hl7.org/fhir/StructureDefinition/individual-pronouns').extension.where(url='value').value.coding" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "drop-down" + } + ] + } + } + ], + "linkId": "540b1034-7c9a-4aba-a9ef-afb77d445a58", + "text": "Preferred pronouns", + "type": "choice", + "repeats": false, + "readOnly": false, + "answerValueSet": "http://terminology.hl7.org/ValueSet/pronouns" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.extension.where(url='http://hl7.org/fhir/StructureDefinition/patient-genderIdentity').value.coding" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "drop-down" + } + ] + } + } + ], + "linkId": "f669a4fe-4818-429a-8847-d20da88d2bb3", + "text": "Gender identity", + "type": "choice", + "repeats": false, + "readOnly": false, + "answerValueSet": "https://healthterminologies.gov.au/fhir/ValueSet/gender-identity-response-1" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.gender" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", + "valueBoolean": true + } + ], + "linkId": "418e4a02-de77-48a0-a92a-fe8fcc52b1aa", + "text": "Administrative gender", + "type": "choice", + "repeats": false, + "answerValueSet": "http://hl7.org/fhir/ValueSet/administrative-gender" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsSex.entry.resource.value.coding" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "drop-down" + } + ] + } + } + ], + "linkId": "56ef44bb-3d1d-4972-aad1-834b69185d61", + "text": "Sex assigned at birth", + "type": "choice", + "repeats": false, + "readOnly": false, + "answerValueSet": "https://healthterminologies.gov.au/fhir/ValueSet/biological-sex-1" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.birthDate" + } + } + ], + "linkId": "90ad8f16-16e4-4438-a7aa-b3189f510da2", + "text": "Date of birth", + "type": "date", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "iif(today().toString().select(substring(5,2) & substring(8,2)).toInteger() > %patient.birthDate.toString().select(substring(5,2) & substring(8,2)).toInteger(), today().toString().substring(0,4).toInteger() - %patient.birthDate.toString().substring(0,4).toInteger(), today().toString().substring(0,4).toInteger() - %patient.birthDate.toString().substring(0,4).toInteger() - 1)" + } + } + ], + "linkId": "e2a16e4d-2765-4b61-b286-82cfc6356b30", + "text": "Age", + "type": "integer", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.extension.where(url='http://hl7.org.au/fhir/StructureDefinition/indigenous-status').value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + } + ], + "linkId": "8acde9f8-7a91-4f0c-9216-38531ec984ef", + "text": "Aboriginal and/or Torres Strait Islander status", + "type": "choice", + "repeats": false, + "readOnly": false, + "answerValueSet": "#AboriginalTorresStraitIslander" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 24" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "c8852db9-efe9-4102-96db-cef3a8be0a5f", + "text": "Parents/primary carer/s", + "type": "choice", + "repeats": true, + "answerValueSet": "#PrimaryCarerParentGrandparent" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 24" + } + } + ], + "linkId": "7089c48e-4216-4089-a548-034cd585e4da", + "text": "Other family", + "type": "string", + "repeats": true, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "70c45932-99dc-42a3-9650-4683892a0892", + "text": "details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 24" + } + } + ], + "linkId": "42b1f5e0-bf4a-47d9-86a4-f2fe946ac01f", + "text": "Other", + "type": "string", + "repeats": true, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "dcbd3a54-9b68-4486-bf30-f6f1723bc39c", + "text": "details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "06737e46-e880-4037-9a2c-bcd278cd70ba", + "text": "Parents/primary carer/s details", + "type": "group", + "repeats": true, + "item": [ + { + "linkId": "cc20ce96-af06-4cd7-aa9b-c2601a6169ad", + "text": "Name of parent/primary carer", + "type": "string", + "repeats": false + }, + { + "linkId": "372d79bb-9d0b-42d2-a98c-cbe332bd3745", + "text": "Relationship to child", + "type": "string", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", + "valueExpression": { + "name": "HomeAddressRepeat", + "language": "text/fhirpath", + "expression": "%patient.address.where(use='home'and (type.empty() or type!='postal'))" + } + } + ], + "linkId": "f1262ade-843c-4eba-a86d-51a9c97d134b", + "text": "Home address", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HomeAddressRepeat.extension('http://hl7.org.au/fhir/StructureDefinition/no-fixed-address').value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "311d83bb-f22e-4f60-9b50-b6e38dd2059b", + "definition": "http://hl7.org.au/fhir/StructureDefinition/au-address#Address.extension:noFixedAddress", + "text": "No fixed address", + "type": "boolean", + "repeats": false + }, + { + "linkId": "4e0dc185-f83e-4027-b7a8-ecb543d42c6d", + "type": "group", + "enableWhen": [ + { + "question": "311d83bb-f22e-4f60-9b50-b6e38dd2059b", + "operator": "!=", + "answerBoolean": true + } + ], + "repeats": true, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HomeAddressRepeat.select(line.join(', '))" + } + } + ], + "linkId": "2fee2d51-7828-4178-b8c1-35edd32ba338", + "definition": "http://hl7.org.au/fhir/StructureDefinition/au-address#Address.line", + "text": "Street address", + "type": "string", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HomeAddressRepeat.city" + } + } + ], + "linkId": "ddb65ed1-f4b2-4730-af2a-2f98bc73c76f", + "definition": "http://hl7.org.au/fhir/StructureDefinition/au-address#Address.city", + "text": "City", + "type": "string", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HomeAddressRepeat.state" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "drop-down" + } + ] + } + } + ], + "linkId": "d9a1236c-8d6e-4f20-a12a-9d5de5a1d0f6", + "definition": "http://hl7.org.au/fhir/StructureDefinition/au-address#Address.state", + "text": "State", + "type": "choice", + "repeats": false, + "answerValueSet": "https://healthterminologies.gov.au/fhir/ValueSet/australian-states-territories-2" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HomeAddressRepeat.postalCode" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/regex", + "valueString": "matches('^[0-9]{4}$')" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/entryFormat", + "valueString": "####" + } + ], + "linkId": "3f61a1ea-1c74-4f52-8519-432ce861a74f", + "definition": "http://hl7.org.au/fhir/StructureDefinition/au-address#Address.postalCode", + "text": "Postcode", + "type": "string", + "repeats": false + } + ] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", + "valueExpression": { + "name": "PostalAddressRepeat", + "language": "text/fhirpath", + "expression": "%patient.address.where(type='postal')" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%PostalAddress.exists()" + } + } + ], + "linkId": "edc081ea-b5ba-4234-9234-8ee598c2f95f", + "text": "Postal address", + "type": "group", + "repeats": true, + "readOnly": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%PostalAddressRepeat.use" + } + } + ], + "linkId": "622970f1-3cf1-4f0a-bf05-b00a08046eba", + "definition": "http://hl7.org.au/fhir/StructureDefinition/au-address#Address.use", + "text": "Purpose of use", + "type": "string", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%PostalAddressRepeat.select(line.join(', '))" + } + } + ], + "linkId": "2e8437cd-5ea0-4d44-8ab2-d2aa9ef18ba7", + "definition": "http://hl7.org.au/fhir/StructureDefinition/au-address#Address.line", + "text": "Address", + "type": "string", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%PostalAddressRepeat.city" + } + } + ], + "linkId": "2bde25e5-2c4c-4c0c-b6f3-c6859535a764", + "definition": "http://hl7.org.au/fhir/StructureDefinition/au-address#Address.city", + "text": "City", + "type": "string", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%PostalAddressRepeat.state" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "drop-down" + } + ] + } + } + ], + "linkId": "b41a8b11-8dbf-4999-9d0a-71d39240fed1", + "definition": "http://hl7.org.au/fhir/StructureDefinition/au-address#Address.state", + "text": "State", + "type": "choice", + "repeats": false, + "answerValueSet": "https://healthterminologies.gov.au/fhir/ValueSet/australian-states-territories-2" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%PostalAddressRepeat.postalCode" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/regex", + "valueString": "matches('^[0-9]{4}$')" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/entryFormat", + "valueString": "####" + } + ], + "linkId": "28b58e50-2a04-4192-9655-efc8d72f32fa", + "definition": "http://hl7.org.au/fhir/StructureDefinition/au-address#Address.postalCode", + "text": "Postcode", + "type": "string", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.telecom.where(system = 'phone' and use = 'home').value" + } + } + ], + "linkId": "9541f0b0-f5ba-4fe7-a8e9-ad003cef897b", + "text": "Home phone", + "type": "string", + "repeats": true + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.telecom.where(system = 'phone' and use = 'mobile').value" + } + } + ], + "linkId": "4037a02b-4a85-40e0-9be6-5b17df1aac56", + "text": "Mobile phone", + "type": "string", + "repeats": true + }, + { + "linkId": "c22390d3-1be6-4fd1-b775-6443b7239a6b", + "text": "Emergency contact", + "type": "group", + "repeats": true, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.contact.where(relationship.coding.code = 'C').name.select(given.first() | family).join(' ')" + } + } + ], + "linkId": "d7f2dd75-20c8-480f-8c22-71d604ebee8d", + "text": "Name", + "type": "string", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "aa35d559-f45b-4d35-9453-dd02e4a790f3", + "text": "Relationship to child", + "type": "string", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "27099697-d6d1-42c0-bb0a-5e9ff7372a96", + "text": "Relationship to patient", + "type": "string", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.contact.where(relationship.coding.code = 'C').telecom.value" + } + } + ], + "linkId": "626e3723-6310-4b99-81c1-525676b027c8", + "text": "Phone", + "type": "string", + "repeats": true + } + ] + }, + { + "linkId": "df1475ea-bf7e-4bf0-a69f-7f9608c3ed3c", + "text": "Medicare number", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.identifier.where(type.coding.where(system='http://terminology.hl7.org/CodeSystem/v2-0203' and code='MC')).value.substring(0,10)" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/regex", + "valueString": "matches('^[0-9]{10}$')" + } + ], + "linkId": "eb2a59ed-9632-4df1-b5b1-1e85c3b4b7cf", + "text": "Number", + "type": "string", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.identifier.where(type.coding.system='http://terminology.hl7.org/CodeSystem/v2-0203' and type.coding.code='MC').value.substring(10,1)" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/regex", + "valueString": "matches('^[0-9]{1}$')" + } + ], + "linkId": "d6253253-a124-494e-a1d8-7ce02c69ec11", + "text": "Reference number", + "type": "string", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.identifier.where(type.coding.system='http://terminology.hl7.org/CodeSystem/v2-0203' and type.coding.code='MC').period.end.toString()" + } + } + ], + "linkId": "c520e213-5313-42c3-860a-d30206620290", + "text": "Expiry", + "type": "string", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.identifier.where(type.coding.system='http://terminology.hl7.org/CodeSystem/v2-0203' and type.coding.code='PEN').value" + } + } + ], + "linkId": "c1e4e967-c0aa-4280-b5d4-ab1f375ed9ac", + "text": "Pensioner Card Number", + "type": "string", + "repeats": false, + "maxLength": 10 + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.identifier.where(type.coding.system='http://terminology.hl7.org/CodeSystem/v2-0203' and type.coding.code='HC').value" + } + } + ], + "linkId": "a7e97574-3cea-4dfa-bef2-2665e7748364", + "text": "Health Care Card Number", + "type": "string", + "repeats": false, + "maxLength": 10 + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "83814495-3a81-43f4-88df-42186cce516a", + "text": "Registered for Closing the Gap PBS Co-payment Measure (CTG)", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "e63547c6-1623-412f-963f-5f1ebf23563f", + "text": "Child has a birth certificate", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50" + } + } + ], + "linkId": "a8143230-b30d-4b85-9805-5f2f73f2dffa", + "text": "My Aged Care", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "7165c072-e3d8-4564-9d1d-d17f6807787c", + "text": "Registered for My Aged Care", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "linkId": "04e50521-dc85-4744-b7ab-6f8682aacb11", + "text": "My Aged Care Number", + "type": "string", + "enableWhen": [ + { + "question": "7165c072-e3d8-4564-9d1d-d17f6807787c", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "2bfe50cb-7913-4f31-bce2-763c17ff8b1a", + "text": "National Disability Insurance Scheme", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "924b4500-53ac-4c4e-831b-7ab5569ff981", + "text": "Registered for NDIS", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "linkId": "7379a0fd-d95b-4ecb-a781-9f43d1394f10", + "text": "NDIS Number", + "type": "string", + "enableWhen": [ + { + "question": "924b4500-53ac-4c4e-831b-7ab5569ff981", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age <= 49).intersect(%age > 12)" + } + } + ], + "linkId": "9bc882bc-e989-4600-9587-8089fb757641", + "text": "Children", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "e90b436b-2751-4e07-a40c-adfe951b6528", + "text": "Do you have children?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "slider" + } + ] + } + } + ], + "linkId": "241f5fca-f61a-49bd-8972-52613c0e6d15", + "text": "Number of children", + "type": "integer", + "enableWhen": [ + { + "question": "e90b436b-2751-4e07-a40c-adfe951b6528", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "lower" + } + ] + } + } + ], + "text": "Strongly disagree", + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "upper" + } + ] + } + } + ], + "text": "Strongly Agree", + "type": "display" + } + ] + }, + { + "linkId": "74ce4c60-31d6-4e78-9056-579937379451", + "text": "Number of children in your care", + "type": "integer", + "enableWhen": [ + { + "question": "e90b436b-2751-4e07-a40c-adfe951b6528", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "2b5ae784-4341-4172-875d-1698cc8069f0", + "text": "Someone's carer", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "a08271f1-194b-4fe9-91f9-4f3398858eb0", + "text": "Are you responsible for caring for someone else?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "linkId": "4c14b158-3ae4-4994-8446-76e02640702c", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "a08271f1-194b-4fe9-91f9-4f3398858eb0", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50" + } + } + ], + "linkId": "6c80c675-1320-4ca3-ae3f-51ad173da741", + "text": "Your carer", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "d05558fb-a3cc-4bd6-b803-b672b36b9c51", + "text": "Do you have a carer?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "linkId": "b9991e7e-ce03-465d-b4b0-5a1725b24e02", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "d05558fb-a3cc-4bd6-b803-b672b36b9c51", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "3494631c-6b56-46dc-abf7-a17bfc1d025f", + "text": "Providers", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "41210be5-d441-4c44-b9c2-8dd94a44cbb4", + "text": "Are name and contact details of other key providers (eg case workers, support services) up to date?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "linkId": "6733d6ec-5b6b-4ee2-a21e-0e9474c2b22b", + "text": "Details", + "type": "text", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50" + } + } + ], + "linkId": "38f81a73-447f-4ecd-a8eb-6eccd9dee050", + "text": "Advance care planning", + "type": "group", + "repeats": false, + "item": [ + { + "linkId": "c023ef16-b554-4ed9-8993-1331e5f5a3b4", + "text": "Enduring Power of Attorney", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "036eace9-ea83-46ec-9d01-f2093f710816", + "text": "Enduring Power of Attorney", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "linkId": "83518215-7151-4365-b745-d7464bbb9528", + "text": "Discussed today", + "type": "text", + "repeats": false + } + ] + }, + { + "linkId": "c4f68251-26af-462f-879a-a69b449066ff", + "text": "Advance Health Directive", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "b0632039-c12b-4748-9e94-52073590c0ba", + "text": "Advance Health Directive", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "linkId": "c4bc2d84-e411-488d-9c0d-761f0377a026", + "text": "Discussed today", + "type": "text", + "repeats": false + } + ] + } + ] + }, + { + "linkId": "MarkComplete-32", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Current priorities" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + } + ], + "linkId": "b3a3eee2-f340-452e-9d05-d1f54f677b81", + "text": "Current health/patient priorities", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-5", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-5", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-5", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-5", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "dcf182c0-a2bf-46ac-a19b-72e4d24ef24d", + "text": "What are the important things for you in this health check today?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "3ac0c629-9acc-48af-bafe-6b05dfd06281", + "text": "details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "a0c06f8d-3210-480b-9031-7b5eb5bf1dda", + "text": "Is there anything you are worried about?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "43fb3316-64a4-41dc-b12c-2f3fcee3eb84", + "text": "details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "96f3396e-f5f8-4347-8692-9abdecb97768", + "text": "Is there anything that you are worried about with your child's health or wellbeing?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "75b39c42-8a15-4fdf-9129-936072336456", + "text": "details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + } + ], + "linkId": "17651f83-8476-499c-a5ef-dd4e1a6c9f13", + "text": "Child Health Book", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "2655e0e1-fe4b-431e-87af-30d4ff1aca76", + "text": "Does your child have a Child Health Book?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "a30d0101-06ce-4481-b142-9fa2c091fe4f", + "text": "Is it up to date?", + "type": "choice", + "enableWhen": [ + { + "question": "2655e0e1-fe4b-431e-87af-30d4ff1aca76", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false, + "answerValueSet": "#YesNo" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "35b3f6d8-2907-4134-ae55-1e321b908f70", + "text": "Do you have any specific health goals? Is there anything in particular about your health and wellbeing that you would like to improve?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "bb176839-5cc8-4fb5-a919-0904968418be", + "text": "details", + "type": "display" + } + ] + }, + { + "linkId": "7cd424e5-7672-4e99-8a99-30b1fb3043fd", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-5", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + } + ], + "linkId": "28d5dbe4-1e65-487c-847a-847f544a6a91", + "text": "Medical history and current problems", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-17", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-17", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-17", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-17", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "RecordUpdate-MedHistory", + "text": "Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there first.", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there first.\r\n
" + } + ] + }, + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "wk" + } + } + ], + "linkId": "a10a7375-e9d3-4e71-a47a-282e9ba38ec1", + "text": "Gestation at birth", + "type": "decimal", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "f3899852-36c4-441f-9a7d-544ef1617f08", + "text": "weeks", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "kg" + } + } + ], + "linkId": "29b6d8ea-23b2-4a69-98d9-899198692de7", + "text": "Birth weight", + "type": "decimal", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "87cf1ecd-6d1b-4de1-894d-58bd77dcfde1", + "text": "kg", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%Condition.entry.resource.code.select(coding.where(system='http://snomed.info/sct').first())" + } + } + ], + "linkId": "033db7b3-80da-43e2-9838-88f3d51e5913", + "text": "Problems", + "type": "choice", + "repeats": true, + "answerValueSet": "#MedicalHistoryShortListInfants" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age > 5).intersect(%age <= 12)" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%Condition.entry.resource.code.select(coding.where(system='http://snomed.info/sct').first())" + } + } + ], + "linkId": "384ab440-10ed-4ac1-89da-cd7d24f87a95", + "text": "Problems", + "type": "choice", + "repeats": true, + "answerValueSet": "#MedicalHistoryShortListPrimarySchool" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age > 12).intersect(%age <= 24)" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%Condition.entry.resource.code.select(coding.where(system='http://snomed.info/sct').first())" + } + } + ], + "linkId": "c24ae0d2-8932-4b87-9b7e-a644b5eb2874", + "text": "Problems", + "type": "choice", + "repeats": true, + "answerValueSet": "#MedicalHistoryShortListAdolescents" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 24" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%Condition.entry.resource.code.select(coding.where(system='http://snomed.info/sct').first())" + } + } + ], + "linkId": "bba27ef5-05c5-4e9c-bc9f-cf42091e99cb", + "text": "Problems", + "type": "choice", + "repeats": true, + "answerValueSet": "#MedicalHistoryShortListAdultsAndOlderPeople" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "autocomplete" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%Condition.entry.resource.code.select((coding.where(system='http://snomed.info/sct') | coding.where(system!='http://snomed.info/sct').first() | text ).first())" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Other relevant medical history" + } + ], + "linkId": "736f2a51-e04d-4e7f-aef1-c47f3a1f4e3c", + "text": "Other relevant medical history, operations, hospital admissions, etc", + "type": "open-choice", + "repeats": true, + "answerValueSet": "#MedicalHistory" + }, + { + "linkId": "f00def30-35dd-401a-9a38-12602bd3b8b1", + "text": "Provide details of identified problems", + "type": "text", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "gtable" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext", + "valueExpression": { + "name": "ConditionRepeat", + "language": "text/fhirpath", + "expression": "%Condition.entry.resource" + } + } + ], + "linkId": "92bd7d05-9b5e-4cf9-900b-703f361dad9d", + "text": "Medical history and current problems list", + "type": "group", + "repeats": true, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "autocomplete" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ConditionRepeat.code.select((coding.where(system='http://snomed.info/sct') | coding.where(system!='http://snomed.info/sct').first() | text ).first())" + } + } + ], + "linkId": "59b1900a-4f85-4a8c-b9cd-3fe2fd76f27e", + "text": "Condition", + "type": "open-choice", + "answerValueSet": "#MedicalHistory" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "drop-down" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ConditionRepeat.clinicalStatus.coding" + } + } + ], + "linkId": "88bcfad7-386b-4d87-b34b-2e50482e4d2c", + "text": "Clinical Status", + "type": "choice", + "answerValueSet": "http://hl7.org/fhir/ValueSet/condition-clinical" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ConditionRepeat.onset.ofType(dateTime)" + } + } + ], + "linkId": "6ae641ad-95bb-4cdc-8910-5a52077e492c", + "text": "Onset Date", + "type": "date" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ConditionRepeat.recordedDate" + } + } + ], + "linkId": "18b9e159-2ed7-4047-82b7-deb2a171de4f", + "text": "Recorded Date", + "type": "date" + } + ] + }, + { + "linkId": "62774152-8a6e-4449-af9f-87bdce8b9bf5", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-17", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Regular medications" + } + ], + "linkId": "7dfe7c6a-ca7f-4ddf-9241-a7b918a9695a", + "text": "Regular medications: check if still required, appropriate dose, understanding of medication and adherence", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-23", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-23", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-23", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-23", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Does your child take any regular medications?" + } + ], + "linkId": "6eb59145-ed9a-4184-af83-3506d47e4d4e", + "text": "Does your child take any regular medications (prescribed, over-the-counter, traditional, complementary and alternative)?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Do you take any regular medications?" + } + ], + "linkId": "3a2d27b6-e918-4df5-aca9-b374fcf9faad", + "text": "Do you take any regular medications (prescribed, over-the-counter, traditional, complementary and alternative)?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "874ec8db-95c9-4cc0-95db-e45edaa3cd12", + "text": "Up to date in the health record?", + "type": "boolean", + "enableWhen": [ + { + "question": "6eb59145-ed9a-4184-af83-3506d47e4d4e", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + }, + { + "question": "3a2d27b6-e918-4df5-aca9-b374fcf9faad", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "enableBehavior": "any", + "required": true, + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Understanding and adherence checked" + } + ], + "linkId": "36290837-ad70-48b2-9c66-31533fec918b", + "text": "Medication understanding and adherence has been checked with patient", + "type": "boolean", + "enableWhen": [ + { + "question": "6eb59145-ed9a-4184-af83-3506d47e4d4e", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + }, + { + "question": "3a2d27b6-e918-4df5-aca9-b374fcf9faad", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "enableBehavior": "any", + "required": true, + "repeats": false + }, + { + "linkId": "aa9ff2ed-bcd2-406d-a9ff-89c201df2605", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-23", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + } + ], + "linkId": "d4e4db07-a795-4a30-bd0f-9c109f96a22b", + "text": "Allergies/adverse reactions", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-3", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-3", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-3", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-3", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "8a1d70bf-a68b-4b7b-be73-ba6956fccc78", + "text": "Up to date in the health record?", + "type": "boolean", + "repeats": false + }, + { + "linkId": "3e689aeb-69a1-4a9b-93bd-50377511dd9b", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-3", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + } + ], + "linkId": "01f67f0b-e3be-48d8-a2ad-4c54f469cd13", + "text": "Family history", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-9", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-9", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-9", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-9", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "532e09ea-2c2d-48c6-81f8-e23380b329a0", + "text": "Provide relevant family history information", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "9bc2daf9-6d13-4747-90c3-4a1862f6199a", + "text": "Details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Provide relevant family history information" + } + ], + "linkId": "df5b2081-a373-48ee-acab-96225dad3c1d", + "text": "Provide relevant family history information (including diabetes, heart disease, cancer, mental health)", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "8f801e02-bfe8-437f-ba51-07c8f3631a0e", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "49ee4583-c608-41d4-a1e9-c06cf4292369", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-9", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "0a3c9c93-5836-4a5b-93e5-d7de559e053a", + "text": "Social and emotional wellbeing", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-27", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-27", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-27", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-27", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "c736d065-88f6-49c3-a5a4-91a2bd7a54bb", + "text": "Stressful life events", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "e7297156-cfed-4437-b877-c345f744168b", + "text": "Have there been any particular stressful life events that are impacting on you/your health lately?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "4c3427ce-062f-4f62-b566-2decb506a9cb", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "e7297156-cfed-4437-b877-c345f744168b", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 24" + } + } + ], + "linkId": "7d783b71-7303-441b-822a-14e11a740038", + "text": "Social and emotional wellbeing assessment: consider tools such as Aboriginal and Torres Strait Islander Youth Social Emotional Wellbeing assessment question guide or HEEADSSS", + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 24" + } + } + ], + "linkId": "9e991b80-7080-40d5-9ad9-447dc47e3a68", + "text": "Consider conversation about social connection, which could include questions about sports/hobbies/clubs/other activities", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "2740f866-2cd7-41a1-912c-ba29cbe7a582", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "b5a00aad-2a8b-4ac3-87b2-4a5920ca22ee", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-27", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Social history" + } + ], + "linkId": "a5cc8a8f-89cf-470c-a6bd-ce9da2f64ee9", + "text": "Social history: Information about family and child's living arrangements", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-28", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-28", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-28", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-28", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "1bb673a4-40f9-41c3-ad04-66c9f38fdc1b", + "text": "Who lives in your household? / Who does the child live with?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "5b8134d2-f87e-4449-bfc1-eac1d8d3d58b", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "934d105e-a4d6-4926-9b64-55bb1049d839", + "text": "Stressful life events", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "062f5234-686a-4bf3-afcd-3fcd988afd6c", + "text": "Have there been any stressful life events that would cause you or your child to be upset?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "1ea0a898-d680-4a5d-a0f1-91b57eb77a91", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "062f5234-686a-4bf3-afcd-3fcd988afd6c", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 5" + } + } + ], + "linkId": "272af1cb-4309-4227-bab4-a6cc9fb47635", + "text": "If indicated, ask about depression and other mental health concerns", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "4048e200-1c09-441d-b25d-f8a946fac411", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "76d51512-b94a-4092-b3ae-a656fbb9c360", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-28", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "819b3305-bf93-4502-9986-242ea2ae5f43", + "text": "Home and family", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-12", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-12", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-12", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-12", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "29bb209f-6dfc-4ed0-8b8d-741016c0ac61", + "text": "Who do you live with?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "f3e122f3-77ff-4e07-a45b-1511a85a9a83", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "64b979b6-cfc1-4024-868c-94e7be90d12b", + "text": "Housing stability", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "a7542da8-aad6-4a80-8b5b-806ca11d68d2", + "text": "Do you have stable housing?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "476dae02-d0e8-4128-81a1-7ad71dd06e97", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "a7542da8-aad6-4a80-8b5b-806ca11d68d2", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "N" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "367ac5dd-07fa-4bda-a775-d9f38b15affd", + "text": "Home safety", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "6f73d1ee-dd8e-419a-9142-ede367200e3b", + "text": "Do you feel safe at home?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "9bd5f571-8cbf-4c25-975c-5fc8395b75f5", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "6f73d1ee-dd8e-419a-9142-ede367200e3b", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "N" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "08d2e80e-3bb4-4f67-8b1c-090b1ace225a", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-12", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "3e7d7246-98f8-4803-b063-8405ac30b086", + "text": "Learning and development", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-15", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-15", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-15", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-15", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + } + ], + "linkId": "818c9aaa-1b00-4c76-9971-49df74edff7a", + "text": "Is there anything that you are worried about with your child's development?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "ca6113f5-b6f6-413d-b9e1-0a34491f4be3", + "text": "Details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 5" + } + } + ], + "linkId": "e7ef5692-25e6-4598-aa08-d0107e21fe31", + "text": "Is there anything that you are worried about with your child's learning?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "c7c5fb28-c72b-4804-b7ec-c52fe754b689", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "fc658147-3fad-42a0-9c10-c14fbd30775e", + "text": "Is there anything that you are worried about with your child's behaviour?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "a3327fc8-663d-402b-8910-2b15f2a3d500", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "582fcfe5-c7a4-4847-9881-815452b9eafe", + "text": "Is there anything that you are worried about with your child's sleep?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "44e0023c-1b92-455f-a501-6006cf412fc5", + "text": "Details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + } + ], + "linkId": "335f4c10-a6e6-455b-8a7e-2962158f5183", + "text": "What childcare/early learning centre/kindergarten does your child go to? How often?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "20ae39db-7bb5-4af4-ac59-3298d20719d8", + "text": "details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + } + ], + "linkId": "e5b886ad-840e-4f01-af04-55c5ea7f215d", + "text": "How often does your child miss childcare/early learning centre/kindergarten?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "61ff302c-9ef0-414c-a9f8-e2b8d119373c", + "text": "details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 5" + } + } + ], + "linkId": "f0e0ea74-cffc-46a5-8554-67e8fcc667f1", + "text": "Is there anything you are worried about at school?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "520a4544-a48b-4864-8cfd-6af263756f1b", + "text": "details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 5" + } + } + ], + "linkId": "73a40641-04c9-4da4-813e-a8b9ae3a2ecf", + "text": "How often does your child miss school?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "2e24a8de-c23d-409a-a5d6-96345177e105", + "text": "details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 5" + } + } + ], + "linkId": "47f09b28-9eea-4f8c-8d3c-7efef0504728", + "text": "Is your child having any difficulties making friends?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "f95dd477-98a2-4534-b8ab-5a74d1b46502", + "text": "details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 5" + } + } + ], + "linkId": "9371dddc-49f4-4a8f-a9dc-a0e128f99636", + "text": "Are there any other concerns about your child's learning and development", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "f513b077-5714-4b14-b44f-30a979509651", + "text": "details", + "type": "display" + } + ] + }, + { + "linkId": "5ab80929-5901-431d-bf68-67d532f5fa58", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-15", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age > 12).intersect(%age < 50)" + } + } + ], + "linkId": "5437e30d-8a0a-4785-974e-00a10d2a1df0", + "text": "Learning and work", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-33", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-33", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-33", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-33", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age < 25" + } + } + ], + "linkId": "0e30e9b4-ec83-44ea-88ab-47963e52a2d7", + "text": "Learning", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "0cd9e27b-1e98-41af-917b-0c6ee21c0819", + "text": "Are you studying at school/uni?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "linkId": "18bdfa42-9845-4c6e-b737-843b14d54641", + "text": "Details", + "type": "text", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 25" + } + } + ], + "linkId": "c0ba8a79-a9c5-40cc-b0c2-041e736784e9", + "text": "Learning", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "4a81afc0-f0da-49e1-b8cc-c19cb0f5f4e9", + "text": "Are you studying?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "linkId": "1c648524-558e-4d24-bd83-c9f5cd35e97b", + "text": "Details", + "type": "text", + "repeats": false + } + ] + }, + { + "linkId": "ccf6f0b0-57ae-473e-9929-2a09184c8a14", + "text": "Work", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "aaead1e2-ea54-4979-be0a-647e61ab59a9", + "text": "Are you working?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNA" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Details" + } + ], + "linkId": "749a4e1e-35ab-4f37-ab28-cb3f0830bb2a", + "text": "Details (occupation including occupational hazards, study, training, disability, etc)", + "type": "text", + "repeats": false + } + ] + }, + { + "linkId": "3569e514-a74b-4343-b31b-3395e58d991a", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-33", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50" + } + } + ], + "linkId": "dec713ae-246a-4961-95c9-0626bfebfed2", + "text": "Work", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-16", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-16", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-16", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-16", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "2bfc99a5-677c-4aea-a1ad-c37a181a3733", + "text": "Work", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "4c68ff3e-0e73-4ea2-b295-5057deaa590e", + "text": "Are you working?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Details" + } + ], + "linkId": "794fc001-6799-4a51-9a80-f2ed7c685a42", + "text": "Details (occupation including occupational hazards, study, training, disability, etc)", + "type": "text", + "repeats": false + } + ] + }, + { + "linkId": "ed6f7800-e22a-4639-9d11-faf845513500", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-16", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "9559242e-9ffe-4e1f-a9fc-86d1fa62c4b9", + "text": "Mood", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-19", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-19", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-19", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-19", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "b3c510a7-bfd1-4ebe-8755-9f05e7a742ba", + "text": "How have you been feeling lately?", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "e440f97d-b10a-472a-9e5b-4fcf7614ee08", + "text": "Details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Ask about depression and complete risk assessment" + } + ], + "linkId": "b4245702-afe5-4e4e-a102-1d3ceb4ad7c2", + "text": "If indicated, ask about depression (consider screening tools, eg aPHQ-9, K5 or K10) and complete risk assessment", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "f9640e61-3b19-4d07-95e2-34daa44881ab", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "6a99da48-366b-40c9-97ec-d0f2d52964a8", + "text": "Explore other mental health concerns as indicated", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "8b747e00-0f5d-4ba1-98c3-3d8e592f4c22", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "db9a8650-42a2-4bd3-8066-7e09394120d5", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-19", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50" + } + } + ], + "linkId": "1bd58e7b-2cb7-45fb-965f-d5fa33d0bb4c", + "text": "Memory and thinking", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-18", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-18", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-18", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-18", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "64fd0c95-b57b-4319-bf40-ad77d10a9832", + "text": "Personal concerns about your memory or thinking", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "e29701be-2b79-471d-a42e-7e3830459080", + "text": "Do you have any worries about your memory or thinking?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "69985e2e-4619-42fa-a111-e6fb3118ef74", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "e29701be-2b79-471d-a42e-7e3830459080", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "44da9ba8-4636-4eaa-8bb1-aaa65f117fab", + "text": "Family concerns about your memory or thinking", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "06a67326-9e3d-4c4c-b271-af5b168d077c", + "text": "Does anyone in your family have any worries about your memory or thinking?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "43d2cb6c-29a7-4293-a6c8-87a228a82e19", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "06a67326-9e3d-4c4c-b271-af5b168d077c", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "4ebb3c30-936b-4932-a330-f1e643b5ccd4", + "text": "If any concerns are raised and/or high risk for cognitive impairment identified, follow up with cognitive screening (eg clock test, GPCOG, KICA-Cog, MMSE)", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "c563f52d-d3cc-4687-9863-0f1b7d00d942", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "1f0e7fde-e964-4f36-9151-dbdc5e145f94", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-18", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50" + } + } + ], + "linkId": "c5da020c-c4f3-437c-b658-ea7e7667514d", + "text": "Chronic disease associated with ageing", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-4", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-4", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-4", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-4", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Assessment of chronic disease associated with ageing" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n
For older people with chronic disease and/or conditions associated with ageing, consider assessing:
\r\n
    \r\n
  • Osteoporosis risk
  • \r\n
  • Falls risk
  • \r\n
  • Balance, coordination and mobility
  • \r\n
  • Pain
  • \r\n
  • Nutrition
  • \r\n
  • Regularity of chronic disease management and review
  • \r\n
\r\n
" + } + ], + "linkId": "12e244c0-2887-4230-8792-9521d4f1ab33", + "text": "For older people with chronic disease and/or conditions associated with ageing, consider assessing: Osteoporosis risk; Falls risk; Balance, coordination and mobility; Pain; Nutrition; Regularity of chronic disease management and review", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "d6337ce3-ec9a-44e2-a69a-2355025b3e8c", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "7292070b-8944-4a40-bcf6-9aaf1721e986", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-4", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age >= 50).intersect(%age <= 74)" + } + } + ], + "linkId": "9674ffa0-2ad9-4ca3-80e6-e8bb0670a802", + "text": "Participation in screening programs", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-24", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-24", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-24", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-24", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "RecordUpdate-ScreeningPrograms", + "text": "Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there first.", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there first.\r\n
" + } + ] + }, + "type": "display" + }, + { + "linkId": "ed15e82b-803a-4d21-9344-9110b57b2313", + "text": "Cervical screening (age <=74 years)", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + } + ], + "linkId": "c1cf9c00-15ef-4b98-bab0-20a5f01b4932", + "text": "Cervical screening status", + "type": "choice", + "repeats": false, + "answerOption": [ + { + "valueString": "Up to date" + }, + { + "valueString": "Discussed today" + }, + { + "valueString": "Not required" + }, + { + "valueString": "Declined" + }, + { + "valueString": "Next due" + } + ] + }, + { + "linkId": "4bd712ec-b11b-4ef9-aa0e-2cd2c02cf8bd", + "text": "Cervical screening next due", + "type": "date", + "repeats": false + }, + { + "linkId": "4e0c55a0-c559-45fd-b165-5aaea3451423", + "text": "Cervical screening details", + "type": "text", + "repeats": false + } + ] + }, + { + "linkId": "17ff5354-fe9c-429c-a752-c27a871d4ee7", + "text": "Breast screening (age <=74 years)", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + } + ], + "linkId": "29fada07-f981-44cf-8092-61c86365a965", + "text": "Breast screening status", + "type": "choice", + "repeats": false, + "answerOption": [ + { + "valueString": "Up to date" + }, + { + "valueString": "Discussed today" + }, + { + "valueString": "Not required" + }, + { + "valueString": "Declined" + }, + { + "valueString": "Next due" + } + ] + }, + { + "linkId": "9410ff22-86a4-4d01-b6ff-da9b1e7d17da", + "text": "Breast screening next due", + "type": "date", + "repeats": false + }, + { + "linkId": "b63a03c8-2c7b-46a5-8f13-ebc7fb8b91ee", + "text": "Breast screening details", + "type": "text", + "repeats": false + } + ] + }, + { + "linkId": "bb5d56e3-efb9-45fe-854d-e4550b327d26", + "text": "Bowel cancer screening (age <=74 years)", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + } + ], + "linkId": "521df1b1-ff36-458b-8f99-e41c2b1685c8", + "text": "Bowel cancer screening status", + "type": "choice", + "repeats": false, + "answerOption": [ + { + "valueString": "Up to date" + }, + { + "valueString": "Discussed today" + }, + { + "valueString": "Not required" + }, + { + "valueString": "Declined" + }, + { + "valueString": "Next due" + } + ] + }, + { + "linkId": "df2fbba0-cb6f-4fb8-a413-e3acf1a3a98e", + "text": "Bowel cancer screening next due", + "type": "date", + "repeats": false + }, + { + "linkId": "0d59513c-7a77-4752-9c4e-492a54412731", + "text": "Bowel cancer screening details", + "type": "text", + "repeats": false + } + ] + }, + { + "linkId": "70f82c4b-d1f9-44d5-9903-bd7097799c05", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-24", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + } + ], + "linkId": "ae7a3801-9491-4b1f-820c-678236d18f56", + "text": "Healthy eating", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-11", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-11", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-11", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-11", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "9ac8c78d-9c36-4bf5-8c6e-e48109902dfa", + "text": "Child eating concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "e2942894-5537-47a6-ab43-06eb6761f9b5", + "text": "Is there anything that you are worried about with your child's feeding/eating?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 5" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "69d92a26-95ac-4556-94da-5b0e09940bfd", + "text": "Is there anything that you are worried about with your child's eating?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "f6907808-3e42-4206-9bf8-ca4082ea4814", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "e2942894-5537-47a6-ab43-06eb6761f9b5", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + }, + { + "question": "69d92a26-95ac-4556-94da-5b0e09940bfd", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "enableBehavior": "any", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + } + ], + "linkId": "ff6a46e6-0812-4718-a854-489b24805925", + "text": "Breastfeeding history", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "87f4277a-0af8-4bb9-ba2d-cb4e4f3a4548", + "text": "Details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + } + ], + "linkId": "b5f748d2-1874-4949-a7df-6e233f03135d", + "text": "Bottle feeding history", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "1792a4b0-640f-4d41-8704-c069179539bb", + "text": "Details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "9266b946-74b3-4fc2-91ce-df557692e600", + "text": "Diet or weight concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "646302e9-d384-4943-99bc-11e638641703", + "text": "Do you have any worries about your diet or weight?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "1d5c3354-6780-4b6a-b9af-7a17b0386781", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "646302e9-d384-4943-99bc-11e638641703", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50" + } + } + ], + "linkId": "c4c51d01-7acf-4551-a652-82f9fdf58a6d", + "text": "Unintended weight loss", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "6dc96b26-cbc5-4434-8f6b-0260196311c2", + "text": "Have you lost weight without trying to in the last three months?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "ce71f016-c5e4-4121-abe5-fe0c974c1bba", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "6dc96b26-cbc5-4434-8f6b-0260196311c2", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n
Document conversation about age-appropriate healthy eating, which could include:
\r\n
    \r\n
  • current diet
  • \r\n
  • transition to solids
  • \r\n
  • dietary recommendations re fruit and vegetable intake, iron-rich foods, avoiding sugary drinks
  • \r\n
\r\n
" + } + ], + "linkId": "9f6adf74-f240-41a2-a509-d216d5308911", + "text": "Document conversation about age-appropriate healthy eating, which could include: current diet; transition to solids; dietary recommendations re fruit and vegetable intake, iron-rich foods, avoiding sugary drinks", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "d3c0033f-20d0-40ab-b4d5-6eb3f67be492", + "text": "details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 5" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n
Document conversation about health eating which could include:
\r\n
    \r\n
  • current diet including food and drinks
  • \r\n
  • recommendations about fruit and vegetable intake, water as the main drink, avoiding sugary drinks, avoiding highly processed foods (including supermarket-bought and take-away like KFC, Maccas, etc)
  • \r\n
\r\n
" + } + ], + "linkId": "7a22a4c4-6611-4687-af00-37c80c3f8fc0", + "text": "Document conversation about health eating which could include: current diet including food and drinks; recommendations about fruit and vegetable intake, water as the main drink, avoiding sugary drinks, avoiding highly processed foods (including supermarket-bought and take-away like KFC, Maccas, etc)", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "579a1e9e-c679-4411-b78f-0468cd45e1a2", + "text": "details", + "type": "display" + } + ] + }, + { + "linkId": "71e39493-f0b0-4074-934b-604155b349e1", + "text": "Food availability issues", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "12a41538-5dbd-4c1d-af69-52c59c48b1a9", + "text": "Are there any issues about availability of food?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "92908e91-9453-4d22-99eb-23dad580c1cb", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "12a41538-5dbd-4c1d-af69-52c59c48b1a9", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "301789b0-8c6a-470d-8787-0ac6597e3bea", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-11", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age < 50" + } + } + ], + "linkId": "74736baa-455b-41d2-af98-fb65cd463e97", + "text": "Physical activity and screen time", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-34", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-34", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-34", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-34", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "8c5e737f-820b-47a4-8c8a-27ce1eb18cf4", + "text": "Physical activity concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "304d0332-9bfd-42dc-a4be-a5122596fb89", + "text": "Is there anything that you are worried about with your child's level of physical activity?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "26707b9a-4e3d-4063-a890-7ec2ff02ced1", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "304d0332-9bfd-42dc-a4be-a5122596fb89", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "e24d487b-3dd4-4a6d-a58e-85dfa8ce3f36", + "text": "Screen time concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "465eacce-f9ee-4022-9186-89065cf01ce2", + "text": "Is there anything that you are worried about with your child's level of screen time?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "13040f64-5cbf-4592-a683-c03527c64ac6", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "465eacce-f9ee-4022-9186-89065cf01ce2", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "e9b6ac74-d810-4350-8b41-8ea2e4bd14fc", + "text": "Physical activity or screen time concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "08320c7a-831b-4237-95e2-d79aee155b90", + "text": "Do you have any worries about physical activity or screen time?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "57fa51e3-11c5-43f1-bdf0-73b2b48414c3", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "08320c7a-831b-4237-95e2-d79aee155b90", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "a9aaba01-5f11-4d4e-ad39-40b6bef745da", + "text": "Document conversation about age-appropriate recommendations re physical activity and screen time", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "64c5bab2-575b-4304-bb50-3840bae351ea", + "text": "Details", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age > 12).intersect(%age <= 24)" + } + } + ], + "linkId": "b2269be8-3ea5-494c-9368-06912b629789", + "text": "Document conversation about social connection, which could include questions about sports/hobbies/clubs/other activities", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "d35063fc-688b-4fab-ae3a-9aae18806043", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "ccbd7fbf-0d40-4cb3-82b3-ad2c7cc7bba2", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-34", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50" + } + } + ], + "linkId": "d56234a0-aafd-4c22-96c9-00ead8424f0b", + "text": "Physical activity", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-21", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-21", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-21", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-21", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "015d986f-89cf-45b0-a753-9a3ab0c4b05b", + "text": "Physical activity concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "b30d5d21-c6d6-4bb3-aab4-0fdee80b3093", + "text": "Do you have any worries about physical activity?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "fd6beb79-ffc3-4879-913b-f42b0ec930ba", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "b30d5d21-c6d6-4bb3-aab4-0fdee80b3093", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "eb326905-3709-4088-8491-8b83c97f2da4", + "text": "Document conversation about recommendations re physical activity", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "10add54e-af14-47b7-ad1a-666692ee3767", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "25b8b8fd-adb1-48ab-aeae-528603668c4b", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-21", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + } + ], + "linkId": "b9a6ce8b-7766-47a5-8e1c-1590a1edbfa8", + "text": "Red flags early identification guide for children", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-22", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-22", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-22", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-22", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "dfbf13b5-e9e1-4f2f-83fc-1b3b9e50c921", + "text": "This is based on material from the The State of Queensland, Red flags early identification guide (for children aged birth to five years). 2nd edn. South Brisbane, Qld: Child Development Program, Queensland Health, 2016. Available at www.childrens.health.qld.gov.au/wp-content/uploads/PDF/red-flags-a3.pdf [Accessed 2 December 2019]. © Developed by the Child Development Program in conjunction with Brisbane North Primary Health Network. Updated: July 2016.", + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "0b520b20-98df-4024-b25d-2986f6b96e77", + "text": "What age group is the child closet to?", + "type": "choice", + "repeats": false, + "answerOption": [ + { + "valueString": "6 months" + }, + { + "valueString": "9 months" + }, + { + "valueString": "12 months" + }, + { + "valueString": "18 months" + }, + { + "valueString": "2 years" + }, + { + "valueString": "3 years" + }, + { + "valueString": "4 years" + }, + { + "valueString": "5 years" + } + ] + }, + { + "linkId": "3ba3a34f-cb05-4d85-b5ea-0eddeb565aeb", + "text": "Red flags", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "9c717263-341e-416f-aad8-7aec7d2167c9", + "text": "Social Emotional", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "6 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Does not smile or interact with people" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "c10acb25-fdc3-401e-b0aa-d85b2921e5bb", + "text": "Social Emotional", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "9 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Not sharing enjoyment with others using eye contact or facial expression" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "b6bb38f6-8084-4c89-a0f2-9d77aacab61d", + "text": "Social Emotional", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "12 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Does not notice someone new" + }, + { + "valueString": "Does not pay early turn taking games (eg peekaboo, rolling a ball)" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "c0ad8dc5-4672-4b21-b30d-6dcc7a00109a", + "text": "Social Emotional", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "18 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Lacks interest in playing and interacting with others" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "fc0977e1-fd83-4d0b-a57a-e94c7fd41fdb", + "text": "Social Emotional", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "2 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "When playing with toys tends to bang, drop, or throw them rather than use them for their purpose (eg Cuddle doll, build blocks)" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "70f7b96f-eaae-490b-8522-1214c1b1aede", + "text": "Social Emotional", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "3 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "No interest in pretend play or interacting with other children" + }, + { + "valueString": "Difficulty noticing and understanding feelings in themselves and others (eg happy, sad)" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "03ff1391-f48d-4b99-894c-159f4d09eb33", + "text": "Social Emotional", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "4 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Unwilling or unable to play cooperatively" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "ee5f0a61-a8a1-473e-addf-ca5b1eaad7d3", + "text": "Social Emotional", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "5 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Play is different than their friends" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "2b23128e-1622-4880-abd6-c9cd429b48e3", + "text": "Communication", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "6 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Not starting to babble (eg aahh, oohh)" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "dfb86be5-b6ff-400e-b7d6-68701df086da", + "text": "Communication", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "9 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Not using gestures (eg pointing, showing, waving)" + }, + { + "valueString": "Not using two part babble (eg bubu, dada)" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "4d802a6d-c89e-4460-8091-874f855be4ad", + "text": "Communication", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "12 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "No babbled phrases that sound like talking" + }, + { + "valueString": "No response to familiar words (eg bottle, daddy)" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "b8e1a699-ed65-491f-9865-8ab855bb2d33", + "text": "Communication", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "18 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "No clear words" + }, + { + "valueString": "Cannot understand short requests (eg 'Where is the ball?')" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "6c3637ed-4afd-45be-a15c-9d5e7d8e78e8", + "text": "Communication", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "2 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Not learning new words" + }, + { + "valueString": "Not putting words together (eg 'push car')" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "25d67a2f-8bbe-4f79-9488-1682d2ce49fa", + "text": "Communication", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "3 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Speech is difficult for familiar people to understand" + }, + { + "valueString": "Not using simple sentences (eg big car go)" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "f00b5ae1-cc33-44f9-bd9b-f9b6c93cc005", + "text": "Communication", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "4 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Speech difficult to understand" + }, + { + "valueString": "Not able to follow directions with two steps (eg 'Put your bag away and then go play')" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "3e06438a-ee7d-4880-83aa-68d2ade997ce", + "text": "Communication", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "5 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Difficulty telling a parent what is wrong" + }, + { + "valueString": "Not able to answer questions in a simple conversation (eg What's your name? Who is your family?)" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "49d172b4-bc2f-46cd-95a8-2f3ecba8e852", + "text": "Cognition, fine motor and self care", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "6 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Not reaching for and holding (grasping) toys" + }, + { + "valueString": "Hands frequently clenched" + }, + { + "valueString": "Does not explore objects with hand and mouth" + }, + { + "valueString": "Does not bring hands together at midline" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "785ec313-7b25-4d0d-9421-382981286cbc", + "text": "Cognition, fine motor and self care", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "9 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Does not hold objects" + }, + { + "valueString": "Does not 'give' objects on request" + }, + { + "valueString": "Cannot move toy from one hand to another" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "2c2b263e-41a5-4dae-94e1-814f5bfca20a", + "text": "Cognition, fine motor and self care", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "12 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Does not feed self finger foods or hold own bottle/cup" + }, + { + "valueString": "Unable to pick up small items using index finger and thumb" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "d6d7d675-0fee-466d-85e8-5dae46adac40", + "text": "Cognition, fine motor and self care", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "18 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Does not scribble with a crayon" + }, + { + "valueString": "Does not attempt to stack blocks after demonstration" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "c48e4138-0952-49a7-9c77-14b3e6d1dad3", + "text": "Cognition, fine motor and self care", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "2 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Does not attempt to feed self using a spoon and/or help with dressing" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "433e768c-8458-476a-8330-3f59a4aa94b4", + "text": "Cognition, fine motor and self care", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "3 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Does not attempt everyday care skills (such as feeding or dressing)" + }, + { + "valueString": "Difficulty in manipulating small objects (eg threading beads)" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "06d96181-2b2d-48de-b80f-bd5ccb2fb3c1", + "text": "Cognition, fine motor and self care", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "4 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Not toilet trained by day" + }, + { + "valueString": "Not able to draw lines and circles" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "e08345d3-a919-4bf0-8775-5df84a173832", + "text": "Cognition, fine motor and self care", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "5 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Concerns from teacher about school readiness" + }, + { + "valueString": "Not independently able to complete everyday routines such as feeding and dressing" + }, + { + "valueString": "Cannot draw simple pictures (eg stick person)" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "7f3861fd-b9f0-489d-8a39-5fdd18eeaf0e", + "text": "Gross motor", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "6 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Not holding head and shoulders up with good control when lying on tummy" + }, + { + "valueString": "Not holding head with good control in supported sitting" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "68809920-fbf4-48e5-89f7-c0b49a8b8f78", + "text": "Gross motor", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "9 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Not rolling" + }, + { + "valueString": "Not sitting independently/ without support" + }, + { + "valueString": "Not moving (eg creeping, crawling)" + }, + { + "valueString": "Not taking weight on legs when held in standing" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "5cf7c9bc-b3ec-43ac-8de8-65078f57a82b", + "text": "Gross motor", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "12 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "No form of independent mobility (eg crawling, commando crawling, bottom shuffle)" + }, + { + "valueString": "Not pulling to stand independently and holding on for support" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "a1137862-767c-49fb-883b-92bee7588edc", + "text": "Gross motor", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "18 months" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Not standing independently" + }, + { + "valueString": "Not attempting to walk without support" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "dd83d558-6a7f-4b94-b677-7c2b31ccc52f", + "text": "Gross motor", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "2 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Not able to walk independently" + }, + { + "valueString": "Not able to walk up and down stairs holding on" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "5ea4460c-a4c5-4025-bf85-64884a66458f", + "text": "Gross motor", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "3 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Not able to walk up and down stairs independently" + }, + { + "valueString": "Not able to run or jump" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "75b597b4-3b38-4efd-aeb2-ab1551d83c3c", + "text": "Gross motor", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "4 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Not able to walk, run, climb, jump and uses stairs confidently" + }, + { + "valueString": "Cannot catch, throw or kick a ball" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "f23ac52c-2064-4032-b283-6ce09fc306fa", + "text": "Gross motor", + "type": "choice", + "enableWhen": [ + { + "question": "0b520b20-98df-4024-b25d-2986f6b96e77", + "operator": "=", + "answerString": "5 years" + } + ], + "repeats": true, + "answerOption": [ + { + "valueString": "Not able to walk, run, climb, jump and use stairs confidently" + }, + { + "valueString": "Not able to hop five times on one leg and stand on one leg for five seconds" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "758d4109-363a-48c9-95f3-8a8d8b1b32ec", + "text": "Red flags at any age", + "type": "choice", + "repeats": true, + "answerOption": [ + { + "valueString": "Strong parental concerns" + }, + { + "valueString": "Significant loss of skills" + }, + { + "valueString": "Lack of response to sound or visual stimuli" + }, + { + "valueString": "Poor interaction with adults or other children" + }, + { + "valueString": "Lack of, or limited eye contact" + }, + { + "valueString": "Differences between right and left sides of body in strength, movement or tone" + }, + { + "valueString": "Marked low tone (floppy) or high tone (stiff and tense) and significantly impacting on development and functional motor skills" + } + ] + } + ] + }, + { + "linkId": "MarkComplete-22", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 12" + } + } + ], + "linkId": "14a9fb5f-5b0e-4862-b143-08a11cd3ebf0", + "text": "Substance use, including tobacco", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-29", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-29", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-29", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-29", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "RecordUpdate-SubstanceUse", + "text": "Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there first.", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there first.\r\n
" + } + ] + }, + "type": "display" + }, + { + "linkId": "515eda6e-973a-4b10-910a-0d4bf4f2efff", + "text": "Smoking", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsTobaccoSmokingStatus.entry.resource.valueCodeableConcept.coding" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + } + ], + "linkId": "b639a3a8-f476-4cc8-b5c7-f5d2abb23511", + "text": "Smoking status", + "type": "choice", + "repeats": false, + "answerOption": [ + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "266919005", + "display": "Never smoked" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "77176002", + "display": "Smoker" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "8517006", + "display": "Ex-Smoker" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "16090371000119103", + "display": "Environmental exposure to tobacco smoke (home, car, etc)" + } + }, + { + "valueString": "Wants to quit" + }, + { + "valueString": "Other tobacco use" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + } + ], + "linkId": "96dc7c22-d003-459c-8a56-f6cd182fc077", + "text": "Quit status", + "type": "choice", + "enableWhen": [ + { + "question": "b639a3a8-f476-4cc8-b5c7-f5d2abb23511", + "operator": "=", + "answerCoding": { + "system": "http://snomed.info/sct", + "code": "8517006" + } + } + ], + "repeats": false, + "answerOption": [ + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "48031000119106", + "display": "Quit >=12 months" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "735128000", + "display": "Quit <12 months" + } + } + ] + }, + { + "linkId": "9e86387d-1be4-4c26-9047-9dd6b03e1ee0", + "text": "How many?", + "type": "string", + "enableWhen": [ + { + "question": "b639a3a8-f476-4cc8-b5c7-f5d2abb23511", + "operator": "=", + "answerCoding": { + "system": "http://snomed.info/sct", + "code": "77176002" + } + }, + { + "question": "b639a3a8-f476-4cc8-b5c7-f5d2abb23511", + "operator": "=", + "answerCoding": { + "system": "http://snomed.info/sct", + "code": "8517006" + } + }, + { + "question": "b639a3a8-f476-4cc8-b5c7-f5d2abb23511", + "operator": "=", + "answerString": "Wants to quit" + } + ], + "enableBehavior": "any", + "repeats": false + }, + { + "linkId": "32e71641-f660-4ca2-af99-dff8917f07be", + "text": "How long as a smoker?", + "type": "string", + "enableWhen": [ + { + "question": "b639a3a8-f476-4cc8-b5c7-f5d2abb23511", + "operator": "=", + "answerCoding": { + "system": "http://snomed.info/sct", + "code": "77176002" + } + }, + { + "question": "b639a3a8-f476-4cc8-b5c7-f5d2abb23511", + "operator": "=", + "answerCoding": { + "system": "http://snomed.info/sct", + "code": "8517006" + } + }, + { + "question": "b639a3a8-f476-4cc8-b5c7-f5d2abb23511", + "operator": "=", + "answerString": "Wants to quit" + } + ], + "enableBehavior": "any" + } + ] + }, + { + "linkId": "34feaee8-8088-43ee-991d-9729990b5550", + "text": "Alcohol and other substance use", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n
Quantity and frequency of:
\r\n
    \r\n
  • alcohol
  • \r\n
  • caffeine (coffee, soft drinks, iced coffee)
  • \r\n
  • cannabis/yarndi/gunja
  • \r\n
  • other substance use: IVDU, methamphetamine, opiates, solvents, other
  • \r\n
\r\n\t
" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Quantity and frequency of substance use" + } + ], + "linkId": "ea73d52c-f831-46be-a45d-2c42250a5210", + "text": "Quantity and frequency of: alcohol; caffeine (coffee, soft drinks, iced coffee); cannabis/yarndi/gunja; other substance use: IVDU, methamphetamine, opiates, solvents, other", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "232cf24c-db60-4601-869d-525fb6e05988", + "text": "details", + "type": "display" + } + ] + } + ] + }, + { + "linkId": "f8e1cc1f-f1a1-4eb3-8255-77d600f52831", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-29", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "a7bb0dd2-4b2d-49c2-9da6-3cb0a4dd9240", + "text": "Gambling", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-10", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-10", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-10", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-10", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "fb489c43-f311-41f5-9d6a-1b61748e165f", + "text": "Gambling issues", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "a233c01e-a72e-474b-9a26-bab1504491fa", + "text": "Have you or someone close to you ever had issues with gambling?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "d1b68cfc-77cf-464e-83ce-0e8517bed9f3", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "a233c01e-a72e-474b-9a26-bab1504491fa", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "2ab74c97-55d9-4fd9-968f-8962d62ea573", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-10", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age > 12).intersect(%age <= 24)" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Sexual health" + } + ], + "linkId": "4b49c291-6e93-4b7e-be3b-15ef8bc207ad", + "text": "Sexual health (sexual activity, contraception, safe sex/protection, sexual orientation, gender identity, pressure to have sex, STIs)", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-36", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-36", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-36", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-36", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "e5aeda89-b820-4bb3-8fbd-d4f662207b7d", + "text": "Puberty and sexual health concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "1d20138a-caf3-4c43-9693-04c08d37a84a", + "text": "Is there anything that you are worried about in relation to puberty/your sexual health?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNotAskedDeclined" + }, + { + "linkId": "d7b92cad-4aa8-47d3-975c-92563f132325", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "1d20138a-caf3-4c43-9693-04c08d37a84a", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n
Consider discussing as relevant to age/sex/gender:
\r\n
    \r\n
  • menstruation (including risk of anaemia)
  • \r\n
  • current sexual activity
  • \r\n
  • contraception
  • \r\n
  • safe sex practice (eg use of condoms)
  • \r\n
  • sexually transmitted infection symptoms and screening
  • \r\n
  • blood-borne virus screening
  • \r\n
\r\n
" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Consider discussing items relevant to age/sex/gender" + } + ], + "linkId": "0fba3972-faa3-4f40-940c-c2f1c9b55329", + "text": "Consider discussing as relevant to age/sex/gender: menstruation (including risk of anaemia); current sexual activity; contraception; safe sex practice (eg use of condoms); sexually transmitted infection symptoms and screening; blood-borne virus screening", + "type": "text", + "repeats": false + }, + { + "linkId": "b41572ba-cf36-4cec-addf-cb0b47fea63f", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-36", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age > 24).intersect(%age <= 49)" + } + } + ], + "linkId": "589b53a4-ceb2-41c0-850a-69438f9fd1cc", + "text": "Genitourinary and sexual health", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-35", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-35", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-35", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-35", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "5f5d4886-ce06-47fa-a4d8-f6808b9081c0", + "text": "Sexual health concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "e56e79e5-8fbb-43f0-b2a3-018b55750bd0", + "text": "Is there anything that you are worried about in relation to your sexual health?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNotAskedDeclined" + }, + { + "linkId": "5148c6c6-c99f-480d-bb05-569064ba7118", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "e56e79e5-8fbb-43f0-b2a3-018b55750bd0", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "d844a31e-8e51-420b-855c-4f485a180a57", + "text": "Cervical screening", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "37dbd343-6d02-477c-89bf-59ba022efbb7", + "text": "Cervical screening status", + "type": "choice", + "repeats": false, + "answerOption": [ + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "736595007", + "display": "Declined" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "410527000", + "display": "Offered" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "171154002", + "display": "Not required" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "171155001", + "display": "Up to date" + } + } + ] + }, + { + "linkId": "f93eb998-1502-4d8a-88a4-986117a387c5", + "text": "Next due", + "type": "date", + "repeats": false + }, + { + "linkId": "862fc298-5b5e-4a46-badc-900c6ba1ff50", + "text": "Details", + "type": "text", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n
Consider discussing as relevant to age/sex/gender:
\r\n
    \r\n
  • contraception
  • \r\n
  • menstruation
  • \r\n
  • sexually transmitted infection symptoms and screening
  • \r\n
  • blood-borne virus screening
  • \r\n
  • continence
  • \r\n
  • menopause
  • \r\n
  • erectile dysfunction
  • \r\n
\r\n
" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Consider discussing items relevant to age/sex/gender" + } + ], + "linkId": "39b02169-ea34-4af9-aa35-1c47f7f39333", + "text": "Consider discussing as relevant to age/sex/gender: contraception; menstruation; sexually transmitted infection symptoms and screening; blood-borne virus screening; continence; menopause; erectile dysfunction", + "type": "text", + "repeats": false + }, + { + "linkId": "efd0735c-c379-471f-83bb-93b0392093aa", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-35", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50" + } + } + ], + "linkId": "02048954-e9d7-424e-8c7b-6a3c495d7ce4", + "text": "Genitourinary and sexual health", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-25", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-25", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-25", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-25", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "8172aaac-81c4-4b06-b4cd-6a891a227e9f", + "text": "Sexual health concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "1c40a720-bdb7-4386-a9f6-be82b7349bf7", + "text": "Consider asking when appropriate: Is there anything that you are worried about in relation to your sexual health?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNoNotAskedDeclined" + }, + { + "linkId": "f93fe768-9215-4a15-9376-686e9530ea79", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "1c40a720-bdb7-4386-a9f6-be82b7349bf7", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "2e1ea1cc-1f74-4b2e-bfda-f6a1d41e1e50", + "text": "Continence issues", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "64fd0f79-7e09-4934-905d-9bff6715f9ba", + "text": "Do you have problems with urine leaking?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "4fc14fd9-4c7e-48ec-90c0-c406523400fa", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "64fd0f79-7e09-4934-905d-9bff6715f9ba", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n
Consider discussing as relevant to age/sex/gender:
\r\n
    \r\n
  • menopause
  • \r\n
  • erectile dysfunction
  • \r\n
  • prostatic symptoms
  • \r\n
\r\n\t
" + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Consider discussing items relevant to age/sex/gender" + } + ], + "linkId": "8d75d1f1-290b-41fc-8e32-ad0681c650bb", + "text": "Consider discussing as relevant to age/sex/gender: menopause; erectile dysfunction; prostatic symptoms", + "type": "text", + "repeats": false + }, + { + "linkId": "e9936322-e6fe-4cf7-ab61-22846a8fbb95", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-25", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + } + ], + "linkId": "961da481-1698-4a1d-962b-a9c2185e335a", + "text": "Eye health", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-8", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-8", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-8", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-8", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "0e30de87-8d5a-4b7a-893a-f1791c4f31c5", + "text": "Vision concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "bc49ee24-62a8-4252-a5ee-9c68bfed601c", + "text": "Is there anything that you are worried about with your child's vision?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "6286346d-c805-4519-8e82-bf364a215c58", + "text": "Is there anything that you are worried about with your vision?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "468770e4-af95-4377-8af5-280deb585e01", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "bc49ee24-62a8-4252-a5ee-9c68bfed601c", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + }, + { + "question": "6286346d-c805-4519-8e82-bf364a215c58", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "enableBehavior": "any", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "version": "1.0.0", + "code": "grid" + } + ] + } + } + ], + "linkId": "25d3e4b6-8c71-4c17-8f5a-aca90e232ed2", + "text": "Eye examination", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age < 1" + } + } + ], + "linkId": "cb1b9349-2dd1-4bdd-904b-a529458e3b98", + "text": "Red reflex (up to six months)", + "type": "group", + "repeats": false, + "item": [ + { + "linkId": "47ce0b44-ac12-4a1d-8657-2cc741a29d3a", + "text": "Left eye", + "type": "string", + "repeats": false + }, + { + "linkId": "3f192141-0845-44d6-85ad-94f0295e062f", + "text": "Right eye", + "type": "string", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "3ff41163-549f-4834-8817-151144613988", + "text": "Evidence of squint or other abnormality", + "type": "group", + "repeats": false, + "item": [ + { + "linkId": "83e65791-a04a-42e4-b3f2-1e552b8e8044", + "text": "Left eye", + "type": "string", + "repeats": false + }, + { + "linkId": "2dd18bad-9491-436f-a2db-a4ed6022ac5c", + "text": "Right eye", + "type": "string", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 3" + } + } + ], + "linkId": "2c0e12a5-2650-4886-8f50-405dc0ead9c5", + "text": "Visual acuity", + "type": "group", + "repeats": false, + "item": [ + { + "linkId": "43825f29-c720-40a5-9fd1-de50ee35479c", + "text": "Left eye", + "type": "string", + "repeats": false + }, + { + "linkId": "e98428b4-bc8d-4272-a803-757a84813c3c", + "text": "Right eye", + "type": "string", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 25" + } + } + ], + "linkId": "bac129ef-a5c0-4d94-915c-ceadc6016594", + "text": "Trachoma Check (endemic areas)", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "202b5b91-541e-4a72-b1f6-1d474b59b7a3", + "text": "Left eye", + "type": "choice", + "repeats": false, + "answerOption": [ + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "60332004", + "display": "Trichiasis" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "95726001", + "display": "Corneal scarring" + } + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + } + ], + "linkId": "6ae69487-345e-46a0-a8db-b1356671ee59", + "text": "Right eye", + "type": "choice", + "repeats": false, + "answerOption": [ + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "60332004", + "display": "Trichiasis" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "95726001", + "display": "Corneal scarring" + } + } + ] + } + ] + } + ] + }, + { + "linkId": "8dcdc04c-7655-4b47-88eb-8425f0cdc0d0", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-8", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + } + ], + "linkId": "de71bbd0-178c-4974-9c75-55d5a48c66f7", + "text": "Ear health and hearing", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-6", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-6", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-6", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-6", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "f3473e82-4336-4858-96de-3a61eff5abfb", + "text": "Child listening concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "f982c374-f023-4e68-8968-1f1f5d3969ae", + "text": "Is there anything that you are worried about with your child's listening?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "297114f4-8c3f-4916-b840-c38ea14d37b1", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "f982c374-f023-4e68-8968-1f1f5d3969ae", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "d2a3a346-7b20-4634-beb4-f2bdc7252fe5", + "text": "Child language concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "06c150f8-4d54-4d10-aeff-2ef7567b6812", + "text": "Is there anything you are worried about with your child's language/talking?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "30dc1581-f6b7-49f0-be09-3902178a495f", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "06c150f8-4d54-4d10-aeff-2ef7567b6812", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "6662bc91-fd05-4ea0-a96b-1cc124a9769a", + "text": "Child snoring", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "b326271b-e9b1-45a0-b899-125364833702", + "text": "Do you notice snoring/noisy breathing at night/while your child is sleeping?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "36a3967c-e79a-49a7-8022-ac9561c4e656", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "b326271b-e9b1-45a0-b899-125364833702", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "ec7b6e93-e1f0-41f5-b2c2-43c7ddff8aed", + "text": "Hearing concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "3e53edc7-c90e-4681-a006-b7a05b91a02c", + "text": "Is there anything that you are worried about with your hearing?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "d72dacb8-a9b3-483b-ae24-8b062873b2cb", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "3e53edc7-c90e-4681-a006-b7a05b91a02c", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "11aa62ca-5a52-428b-952b-cfbcd2c75824", + "text": "Last hearing test (audiology)", + "type": "date", + "repeats": false + }, + { + "linkId": "31452c47-30b2-4590-95f4-b2b75aad2fb6", + "text": "Ear examination", + "type": "group", + "repeats": false, + "item": [ + { + "linkId": "44c3434d-ea52-43bd-b635-34184e5f037d", + "text": "Otoscopy", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-display-category", + "code": "instructions" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "fe96046a-a202-4c22-ad3e-00419e717185", + "text": "Video otoscopy procedure recommended where possible as it allows for parental education and for images to be saved for tracking over time", + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "2841915f-c8d2-4edb-8bc7-39b63385a2fb", + "text": "Otoscopy findings", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other, please specify" + } + ], + "linkId": "dedfc83e-7451-404d-bd24-97b1254304eb", + "text": "Left ear", + "type": "open-choice", + "repeats": true, + "answerOption": [ + { + "valueString": "Clear and intact" + }, + { + "valueString": "Dull and intact" + }, + { + "valueString": "Discharge" + }, + { + "valueString": "Retracted" + }, + { + "valueString": "Unable to view eardrum" + }, + { + "valueString": "Wax" + }, + { + "valueString": "Grommet in canal" + }, + { + "valueString": "Grommet in eardrum" + }, + { + "valueString": "Perforation" + }, + { + "valueString": "Red/bulging" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other, please specify" + } + ], + "linkId": "23daa784-4476-447f-8aa2-42933b4490d9", + "text": "Right ear", + "type": "open-choice", + "repeats": true, + "answerOption": [ + { + "valueString": "Clear and intact" + }, + { + "valueString": "Dull and intact" + }, + { + "valueString": "Discharge" + }, + { + "valueString": "Retracted" + }, + { + "valueString": "Unable to view eardrum" + }, + { + "valueString": "Wax" + }, + { + "valueString": "Grommet in canal" + }, + { + "valueString": "Grommet in eardrum" + }, + { + "valueString": "Perforation" + }, + { + "valueString": "Red/bulging" + } + ] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "361b3c80-375b-423e-bb61-5732826bc2f0", + "text": "Otoscopy findings", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other, please specify" + } + ], + "linkId": "079df9c5-234c-4129-8769-800dab47a59a", + "text": "Left ear", + "type": "open-choice", + "repeats": true, + "answerOption": [ + { + "valueString": "Clear and intact" + }, + { + "valueString": "Dull and intact" + }, + { + "valueString": "Discharge" + }, + { + "valueString": "Retracted" + }, + { + "valueString": "Unable to view eardrum" + }, + { + "valueString": "Wax" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other, please specify" + } + ], + "linkId": "ce1fc869-a412-4aea-aa53-36e794a14519", + "text": "Right ear", + "type": "open-choice", + "repeats": true, + "answerOption": [ + { + "valueString": "Clear and intact" + }, + { + "valueString": "Dull and intact" + }, + { + "valueString": "Discharge" + }, + { + "valueString": "Retracted" + }, + { + "valueString": "Unable to view eardrum" + }, + { + "valueString": "Wax" + } + ] + } + ] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age > 5).intersect(%age <= 12)" + } + } + ], + "linkId": "972afa06-9649-43d9-b8ce-c802f7f27e39", + "text": "Tympanometry", + "type": "group", + "repeats": false, + "item": [ + { + "linkId": "a0d1413f-31e5-4b29-a00b-235f50f91cf7", + "text": "Left ear", + "type": "text", + "repeats": false + }, + { + "linkId": "6423348a-943f-41e5-b4f2-ef5a34e56414", + "text": "Right ear", + "type": "text", + "repeats": false + } + ] + } + ] + }, + { + "linkId": "ac87b23a-b022-4d62-9e82-1c56583bca34", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-6", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + } + ], + "linkId": "bde9ab00-a20f-4a7c-9266-11f53f60c65f", + "text": "Oral and dental health", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-20", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-20", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-20", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-20", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "70714d58-d936-4170-9763-82398f84a7a7", + "text": "Dental concerns", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "e4cf4f15-7eed-4aa1-9f9d-61ccd659685c", + "text": "Is there anything that you are worried about with your child's teeth or mouth?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "cb287506-9a64-4ee8-8f24-ba7cb77756f3", + "text": "Is there anything that you are worried about with your teeth?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "cf949305-5ff7-4767-b946-7a50efd21cfc", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "e4cf4f15-7eed-4aa1-9f9d-61ccd659685c", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + }, + { + "question": "cb287506-9a64-4ee8-8f24-ba7cb77756f3", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "enableBehavior": "any", + "repeats": false + } + ] + }, + { + "linkId": "1f362cb2-911f-448b-b717-2614f1aced86", + "text": "Last dental checkup", + "type": "date", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "ffe81bde-608f-4e3f-98ae-39d0b9884dcc", + "text": "Dentures?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "5a3a56c6-b953-4d96-894d-95e07268473f", + "text": "Teeth and mouth check", + "type": "group", + "repeats": false, + "item": [ + { + "linkId": "6247ab4c-41cb-4e77-b028-c9c2a8c7da91", + "text": "Examination findings", + "type": "text", + "repeats": false + }, + { + "linkId": "79e09f4d-dac6-4088-baa0-d95dc658fb0b", + "text": "Document conversation about oral health and care of teeth", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "39ddbf92-847d-4c98-adff-6aa3013f8b39", + "text": "Details", + "type": "display" + } + ] + } + ] + }, + { + "linkId": "875574fa-9769-42ca-8381-9e80c3e5233d", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-20", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 24" + } + } + ], + "linkId": "7d4772cb-a1cd-49d9-853f-883ccd8343a6", + "text": "Skin", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-26", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-26", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-26", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-26", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "0d23be6b-3a30-4a80-9ebe-158acf32eb09", + "text": "Skin problems", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "829de3f8-eea9-4139-8a18-47c16182ac9e", + "text": "Does your child have any skin problems?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "353f528b-3518-4fb3-a0bd-3ed5ae6b036a", + "text": "Is there anything that you are worried about with your skin?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "b9332f4f-ed6c-4e87-a467-13d7e83bd550", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "829de3f8-eea9-4139-8a18-47c16182ac9e", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + }, + { + "question": "353f528b-3518-4fb3-a0bd-3ed5ae6b036a", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "enableBehavior": "any", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "80e4349f-6d89-4017-8632-9a947e50e947", + "text": "Do you use sun protection?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "206f4e35-3b87-4252-97fc-c78bf9fb6f5d", + "text": "Document conversation about sun protection as appropriate (ie sunscreen, hats, shade).", + "type": "text", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "prompt" + } + ] + } + } + ], + "linkId": "03f9df0e-dd04-43b2-b556-ff65a70c5a0d", + "text": "Details", + "type": "display" + } + ] + }, + { + "linkId": "7cec4c99-90da-40bc-86a6-f77abb093933", + "text": "General skin examination findings", + "type": "text", + "repeats": false + }, + { + "linkId": "88d23fa4-df88-43ab-a1d0-69315d55c3bf", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-26", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + } + ], + "linkId": "205677d6-17c7-4285-a7c4-61aa02b6c816", + "text": "Immunisation", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-13", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-13", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-13", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-13", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "54de7714-b917-4426-acb4-29d48648a2d8", + "text": "Check Child Health Record/Book and Australian Immunisation Register", + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "d77c527d-6fde-4ed7-97b9-c71acf817f39", + "text": "Eligibility for funded vaccines may vary across jurisdictions", + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age > 12).intersect(%age <= 24)" + } + } + ], + "linkId": "77d87581-d4d7-4267-9f3c-ad6541ad0f46", + "text": "Check Australian Immunisation Register", + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age > 24).intersect(%age <= 49)" + } + } + ], + "linkId": "a2631d2c-2b5c-4147-9aca-05ae655a56a5", + "text": "Check recommended primary vaccinations completed and provide catch-up if required", + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "69a4a459-196b-4931-8336-ea76ab3fccd1", + "text": "Immunisations up to date and recorded on Australian Immunisation Register (as per Australian immunisation handbook)?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "08e8ca54-9af8-4028-be83-aab20bccecc3", + "text": "Immunisations due", + "type": "string", + "repeats": true + }, + { + "linkId": "cc522cb1-b553-48c7-9028-61d15dd60845", + "text": "Vaccines given today", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation", + "valueCode": "horizontal" + } + ], + "linkId": "9f5787e6-8ece-46a4-8d67-e7c3e14daf18", + "text": "Vaccines recorded on Australian Immunisation Register?", + "type": "choice", + "repeats": false, + "answerValueSet": "#YesNo" + }, + { + "linkId": "c8da01ec-de58-46e3-81a1-2c49aed8c28e", + "text": "Details", + "type": "text", + "enableWhen": [ + { + "question": "9f5787e6-8ece-46a4-8d67-e7c3e14daf18", + "operator": "=", + "answerCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0136", + "code": "Y" + } + } + ], + "repeats": false + } + ] + }, + { + "linkId": "bcd1c9f2-889e-41e5-8c2b-a70221c5cec5", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-13", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + } + ], + "linkId": "c587e3b6-b91a-40dc-9a16-179342d001e9", + "text": "Examination", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-7", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-7", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-7", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-7", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "linkId": "RecordUpdate-Exam", + "text": "Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there first.", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there first.\r\n
" + } + ] + }, + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "d15824f8-eafc-4fa0-80a2-82f0ec7f8728", + "text": "Growth measures recorded on Centers for Disease Control and Prevention (CDC) and World Health Organization (WHO) growth charts for centile and tracking overtime", + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "version": "1.0.0", + "code": "grid" + } + ] + } + } + ], + "linkId": "53d5d5a6-3198-4bec-92ac-03fe7d77fb68", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + } + ], + "linkId": "4e32e9b2-82e6-41ea-9545-79e928f7d6c2", + "text": "Length/Height", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsBodyHeight.entry.resource.value.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "cm" + } + } + ], + "linkId": "837cd0ce-4a9e-4c8b-8679-007ed961f121", + "text": "Value", + "type": "decimal", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "e73c3643-8898-4ef8-8bc9-b4b3826ab790", + "text": "cm", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsBodyHeight.entry.resource.effective" + } + } + ], + "linkId": "b9faf79e-b5f7-443a-9203-67532e3a381f", + "text": "Date performed", + "type": "date", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 5" + } + } + ], + "linkId": "6226a5c5-b5c3-4ebb-a689-2b286322cfe0", + "text": "Height", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsBodyHeight.entry.resource.value.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "cm" + } + } + ], + "linkId": "7035c7e7-ada3-4c6b-9ea8-f39666f5d4ea", + "text": "Value", + "type": "decimal", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "387c95f0-8b54-4ad7-992d-8ab26a34fd77", + "text": "cm", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsBodyHeight.entry.resource.effective" + } + } + ], + "linkId": "c666ac96-1e64-40e2-8e0b-7d0187bb3e50", + "text": "Date performed", + "type": "date", + "repeats": false + } + ] + }, + { + "linkId": "97ed4c86-8820-4e4d-9234-0e0e8b6ca44a", + "text": "Weight", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsBodyWeight.entry.resource.value.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "kg" + } + } + ], + "linkId": "443bd584-684a-449c-ab6e-9d07da4df9fa", + "text": "Value", + "type": "decimal", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "5ba0d699-bc2a-45d0-8f40-f53cb21dc911", + "text": "kg", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsBodyWeight.entry.resource.effective" + } + } + ], + "linkId": "92cdc1c7-eb6c-4f6d-9bd9-ae726a0e0d3d", + "text": "Date performed", + "type": "date", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "bc209c5e-ed28-48e3-b1a1-55cb7e435d8b", + "text": "BMI", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "BMI calculation", + "language": "text/fhirpath", + "expression": "(%weight/((%height/100).power(2))).round(1)" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "kg/m2" + } + } + ], + "linkId": "2ada6633-03c6-4b05-bc23-18dec84ec150", + "text": "Value", + "type": "decimal", + "repeats": false, + "readOnly": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "a709b8ec-9e65-40f0-a781-500cb3e56f3c", + "text": "kg/m2", + "type": "display" + } + ] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "d3557f55-1abf-401c-aada-2d4380151c56", + "text": "Head circumference", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsHeadCircumference.entry.resource.value.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "cm" + } + } + ], + "linkId": "7a4a6aac-558e-4bec-86c5-326ae07e37d6", + "text": "Value", + "type": "decimal", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "73937983-65a0-4d40-8600-de7ca3277d5e", + "text": "cm", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsHeadCircumference.entry.resource.effective" + } + } + ], + "linkId": "b8da15e7-8648-492b-9e82-ad5ab7cad179", + "text": "Date performed", + "type": "date", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 18" + } + } + ], + "linkId": "ec884b64-ed8d-485b-930f-e7ac18ad4cc9", + "text": "Waist circumference", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsWaistCircumference.entry.resource.value.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "cm" + } + } + ], + "linkId": "8df0f5d8-821d-4f71-b3c1-d164616ea2f5", + "text": "Value", + "type": "decimal", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "19aeb0ab-7494-4bac-8b2d-d7d2527c1f4a", + "text": "cm", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsWaistCircumference.entry.resource.effective" + } + } + ], + "linkId": "3eb3b929-e67a-4331-8949-b8447b66a4c7", + "text": "Date performed", + "type": "date", + "repeats": false + } + ] + }, + { + "linkId": "3d3e1079-d225-447b-959b-4caddc057f7d", + "text": "Heart rate", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsHeartRate.entry.resource.value.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "/min" + } + } + ], + "linkId": "49029ef0-eaa8-44f8-b26a-177820c82dfd", + "text": "Value", + "type": "integer", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "090964b9-be33-438b-8465-2a2a09632fde", + "text": "/min", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsBloodPressure.entry.resource.effective" + } + } + ], + "linkId": "feeac08f-2ba6-4048-80a2-10b3f90cf5e3", + "text": "Date performed", + "type": "date", + "repeats": false + } + ] + }, + { + "linkId": "8d3d05cc-64bc-47ae-b989-060bac838d1c", + "text": "Heart rhythm", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + } + ], + "linkId": "99a8eb6f-a36a-4daf-99d7-27bfde0d4bb1", + "text": "Value", + "type": "choice", + "repeats": false, + "answerOption": [ + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "271636001", + "display": "Pulse Regular" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "61086009", + "display": "Pulse Irregular" + } + } + ] + }, + { + "linkId": "eeb56682-0eae-4428-9c37-0e63852026c0", + "text": "Date performed", + "type": "date", + "repeats": false + } + ] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "version": "1.0.0", + "code": "grid" + } + ] + } + } + ], + "linkId": "3639c586-9576-48d3-a52b-e91fd2138581", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "705f6d04-acab-4d14-baab-98f9bfc4808e", + "text": "Blood pressure", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsBloodPressure.entry.resource.component.where(code.coding.where(code='8480-6')).value.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "mm[Hg]" + } + } + ], + "linkId": "e68b660d-cfd2-4b89-957a-c96a4c73a5fd", + "text": "Systolic", + "type": "integer", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "197d212d-72cc-4c85-91dc-2f030d384391", + "text": "mm Hg", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsBloodPressure.entry.resource.component.where(code.coding.where(code='8462-4')).value.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "mm[Hg]" + } + } + ], + "linkId": "867b0022-f812-4f80-b287-79686c972b15", + "text": "Diastolic", + "type": "integer", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "416ee494-4fa2-4b29-af0b-3d022f686e39", + "text": "mm Hg", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsBloodPressure.entry.resource.effective" + } + } + ], + "linkId": "a005050c-ed79-46ed-ac14-2fc1496059a5", + "text": "Date performed", + "type": "date", + "repeats": false + } + ] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "213a3eac-e530-4e27-859c-407136c7a0a6", + "text": "Cardiac auscultation", + "type": "text", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "8886f3bb-52de-4294-a5cb-8f960e2a6bbe", + "text": "Abdominal examination", + "type": "text", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "5e10229c-390d-4968-90d3-f896840f3c50", + "text": "Gait examination (musculoskeletal structure, balance, coordination)", + "type": "text", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age < 1" + } + } + ], + "linkId": "6c69ee91-f777-494c-bf09-d963773cd4ae", + "text": "Newborn examination (if indicated, infant aged <=6 weeks)", + "type": "text", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12" + } + } + ], + "linkId": "7a431d03-1726-4905-aae7-49f62a10ce5e", + "text": "Haemoglobin (children at risk of iron deficiency anaemia)", + "type": "string", + "repeats": false + }, + { + "linkId": "fcbfa6e1-c101-4675-969d-aa11027859c2", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-7", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 25" + } + } + ], + "linkId": "d95abe99-8ef2-4b97-bc88-a2901e2ebc9c", + "text": "Absolute cardiovascular disease risk calculation", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-2", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-2", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-2", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-2", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there first.\r\n
" + } + ], + "linkId": "RecordUpdate-CVDRisk", + "text": "Important: The patient record may not be updated with information entered here. Information intended for the patient record should be entered there.", + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n

The Australian guideline for assessing and managing cardiovascular disease risk recommends the use of the online Australian CVD risk calculator.

\r\n

The items included in this section are a subset of variables that can be used as inputs for the online calculator.

\r\n

The final CVD risk result can be entered in the item at the bottom of this section.

\r\n
" + } + ], + "linkId": "Guidance-CVDRisk", + "text": "Australian CVD risk calculator - https://www.cvdcheck.org.au/calculator", + "type": "display" + }, + { + "linkId": "8d02ef36-3f48-4912-b001-e9fec6aa7101", + "text": "CVD risk calculator variables", + "type": "group", + "repeats": false, + "readOnly": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "CVD Risk Age", + "language": "text/fhirpath", + "expression": "%age" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "a" + } + } + ], + "linkId": "6909cb38-a6f4-44c9-abae-0e5d697a21f5", + "text": "Age", + "type": "integer", + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "b9aba16c-f910-4948-9267-e07851f69572", + "text": "years", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "CVD Risk Sex At Birth", + "language": "text/fhirpath", + "expression": "%sex" + } + } + ], + "linkId": "3dbb0e63-3b28-4567-8ef3-bac242fd95f6", + "text": "Sex at birth", + "type": "choice", + "repeats": false, + "answerValueSet": "https://healthterminologies.gov.au/fhir/ValueSet/biological-sex-1" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "CVD Risk Smoking Status", + "language": "text/fhirpath", + "expression": "%smoker" + } + } + ], + "linkId": "bac0f824-3784-400e-80f9-ad18d46bd8cb", + "text": "Smoking status", + "type": "choice", + "repeats": false, + "answerOption": [ + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "266919005", + "display": "Never smoked" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "77176002", + "display": "Smoker" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "8517006", + "display": "Ex-Smoker" + } + }, + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "16090371000119103", + "display": "Environmental exposure to tobacco smoke (home, car, etc)" + } + }, + { + "valueString": "Wants to quit" + }, + { + "valueString": "Other tobacco use" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "version": "1.0.0", + "code": "grid" + } + ] + } + } + ], + "linkId": "fe9feec6-593a-4106-8a7d-f9965a632ea2", + "type": "group", + "repeats": false, + "item": [ + { + "linkId": "fa4f73a3-7633-410c-9177-8aa43b117122", + "text": "Systolic Blood Pressure", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsBloodPressure.entry.resource.component.where(code.coding.where(code='8480-6')).value.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "mm[Hg]" + } + } + ], + "linkId": "818ce640-c8dd-457d-b607-3aaa8da38524", + "text": "Value", + "type": "integer", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "ddea5a62-a8c1-4b15-b667-7b69babec8cd", + "text": "mm Hg", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsBloodPressure.entry.resource.effective" + } + } + ], + "linkId": "85d8faf7-ddb0-446c-b489-28d786d6de50", + "text": "Date performed", + "type": "date", + "repeats": false + } + ] + }, + { + "linkId": "e693c7d2-be69-4f1f-b72d-7ff2ea3cd536", + "text": "Total Cholesterol", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsTotalCholesterol.entry.resource.value.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "mmol/L" + } + } + ], + "linkId": "99932a93-8135-47b2-933b-fd751b34b7af", + "text": "Value", + "type": "decimal", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "fcfbfc9f-e400-4aae-993f-ea54096e7361", + "text": "mmol/L", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsTotalCholesterol.entry.resource.effective" + } + } + ], + "linkId": "16cbe87b-5c8d-4385-b7d9-da3f07f63f8a", + "text": "Date performed", + "type": "date", + "repeats": false + } + ] + }, + { + "linkId": "87eefaf6-010f-4b0d-9f51-2c33e46e6c69", + "text": "HDL Cholesterol", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsHDLCholesterol.entry.resource.value.value" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "mmol/L" + } + } + ], + "linkId": "c14b4513-1e20-461d-97f4-4631711adc65", + "text": "Value", + "type": "decimal", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "2ba61002-b642-4b28-9e66-dc2b060c4e0e", + "text": "mmol/L", + "type": "display" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%ObsHDLCholesterol.entry.resource.effective" + } + } + ], + "linkId": "6407e0a7-c416-4a75-933b-904c0dcf88ca", + "text": "Date performed", + "type": "date", + "repeats": false + } + ] + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "CVD Risk Postcode", + "language": "text/fhirpath", + "expression": "%postcode" + } + } + ], + "linkId": "fa8f03ca-9a5a-4ed1-a866-db26e567352a", + "text": "Postcode", + "type": "string" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%Condition.entry.resource.code.coding.where(system='http://snomed.info/sct' and code='44054006').exists()" + } + } + ], + "linkId": "1c1eea28-6c82-4b7b-aaa3-8655ce70f2fd", + "text": "Type 2 diabetes mellitus", + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", + "valueCoding": { + "system": "http://unitsofmeasure.org", + "code": "%" + } + } + ], + "linkId": "4c52fcec-0695-4916-b185-24a5c2711631", + "text": "CVD risk result", + "type": "integer", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "unit" + } + ] + } + } + ], + "linkId": "0162854e-c124-4b58-acd9-93c17562d407", + "text": "%", + "type": "display" + } + ] + }, + { + "linkId": "f8022f3f-21fe-42c0-8abd-95f24e2e37e5", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-2", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 12" + } + } + ], + "linkId": "918f7f32-cdaf-4742-b33a-8254eda2d8bd", + "text": "Investigations", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-14", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-14", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-14", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-14", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 18" + } + } + ], + "linkId": "740cbc59-08e3-41e8-bc00-de22c1ad45a0", + "text": "Full blood count, HbA1c or blood glucose level, serum lipids, Kidney function including eGFR, Liver function tests, ACR", + "type": "text" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 30" + } + } + ], + "linkId": "73e1e470-5c41-4644-b279-03f57bde036d", + "text": "Chlamydia, gonorrhoea: <=30, first void urine (male and female) and/or endocervical swab or self-administered vaginal swab (female) or throat and anal swab (men who have sex with men [MSM])", + "type": "text" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 49" + } + } + ], + "linkId": "77847d34-103e-497d-a7d5-f62cbaf4f698", + "text": "Syphilis (endemic areas, MSM, others at high risk)", + "type": "text" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 30" + } + } + ], + "linkId": "4aa47bda-d740-4294-9466-52b1be2ec15b", + "text": "Trichomoniasis (<=30, male and female, remote areas and other endemic areas, first void urine and/or endocervical swab or self-administered vaginal swab)", + "type": "text" + }, + { + "linkId": "b919de86-d81c-470d-8cb2-9caa4f8d3a42", + "text": "Blood-borne virus screening: HBV if status not known/not recorded on file, HCV if risk factors, HIV if risk factors", + "type": "text" + }, + { + "linkId": "96a8d946-6078-4c85-9de8-3bf18d2c8150", + "text": "Health priorities, actions and follow-up", + "type": "text", + "repeats": false + }, + { + "linkId": "MarkComplete-14", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Health Priorities Summary" + } + ], + "linkId": "e2c778e2-83df-40d5-89ea-f0f91b666b04", + "text": "Health Priorities, Actions And Follow-Up Summary", + "type": "group", + "repeats": false, + "item": [ + { + "linkId": "f948fb81-48e9-4bc6-bf81-8d778ac4375a", + "text": "The following information is a read-only collection of the 'Health priorities, actions and follow-up' sections entered in the previous tabs. Only sections where previous information entered will be displayed here.", + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryCurrentPriorities.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Current priorities calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryCurrentPriorities" + } + } + ], + "linkId": "4b03d116-84ee-488c-b132-427472d21fcd", + "text": "Current health/patient priorities", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryMedicalHistory.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Medical history calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryMedicalHistory" + } + } + ], + "linkId": "c848098c-85f3-487b-91af-01da4eba3aba", + "text": "Medical history and current problems", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryRegularMedications.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Regular medications calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryRegularMedications" + } + } + ], + "linkId": "0c0a389e-c23a-4687-84d9-e00c5a258c7a", + "text": "Regular medications", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryAllergiesAdverseReactions.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Allergies/adverse reactions calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryAllergiesAdverseReactions" + } + } + ], + "linkId": "34b7c4f3-c848-4dcb-ba9b-0b4c5ccd0785", + "text": "Allergies/adverse reactions", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryFamilyHistory.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Family history Calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryFamilyHistory" + } + } + ], + "linkId": "f81c85c7-587e-47de-8b02-9c1eeee13949", + "text": "Family history", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12 and %HealthPrioritiesSummarySocialEmotionalWellbeing.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Social and emotional wellbeing calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummarySocialEmotionalWellbeing" + } + } + ], + "linkId": "a57d29d3-b875-47ac-b8ed-c95eaa6a027d", + "text": "Social and emotional wellbeing", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12 and %HealthPrioritiesSummarySocialHistory.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Social history calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummarySocialHistory" + } + } + ], + "linkId": "ad9b85fc-24fe-495d-a980-941e2ad16533", + "text": "Social history", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12 and %HealthPrioritiesSummaryHomeFamily.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Home and family calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryHomeFamily" + } + } + ], + "linkId": "622f0877-80ec-4b91-bb1c-e741e5657e4c", + "text": "Home and family", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 12 and %HealthPrioritiesSummaryLearningDevelopment.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Learning and development calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryLearningDevelopment" + } + } + ], + "linkId": "9a88bdf6-e97a-4c54-96ff-1dad9701b5ab", + "text": "Learning and development", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age > 12).intersect(%age < 50) and %HealthPrioritiesSummaryLearningWorkAdults.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Learning and work for adolescents and adults calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryLearningWorkAdults" + } + } + ], + "linkId": "aefbee8b-64fc-4cdc-9902-d6c3f50a2e18", + "text": "Learning and work", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50 and %HealthPrioritiesSummaryLearningWorkOlder.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Learning and work calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryLearningWorkOlder" + } + } + ], + "linkId": "a96cce74-cda3-4b6b-adc4-1b7d73df2317", + "text": "Work", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12 and %HealthPrioritiesSummaryMood.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Mood calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryMood" + } + } + ], + "linkId": "58bf5a0f-6c68-4d1f-b352-bfcba8e1e05e", + "text": "Mood", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50 and %HealthPrioritiesSummaryMemoryThinking.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Memory and thinking calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryMemoryThinking" + } + } + ], + "linkId": "d963364a-e2d3-4382-8430-c47c19fc206c", + "text": "Memory and thinking", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50 and %HealthPrioritiesSummaryChronicDiseaseAgeing.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Chronic disease associated with ageing calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryChronicDiseaseAgeing" + } + } + ], + "linkId": "1877223d-8cae-48af-8add-fd6b10b37209", + "text": "Chronic disease associated with ageing", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age >= 50).intersect(%age <= 74) and %HealthPrioritiesSummaryScreeningPrograms.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Participation in screening programs calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryScreeningPrograms" + } + } + ], + "linkId": "b031bccf-5413-4c57-8e70-f464d24a6e6c", + "text": "Participation in screening programs", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryHealthyEating.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Healthy eating calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryHealthyEating" + } + } + ], + "linkId": "6ef556cb-2a69-4d28-a6cf-b4866303a564", + "text": "Healthy eating", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age < 50 and %HealthPrioritiesSummaryPhysicalActivityScreenTimeNotOlder.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Physical activity and screen time calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryPhysicalActivityScreenTimeNotOlder" + } + } + ], + "linkId": "b7e32f62-a4e7-4419-a728-6addceefeb02", + "text": "Physical activity and screen time", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50 and %HealthPrioritiesSummaryPhysicalActivityScreenTimeOlder.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Physical activity and screen time calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryPhysicalActivityScreenTimeOlder" + } + } + ], + "linkId": "f1c3d1ba-240c-4e68-8afc-62c50cc313d1", + "text": "Physical activity", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 12 and %HealthPrioritiesSummarySubstanceUse.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Substance use, including tobacco calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummarySubstanceUse" + } + } + ], + "linkId": "c94f2749-4353-4f51-9c75-106f81c5b69f", + "text": "Substance use, including tobacco", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12 and %HealthPrioritiesSummaryGambling.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Gambling calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryGambling" + } + } + ], + "linkId": "931457d4-0de0-434c-88af-eb1b17746953", + "text": "Gambling", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age > 12).intersect(%age <= 24) and %HealthPrioritiesSummarySexualHealthAdolescents.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Sexual health calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummarySexualHealthAdolescents" + } + } + ], + "linkId": "797402ac-95de-4c0b-a04f-44b669755f7c", + "text": "Sexual health", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age > 24).intersect(%age <= 49) and %HealthPrioritiesSummarySexualHealthAdults.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Sexual health calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummarySexualHealthAdults" + } + } + ], + "linkId": "e4df6f14-7a9c-445c-8cf5-3fc489db7307", + "text": "Genitourinary and sexual health", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 50 and %HealthPrioritiesSummarySexualHealthOlder.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Sexual health calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummarySexualHealthOlder" + } + } + ], + "linkId": "23e293c4-537f-46ca-90f9-c8dfb7630211", + "text": "Genitourinary and sexual health", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryEyeHealth.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Eye health calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryEyeHealth" + } + } + ], + "linkId": "4b1bf353-a422-40fb-a6d3-42807ebf1a6a", + "text": "Eye health", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryEarHealthHearing.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Ear health and hearing calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryEarHealthHearing" + } + } + ], + "linkId": "c292557b-2798-4b45-854d-58c20ecf8233", + "text": "Ear health and hearing", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryOralDentalHealth.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Oral and dental health calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryOralDentalHealth" + } + } + ], + "linkId": "93c33ba0-e4cc-4e9d-978b-49f57ce4a5eb", + "text": "Oral and dental health", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 24 and %HealthPrioritiesSummarySkin.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Skin calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummarySkin" + } + } + ], + "linkId": "0ccc2bce-899f-42b0-9100-05e6874372a3", + "text": "Skin", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryImmunisation.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Immunisation calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryImmunisation" + } + } + ], + "linkId": "8a33280b-19b9-4e0f-a26f-d9a0f95a7714", + "text": "Immunisation", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryExamination.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Examination calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryExamination" + } + } + ], + "linkId": "a889034b-7942-460d-ada6-b728a9f57dc0", + "text": "Examination", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 25 and %HealthPrioritiesSummaryAbsoluteCVDRisk.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Absolute cardiovascular risk calculation calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryAbsoluteCVDRisk" + } + } + ], + "linkId": "fd51cc3f-f53d-4a7d-a3a3-4a3b7232d4ee", + "text": "Absolute cardiovascular risk calculation", + "type": "text", + "repeats": false, + "readOnly": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >= 12 and %HealthPrioritiesSummaryInvestigations.exists()" + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression", + "valueExpression": { + "description": "Investigations calculation", + "language": "text/fhirpath", + "expression": "%HealthPrioritiesSummaryInvestigations" + } + } + ], + "linkId": "84fa4cca-aff7-4357-8d92-bb827074dc6a", + "text": "Investigations", + "type": "text", + "repeats": false, + "readOnly": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age.exists()" + } + } + ], + "linkId": "16971bd2-5494-483d-9713-eda182c47f02", + "text": "Finalising the health check", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-in-progress-31", + "text": "In progress", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-31", + "operator": "=", + "answerBoolean": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://smartforms.csiro.au/ig/CodeSystem/QuestionnaireItemControlExtended", + "code": "context-display" + } + ] + } + } + ], + "linkId": "CD-complete-31", + "text": "Complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\t
\r\n\t\t\r\n\t
\r\n
\r\n" + } + ] + }, + "type": "display", + "enableWhen": [ + { + "question": "MarkComplete-31", + "operator": "=", + "answerBoolean": true + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + } + ], + "linkId": "30532ad8-3465-4bdd-97ed-ec5664f9d733", + "text": "Patient priorities and goals: What does the parent/carer say are the important things that have come out of this health check?", + "type": "text", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age <= 12).intersect(%age > 5)" + } + } + ], + "linkId": "6aa0a113-4d33-4f6b-9899-fa249674075a", + "text": "Patient priorities and goals: What does the parent/carer and child say are the important things that have come out of this health check?", + "type": "text", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 12" + } + } + ], + "linkId": "71c19d58-a8ae-43ba-8b96-463c108c75dc", + "text": "Patient priorities and goals: What does the patient say are the important things that have come out of this health check?", + "type": "text", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other" + } + ], + "linkId": "d0e58402-a08a-49ca-b2ca-9f4bbdb89da0", + "text": "Brief intervention: advice and information provided during health check", + "type": "open-choice", + "repeats": true, + "answerOption": [ + { + "valueString": "Sugary drinks" + }, + { + "valueString": "Screen use" + }, + { + "valueString": "Healthy eating, including breastfeeding" + }, + { + "valueString": "Environmental exposure to harmful elements eg tobacco smoke" + }, + { + "valueString": "Physical activity and exercise" + }, + { + "valueString": "Sun protection" + }, + { + "valueString": "Parenting advice" + }, + { + "valueString": "Safe sleeping practices" + }, + { + "valueString": "Developmental milestones - including language and hearing" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age <= 12).intersect(%age > 5)" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other" + } + ], + "linkId": "0f70dec3-c1f2-4b36-b1f6-bd7f5743d5f8", + "text": "Brief intervention: advice and information provided during health check", + "type": "open-choice", + "repeats": true, + "answerOption": [ + { + "valueString": "Healthy eating" + }, + { + "valueString": "Screen use" + }, + { + "valueString": "Sun protection" + }, + { + "valueString": "Environmental exposure to harmful elements (e.g. tobacco smoke)" + }, + { + "valueString": "Sugary drinks" + }, + { + "valueString": "Physical activity and exercise" + }, + { + "valueString": "Parenting advice" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age <= 24).intersect(%age > 12)" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other" + } + ], + "linkId": "eaed9770-95f4-4c6a-b06c-d573427a2616", + "text": "Brief intervention: advice and information provided during health check", + "type": "open-choice", + "repeats": true, + "answerOption": [ + { + "valueString": "Healthy eating" + }, + { + "valueString": "Screen use" + }, + { + "valueString": "Physical activity and exercise" + }, + { + "valueString": "Mental health and wellbeing" + }, + { + "valueString": "Safety/risky behaviours" + }, + { + "valueString": "Smoking cessation" + }, + { + "valueString": "Substance use/harm minimisation" + }, + { + "valueString": "Safe sex/contraception" + }, + { + "valueString": "Care of teeth and gums" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age <= 49).intersect(%age > 24)" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other" + } + ], + "linkId": "25f27e83-fcf0-49c8-86c1-e285e201a043", + "text": "Brief intervention: advice and information provided during health check", + "type": "open-choice", + "repeats": true, + "answerOption": [ + { + "valueString": "Healthy eating" + }, + { + "valueString": "Screen use" + }, + { + "valueString": "Physical activity and exercise" + }, + { + "valueString": "Mental health and wellbeing" + }, + { + "valueString": "Carer support" + }, + { + "valueString": "Safety/risky behaviours" + }, + { + "valueString": "Smoking cessation" + }, + { + "valueString": "Substance use/harm minimisation" + }, + { + "valueString": "Safe sex/contraception" + }, + { + "valueString": "Oral and dental health" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 49" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "check-box" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other" + } + ], + "linkId": "2657da9c-a27e-4939-af7a-08a19b9ab6f7", + "text": "Brief intervention: advice and information provided during health check", + "type": "open-choice", + "repeats": true, + "answerOption": [ + { + "valueString": "Healthy eating" + }, + { + "valueString": "Physical activity and exercise" + }, + { + "valueString": "Mental health and wellbeing" + }, + { + "valueString": "Carer support" + }, + { + "valueString": "Smoking cessation" + }, + { + "valueString": "Substance use/harm minimisation" + }, + { + "valueString": "Social support and services" + }, + { + "valueString": "Oral and dental health" + } + ] + }, + { + "linkId": "afbadad6-bef9-4fad-b5f4-111f666ccf11", + "text": "Care provided as part of the health check (eg immunisations, medication review, investigations requested)", + "type": "text" + }, + { + "linkId": "4b3015f6-5b0a-4dfa-9791-994e4059f921", + "text": "Identified needs and plan (including new diagnoses)", + "type": "text" + }, + { + "linkId": "5760a1f9-d725-4b9e-b74d-50800615a689", + "text": "Follow-up", + "type": "group", + "repeats": false, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-display-category", + "code": "instructions" + } + ] + } + } + ], + "linkId": "b4110a63-8547-4aa2-84c6-c1f64f0d24da", + "text": "Consider what follow-up appointments can be made at the time of the health check.", + "type": "display" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-display-category", + "code": "instructions" + } + ] + } + } + ], + "linkId": "c47cfd7e-0f15-4dd9-bd53-bb62851b677c", + "text": "Reminder: MBS follow up items for clients at risk of or with chronic disease are available to support follow-up of health checks", + "type": "display" + }, + { + "linkId": "1be25c55-2a2d-4b94-b826-bd17d9e35e92", + "text": "Referrals and appointments", + "type": "group", + "repeats": true, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "drop-down" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other" + } + ], + "linkId": "4044d0b4-94b2-4a89-b826-a14614298511", + "text": "Who", + "type": "open-choice", + "repeats": false, + "answerOption": [ + { + "valueString": "GP follow-up" + }, + { + "valueString": "Aboriginal and/or Torres Strait Islander Health Worker follow-up" + }, + { + "valueString": "Aboriginal and/or Torres Strait Islander Health Practitioner follow-up" + }, + { + "valueString": "Practice nurse follow-up" + }, + { + "valueString": "Child health nurse" + }, + { + "valueString": "Dentist" + }, + { + "valueString": "Paediatrician" + }, + { + "valueString": "Audiology" + }, + { + "valueString": "Speech pathology" + }, + { + "valueString": "Mental health" + }, + { + "valueString": "Early intervention (development) services" + }, + { + "valueString": "Parenting programs/support services" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age <= 12).intersect(%age > 5)" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "drop-down" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other" + } + ], + "linkId": "f97f211a-ef2a-49a3-aef7-c4e9cd08aa2a", + "text": "Who", + "type": "open-choice", + "repeats": false, + "answerOption": [ + { + "valueString": "GP follow-up" + }, + { + "valueString": "Aboriginal and/or Torres Strait Islander Health Worker follow-up" + }, + { + "valueString": "Aboriginal and/or Torres Strait Islander Health Practitioner follow-up" + }, + { + "valueString": "Practice nurse follow-up" + }, + { + "valueString": "Dentist" + }, + { + "valueString": "Paediatrician" + }, + { + "valueString": "Audiology" + }, + { + "valueString": "Speech pathology" + }, + { + "valueString": "Mental health" + }, + { + "valueString": "Parenting programs/support services" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age <= 24).intersect(%age > 12)" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "drop-down" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other" + } + ], + "linkId": "07cfe077-ba93-4f93-b2a5-027023faa33b", + "text": "Who", + "type": "open-choice", + "repeats": false, + "answerOption": [ + { + "valueString": "GP follow-up" + }, + { + "valueString": "GP review of results of investigations" + }, + { + "valueString": "Aboriginal and/or Torres Strait Islander Health Worker follow-up" + }, + { + "valueString": "Aboriginal and/or Torres Strait Islander Health Practitioner follow-up" + }, + { + "valueString": "Practice nurse follow-up" + }, + { + "valueString": "Dentist" + }, + { + "valueString": "Paediatrician" + }, + { + "valueString": "Audiology" + }, + { + "valueString": "Speech pathology" + }, + { + "valueString": "Parenting programs/support services" + }, + { + "valueString": "Social and emotional wellbeing/mental health" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age <= 49).intersect(%age > 24)" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "drop-down" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other" + } + ], + "linkId": "a525c370-d8c3-4764-ab3a-bf62081725e0", + "text": "Who", + "type": "open-choice", + "repeats": false, + "answerOption": [ + { + "valueString": "GP follow-up" + }, + { + "valueString": "GP review of results of investigations" + }, + { + "valueString": "Aboriginal and/or Torres Strait Islander Health Worker follow-up" + }, + { + "valueString": "Aboriginal and/or Torres Strait Islander Health Practitioner follow-up" + }, + { + "valueString": "Practice nurse follow-up" + }, + { + "valueString": "Dentist" + }, + { + "valueString": "Medication review" + }, + { + "valueString": "Smoking cessation" + }, + { + "valueString": "Audiology" + }, + { + "valueString": "Dietician" + }, + { + "valueString": "Physiotherapist or exercise program" + }, + { + "valueString": "Parenting programs/support services" + }, + { + "valueString": "Social and emotional wellbeing/mental health" + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age > 49" + } + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "drop-down" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel", + "valueString": "Other" + } + ], + "linkId": "d68d9693-48d3-4663-9dbb-dd3a7aec5278", + "text": "Who", + "type": "open-choice", + "repeats": false, + "answerOption": [ + { + "valueString": "GP follow-up" + }, + { + "valueString": "GP review of results of investigations" + }, + { + "valueString": "Aboriginal and/or Torres Strait Islander Health Worker follow-up" + }, + { + "valueString": "Aboriginal and/or Torres Strait Islander Health Practitioner follow-up" + }, + { + "valueString": "Practice nurse follow-up" + }, + { + "valueString": "Dentist" + }, + { + "valueString": "Medication review" + }, + { + "valueString": "Geriatrician" + }, + { + "valueString": "Smoking cessation" + }, + { + "valueString": "Audiologist" + }, + { + "valueString": "Dietician" + }, + { + "valueString": "Physiotherapist or exercise program" + }, + { + "valueString": "Optometrist" + }, + { + "valueString": "Podiatrist" + }, + { + "valueString": "Social and emotional wellbeing/mental health" + }, + { + "valueString": "Social support and services" + } + ] + }, + { + "linkId": "0ef84b09-ca34-44c2-96d1-fcbbea0bae66", + "text": "When", + "type": "date", + "enableWhen": [ + { + "question": "4044d0b4-94b2-4a89-b826-a14614298511", + "operator": "exists", + "answerBoolean": true + }, + { + "question": "f97f211a-ef2a-49a3-aef7-c4e9cd08aa2a", + "operator": "exists", + "answerBoolean": true + }, + { + "question": "07cfe077-ba93-4f93-b2a5-027023faa33b", + "operator": "exists", + "answerBoolean": true + }, + { + "question": "a525c370-d8c3-4764-ab3a-bf62081725e0", + "operator": "exists", + "answerBoolean": true + }, + { + "question": "d68d9693-48d3-4663-9dbb-dd3a7aec5278", + "operator": "exists", + "answerBoolean": true + } + ], + "enableBehavior": "any", + "repeats": false + } + ] + } + ] + }, + { + "linkId": "a400fe69-c99f-47ed-bee1-083c3e4be467", + "text": "Recalls entered (eg clinical review, investigations, influenza vaccination, asthma plan/cycle of care, diabetes cycle of care, care plan review, cervical screening, investigations)", + "type": "group", + "repeats": true, + "item": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden", + "valueBoolean": true + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%patient.id" + } + } + ], + "linkId": "40e3933d-77bb-40f3-8609-0c38ebb4421e", + "definition": "http://aehrc.com/fhir/StructureDefinition/AUPrimaryCareFollowUp#CarePlan.subject.reference", + "text": "recall-subject", + "type": "string" + }, + { + "linkId": "fece6a3c-f8f1-4592-a166-5ea5a3c60c8e", + "definition": "http://aehrc.com/fhir/StructureDefinition/AUPrimaryCareFollowUp#CarePlan.title", + "text": "Recall", + "type": "text", + "repeats": false + } + ] + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age <= 5" + } + } + ], + "linkId": "5a0c98f8-5349-4045-9ba0-27a4f35630b9", + "text": "Parent/carer actions", + "type": "text", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "(%age <= 12).intersect(%age > 5)" + } + } + ], + "linkId": "cde03bf0-182a-4998-a37e-7b3f22786617", + "text": "Parent/patient actions", + "type": "text", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression", + "valueExpression": { + "language": "text/fhirpath", + "expression": "%age >12" + } + } + ], + "linkId": "51ff0c15-312a-45ce-a25a-6c6a4bf0e17e", + "text": "Patient actions", + "type": "text", + "repeats": false + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl", + "valueCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/questionnaire-item-control", + "code": "radio-button" + } + ] + } + }, + { + "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-shortText", + "valueString": "Copy of health check" + } + ], + "linkId": "8176151f-6d86-45eb-91b1-12458d75a181", + "text": "A copy of this health check has been offerered - including details of follow-up and future appointments", + "type": "choice", + "repeats": false, + "answerOption": [ + { + "valueString": "Yes, copy taken" + }, + { + "valueString": "Yes, but declined" + }, + { + "valueString": "Not offered. Plan to follow up and offer at a later date" + } + ] + }, + { + "linkId": "MarkComplete-31", + "text": "Mark section as complete", + "_text": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/rendering-xhtml", + "valueString": "
\r\n\r\n \r\n\r\n\r\n
Mark section as complete
\r\n\r\n
" + } + ] + }, + "type": "boolean", + "repeats": false + } + ] + } + ] + } + ] +} From 307750f120103b73c006b9ed06e2680c2fb068a1 Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Sat, 25 Nov 2023 17:12:54 +1030 Subject: [PATCH 02/12] Remove moment dependency and add react-beautiful-dnd --- package-lock.json | 115 +++++++++++++++--- package.json | 2 +- packages/smart-forms-renderer/package.json | 7 +- .../src/utils/calculatedExpression.ts | 3 +- 4 files changed, 103 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7465c630e..ba491cc72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "workspaces": [ - "apps/*", + "apps/smart-forms-app", "packages/*", "services/*", "deployment/forms-server/*", @@ -19,6 +19,7 @@ }, "apps/demo-renderer-app": { "version": "0.0.0", + "extraneous": true, "dependencies": { "@aehrc/sdc-populate": "^1.0.6", "@aehrc/smart-forms-renderer": "^0.9.0", @@ -40,12 +41,6 @@ "vite": "^4.4.5" } }, - "apps/demo-renderer-app/node_modules/@types/fhir": { - "version": "0.0.37", - "resolved": "https://registry.npmjs.org/@types/fhir/-/fhir-0.0.37.tgz", - "integrity": "sha512-fR1y6tPfDmxYDWN4JkJhuI5F5QpbaFVSoNo3pu9A6nzuoojANqg0UBnNZTVegTz/MilV3PSjyvFe6/vO55geKA==", - "dev": true - }, "apps/smart-forms-app": { "name": "@aehrc/smart-forms-app", "version": "0.2.0", @@ -14053,6 +14048,15 @@ "csstype": "^3.0.2" } }, + "node_modules/@types/react-beautiful-dnd": { + "version": "13.1.7", + "resolved": "https://registry.npmjs.org/@types/react-beautiful-dnd/-/react-beautiful-dnd-13.1.7.tgz", + "integrity": "sha512-jQZLov9OkD0xRQkqz8/lx66bHYAYv+g4+POBqnH5Jtt/xo4MygzM879Q9sxAiosPBdNj1JYTdbPxDn3dNRYgow==", + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/react-dom": { "version": "18.2.9", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.9.tgz", @@ -14070,6 +14074,17 @@ "@types/react": "*" } }, + "node_modules/@types/react-redux": { + "version": "7.1.31", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.31.tgz", + "integrity": "sha512-merF9AH72krBUekQY6uObXnMsEo1xTeZy9NONNRnqSwvwVe3HtLeRvNIPaKmPDIOWPsSFE51rc2WGpPMqmuCWg==", + "dependencies": { + "@types/hoist-non-react-statics": "^3.3.0", + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0", + "redux": "^4.0.0" + } + }, "node_modules/@types/react-test-renderer": { "version": "18.0.0", "dev": true, @@ -17689,6 +17704,14 @@ "node": ">=8" } }, + "node_modules/css-box-model": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/css-box-model/-/css-box-model-1.2.1.tgz", + "integrity": "sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw==", + "dependencies": { + "tiny-invariant": "^1.0.6" + } + }, "node_modules/css-jss": { "version": "10.10.0", "license": "MIT", @@ -18506,10 +18529,6 @@ "node": ">=0.4.0" } }, - "node_modules/demo-renderer-app": { - "resolved": "apps/demo-renderer-app", - "link": true - }, "node_modules/denodeify": { "version": "1.2.1", "license": "MIT", @@ -24699,9 +24718,7 @@ }, "node_modules/memoize-one": { "version": "5.2.1", - "license": "MIT", - "optional": true, - "peer": true + "license": "MIT" }, "node_modules/memoizerific": { "version": "1.11.3", @@ -28070,6 +28087,11 @@ ], "license": "MIT" }, + "node_modules/raf-schd": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/raf-schd/-/raf-schd-4.0.3.tgz", + "integrity": "sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==" + }, "node_modules/ramda": { "version": "0.29.0", "dev": true, @@ -28166,6 +28188,24 @@ "lodash.curry": "^4.1.1" } }, + "node_modules/react-beautiful-dnd": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/react-beautiful-dnd/-/react-beautiful-dnd-13.1.1.tgz", + "integrity": "sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ==", + "dependencies": { + "@babel/runtime": "^7.9.2", + "css-box-model": "^1.2.0", + "memoize-one": "^5.1.1", + "raf-schd": "^4.0.2", + "react-redux": "^7.2.0", + "redux": "^4.0.4", + "use-memo-one": "^1.1.1" + }, + "peerDependencies": { + "react": "^16.8.5 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.5 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-colorful": { "version": "5.6.1", "dev": true, @@ -28252,7 +28292,8 @@ }, "node_modules/react-dnd": { "version": "16.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-16.0.1.tgz", + "integrity": "sha512-QeoM/i73HHu2XF9aKksIUuamHPDvRglEwdHL4jsp784BgUuWcg6mzfxT0QDdQz8Wj0qyRKx2eMg8iZtWvU4E2Q==", "dependencies": { "@react-dnd/invariant": "^4.0.1", "@react-dnd/shallowequal": "^4.0.1", @@ -28280,7 +28321,8 @@ }, "node_modules/react-dnd-html5-backend": { "version": "16.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-16.0.1.tgz", + "integrity": "sha512-Wu3dw5aDJmOGw8WjH1I1/yTH+vlXEL4vmjk5p+MHxP8HuHJS1lAGeIdG/hze1AvNeXWo/JgULV87LyQOr+r5jw==", "dependencies": { "dnd-core": "^16.0.1" } @@ -28627,6 +28669,35 @@ "resolved": "https://registry.npmjs.org/react-property/-/react-property-2.0.2.tgz", "integrity": "sha512-+PbtI3VuDV0l6CleQMsx2gtK0JZbZKbpdu5ynr+lbsuvtmgbNcS3VM0tuY2QjFNOcWxvXeHjDpy42RO+4U2rug==" }, + "node_modules/react-redux": { + "version": "7.2.9", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.9.tgz", + "integrity": "sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==", + "dependencies": { + "@babel/runtime": "^7.15.4", + "@types/react-redux": "^7.1.20", + "hoist-non-react-statics": "^3.3.2", + "loose-envify": "^1.4.0", + "prop-types": "^15.7.2", + "react-is": "^17.0.2" + }, + "peerDependencies": { + "react": "^16.8.3 || ^17 || ^18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } + } + }, + "node_modules/react-redux/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + }, "node_modules/react-refresh": { "version": "0.14.0", "dev": true, @@ -31099,7 +31170,6 @@ }, "node_modules/tiny-invariant": { "version": "1.3.1", - "dev": true, "license": "MIT" }, "node_modules/tiny-warning": { @@ -31921,6 +31991,14 @@ } } }, + "node_modules/use-memo-one": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.3.tgz", + "integrity": "sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/use-resize-observer": { "version": "9.1.0", "license": "MIT", @@ -32853,8 +32931,8 @@ "html-react-parser": "4.2.10", "lodash.clonedeep": "^4.5.0", "lodash.debounce": "^4.0.8", - "moment": "^2.29.4", "nanoid": "^5.0.1", + "react-beautiful-dnd": "^13.1.1", "react-markdown": "^8.0.7", "zustand": "^4.4.1" }, @@ -32877,6 +32955,7 @@ "@types/lodash.clonedeep": "^4.5.7", "@types/lodash.debounce": "^4.0.7", "@types/react": "^18.2.37", + "@types/react-beautiful-dnd": "^13.1.7", "@types/react-dom": "^18.2.9", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", diff --git a/package.json b/package.json index 467f4aaa4..8ff08974d 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "check-formatting": "prettier --check ." }, "workspaces": [ - "apps/*", + "apps/smart-forms-app", "packages/*", "services/*", "deployment/forms-server/*", diff --git a/packages/smart-forms-renderer/package.json b/packages/smart-forms-renderer/package.json index 8198823cd..10ab19396 100644 --- a/packages/smart-forms-renderer/package.json +++ b/packages/smart-forms-renderer/package.json @@ -34,9 +34,9 @@ "lodash.clonedeep": "^4.5.0", "lodash.debounce": "^4.0.8", "nanoid": "^5.0.1", + "react-beautiful-dnd": "^13.1.1", "react-markdown": "^8.0.7", - "zustand": "^4.4.1", - "moment": "^2.29.4" + "zustand": "^4.4.1" }, "peerDependencies": { "@emotion/react": ">=11.11.0", @@ -65,9 +65,10 @@ "@testing-library/react-hooks": "^7.0.2", "@types/deep-diff": "^1.0.4", "@types/jest": "^29.5.7", - "@types/lodash.debounce": "^4.0.7", "@types/lodash.clonedeep": "^4.5.7", + "@types/lodash.debounce": "^4.0.7", "@types/react": "^18.2.37", + "@types/react-beautiful-dnd": "^13.1.7", "@types/react-dom": "^18.2.9", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", diff --git a/packages/smart-forms-renderer/src/utils/calculatedExpression.ts b/packages/smart-forms-renderer/src/utils/calculatedExpression.ts index 1b202cc19..d8d02bd16 100644 --- a/packages/smart-forms-renderer/src/utils/calculatedExpression.ts +++ b/packages/smart-forms-renderer/src/utils/calculatedExpression.ts @@ -34,7 +34,6 @@ import { getQrItemsIndex, mapQItemsIndex } from './mapItem'; import { updateQrItemsInGroup } from './qrItem'; import cloneDeep from 'lodash.clonedeep'; import dayjs from 'dayjs'; -import moment from 'moment'; interface EvaluateInitialCalculatedExpressionsParams { initialResponse: QuestionnaireResponse; @@ -354,7 +353,7 @@ function parseValueToAnswer(qItem: QuestionnaireItem, value: any): Questionnaire export function checkIsDateTime(value: string): boolean { const acceptedFormats = ['YYYY', 'YYYY-MM', 'YYYY-MM-DD', 'YYYY-MM-DDTHH:mm:ssZ']; const formattedDate = dayjs(value).format(); - return moment(formattedDate, acceptedFormats, true).isValid(); + return dayjs(formattedDate, acceptedFormats, true).isValid(); } /** From 61338bbf0e25f6ccdf20606252c42eb6ec762eb3 Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Sat, 25 Nov 2023 17:50:15 +1030 Subject: [PATCH 03/12] Add drag and drop + select row to group table --- apps/demo-renderer-app/README.md | 3 + .../src/components/Button/RefetchButton.tsx | 2 +- .../FormComponents/Tables/GroupTable.tsx | 183 +++++++----------- .../FormComponents/Tables/GroupTableBody.tsx | 116 +++++++++++ .../FormComponents/Tables/GroupTableRow.tsx | 138 ++++++++----- .../Tables/GroupTableRowCells.tsx | 87 +++++++++ .../FormComponents/Tables/GroupTableView.tsx | 169 ++++++++++++++++ .../FormComponents/Tables/RemoveRowButton.tsx | 6 +- .../FormComponents/Tables/SelectRowButton.tsx | 37 ++++ .../FormComponents/Tables/Table.styles.tsx | 25 +++ .../src/hooks/useInitialiseGroupTable.ts | 6 +- .../src/interfaces/groupTable.interface.ts | 2 +- .../stories/MedicalHistoryTable.stories.tsx | 23 ++- .../src/stories/SmartFormsRenderer.stories.ts | 10 +- .../QR_GTableMedicalHistory.json | 80 ++++++++ .../Q_GTableMedicalHistory.json} | 2 +- .../stories/assets/{ => Qs-and-QRs}/Q715.json | 0 .../assets/{ => Qs-and-QRs}/QDev715.json | 0 .../assets/{ => Qs-and-QRs}/QTestGrid.json | 0 .../stories/assets/{ => Qs-and-QRs}/R715.json | 0 .../assets/{ => Qs-and-QRs}/RTestGrid.json | 0 .../src/theme/overrides/Table.ts | 3 +- .../src/utils/groupTable.ts | 37 ++++ 23 files changed, 741 insertions(+), 188 deletions(-) create mode 100644 packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableBody.tsx create mode 100644 packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRowCells.tsx create mode 100644 packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableView.tsx create mode 100644 packages/smart-forms-renderer/src/components/FormComponents/Tables/SelectRowButton.tsx create mode 100644 packages/smart-forms-renderer/src/stories/assets/QItems-and-QRItems/QR_GTableMedicalHistory.json rename packages/smart-forms-renderer/src/stories/assets/{GTableMedicalHistory.json => QItems-and-QRItems/Q_GTableMedicalHistory.json} (97%) rename packages/smart-forms-renderer/src/stories/assets/{ => Qs-and-QRs}/Q715.json (100%) rename packages/smart-forms-renderer/src/stories/assets/{ => Qs-and-QRs}/QDev715.json (100%) rename packages/smart-forms-renderer/src/stories/assets/{ => Qs-and-QRs}/QTestGrid.json (100%) rename packages/smart-forms-renderer/src/stories/assets/{ => Qs-and-QRs}/R715.json (100%) rename packages/smart-forms-renderer/src/stories/assets/{ => Qs-and-QRs}/RTestGrid.json (100%) create mode 100644 packages/smart-forms-renderer/src/utils/groupTable.ts diff --git a/apps/demo-renderer-app/README.md b/apps/demo-renderer-app/README.md index 1ebe379f5..aba81771a 100644 --- a/apps/demo-renderer-app/README.md +++ b/apps/demo-renderer-app/README.md @@ -25,3 +25,6 @@ If you are developing a production application, we recommend updating the config - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` - Optionally add `plugin:@typescript-eslint/stylistic-type-checked` - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list + + +Note to devs working on this: apps/demo-renderer-app is not included in npm workspaces to test if packages are working as a standalone diff --git a/apps/smart-forms-app/src/components/Button/RefetchButton.tsx b/apps/smart-forms-app/src/components/Button/RefetchButton.tsx index 202a7fabd..0f82d66b0 100644 --- a/apps/smart-forms-app/src/components/Button/RefetchButton.tsx +++ b/apps/smart-forms-app/src/components/Button/RefetchButton.tsx @@ -27,7 +27,7 @@ function RefetchButton(props: RefetchButtonProps) { const { isFetching, refetchResources } = props; return ( - + diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTable.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTable.tsx index 483f1a629..ce0afb0d7 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTable.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTable.tsx @@ -18,18 +18,6 @@ import React, { useMemo, useState } from 'react'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; -import Divider from '@mui/material/Divider'; -import Paper from '@mui/material/Paper'; -import Table from '@mui/material/Table'; -import TableBody from '@mui/material/TableBody'; -import TableCell from '@mui/material/TableCell'; -import TableContainer from '@mui/material/TableContainer'; -import TableHead from '@mui/material/TableHead'; -import TableRow from '@mui/material/TableRow'; -import Typography from '@mui/material/Typography'; -import GroupTableRow from './GroupTableRow'; -import { HeaderTableCell } from './Table.styles'; -import { QGroupContainerBox } from '../../Box.styles'; import { mapQItemsIndex } from '../../../utils/mapItem'; import type { PropsWithParentIsReadOnlyAttribute, @@ -38,12 +26,10 @@ import type { } from '../../../interfaces/renderProps.interface'; import useInitialiseGroupTable from '../../../hooks/useInitialiseGroupTable'; import { nanoid } from 'nanoid'; -import { createEmptyQrItem } from '../../../utils/qrItem'; -import RemoveRowButton from './RemoveRowButton'; -import LabelWrapper from '../ItemParts/ItemLabelWrapper'; -import cloneDeep from 'lodash.clonedeep'; -import AddRowButton from './AddRowButton'; import useReadOnly from '../../../hooks/useReadOnly'; +import GroupTableView from './GroupTableView'; +import { GroupTableRowModel } from '../../../interfaces/groupTable.interface'; +import { getGroupTableItemsToUpdate } from '../../../utils/groupTable'; interface GroupTableProps extends PropsWithQrRepeatGroupChangeHandler, @@ -64,11 +50,16 @@ function GroupTable(props: GroupTableProps) { onQrRepeatGroupChange } = props; + // TODO come back to fix stuttering on dnd update + const readOnly = useReadOnly(qItem, parentIsReadOnly); const initialisedGroupTables = useInitialiseGroupTable(qrItems); const [tableRows, setTableRows] = useState(initialisedGroupTables); + const [selectedIds, setSelectedIds] = useState( + initialisedGroupTables.map((row) => row.nanoId) + ); // Generate item labels as table headers const qItems = qItem.item; @@ -99,13 +90,11 @@ function GroupTable(props: GroupTableProps) { setTableRows(updatedTableRows); onQrRepeatGroupChange({ linkId: qItem.linkId, - qrItems: updatedTableRows.flatMap((singleRow) => - singleRow.qrItem ? [cloneDeep(singleRow.qrItem)] : [] - ) + qrItems: getGroupTableItemsToUpdate(updatedTableRows, selectedIds) }); } - function handleDeleteRow(index: number) { + function handleRemoveRow(index: number) { const updatedTableRows = [...tableRows]; updatedTableRows.splice(index, 1); @@ -113,118 +102,76 @@ function GroupTable(props: GroupTableProps) { setTableRows(updatedTableRows); onQrRepeatGroupChange({ linkId: qItem.linkId, - qrItems: updatedTableRows.flatMap((singleRow) => - singleRow.qrItem ? [cloneDeep(singleRow.qrItem)] : [] - ) + qrItems: getGroupTableItemsToUpdate(updatedTableRows, selectedIds) }); } function handleAddRow() { + const newRowNanoId = nanoid(); setTableRows([ ...tableRows, { - nanoId: nanoid(), + nanoId: newRowNanoId, qrItem: null } ]); + setSelectedIds([...selectedIds, newRowNanoId]); + } + + function handleSelectAll() { + // deselect all if all are selected, otherwise select all + const updatedTableIds = + selectedIds.length === tableRows.length ? [] : tableRows.map((tableRow) => tableRow.nanoId); + setSelectedIds(updatedTableIds); + onQrRepeatGroupChange({ + linkId: qItem.linkId, + qrItems: getGroupTableItemsToUpdate(tableRows, updatedTableIds) + }); + } + + function handleSelectRow(nanoId: string) { + const updatedSelectedIds = [...selectedIds]; + + const index = updatedSelectedIds.indexOf(nanoId); + if (index === -1) { + updatedSelectedIds.push(nanoId); + } else { + updatedSelectedIds.splice(index, 1); + } + + setSelectedIds(updatedSelectedIds); + onQrRepeatGroupChange({ + linkId: qItem.linkId, + qrItems: getGroupTableItemsToUpdate(tableRows, updatedSelectedIds) + }); } - if (showMinimalView) { - return ( - - - - - - {itemLabels.map((itemLabel) => ( - - {itemLabel} - - ))} - - - - - {tableRows.map(({ nanoId, qrItem: nullableQrItem }, index) => { - const answeredQrItem = createEmptyQrItem(qItem); - if (nullableQrItem) { - answeredQrItem.item = nullableQrItem.item; - } - - return ( - - handleRowChange(newQrGroup, index)} - /> - - ); - })} - -
-
-
- ); + function handleReorderRows(newTableRows: GroupTableRowModel[]) { + setTableRows(newTableRows); + onQrRepeatGroupChange({ + linkId: qItem.linkId, + qrItems: getGroupTableItemsToUpdate(newTableRows, selectedIds) + }); } return ( - - {groupCardElevation !== 1 ? ( - <> - - - - - - ) : null} - - - - - - {itemLabels.map((itemLabel) => ( - {itemLabel} - ))} - - - - - {tableRows.map(({ nanoId, qrItem: nullableQrItem }, index) => { - const answeredQrItem = createEmptyQrItem(qItem); - if (nullableQrItem) { - answeredQrItem.item = nullableQrItem.item; - } - - return ( - - handleRowChange(newQrGroup, index)} - /> - handleDeleteRow(index)} - /> - - ); - })} - -
- -
-
-
+ ); } diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableBody.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableBody.tsx new file mode 100644 index 000000000..20df2e66b --- /dev/null +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableBody.tsx @@ -0,0 +1,116 @@ +/* + * Copyright 2023 Commonwealth Scientific and Industrial Research + * Organisation (CSIRO) ABN 41 687 119 230. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { createEmptyQrItem } from '../../../utils/qrItem'; +import { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; +import { GroupTableRowModel } from '../../../interfaces/groupTable.interface'; +import { + PropsWithParentIsReadOnlyAttribute, + PropsWithShowMinimalViewAttribute +} from '../../../interfaces/renderProps.interface'; +import GroupTableRow from './GroupTableRow'; +import { DragDropContext, Droppable, DropResult } from 'react-beautiful-dnd'; +import { reorderRows } from '../../../utils/groupTable'; +import TableBody from '@mui/material/TableBody'; + +interface GroupTableBodyProps + extends PropsWithParentIsReadOnlyAttribute, + PropsWithShowMinimalViewAttribute { + tableQItem: QuestionnaireItem; + readOnly: boolean; + tableRows: GroupTableRowModel[]; + selectedIds: string[]; + qItemsIndexMap: Record; + onRowChange: (newQrRow: QuestionnaireResponseItem, index: number) => void; + onRemoveRow: (index: number) => void; + onSelectRow: (nanoId: string) => void; + onReorderRows: (newTableRows: GroupTableRowModel[]) => void; +} + +function GroupTableBody(props: GroupTableBodyProps) { + const { + tableQItem, + readOnly, + tableRows, + selectedIds, + qItemsIndexMap, + showMinimalView, + parentIsReadOnly, + onRowChange, + onRemoveRow, + onSelectRow, + onReorderRows + } = props; + + function onDragEnd(result: DropResult) { + if (!result.destination) { + return; + } + + if (result.destination.index === result.source.index) { + return; + } + + const reorderedRows = reorderRows(tableRows, result.source.index, result.destination.index); + + onReorderRows(reorderedRows); + } + + return ( + + + {(droppableProvided, snapshot) => ( + + {tableRows.map(({ nanoId, qrItem: nullableQrItem }, index) => { + const itemIsSelected = selectedIds.indexOf(nanoId) !== -1; + const answeredQrItem = createEmptyQrItem(tableQItem); + if (nullableQrItem) { + answeredQrItem.item = nullableQrItem.item; + } + + return ( + + ); + })} + {droppableProvided.placeholder} + + )} + + + ); +} + +export default GroupTableBody; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRow.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRow.tsx index 441f0e998..16323dd4e 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRow.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRow.tsx @@ -17,65 +17,105 @@ import React from 'react'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; -import { createEmptyQrGroup, updateQrItemsInGroup } from '../../../utils/qrItem'; -import SingleItem from '../SingleItem/SingleItem'; -import { getQrItemsIndex } from '../../../utils/mapItem'; -import { StandardTableCell } from './Table.styles'; import type { PropsWithParentIsReadOnlyAttribute, - PropsWithQrItemChangeHandler + PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface'; +import { TableRowProps } from '@mui/material/TableRow'; +import SelectRowButton from './SelectRowButton'; +import GroupTableRowCells from './GroupTableRowCells'; +import RemoveRowButton from './RemoveRowButton'; +import { GroupTableRowModel } from '../../../interfaces/groupTable.interface'; +import DragIndicator from '@mui/icons-material/DragIndicator'; +import TableCell from '@mui/material/TableCell'; +import Box from '@mui/material/Box'; +import { Draggable } from 'react-beautiful-dnd'; +import { StyledGroupTableRow } from './Table.styles'; -interface Props extends PropsWithQrItemChangeHandler, PropsWithParentIsReadOnlyAttribute { - qItem: QuestionnaireItem; - qrItem: QuestionnaireResponseItem | null; +interface GroupTableRowProps + extends PropsWithShowMinimalViewAttribute, + PropsWithParentIsReadOnlyAttribute, + TableRowProps { + nanoId: string; + index: number; + tableQItem: QuestionnaireItem; + answeredQrItem: QuestionnaireResponseItem; + nullableQrItem: QuestionnaireResponseItem | null; + readOnly: boolean; + hoverDisabled: boolean; + tableRows: GroupTableRowModel[]; + itemIsSelected: boolean; + selectedIds: string[]; qItemsIndexMap: Record; + onRowChange: (newQrRow: QuestionnaireResponseItem, index: number) => void; + onRemoveRow: (index: number) => void; + onSelectRow: (nanoId: string) => void; } -function GroupTableRow(props: Props) { - const { qItem, qrItem, qItemsIndexMap, parentIsReadOnly, onQrItemChange } = props; - - const rowItems = qItem.item; - const row = qrItem && qrItem.item ? qrItem : createEmptyQrGroup(qItem); - const rowQrItems = row.item; - - if (!rowItems || !rowQrItems) { - return null; - } - - function handleQrRowItemChange(newQrRowItem: QuestionnaireResponseItem) { - const qrRow: QuestionnaireResponseItem = { ...row }; - updateQrItemsInGroup(newQrRowItem, null, qrRow, qItemsIndexMap); - onQrItemChange(qrRow); - } - - const qrItemsByIndex = getQrItemsIndex(rowItems, rowQrItems, qItemsIndexMap); +function GroupTableRow(props: GroupTableRowProps) { + const { + nanoId, + index, + tableQItem, + answeredQrItem, + nullableQrItem, + readOnly, + hoverDisabled, + tableRows, + itemIsSelected, + qItemsIndexMap, + showMinimalView, + parentIsReadOnly, + onRowChange, + onRemoveRow, + onSelectRow + } = props; return ( - <> - {rowItems.map((rowItem, index) => { - const qrItem = qrItemsByIndex[index]; - - if (Array.isArray(qrItem)) { - return null; - } - - return ( - - + {(draggableProvided, snapshot) => ( + + {showMinimalView ? null : ( + <> + + + + + + onSelectRow(nanoId)} + /> + + )} + onRowChange(newQrGroup, index)} + /> + {showMinimalView ? null : ( + onRemoveRow(index)} /> - - ); - })} - + )} + + )} + ); } diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRowCells.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRowCells.tsx new file mode 100644 index 000000000..413a316bd --- /dev/null +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRowCells.tsx @@ -0,0 +1,87 @@ +/* + * Copyright 2023 Commonwealth Scientific and Industrial Research + * Organisation (CSIRO) ABN 41 687 119 230. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; +import { createEmptyQrGroup, updateQrItemsInGroup } from '../../../utils/qrItem'; +import SingleItem from '../SingleItem/SingleItem'; +import { getQrItemsIndex } from '../../../utils/mapItem'; +import { StandardTableCell } from './Table.styles'; +import type { + PropsWithParentIsReadOnlyAttribute, + PropsWithQrItemChangeHandler +} from '../../../interfaces/renderProps.interface'; +import { TableRowProps } from '@mui/material/TableRow'; + +interface GroupTableRowCellsProps + extends PropsWithQrItemChangeHandler, + PropsWithParentIsReadOnlyAttribute, + TableRowProps { + qItem: QuestionnaireItem; + qrItem: QuestionnaireResponseItem | null; + qItemsIndexMap: Record; +} + +function GroupTableRowCells(props: GroupTableRowCellsProps) { + const { qItem, qrItem, qItemsIndexMap, parentIsReadOnly, onQrItemChange, ...tableRowProps } = + props; + + const rowItems = qItem.item; + const row = qrItem && qrItem.item ? qrItem : createEmptyQrGroup(qItem); + const rowQrItems = row.item; + + if (!rowItems || !rowQrItems) { + return null; + } + + function handleQrRowItemChange(newQrRowItem: QuestionnaireResponseItem) { + const qrRow: QuestionnaireResponseItem = { ...row }; + updateQrItemsInGroup(newQrRowItem, null, qrRow, qItemsIndexMap); + onQrItemChange(qrRow); + } + + const qrItemsByIndex = getQrItemsIndex(rowItems, rowQrItems, qItemsIndexMap); + + return ( + <> + {rowItems.map((rowItem, index) => { + const qrItem = qrItemsByIndex[index]; + + if (Array.isArray(qrItem)) { + return null; + } + + return ( + + + + ); + })} + + ); +} + +export default GroupTableRowCells; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableView.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableView.tsx new file mode 100644 index 000000000..acad10cee --- /dev/null +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableView.tsx @@ -0,0 +1,169 @@ +/* + * Copyright 2023 Commonwealth Scientific and Industrial Research + * Organisation (CSIRO) ABN 41 687 119 230. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { QGroupContainerBox } from '../../Box.styles'; +import TableContainer from '@mui/material/TableContainer'; +import Paper from '@mui/material/Paper'; +import Table from '@mui/material/Table'; +import TableHead from '@mui/material/TableHead'; +import TableRow from '@mui/material/TableRow'; +import { HeaderTableCell } from './Table.styles'; +import TableCell from '@mui/material/TableCell'; +import TableBody from '@mui/material/TableBody'; +import Typography from '@mui/material/Typography'; +import LabelWrapper from '../ItemParts/ItemLabelWrapper'; +import Divider from '@mui/material/Divider'; +import AddRowButton from './AddRowButton'; +import { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; +import { + PropsWithParentIsReadOnlyAttribute, + PropsWithShowMinimalViewAttribute +} from '../../../interfaces/renderProps.interface'; +import { GroupTableRowModel } from '../../../interfaces/groupTable.interface'; +import GroupTableBody from './GroupTableBody'; +import Checkbox from '@mui/material/Checkbox'; + +interface GroupTableViewProps + extends PropsWithShowMinimalViewAttribute, + PropsWithParentIsReadOnlyAttribute { + qItem: QuestionnaireItem; + qItemsIndexMap: Record; + groupCardElevation: number; + readOnly: boolean; + tableRows: GroupTableRowModel[]; + selectedIds: string[]; + itemLabels: string[]; + onAddRow: () => void; + onRowChange: (newQrRow: QuestionnaireResponseItem, index: number) => void; + onRemoveRow: (index: number) => void; + onSelectRow: (nanoId: string) => void; + onSelectAll: () => void; + onReorderRows: (newTableRows: GroupTableRowModel[]) => void; +} + +function GroupTableView(props: GroupTableViewProps) { + const { + qItem, + qItemsIndexMap, + groupCardElevation, + readOnly, + tableRows, + selectedIds, + itemLabels, + showMinimalView, + parentIsReadOnly, + onAddRow, + onRowChange, + onRemoveRow, + onSelectRow, + onSelectAll, + onReorderRows + } = props; + + if (showMinimalView) { + return ( + + + + + + {itemLabels.map((itemLabel) => ( + + {itemLabel} + + ))} + + + + + + +
+
+
+ ); + } + + return ( + + {groupCardElevation !== 1 ? ( + <> + + + + + + ) : null} + + + + + + + + 0 && selectedIds.length < tableRows.length} + checked={tableRows.length > 0 && selectedIds.length === tableRows.length} + onChange={onSelectAll} + /> + + {itemLabels.map((itemLabel) => ( + {itemLabel} + ))} + + + + +
+ +
+
+
+ ); +} + +export default GroupTableView; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/RemoveRowButton.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/RemoveRowButton.tsx index 2d8cc9e15..71a7d78df 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Tables/RemoveRowButton.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/RemoveRowButton.tsx @@ -27,18 +27,18 @@ interface RemoveRowButtonProps { nullableQrItem: QuestionnaireResponseItem | null; numOfRows: number; readOnly: boolean; - onDeleteItem: () => void; + onRemoveItem: () => void; } function RemoveRowButton(props: RemoveRowButtonProps) { - const { nullableQrItem, numOfRows, readOnly, onDeleteItem } = props; + const { nullableQrItem, numOfRows, readOnly, onRemoveItem } = props; const isDisabled = nullableQrItem === null || numOfRows === 1 || readOnly; return ( - + diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/SelectRowButton.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/SelectRowButton.tsx new file mode 100644 index 000000000..d66ee196c --- /dev/null +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/SelectRowButton.tsx @@ -0,0 +1,37 @@ +/* + * Copyright 2023 Commonwealth Scientific and Industrial Research + * Organisation (CSIRO) ABN 41 687 119 230. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import Checkbox from '@mui/material/Checkbox'; +import TableCell from '@mui/material/TableCell'; + +interface SelectRowButtonProps { + isSelected: boolean; + onSelectItem: () => void; +} + +function SelectRowButton(props: SelectRowButtonProps) { + const { isSelected, onSelectItem } = props; + + return ( + + + + ); +} + +export default SelectRowButton; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/Table.styles.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/Table.styles.tsx index 5f53fa0a1..a46cf824f 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Tables/Table.styles.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/Table.styles.tsx @@ -17,6 +17,8 @@ import { styled } from '@mui/material/styles'; import TableCell from '@mui/material/TableCell'; +import TableRow from '@mui/material/TableRow'; +import { grey } from '@mui/material/colors'; export const HeaderTableCell = styled(TableCell)(() => ({ fontSize: 13, @@ -50,3 +52,26 @@ export const GridAnswerTableCell = styled(TableCell, { paddingLeft: 5, paddingRight: 5 })); + +export const StyledGroupTableRow = styled(TableRow, { + shouldForwardProp: (prop) => + prop !== 'itemIsDragged' && prop !== 'itemIsSelected' && prop !== 'hoverDisabled' +})<{ itemIsDragged: boolean; itemIsSelected: boolean; hoverDisabled: boolean }>( + ({ theme, itemIsDragged, itemIsSelected, hoverDisabled }) => ({ + backgroundColor: itemIsSelected ? '#f4f8ff' : '#fff', + ...(hoverDisabled + ? {} + : { + '&.MuiTableRow-root:hover': { + backgroundColor: itemIsSelected ? '#e9f1ff' : grey['50'] + } + }), + ...(itemIsDragged + ? { + boxShadow: theme.customShadows.z8, + opacity: 1, + backgroundColor: itemIsSelected ? '#edf4ff' : '#fafafa' + } + : {}) + }) +); diff --git a/packages/smart-forms-renderer/src/hooks/useInitialiseGroupTable.ts b/packages/smart-forms-renderer/src/hooks/useInitialiseGroupTable.ts index 8ad49b55b..a6d102d0c 100644 --- a/packages/smart-forms-renderer/src/hooks/useInitialiseGroupTable.ts +++ b/packages/smart-forms-renderer/src/hooks/useInitialiseGroupTable.ts @@ -17,10 +17,10 @@ import type { QuestionnaireResponseItem } from 'fhir/r4'; import { nanoid } from 'nanoid'; -import type { GroupTableRow } from '../interfaces/groupTable.interface'; +import type { GroupTableRowModel } from '../interfaces/groupTable.interface'; -function useInitialiseGroupTable(qrItems: QuestionnaireResponseItem[]): GroupTableRow[] { - let initialGroupTableRows: GroupTableRow[] = [ +function useInitialiseGroupTable(qrItems: QuestionnaireResponseItem[]): GroupTableRowModel[] { + let initialGroupTableRows: GroupTableRowModel[] = [ { nanoId: nanoid(), qrItem: null diff --git a/packages/smart-forms-renderer/src/interfaces/groupTable.interface.ts b/packages/smart-forms-renderer/src/interfaces/groupTable.interface.ts index cf2663901..20550a173 100644 --- a/packages/smart-forms-renderer/src/interfaces/groupTable.interface.ts +++ b/packages/smart-forms-renderer/src/interfaces/groupTable.interface.ts @@ -17,7 +17,7 @@ import type { QuestionnaireResponseItem } from 'fhir/r4'; -export interface GroupTableRow { +export interface GroupTableRowModel { nanoId: string; qrItem: QuestionnaireResponseItem | null; } diff --git a/packages/smart-forms-renderer/src/stories/MedicalHistoryTable.stories.tsx b/packages/smart-forms-renderer/src/stories/MedicalHistoryTable.stories.tsx index 9397ddb32..ded4068d5 100644 --- a/packages/smart-forms-renderer/src/stories/MedicalHistoryTable.stories.tsx +++ b/packages/smart-forms-renderer/src/stories/MedicalHistoryTable.stories.tsx @@ -15,11 +15,15 @@ * limitations under the License. */ +import ThemeProvider from '../theme/Theme'; import type { Meta, StoryObj } from '@storybook/react'; import { GroupTable } from '../components'; -import GTableMedicalHistoryJson from './assets/GTableMedicalHistory.json'; -import { QuestionnaireItem } from 'fhir/r4'; +import GTableMedicalHistoryItemJson from './assets/QItems-and-QRItems/Q_GTableMedicalHistory.json'; +import GTableMedicalHistoryAnswersJson from './assets/QItems-and-QRItems/QR_GTableMedicalHistory.json'; +import { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { HTML5Backend } from 'react-dnd-html5-backend'; +import { DndProvider } from 'react-dnd'; // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export const meta = { @@ -28,11 +32,18 @@ const meta = { // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs tags: [], decorators: [ - (Story) => {Story()} + (Story) => ( + + + {Story()} + + + ) ] } satisfies Meta; -const GTableMedicalHistory = GTableMedicalHistoryJson as QuestionnaireItem; +const GTableMedicalHistoryItem = GTableMedicalHistoryItemJson as QuestionnaireItem; +const GTableMedicalHistoryAnswers = GTableMedicalHistoryAnswersJson as QuestionnaireResponseItem[]; export default meta; type Story = StoryObj; @@ -41,8 +52,8 @@ type Story = StoryObj; export const MedicalHistoryTable: Story = { args: { - qItem: GTableMedicalHistory, - qrItems: [], + qItem: GTableMedicalHistoryItem, + qrItems: GTableMedicalHistoryAnswers, groupCardElevation: 1, parentIsReadOnly: false, onQrRepeatGroupChange: () => {} diff --git a/packages/smart-forms-renderer/src/stories/SmartFormsRenderer.stories.ts b/packages/smart-forms-renderer/src/stories/SmartFormsRenderer.stories.ts index 5e31c9b30..fcea9f0bb 100644 --- a/packages/smart-forms-renderer/src/stories/SmartFormsRenderer.stories.ts +++ b/packages/smart-forms-renderer/src/stories/SmartFormsRenderer.stories.ts @@ -18,11 +18,11 @@ import type { Meta, StoryObj } from '@storybook/react'; import { SmartFormsRenderer } from '../components'; import type { Questionnaire, QuestionnaireResponse } from 'fhir/r4'; -import Q715Json from './assets/Q715.json'; -import R715Json from './assets/R715.json'; -import QTestGridJson from './assets/QTestGrid.json'; -import RTestGridJson from './assets/RTestGrid.json'; -import QDev715Json from './assets/QDev715.json'; +import Q715Json from './assets/Qs-and-QRs/Q715.json'; +import R715Json from './assets/Qs-and-QRs/R715.json'; +import QTestGridJson from './assets/Qs-and-QRs/QTestGrid.json'; +import RTestGridJson from './assets/Qs-and-QRs/RTestGrid.json'; +import QDev715Json from './assets/Qs-and-QRs/QDev715.json'; // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export const meta = { diff --git a/packages/smart-forms-renderer/src/stories/assets/QItems-and-QRItems/QR_GTableMedicalHistory.json b/packages/smart-forms-renderer/src/stories/assets/QItems-and-QRItems/QR_GTableMedicalHistory.json new file mode 100644 index 000000000..cbd292216 --- /dev/null +++ b/packages/smart-forms-renderer/src/stories/assets/QItems-and-QRItems/QR_GTableMedicalHistory.json @@ -0,0 +1,80 @@ +[ + { + "linkId": "92bd7d05-9b5e-4cf9-900b-703f361dad9d", + "text": "Medical history and current problems list", + "item": [ + { + "linkId": "59b1900a-4f85-4a8c-b9cd-3fe2fd76f27e", + "text": "Condition", + "answer": [ + { + "valueString": "Large diffuse B-cell lymphoma of the brain" + } + ] + }, + { + "linkId": "88bcfad7-386b-4d87-b34b-2e50482e4d2c", + "text": "Clinical Status", + "answer": [ + { + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "active", + "display": "Active" + } + } + ] + }, + { + "linkId": "18b9e159-2ed7-4047-82b7-deb2a171de4f", + "text": "Recorded Date", + "answer": [ + { + "valueDate": "2021-02-01" + } + ] + } + ] + }, + { + "linkId": "92bd7d05-9b5e-4cf9-900b-703f361dad9d", + "text": "Medical history and current problems list", + "item": [ + { + "linkId": "59b1900a-4f85-4a8c-b9cd-3fe2fd76f27e", + "text": "Condition", + "answer": [ + { + "valueCoding": { + "system": "http://snomed.info/sct", + "code": "56731001", + "display": "Hypertonia" + } + } + ] + }, + { + "linkId": "88bcfad7-386b-4d87-b34b-2e50482e4d2c", + "text": "Clinical Status", + "answer": [ + { + "valueCoding": { + "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", + "code": "inactive", + "display": "Inactive" + } + } + ] + }, + { + "linkId": "18b9e159-2ed7-4047-82b7-deb2a171de4f", + "text": "Recorded Date", + "answer": [ + { + "valueDate": "2023-11-08" + } + ] + } + ] + } +] diff --git a/packages/smart-forms-renderer/src/stories/assets/GTableMedicalHistory.json b/packages/smart-forms-renderer/src/stories/assets/QItems-and-QRItems/Q_GTableMedicalHistory.json similarity index 97% rename from packages/smart-forms-renderer/src/stories/assets/GTableMedicalHistory.json rename to packages/smart-forms-renderer/src/stories/assets/QItems-and-QRItems/Q_GTableMedicalHistory.json index 9a6e2f5df..fa5e10f90 100644 --- a/packages/smart-forms-renderer/src/stories/assets/GTableMedicalHistory.json +++ b/packages/smart-forms-renderer/src/stories/assets/QItems-and-QRItems/Q_GTableMedicalHistory.json @@ -49,7 +49,7 @@ "linkId": "59b1900a-4f85-4a8c-b9cd-3fe2fd76f27e", "text": "Condition", "type": "open-choice", - "answerValueSet": "#MedicalHistory" + "answerValueSet": "https://smartforms.csiro.au/ig/ValueSet/MedicalHistory" }, { "extension": [ diff --git a/packages/smart-forms-renderer/src/stories/assets/Q715.json b/packages/smart-forms-renderer/src/stories/assets/Qs-and-QRs/Q715.json similarity index 100% rename from packages/smart-forms-renderer/src/stories/assets/Q715.json rename to packages/smart-forms-renderer/src/stories/assets/Qs-and-QRs/Q715.json diff --git a/packages/smart-forms-renderer/src/stories/assets/QDev715.json b/packages/smart-forms-renderer/src/stories/assets/Qs-and-QRs/QDev715.json similarity index 100% rename from packages/smart-forms-renderer/src/stories/assets/QDev715.json rename to packages/smart-forms-renderer/src/stories/assets/Qs-and-QRs/QDev715.json diff --git a/packages/smart-forms-renderer/src/stories/assets/QTestGrid.json b/packages/smart-forms-renderer/src/stories/assets/Qs-and-QRs/QTestGrid.json similarity index 100% rename from packages/smart-forms-renderer/src/stories/assets/QTestGrid.json rename to packages/smart-forms-renderer/src/stories/assets/Qs-and-QRs/QTestGrid.json diff --git a/packages/smart-forms-renderer/src/stories/assets/R715.json b/packages/smart-forms-renderer/src/stories/assets/Qs-and-QRs/R715.json similarity index 100% rename from packages/smart-forms-renderer/src/stories/assets/R715.json rename to packages/smart-forms-renderer/src/stories/assets/Qs-and-QRs/R715.json diff --git a/packages/smart-forms-renderer/src/stories/assets/RTestGrid.json b/packages/smart-forms-renderer/src/stories/assets/Qs-and-QRs/RTestGrid.json similarity index 100% rename from packages/smart-forms-renderer/src/stories/assets/RTestGrid.json rename to packages/smart-forms-renderer/src/stories/assets/Qs-and-QRs/RTestGrid.json diff --git a/packages/smart-forms-renderer/src/theme/overrides/Table.ts b/packages/smart-forms-renderer/src/theme/overrides/Table.ts index 623d80dbb..d31a69666 100644 --- a/packages/smart-forms-renderer/src/theme/overrides/Table.ts +++ b/packages/smart-forms-renderer/src/theme/overrides/Table.ts @@ -23,7 +23,8 @@ export default function Table(theme: Theme) { styleOverrides: { head: { color: theme.palette.text.secondary, - backgroundColor: theme.palette.customBackground.neutral + backgroundColor: theme.palette.customBackground.neutral, + borderBottom: '1px solid #e5e7eb' } } } diff --git a/packages/smart-forms-renderer/src/utils/groupTable.ts b/packages/smart-forms-renderer/src/utils/groupTable.ts new file mode 100644 index 000000000..1886696a6 --- /dev/null +++ b/packages/smart-forms-renderer/src/utils/groupTable.ts @@ -0,0 +1,37 @@ +/* + * Copyright 2023 Commonwealth Scientific and Industrial Research + * Organisation (CSIRO) ABN 41 687 119 230. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GroupTableRowModel } from '../interfaces/groupTable.interface'; +import cloneDeep from 'lodash.clonedeep'; + +export function reorderRows( + rows: GroupTableRowModel[], + sourceIndex: number, + destinationIndex: number +) { + const result = Array.from(rows); + const [removed] = result.splice(sourceIndex, 1); + result.splice(destinationIndex, 0, removed); + + return result; +} + +export function getGroupTableItemsToUpdate(tableRows: GroupTableRowModel[], selectedIds: string[]) { + return tableRows + .filter((row) => selectedIds.includes(row.nanoId)) + .flatMap((singleRow) => (singleRow.qrItem ? [cloneDeep(singleRow.qrItem)] : [])); +} From 45402aa5b30ce4634c73bedc23512c589d676a23 Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Sat, 25 Nov 2023 23:05:51 +1030 Subject: [PATCH 04/12] Use vanilla store for state stores --- .../Popovers/QuestionnairePopoverMenu.tsx | 2 +- .../prepopulate/hooks/usePopulate.tsx | 17 +++---- .../FormPage/FormRenderer/FormWrapper.tsx | 4 +- .../FormPreviewPage/FormPreview.tsx | 4 +- .../RendererSaveAsFinalDialog.tsx | 9 ++-- .../RendererActions/RepopulateAction.tsx | 4 +- .../RendererActions/SaveAsFinalAction.tsx | 4 +- .../RendererActions/SaveProgressAction.tsx | 11 ++--- .../RendererDebugFooter/RendererDebugBar.tsx | 6 +-- .../RendererDebugFooter.tsx | 11 ++--- ...ererEmbeddedLaunchQuestionnaireActions.tsx | 2 +- .../RendererEmbeddedStandardActions.tsx | 2 +- .../RendererHeader/RendererHeader.tsx | 2 +- .../RendererHeader/UpdatingIndicator.tsx | 2 +- .../renderer/components/RendererLayout.tsx | 2 +- .../RendererNav/BlockerUnsavedFormDialog.tsx | 9 ++-- .../RendererNavLaunchQuestionnaireActions.tsx | 2 +- .../RendererNavStandardActions.tsx | 2 +- .../src/features/renderer/hooks/useBlocker.ts | 2 +- .../components/RepopulateSelectDialog.tsx | 9 ++-- .../components/Authorisation.tsx | 2 +- .../tokenTimer/components/AutoSaveDialog.tsx | 9 ++-- .../components/TokenTimerDialog.tsx | 9 ++-- .../src/features/viewer/ResponsePreview.tsx | 4 +- .../SaveAsFinal/ViewerSaveAsFinalDialog.tsx | 10 ++-- .../features/viewer/ViewerNav/ViewerNav.tsx | 4 +- .../ViewerNav/ViewerOperationSection.tsx | 2 +- .../src/hooks/useSmartClient.ts | 8 ++-- .../GroupItem/NextTabButtonWrapper.tsx | 10 ++-- .../FormComponents/SingleItem/SingleItem.tsx | 4 +- .../src/components/Renderer/BaseRenderer.tsx | 12 ++--- .../Renderer/FormBodyCollapsible.tsx | 9 ++-- .../components/Renderer/FormBodyTabbed.tsx | 6 +-- .../src/components/Tabs/CompleteTabButton.tsx | 4 +- .../src/components/Tabs/FormBodySingleTab.tsx | 5 +- .../src/components/Tabs/FormBodyTabList.tsx | 8 ++-- .../hooks/useDecimalCalculatedExpression.ts | 4 +- .../src/hooks/useHidden.ts | 8 ++-- .../src/hooks/useInitialiseRenderer.ts | 35 +++++++------- .../hooks/useIntegerCalculatedExpression.ts | 4 +- .../hooks/useStringCalculatedExpression.ts | 4 +- .../src/hooks/useTerminologyServerQuery.ts | 7 ++- .../src/hooks/useValueSetCodings.ts | 22 ++++----- packages/smart-forms-renderer/src/index.ts | 40 ++++++++-------- .../smart-forms-renderer/src/stores/index.ts | 7 +-- ...Store.ts => questionnaireResponseStore.ts} | 26 ++++++++-- ...ionnaireStore.ts => questionnaireStore.ts} | 13 +++-- .../src/stores/selector.ts | 16 +++++++ .../src/stores/smartConfigStore.ts | 47 +++++++++++++++++++ ...rverStore.ts => terminologyServerStore.ts} | 9 ++-- .../src/stores/useSmartConfigStore.ts | 27 ----------- 51 files changed, 262 insertions(+), 219 deletions(-) rename packages/smart-forms-renderer/src/stores/{useQuestionnaireResponseStore.ts => questionnaireResponseStore.ts} (70%) rename packages/smart-forms-renderer/src/stores/{useQuestionnaireStore.ts => questionnaireStore.ts} (95%) create mode 100644 packages/smart-forms-renderer/src/stores/selector.ts create mode 100644 packages/smart-forms-renderer/src/stores/smartConfigStore.ts rename packages/smart-forms-renderer/src/stores/{useTerminologyServerStore.ts => terminologyServerStore.ts} (76%) delete mode 100644 packages/smart-forms-renderer/src/stores/useSmartConfigStore.ts diff --git a/apps/smart-forms-app/src/components/Header/Popovers/QuestionnairePopoverMenu.tsx b/apps/smart-forms-app/src/components/Header/Popovers/QuestionnairePopoverMenu.tsx index 06f9219f4..92c223ab1 100644 --- a/apps/smart-forms-app/src/components/Header/Popovers/QuestionnairePopoverMenu.tsx +++ b/apps/smart-forms-app/src/components/Header/Popovers/QuestionnairePopoverMenu.tsx @@ -20,7 +20,7 @@ import { PopoverMenuWrapper } from './Popover.styles.ts'; import { useQuestionnaireStore } from '@aehrc/smart-forms-renderer'; function QuestionnairePopoverMenu() { - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); return ( diff --git a/apps/smart-forms-app/src/features/prepopulate/hooks/usePopulate.tsx b/apps/smart-forms-app/src/features/prepopulate/hooks/usePopulate.tsx index 53c2fe3af..c5c66306d 100644 --- a/apps/smart-forms-app/src/features/prepopulate/hooks/usePopulate.tsx +++ b/apps/smart-forms-app/src/features/prepopulate/hooks/usePopulate.tsx @@ -28,19 +28,16 @@ function usePopulate(spinner: RendererSpinner, onStopSpinner: () => void): void const { smartClient, patient, user, encounter } = useSmartClient(); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const sourceResponse = useQuestionnaireResponseStore((state) => state.sourceResponse); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const sourceResponse = useQuestionnaireResponseStore.use.sourceResponse(); - const fhirPathContext = useQuestionnaireStore((state) => state.fhirPathContext); + const fhirPathContext = useQuestionnaireStore.use.fhirPathContext(); - const updatePopulatedProperties = useQuestionnaireStore( - (state) => state.updatePopulatedProperties - ); + const updatePopulatedProperties = useQuestionnaireStore.use.updatePopulatedProperties(); - const setUpdatableResponseAsPopulated = useQuestionnaireResponseStore( - (state) => state.setUpdatableResponseAsPopulated - ); - const formChangesHistory = useQuestionnaireResponseStore((state) => state.formChangesHistory); + const setUpdatableResponseAsPopulated = + useQuestionnaireResponseStore.use.setUpdatableResponseAsPopulated(); + const formChangesHistory = useQuestionnaireResponseStore.use.formChangesHistory(); const [isPopulated, setIsPopulated] = useState(false); diff --git a/apps/smart-forms-app/src/features/renderer/components/FormPage/FormRenderer/FormWrapper.tsx b/apps/smart-forms-app/src/features/renderer/components/FormPage/FormRenderer/FormWrapper.tsx index 220ab21e2..c2fb19e06 100644 --- a/apps/smart-forms-app/src/features/renderer/components/FormPage/FormRenderer/FormWrapper.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/FormPage/FormRenderer/FormWrapper.tsx @@ -26,8 +26,8 @@ import { import useDebugMode from '../../../../../hooks/useDebugMode.ts'; function FormWrapper() { - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const updatableResponse = useQuestionnaireResponseStore((state) => state.updatableResponse); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const updatableResponse = useQuestionnaireResponseStore.use.updatableResponse(); const { debugModeEnabled } = useDebugMode(); diff --git a/apps/smart-forms-app/src/features/renderer/components/FormPreviewPage/FormPreview.tsx b/apps/smart-forms-app/src/features/renderer/components/FormPreviewPage/FormPreview.tsx index 6edffc360..a939b1c78 100644 --- a/apps/smart-forms-app/src/features/renderer/components/FormPreviewPage/FormPreview.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/FormPreviewPage/FormPreview.tsx @@ -28,8 +28,8 @@ import { } from '@aehrc/smart-forms-renderer'; function FormPreview() { - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const updatableResponse = useQuestionnaireResponseStore((state) => state.updatableResponse); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const updatableResponse = useQuestionnaireResponseStore.use.updatableResponse(); if (!sourceQuestionnaire.item || !updatableResponse.item) { return ; diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererActions/RendererSaveAsFinalDialog.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererActions/RendererSaveAsFinalDialog.tsx index 39efc38ce..a2fded358 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererActions/RendererSaveAsFinalDialog.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererActions/RendererSaveAsFinalDialog.tsx @@ -42,11 +42,10 @@ function RendererSaveAsFinalDialog(props: RendererSaveAsFinalDialogProps) { const { smartClient, patient, user, launchQuestionnaire } = useSmartClient(); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const updatableResponse = useQuestionnaireResponseStore((state) => state.updatableResponse); - const setUpdatableResponseAsSaved = useQuestionnaireResponseStore( - (state) => state.setUpdatableResponseAsSaved - ); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const updatableResponse = useQuestionnaireResponseStore.use.updatableResponse(); + const setUpdatableResponseAsSaved = + useQuestionnaireResponseStore.use.setUpdatableResponseAsSaved(); const [isSaving, setIsSaving] = useState(false); diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererActions/RepopulateAction.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererActions/RepopulateAction.tsx index f74cb2348..effffe261 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererActions/RepopulateAction.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererActions/RepopulateAction.tsx @@ -44,8 +44,8 @@ function RepopulateAction(props: RepopulateActionProps) { const [itemsToRepopulate, setItemsToRepopulate] = useState>({}); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const fhirPathContext = useQuestionnaireStore((state) => state.fhirPathContext); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const fhirPathContext = useQuestionnaireStore.use.fhirPathContext(); const { enqueueSnackbar, closeSnackbar } = useSnackbar(); diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererActions/SaveAsFinalAction.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererActions/SaveAsFinalAction.tsx index 315390e08..6b250f3f1 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererActions/SaveAsFinalAction.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererActions/SaveAsFinalAction.tsx @@ -35,8 +35,8 @@ function SaveAsFinalAction(props: SaveAsFinalActionProps) { const [saveAsFinalDialogOpen, setSaveAsFinalDialogOpen] = useState(false); - const updatableResponse = useQuestionnaireResponseStore((state) => state.updatableResponse); - const formChangesHistory = useQuestionnaireResponseStore((state) => state.formChangesHistory); + const updatableResponse = useQuestionnaireResponseStore.use.updatableResponse(); + const formChangesHistory = useQuestionnaireResponseStore.use.formChangesHistory(); function handleOpenDialog() { if (smartClient) { diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererActions/SaveProgressAction.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererActions/SaveProgressAction.tsx index 9e84f5c5d..4655649f2 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererActions/SaveProgressAction.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererActions/SaveProgressAction.tsx @@ -37,12 +37,11 @@ function SaveProgressAction(props: SaveProgressSpeedDialActionProps) { const { smartClient, patient, user, launchQuestionnaire } = useSmartClient(); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const updatableResponse = useQuestionnaireResponseStore((state) => state.updatableResponse); - const formChangesHistory = useQuestionnaireResponseStore((state) => state.formChangesHistory); - const setUpdatableResponseAsSaved = useQuestionnaireResponseStore( - (state) => state.setUpdatableResponseAsSaved - ); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const updatableResponse = useQuestionnaireResponseStore.use.updatableResponse(); + const formChangesHistory = useQuestionnaireResponseStore.use.formChangesHistory(); + const setUpdatableResponseAsSaved = + useQuestionnaireResponseStore.use.setUpdatableResponseAsSaved(); const { enqueueSnackbar, closeSnackbar } = useSnackbar(); diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererDebugFooter/RendererDebugBar.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererDebugFooter/RendererDebugBar.tsx index 26cd70628..74ae92f0d 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererDebugFooter/RendererDebugBar.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererDebugFooter/RendererDebugBar.tsx @@ -26,10 +26,8 @@ interface RendererDebugBarProps { function RendererDebugBar(props: RendererDebugBarProps) { const { isHidden, toggleIsHidden } = props; - const enableWhenIsActivated = useQuestionnaireStore((state) => state.enableWhenIsActivated); - const toggleEnableWhenActivation = useQuestionnaireStore( - (state) => state.toggleEnableWhenActivation - ); + const enableWhenIsActivated = useQuestionnaireStore.use.enableWhenIsActivated(); + const toggleEnableWhenActivation = useQuestionnaireStore.use.toggleEnableWhenActivation(); return ( diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererDebugFooter/RendererDebugFooter.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererDebugFooter/RendererDebugFooter.tsx index aa19f8997..8cd472c4f 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererDebugFooter/RendererDebugFooter.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererDebugFooter/RendererDebugFooter.tsx @@ -31,14 +31,13 @@ const clearTopLevelQRItem: QuestionnaireResponseItem = { function RendererDebugFooter() { const [isHidden, setIsHidden] = useState(true); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const updatableResponse = useQuestionnaireResponseStore((state) => state.updatableResponse); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const updatableResponse = useQuestionnaireResponseStore.use.updatableResponse(); - const fhirPathContext = useQuestionnaireStore((state) => state.fhirPathContext); + const fhirPathContext = useQuestionnaireStore.use.fhirPathContext(); - const setUpdatableResponseAsEmpty = useQuestionnaireResponseStore( - (state) => state.setUpdatableResponseAsEmpty - ); + const setUpdatableResponseAsEmpty = + useQuestionnaireResponseStore.use.setUpdatableResponseAsEmpty(); function handleClearExistingResponse() { if (!updatableResponse.item || updatableResponse.item.length === 0) { diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererEmbeddedSpeedDial/RendererEmbeddedLaunchQuestionnaireActions.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererEmbeddedSpeedDial/RendererEmbeddedLaunchQuestionnaireActions.tsx index 7a2e5b8f9..91786b6a0 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererEmbeddedSpeedDial/RendererEmbeddedLaunchQuestionnaireActions.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererEmbeddedSpeedDial/RendererEmbeddedLaunchQuestionnaireActions.tsx @@ -39,7 +39,7 @@ function RendererEmbeddedLaunchQuestionnaireActions( const { smartClient } = useSmartClient(); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); const { existingResponses, fetchError, refetchResponses } = useFetchExistingResponses(); diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererEmbeddedSpeedDial/RendererEmbeddedStandardActions.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererEmbeddedSpeedDial/RendererEmbeddedStandardActions.tsx index 1215f4431..3a75bdb65 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererEmbeddedSpeedDial/RendererEmbeddedStandardActions.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererEmbeddedSpeedDial/RendererEmbeddedStandardActions.tsx @@ -35,7 +35,7 @@ function RendererEmbeddedStandardActions(props: RendererEmbeddedStandardActionsP const { smartClient } = useSmartClient(); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); const showSaveAndRepopulateActions = smartClient && sourceQuestionnaire.item; diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererHeader/RendererHeader.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererHeader/RendererHeader.tsx index c54885038..74a88cb10 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererHeader/RendererHeader.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererHeader/RendererHeader.tsx @@ -36,7 +36,7 @@ interface RendererHeaderProps { const RendererHeader = memo(function RendererHeader(props: RendererHeaderProps) { const { desktopNavCollapsed, onOpenMobileNav } = props; - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); const theme = useTheme(); const isDesktop = useResponsive('up', 'lg'); diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererHeader/UpdatingIndicator.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererHeader/UpdatingIndicator.tsx index 9443251cb..987d34f9b 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererHeader/UpdatingIndicator.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererHeader/UpdatingIndicator.tsx @@ -21,7 +21,7 @@ import useResponsive from '../../../../hooks/useResponsive.ts'; import { useQuestionnaireResponseStore } from '@aehrc/smart-forms-renderer'; function UpdatingIndicator() { - const updatableResponse = useQuestionnaireResponseStore((state) => state.updatableResponse); + const updatableResponse = useQuestionnaireResponseStore.use.updatableResponse(); const [isUpdating, setIsUpdating] = useState(false); diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererLayout.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererLayout.tsx index 1bfc80a1b..000b30bbf 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererLayout.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererLayout.tsx @@ -40,7 +40,7 @@ import RepopulateBackdrop from '../../repopulate/components/RepopulateBackdrop.t function RendererLayout() { const { smartClient, patient, user } = useSmartClient(); - const sourceResponse = useQuestionnaireResponseStore((state) => state.sourceResponse); + const sourceResponse = useQuestionnaireResponseStore.use.sourceResponse(); const [mobileNavOpen, setMobileNavOpen] = useState(false); const [desktopNavCollapsed, setDesktopNavCollapsed] = useState(false); diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererNav/BlockerUnsavedFormDialog.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererNav/BlockerUnsavedFormDialog.tsx index c11d95608..4b755f090 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererNav/BlockerUnsavedFormDialog.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererNav/BlockerUnsavedFormDialog.tsx @@ -49,11 +49,10 @@ function BlockerUnsavedFormDialog(props: Props) { const [isSaving, setIsSaving] = useState(false); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const updatableResponse = useQuestionnaireResponseStore((state) => state.updatableResponse); - const setUpdatableResponseAsSaved = useQuestionnaireResponseStore( - (state) => state.setUpdatableResponseAsSaved - ); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const updatableResponse = useQuestionnaireResponseStore.use.updatableResponse(); + const setUpdatableResponseAsSaved = + useQuestionnaireResponseStore.use.setUpdatableResponseAsSaved(); const navigate = useNavigate(); const isLaunched = !!(smartClient && patient && user); diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererNav/RendererNavLaunchQuestionnaireActions.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererNav/RendererNavLaunchQuestionnaireActions.tsx index c726f46b5..26cc12dfe 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererNav/RendererNavLaunchQuestionnaireActions.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererNav/RendererNavLaunchQuestionnaireActions.tsx @@ -37,7 +37,7 @@ function RendererNavLaunchQuestionnaireActions(props: RendererNavLaunchQuestionn const { smartClient } = useSmartClient(); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); const { existingResponses, fetchError, refetchResponses } = useFetchExistingResponses(); diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererNav/RendererNavStandardActions.tsx b/apps/smart-forms-app/src/features/renderer/components/RendererNav/RendererNavStandardActions.tsx index b05fa7c60..ad6f85c38 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererNav/RendererNavStandardActions.tsx +++ b/apps/smart-forms-app/src/features/renderer/components/RendererNav/RendererNavStandardActions.tsx @@ -36,7 +36,7 @@ function RendererNavStandardActions(props: RendererNavStandardActionsProps) { const { smartClient } = useSmartClient(); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); return ( diff --git a/apps/smart-forms-app/src/features/renderer/hooks/useBlocker.ts b/apps/smart-forms-app/src/features/renderer/hooks/useBlocker.ts index a6ca00721..f9347e0dd 100644 --- a/apps/smart-forms-app/src/features/renderer/hooks/useBlocker.ts +++ b/apps/smart-forms-app/src/features/renderer/hooks/useBlocker.ts @@ -21,7 +21,7 @@ import { unstable_useBlocker as useBlocker } from 'react-router'; import { useQuestionnaireResponseStore } from '@aehrc/smart-forms-renderer'; function useLeavePageBlocker(): Blocker { - const formChangesHistory = useQuestionnaireResponseStore((state) => state.formChangesHistory); + const formChangesHistory = useQuestionnaireResponseStore.use.formChangesHistory(); const isBlocked = formChangesHistory.length > 0; const blocker = useBlocker(isBlocked); diff --git a/apps/smart-forms-app/src/features/repopulate/components/RepopulateSelectDialog.tsx b/apps/smart-forms-app/src/features/repopulate/components/RepopulateSelectDialog.tsx index 23a24882d..867e7e3a7 100644 --- a/apps/smart-forms-app/src/features/repopulate/components/RepopulateSelectDialog.tsx +++ b/apps/smart-forms-app/src/features/repopulate/components/RepopulateSelectDialog.tsx @@ -50,13 +50,10 @@ interface RepopulateSelectDialogProps { function RepopulateSelectDialog(props: RepopulateSelectDialogProps) { const { itemsToRepopulate, onCloseDialog, onSpinnerChange } = props; - const updatePopulatedProperties = useQuestionnaireStore( - (state) => state.updatePopulatedProperties - ); + const updatePopulatedProperties = useQuestionnaireStore.use.updatePopulatedProperties(); - const setUpdatableResponseAsPopulated = useQuestionnaireResponseStore( - (state) => state.setUpdatableResponseAsPopulated - ); + const setUpdatableResponseAsPopulated = + useQuestionnaireResponseStore.use.setUpdatableResponseAsPopulated(); const { linkIds, itemsToRepopulateTuplesByHeadings } = useMemo( () => getRepopulatedItemTuplesByHeadings(itemsToRepopulate), diff --git a/apps/smart-forms-app/src/features/smartAppLaunch/components/Authorisation.tsx b/apps/smart-forms-app/src/features/smartAppLaunch/components/Authorisation.tsx index 6b5eabd51..a475e7db4 100644 --- a/apps/smart-forms-app/src/features/smartAppLaunch/components/Authorisation.tsx +++ b/apps/smart-forms-app/src/features/smartAppLaunch/components/Authorisation.tsx @@ -72,7 +72,7 @@ function Authorisation() { const { setSmartClient, setCommonLaunchContexts, setQuestionnaireLaunchContext } = useSmartClient(); - const buildSourceQuestionnaire = useQuestionnaireStore((state) => state.buildSourceQuestionnaire); + const buildSourceQuestionnaire = useQuestionnaireStore.use.buildSourceQuestionnaire(); const { enqueueSnackbar } = useSnackbar(); const navigate = useNavigate(); diff --git a/apps/smart-forms-app/src/features/tokenTimer/components/AutoSaveDialog.tsx b/apps/smart-forms-app/src/features/tokenTimer/components/AutoSaveDialog.tsx index 1251e62d0..6f1adfb00 100644 --- a/apps/smart-forms-app/src/features/tokenTimer/components/AutoSaveDialog.tsx +++ b/apps/smart-forms-app/src/features/tokenTimer/components/AutoSaveDialog.tsx @@ -37,11 +37,10 @@ function AutoSaveDialog(props: AutoSaveDialogProps) { const { smartClient, patient, user } = useSmartClient(); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const updatableResponse = useQuestionnaireResponseStore((state) => state.updatableResponse); - const setUpdatableResponseAsSaved = useQuestionnaireResponseStore( - (state) => state.setUpdatableResponseAsSaved - ); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const updatableResponse = useQuestionnaireResponseStore.use.updatableResponse(); + const setUpdatableResponseAsSaved = + useQuestionnaireResponseStore.use.setUpdatableResponseAsSaved(); const { enqueueSnackbar, closeSnackbar } = useSnackbar(); diff --git a/apps/smart-forms-app/src/features/tokenTimer/components/TokenTimerDialog.tsx b/apps/smart-forms-app/src/features/tokenTimer/components/TokenTimerDialog.tsx index b3770e427..1a6e591fe 100644 --- a/apps/smart-forms-app/src/features/tokenTimer/components/TokenTimerDialog.tsx +++ b/apps/smart-forms-app/src/features/tokenTimer/components/TokenTimerDialog.tsx @@ -50,11 +50,10 @@ function TokenTimerDialog(props: TokenTimerDialogProps) { const { smartClient, patient, user, launchQuestionnaire } = useSmartClient(); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const updatableResponse = useQuestionnaireResponseStore((state) => state.updatableResponse); - const setUpdatableResponseAsSaved = useQuestionnaireResponseStore( - (state) => state.setUpdatableResponseAsSaved - ); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const updatableResponse = useQuestionnaireResponseStore.use.updatableResponse(); + const setUpdatableResponseAsSaved = + useQuestionnaireResponseStore.use.setUpdatableResponseAsSaved(); const [isSaving, setIsSaving] = useState(false); diff --git a/apps/smart-forms-app/src/features/viewer/ResponsePreview.tsx b/apps/smart-forms-app/src/features/viewer/ResponsePreview.tsx index b9ccf4c53..3dfab06ef 100644 --- a/apps/smart-forms-app/src/features/viewer/ResponsePreview.tsx +++ b/apps/smart-forms-app/src/features/viewer/ResponsePreview.tsx @@ -42,8 +42,8 @@ function ResponsePreview() { [] ); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const sourceResponse = useQuestionnaireResponseStore((state) => state.sourceResponse); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const sourceResponse = useQuestionnaireResponseStore.use.sourceResponse(); if (!sourceQuestionnaire.item || !sourceResponse.item) { return ; diff --git a/apps/smart-forms-app/src/features/viewer/ViewerNav/SaveAsFinal/ViewerSaveAsFinalDialog.tsx b/apps/smart-forms-app/src/features/viewer/ViewerNav/SaveAsFinal/ViewerSaveAsFinalDialog.tsx index c76ad0123..89e527bf3 100644 --- a/apps/smart-forms-app/src/features/viewer/ViewerNav/SaveAsFinal/ViewerSaveAsFinalDialog.tsx +++ b/apps/smart-forms-app/src/features/viewer/ViewerNav/SaveAsFinal/ViewerSaveAsFinalDialog.tsx @@ -43,11 +43,11 @@ function ViewerSaveAsFinalDialog(props: ViewerSaveAsFinalDialogProps) { const { smartClient, patient, user, launchQuestionnaire } = useSmartClient(); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const updatableResponse = useQuestionnaireResponseStore((state) => state.updatableResponse); - const setUpdatableResponseAsSaved = useQuestionnaireResponseStore( - (state) => state.setUpdatableResponseAsSaved - ); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const updatableResponse = useQuestionnaireResponseStore.use.updatableResponse(); + const setUpdatableResponseAsSaved = + useQuestionnaireResponseStore.use.setUpdatableResponseAsSaved(); + const [isSaving, setIsSaving] = useState(false); const navigate = useNavigate(); diff --git a/apps/smart-forms-app/src/features/viewer/ViewerNav/ViewerNav.tsx b/apps/smart-forms-app/src/features/viewer/ViewerNav/ViewerNav.tsx index f1728c62f..a22a82a75 100644 --- a/apps/smart-forms-app/src/features/viewer/ViewerNav/ViewerNav.tsx +++ b/apps/smart-forms-app/src/features/viewer/ViewerNav/ViewerNav.tsx @@ -41,8 +41,8 @@ function ViewerNav(props: Props) { const { smartClient, launchQuestionnaire } = useSmartClient(); - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const sourceResponse = useQuestionnaireResponseStore((state) => state.updatableResponse); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const sourceResponse = useQuestionnaireResponseStore.use.sourceResponse(); const isDesktop = useResponsive('up', 'lg'); diff --git a/apps/smart-forms-app/src/features/viewer/ViewerNav/ViewerOperationSection.tsx b/apps/smart-forms-app/src/features/viewer/ViewerNav/ViewerOperationSection.tsx index d5be2ad6a..8c2773d98 100644 --- a/apps/smart-forms-app/src/features/viewer/ViewerNav/ViewerOperationSection.tsx +++ b/apps/smart-forms-app/src/features/viewer/ViewerNav/ViewerOperationSection.tsx @@ -32,7 +32,7 @@ import { import { useQuestionnaireResponseStore } from '@aehrc/smart-forms-renderer'; function ViewerOperationSection() { - const sourceResponse = useQuestionnaireResponseStore((state) => state.sourceResponse); + const sourceResponse = useQuestionnaireResponseStore.use.sourceResponse(); const navigate = useNavigate(); diff --git a/apps/smart-forms-app/src/hooks/useSmartClient.ts b/apps/smart-forms-app/src/hooks/useSmartClient.ts index 8923c1772..afe9481a1 100644 --- a/apps/smart-forms-app/src/hooks/useSmartClient.ts +++ b/apps/smart-forms-app/src/hooks/useSmartClient.ts @@ -24,10 +24,10 @@ import type Client from 'fhirclient/lib/Client'; function useSmartClient() { const { state, dispatch } = useContext(SmartClientContext); - const setClient = useSmartConfigStore((state) => state.setClient); - const setPatient = useSmartConfigStore((state) => state.setPatient); - const setUser = useSmartConfigStore((state) => state.setUser); - const setEncounter = useSmartConfigStore((state) => state.setEncounter); + const setClient = useSmartConfigStore.use.setClient(); + const setPatient = useSmartConfigStore.use.setPatient(); + const setUser = useSmartConfigStore.use.setUser(); + const setEncounter = useSmartConfigStore.use.setEncounter(); function setSmartClient(client: Client) { dispatch({ diff --git a/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButtonWrapper.tsx b/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButtonWrapper.tsx index 21ae73660..e390b3cbc 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButtonWrapper.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButtonWrapper.tsx @@ -19,7 +19,7 @@ import React, { memo } from 'react'; import Box from '@mui/material/Box'; import { findNumOfVisibleTabs, getNextVisibleTabIndex } from '../../../utils/tabs'; import type { Tabs } from '../../../interfaces/tab.interface'; -import useQuestionnaireStore from '../../../stores/useQuestionnaireStore'; +import useQuestionnaireStore from '../../../stores/questionnaireStore'; import NextTabButton from './NextTabButton'; interface NextTabButtonWrapperProps { @@ -30,10 +30,10 @@ interface NextTabButtonWrapperProps { const NextTabButtonWrapper = memo(function NextTabWrapper(props: NextTabButtonWrapperProps) { const { currentTabIndex, tabs } = props; - const enableWhenIsActivated = useQuestionnaireStore((state) => state.enableWhenIsActivated); - const enableWhenItems = useQuestionnaireStore((state) => state.enableWhenItems); - const enableWhenExpressions = useQuestionnaireStore((state) => state.enableWhenExpressions); - const switchTab = useQuestionnaireStore((state) => state.switchTab); + const enableWhenIsActivated = useQuestionnaireStore.use.enableWhenIsActivated(); + const enableWhenItems = useQuestionnaireStore.use.enableWhenItems(); + const enableWhenExpressions = useQuestionnaireStore.use.enableWhenExpressions(); + const switchTab = useQuestionnaireStore.use.switchTab(); const tabsNotDefined = currentTabIndex === undefined || tabs === undefined; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/SingleItem/SingleItem.tsx b/packages/smart-forms-renderer/src/components/FormComponents/SingleItem/SingleItem.tsx index 6d918afd7..2c55eb3bf 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/SingleItem/SingleItem.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/SingleItem/SingleItem.tsx @@ -24,7 +24,7 @@ import type { PropsWithQrItemChangeHandler, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface'; -import useQuestionnaireStore from '../../../stores/useQuestionnaireStore'; +import useQuestionnaireStore from '../../../stores/questionnaireStore'; import SingleItemSwitcher from './SingleItemSwitcher'; import useHidden from '../../../hooks/useHidden'; import useReadOnly from '../../../hooks/useReadOnly'; @@ -43,7 +43,7 @@ function SingleItem(props: SingleItemProps) { const { qItem, qrItem, isRepeated, isTabled, showMinimalView, parentIsReadOnly, onQrItemChange } = props; - const updateEnableWhenItem = useQuestionnaireStore((state) => state.updateEnableWhenItem); + const updateEnableWhenItem = useQuestionnaireStore.use.updateEnableWhenItem(); const handleQrItemChange = useCallback( (newQrItem: QuestionnaireResponseItem) => { diff --git a/packages/smart-forms-renderer/src/components/Renderer/BaseRenderer.tsx b/packages/smart-forms-renderer/src/components/Renderer/BaseRenderer.tsx index 59700691e..854887fc4 100644 --- a/packages/smart-forms-renderer/src/components/Renderer/BaseRenderer.tsx +++ b/packages/smart-forms-renderer/src/components/Renderer/BaseRenderer.tsx @@ -20,18 +20,18 @@ import Container from '@mui/material/Container'; import Fade from '@mui/material/Fade'; import FormTopLevelItem from './FormTopLevelItem'; import type { QuestionnaireResponse, QuestionnaireResponseItem } from 'fhir/r4'; -import useQuestionnaireStore from '../../stores/useQuestionnaireStore'; -import useQuestionnaireResponseStore from '../../stores/useQuestionnaireResponseStore'; +import useQuestionnaireStore from '../../stores/questionnaireStore'; +import useQuestionnaireResponseStore from '../../stores/questionnaireResponseStore'; import cloneDeep from 'lodash.clonedeep'; import { getQrItemsIndex, mapQItemsIndex } from '../../utils/mapItem'; import { updateQrItemsInGroup } from '../../utils/qrItem'; import type { QrRepeatGroup } from '../../interfaces/repeatGroup.interface'; function BaseRenderer() { - const sourceQuestionnaire = useQuestionnaireStore((state) => state.sourceQuestionnaire); - const updateExpressions = useQuestionnaireStore((state) => state.updateExpressions); - const updatableResponse = useQuestionnaireResponseStore((state) => state.updatableResponse); - const updateResponse = useQuestionnaireResponseStore((state) => state.updateResponse); + const sourceQuestionnaire = useQuestionnaireStore.use.sourceQuestionnaire(); + const updateExpressions = useQuestionnaireStore.use.updateExpressions(); + const updatableResponse = useQuestionnaireResponseStore.use.updatableResponse(); + const updateResponse = useQuestionnaireResponseStore.use.updateResponse(); const qItemsIndexMap = useMemo(() => mapQItemsIndex(sourceQuestionnaire), [sourceQuestionnaire]); diff --git a/packages/smart-forms-renderer/src/components/Renderer/FormBodyCollapsible.tsx b/packages/smart-forms-renderer/src/components/Renderer/FormBodyCollapsible.tsx index cecbe2f8a..57633fe8b 100644 --- a/packages/smart-forms-renderer/src/components/Renderer/FormBodyCollapsible.tsx +++ b/packages/smart-forms-renderer/src/components/Renderer/FormBodyCollapsible.tsx @@ -21,7 +21,7 @@ import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { getQrItemsIndex, mapQItemsIndex } from '../../utils/mapItem'; import { createEmptyQrGroup, updateQrItemsInGroup } from '../../utils/qrItem'; import type { PropsWithQrItemChangeHandler } from '../../interfaces/renderProps.interface'; -import useQuestionnaireStore from '../../stores/useQuestionnaireStore'; +import useQuestionnaireStore from '../../stores/questionnaireStore'; import FormBodySingleCollapsibleWrapper from './FormBodySingleCollapsibleWrapper'; interface FormBodyCollapsibleProps extends PropsWithQrItemChangeHandler { @@ -32,10 +32,9 @@ interface FormBodyCollapsibleProps extends PropsWithQrItemChangeHandler { function FormBodyCollapsibleWrapper(props: FormBodyCollapsibleProps) { const { topLevelQItem, topLevelQRItem, onQrItemChange } = props; - const currentTab = useQuestionnaireStore((state) => state.currentTabIndex); - const tabs = useQuestionnaireStore((state) => state.tabs); - - const switchTab = useQuestionnaireStore((state) => state.switchTab); + const tabs = useQuestionnaireStore.use.tabs(); + const currentTab = useQuestionnaireStore.use.currentTabIndex(); + const switchTab = useQuestionnaireStore.use.switchTab(); const indexMap: Record = useMemo( () => mapQItemsIndex(topLevelQItem), diff --git a/packages/smart-forms-renderer/src/components/Renderer/FormBodyTabbed.tsx b/packages/smart-forms-renderer/src/components/Renderer/FormBodyTabbed.tsx index 7da32f8dd..0cf83450d 100644 --- a/packages/smart-forms-renderer/src/components/Renderer/FormBodyTabbed.tsx +++ b/packages/smart-forms-renderer/src/components/Renderer/FormBodyTabbed.tsx @@ -25,7 +25,7 @@ import GroupItem from '../FormComponents/GroupItem/GroupItem'; import { createEmptyQrGroup, updateQrItemsInGroup } from '../../utils/qrItem'; import FormBodyTabListWrapper from '../Tabs/FormBodyTabListWrapper'; import type { PropsWithQrItemChangeHandler } from '../../interfaces/renderProps.interface'; -import useQuestionnaireStore from '../../stores/useQuestionnaireStore'; +import useQuestionnaireStore from '../../stores/questionnaireStore'; interface FormBodyTabbedProps extends PropsWithQrItemChangeHandler { topLevelQItem: QuestionnaireItem; @@ -35,8 +35,8 @@ interface FormBodyTabbedProps extends PropsWithQrItemChangeHandler { function FormBodyTabbed(props: FormBodyTabbedProps) { const { topLevelQItem, topLevelQRItem, onQrItemChange } = props; - const tabs = useQuestionnaireStore((state) => state.tabs); - const currentTab = useQuestionnaireStore((state) => state.currentTabIndex); + const tabs = useQuestionnaireStore.use.tabs(); + const currentTab = useQuestionnaireStore.use.currentTabIndex(); const indexMap: Record = useMemo( () => mapQItemsIndex(topLevelQItem), diff --git a/packages/smart-forms-renderer/src/components/Tabs/CompleteTabButton.tsx b/packages/smart-forms-renderer/src/components/Tabs/CompleteTabButton.tsx index 9933b9706..a97656be8 100644 --- a/packages/smart-forms-renderer/src/components/Tabs/CompleteTabButton.tsx +++ b/packages/smart-forms-renderer/src/components/Tabs/CompleteTabButton.tsx @@ -19,7 +19,7 @@ import React, { memo } from 'react'; import IconButton from '@mui/material/IconButton'; import Tooltip from '@mui/material/Tooltip'; import CheckCircleIcon from '@mui/icons-material/CheckCircle'; -import useQuestionnaireStore from '../../stores/useQuestionnaireStore'; +import useQuestionnaireStore from '../../stores/questionnaireStore'; interface CompleteTabButtonProps { tabLinkId: string; @@ -29,7 +29,7 @@ interface CompleteTabButtonProps { const CompleteTabButton = memo(function CompleteTabButton(props: CompleteTabButtonProps) { const { tabLinkId, tabIsMarkedAsComplete } = props; - const markTabAsComplete = useQuestionnaireStore((state) => state.markTabAsComplete); + const markTabAsComplete = useQuestionnaireStore.use.markTabAsComplete(); return ( diff --git a/packages/smart-forms-renderer/src/components/Tabs/FormBodySingleTab.tsx b/packages/smart-forms-renderer/src/components/Tabs/FormBodySingleTab.tsx index 0423c2a67..513a64b23 100644 --- a/packages/smart-forms-renderer/src/components/Tabs/FormBodySingleTab.tsx +++ b/packages/smart-forms-renderer/src/components/Tabs/FormBodySingleTab.tsx @@ -20,8 +20,7 @@ import Box from '@mui/material/Box'; import ListItemButton from '@mui/material/ListItemButton'; import ListItemText from '@mui/material/ListItemText'; import Typography from '@mui/material/Typography'; - -import useQuestionnaireStore from '../../stores/useQuestionnaireStore'; +import useQuestionnaireStore from '../../stores/questionnaireStore'; import type { QuestionnaireItem } from 'fhir/r4'; import ContextDisplayItem from '../FormComponents/ItemParts/ContextDisplayItem'; @@ -35,7 +34,7 @@ interface FormBodySingleTabProps { const FormBodySingleTab = memo(function FormBodySingleTab(props: FormBodySingleTabProps) { const { contextDisplayItems, selected, tabLabel, listIndex } = props; - const switchTab = useQuestionnaireStore((state) => state.switchTab); + const switchTab = useQuestionnaireStore.use.switchTab(); function handleTabClick() { switchTab(listIndex); diff --git a/packages/smart-forms-renderer/src/components/Tabs/FormBodyTabList.tsx b/packages/smart-forms-renderer/src/components/Tabs/FormBodyTabList.tsx index 7dcdc0ce7..71198fc2a 100644 --- a/packages/smart-forms-renderer/src/components/Tabs/FormBodyTabList.tsx +++ b/packages/smart-forms-renderer/src/components/Tabs/FormBodyTabList.tsx @@ -22,7 +22,7 @@ import { getShortText } from '../../utils/itemControl'; import type { QuestionnaireItem } from 'fhir/r4'; import FormBodySingleTab from './FormBodySingleTab'; import type { Tabs } from '../../interfaces/tab.interface'; -import useQuestionnaireStore from '../../stores/useQuestionnaireStore'; +import useQuestionnaireStore from '../../stores/questionnaireStore'; import { isTabHidden } from '../../utils/tabs'; interface FormBodyTabListProps { @@ -37,9 +37,9 @@ const FormBodyTabList = memo(function FormBodyTabList(props: FormBodyTabListProp const { topLevelItems, currentTabIndex, tabs, completedTabsCollapsed, allContextDisplayItems } = props; - const enableWhenIsActivated = useQuestionnaireStore((state) => state.enableWhenIsActivated); - const enableWhenItems = useQuestionnaireStore((state) => state.enableWhenItems); - const enableWhenExpressions = useQuestionnaireStore((state) => state.enableWhenExpressions); + const enableWhenIsActivated = useQuestionnaireStore.use.enableWhenIsActivated(); + const enableWhenItems = useQuestionnaireStore.use.enableWhenItems(); + const enableWhenExpressions = useQuestionnaireStore.use.enableWhenExpressions(); return ( diff --git a/packages/smart-forms-renderer/src/hooks/useDecimalCalculatedExpression.ts b/packages/smart-forms-renderer/src/hooks/useDecimalCalculatedExpression.ts index c0bd328d7..b01c87b48 100644 --- a/packages/smart-forms-renderer/src/hooks/useDecimalCalculatedExpression.ts +++ b/packages/smart-forms-renderer/src/hooks/useDecimalCalculatedExpression.ts @@ -18,7 +18,7 @@ import { useEffect, useState } from 'react'; import { createEmptyQrItem } from '../utils/qrItem'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; -import useQuestionnaireStore from '../stores/useQuestionnaireStore'; +import useQuestionnaireStore from '../stores/questionnaireStore'; interface UseDecimalCalculatedExpression { calcExpUpdated: boolean; @@ -37,7 +37,7 @@ function useDecimalCalculatedExpression( ): UseDecimalCalculatedExpression { const { qItem, inputValue, precision, setInputValue, onQrItemChange } = props; - const calculatedExpressions = useQuestionnaireStore((state) => state.calculatedExpressions); + const calculatedExpressions = useQuestionnaireStore.use.calculatedExpressions(); const [calcExpUpdated, setCalcExpUpdated] = useState(false); diff --git a/packages/smart-forms-renderer/src/hooks/useHidden.ts b/packages/smart-forms-renderer/src/hooks/useHidden.ts index 61b4ae6b5..a409f35f2 100644 --- a/packages/smart-forms-renderer/src/hooks/useHidden.ts +++ b/packages/smart-forms-renderer/src/hooks/useHidden.ts @@ -17,13 +17,13 @@ import type { QuestionnaireItem } from 'fhir/r4'; import { hasHiddenExtension } from '../utils/itemControl'; -import useQuestionnaireStore from '../stores/useQuestionnaireStore'; +import useQuestionnaireStore from '../stores/questionnaireStore'; import { isHiddenByEnableWhens } from '../utils/qItem'; function useHidden(qItem: QuestionnaireItem): boolean { - const enableWhenIsActivated = useQuestionnaireStore((state) => state.enableWhenIsActivated); - const enableWhenItems = useQuestionnaireStore((state) => state.enableWhenItems); - const enableWhenExpressions = useQuestionnaireStore((state) => state.enableWhenExpressions); + const enableWhenIsActivated = useQuestionnaireStore.use.enableWhenIsActivated(); + const enableWhenItems = useQuestionnaireStore.use.enableWhenItems(); + const enableWhenExpressions = useQuestionnaireStore.use.enableWhenExpressions(); if (hasHiddenExtension(qItem)) { return true; diff --git a/packages/smart-forms-renderer/src/hooks/useInitialiseRenderer.ts b/packages/smart-forms-renderer/src/hooks/useInitialiseRenderer.ts index f712b204d..143a70f49 100644 --- a/packages/smart-forms-renderer/src/hooks/useInitialiseRenderer.ts +++ b/packages/smart-forms-renderer/src/hooks/useInitialiseRenderer.ts @@ -18,12 +18,14 @@ import type { Questionnaire, QuestionnaireResponse } from 'fhir/r4'; import { useLayoutEffect, useState } from 'react'; import { createEmptyQuestionnaireResponse } from '../utils/qrItem'; -import useQuestionnaireStore from '../stores/useQuestionnaireStore'; -import useQuestionnaireResponseStore from '../stores/useQuestionnaireResponseStore'; import type Client from 'fhirclient/lib/Client'; -import useSmartConfigStore from '../stores/useSmartConfigStore'; import { readEncounter, readPatient, readUser } from '../api/smartClient'; -import useTerminologyServerStore from '../stores/useTerminologyServerStore'; +import { + useQuestionnaireResponseStore, + useQuestionnaireStore, + useSmartConfigStore, + useTerminologyServerStore +} from '../stores'; function useInitialiseRenderer( questionnaire: Questionnaire, @@ -32,21 +34,18 @@ function useInitialiseRenderer( terminologyServerUrl?: string, fhirClient?: Client ): boolean { - const buildSourceQuestionnaire = useQuestionnaireStore((state) => state.buildSourceQuestionnaire); - const updatePopulatedProperties = useQuestionnaireStore( - (state) => state.updatePopulatedProperties - ); - const buildSourceResponse = useQuestionnaireResponseStore((state) => state.buildSourceResponse); - const setUpdatableResponseAsPopulated = useQuestionnaireResponseStore( - (state) => state.setUpdatableResponseAsPopulated - ); + const buildSourceQuestionnaire = useQuestionnaireStore.use.buildSourceQuestionnaire(); + const updatePopulatedProperties = useQuestionnaireStore.use.updatePopulatedProperties(); + const buildSourceResponse = useQuestionnaireResponseStore.use.buildSourceResponse(); + const setUpdatableResponseAsPopulated = + useQuestionnaireResponseStore.use.setUpdatableResponseAsPopulated(); - const setTerminologyServerUrl = useTerminologyServerStore((state) => state.setUrl); - const resetTerminologyServerUrl = useTerminologyServerStore((state) => state.resetUrl); - const setSmartClient = useSmartConfigStore((state) => state.setClient); - const setPatient = useSmartConfigStore((state) => state.setPatient); - const setUser = useSmartConfigStore((state) => state.setUser); - const setEncounter = useSmartConfigStore((state) => state.setEncounter); + const setTerminologyServerUrl = useTerminologyServerStore.use.setUrl(); + const resetTerminologyServerUrl = useTerminologyServerStore.use.resetUrl(); + const setSmartClient = useSmartConfigStore.use.setClient(); + const setPatient = useSmartConfigStore.use.setPatient(); + const setUser = useSmartConfigStore.use.setUser(); + const setEncounter = useSmartConfigStore.use.setEncounter(); const [loading, setLoading] = useState(true); diff --git a/packages/smart-forms-renderer/src/hooks/useIntegerCalculatedExpression.ts b/packages/smart-forms-renderer/src/hooks/useIntegerCalculatedExpression.ts index e8f057431..00e7a4c20 100644 --- a/packages/smart-forms-renderer/src/hooks/useIntegerCalculatedExpression.ts +++ b/packages/smart-forms-renderer/src/hooks/useIntegerCalculatedExpression.ts @@ -18,7 +18,7 @@ import { useEffect, useState } from 'react'; import { createEmptyQrItem } from '../utils/qrItem'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; -import useQuestionnaireStore from '../stores/useQuestionnaireStore'; +import useQuestionnaireStore from '../stores/questionnaireStore'; interface UseIntegerCalculatedExpression { calcExpUpdated: boolean; @@ -36,7 +36,7 @@ function useIntegerCalculatedExpression( ): UseIntegerCalculatedExpression { const { qItem, inputValue, setInputValue, onQrItemChange } = props; - const calculatedExpressions = useQuestionnaireStore((state) => state.calculatedExpressions); + const calculatedExpressions = useQuestionnaireStore.use.calculatedExpressions(); const [calcExpUpdated, setCalcExpUpdated] = useState(false); diff --git a/packages/smart-forms-renderer/src/hooks/useStringCalculatedExpression.ts b/packages/smart-forms-renderer/src/hooks/useStringCalculatedExpression.ts index 8f833b597..65c93b95d 100644 --- a/packages/smart-forms-renderer/src/hooks/useStringCalculatedExpression.ts +++ b/packages/smart-forms-renderer/src/hooks/useStringCalculatedExpression.ts @@ -18,7 +18,7 @@ import { useEffect, useState } from 'react'; import { createEmptyQrItem } from '../utils/qrItem'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; -import useQuestionnaireStore from '../stores/useQuestionnaireStore'; +import useQuestionnaireStore from '../stores/questionnaireStore'; interface UseStringCalculatedExpression { calcExpUpdated: boolean; @@ -36,7 +36,7 @@ function useStringCalculatedExpression( ): UseStringCalculatedExpression { const { qItem, inputValue, setInputValue, onQrItemChange } = props; - const calculatedExpressions = useQuestionnaireStore((state) => state.calculatedExpressions); + const calculatedExpressions = useQuestionnaireStore.use.calculatedExpressions(); const [calcExpUpdated, setCalcExpUpdated] = useState(false); diff --git a/packages/smart-forms-renderer/src/hooks/useTerminologyServerQuery.ts b/packages/smart-forms-renderer/src/hooks/useTerminologyServerQuery.ts index dfadd67ce..c678b9944 100644 --- a/packages/smart-forms-renderer/src/hooks/useTerminologyServerQuery.ts +++ b/packages/smart-forms-renderer/src/hooks/useTerminologyServerQuery.ts @@ -20,8 +20,7 @@ import type { Coding, QuestionnaireItem, ValueSet } from 'fhir/r4'; import { getTerminologyServerUrl, getValueSetCodings, getValueSetPromise } from '../utils/valueSet'; import type { AlertColor } from '@mui/material/Alert'; -import useQuestionnaireStore from '../stores/useQuestionnaireStore'; -import useTerminologyServerStore from '../stores/useTerminologyServerStore'; +import { useQuestionnaireStore, useTerminologyServerStore } from '../stores'; function useTerminologyServerQuery( qItem: QuestionnaireItem, @@ -29,8 +28,8 @@ function useTerminologyServerQuery( input: string, searchTerm: string ): { options: Coding[]; loading: boolean; feedback?: { message: string; color: AlertColor } } { - const processedValueSetUrls = useQuestionnaireStore((state) => state.processedValueSetUrls); - const defaultTerminologyServerUrl = useTerminologyServerStore((state) => state.url); + const processedValueSetUrls = useQuestionnaireStore.use.processedValueSetUrls(); + const defaultTerminologyServerUrl = useTerminologyServerStore.use.url(); let fullUrl = ''; let options: Coding[] = []; diff --git a/packages/smart-forms-renderer/src/hooks/useValueSetCodings.ts b/packages/smart-forms-renderer/src/hooks/useValueSetCodings.ts index e87800aa9..d0a36684b 100644 --- a/packages/smart-forms-renderer/src/hooks/useValueSetCodings.ts +++ b/packages/smart-forms-renderer/src/hooks/useValueSetCodings.ts @@ -26,22 +26,20 @@ import { import { getAnswerExpression } from '../utils/itemControl'; import fhirpath from 'fhirpath'; import fhirpath_r4_model from 'fhirpath/fhir-context/r4'; -import useSmartConfigStore from '../stores/useSmartConfigStore'; -import useQuestionnaireStore from '../stores/useQuestionnaireStore'; -import useTerminologyServerStore from '../stores/useTerminologyServerStore'; +import { useQuestionnaireStore, useSmartConfigStore, useTerminologyServerStore } from '../stores'; function useValueSetCodings(qItem: QuestionnaireItem) { - const patient = useSmartConfigStore((state) => state.patient); - const user = useSmartConfigStore((state) => state.user); - const encounter = useSmartConfigStore((state) => state.encounter); + const patient = useSmartConfigStore.use.patient(); + const user = useSmartConfigStore.use.user(); + const encounter = useSmartConfigStore.use.encounter(); - const launchContexts = useQuestionnaireStore((state) => state.launchContexts); - const processedValueSetCodings = useQuestionnaireStore((state) => state.processedValueSetCodings); - const cachedValueSetCodings = useQuestionnaireStore((state) => state.cachedValueSetCodings); - const addCodingToCache = useQuestionnaireStore((state) => state.addCodingToCache); - const { xFhirQueryVariables } = useQuestionnaireStore((state) => state.variables); + const launchContexts = useQuestionnaireStore.use.launchContexts(); + const processedValueSetCodings = useQuestionnaireStore.use.processedValueSetCodings(); + const cachedValueSetCodings = useQuestionnaireStore.use.cachedValueSetCodings(); + const addCodingToCache = useQuestionnaireStore.use.addCodingToCache(); + const { xFhirQueryVariables } = useQuestionnaireStore.use.variables(); - const defaultTerminologyServerUrl = useTerminologyServerStore((state) => state.url); + const defaultTerminologyServerUrl = useTerminologyServerStore.use.url(); const valueSetUrl = qItem.answerValueSet; let initialCodings = useMemo(() => { diff --git a/packages/smart-forms-renderer/src/index.ts b/packages/smart-forms-renderer/src/index.ts index 03a9b9c54..bb22fc4af 100644 --- a/packages/smart-forms-renderer/src/index.ts +++ b/packages/smart-forms-renderer/src/index.ts @@ -1,7 +1,7 @@ -import useQuestionnaireStore from './stores/useQuestionnaireStore'; +import questionnaireStore from './stores/questionnaireStore'; import type { Questionnaire, QuestionnaireResponse } from 'fhir/r4'; import { createEmptyQuestionnaireResponse } from './utils/qrItem'; -import useQuestionnaireResponseStore from './stores/useQuestionnaireResponseStore'; +import questionnaireResponseStore from './stores/questionnaireResponseStore'; import { removeHiddenAnswers } from './utils/removeHidden'; import type { ItemToRepopulate } from './utils/repopulateItems'; import { getItemsToRepopulate } from './utils/repopulateItems'; @@ -23,17 +23,17 @@ export async function buildForm( questionnaire: Questionnaire, questionnaireResponse?: QuestionnaireResponse ): Promise { - await useQuestionnaireStore.getState().buildSourceQuestionnaire(questionnaire); + await questionnaireStore.getState().buildSourceQuestionnaire(questionnaire); if (!questionnaireResponse) { - useQuestionnaireResponseStore + questionnaireResponseStore .getState() .buildSourceResponse(createEmptyQuestionnaireResponse(questionnaire)); return; } - useQuestionnaireResponseStore.getState().buildSourceResponse(questionnaireResponse); - useQuestionnaireStore.getState().updatePopulatedProperties(questionnaireResponse); + questionnaireResponseStore.getState().buildSourceResponse(questionnaireResponse); + questionnaireStore.getState().updatePopulatedProperties(questionnaireResponse); } /** @@ -42,8 +42,8 @@ export async function buildForm( * @author Sean Fong */ export function destroyForm(): void { - useQuestionnaireStore.getState().destroySourceQuestionnaire(); - useQuestionnaireResponseStore.getState().destroySourceResponse(); + questionnaireStore.getState().destroySourceQuestionnaire(); + questionnaireResponseStore.getState().destroySourceResponse(); } /** @@ -53,7 +53,7 @@ export function destroyForm(): void { * @author Sean Fong */ export function getResponse(): QuestionnaireResponse { - return useQuestionnaireResponseStore.getState().updatableResponse; + return questionnaireResponseStore.getState().updatableResponse; } /** @@ -66,9 +66,9 @@ export function removeHiddenAnswersFromResponse( questionnaire: Questionnaire, questionnaireResponse: QuestionnaireResponse ): QuestionnaireResponse { - const enableWhenIsActivated = useQuestionnaireStore.getState().enableWhenIsActivated; - const enableWhenItems = useQuestionnaireStore.getState().enableWhenItems; - const enableWhenExpressions = useQuestionnaireStore.getState().enableWhenExpressions; + const enableWhenIsActivated = questionnaireStore.getState().enableWhenIsActivated; + const enableWhenItems = questionnaireStore.getState().enableWhenItems; + const enableWhenExpressions = questionnaireStore.getState().enableWhenExpressions; return removeHiddenAnswers({ questionnaire, @@ -85,12 +85,12 @@ export function removeHiddenAnswersFromResponse( * @author Sean Fong */ export function generateItemsToRepopulate(populatedResponse: QuestionnaireResponse) { - const sourceQuestionnaire = useQuestionnaireStore.getState().sourceQuestionnaire; - const tabs = useQuestionnaireStore.getState().tabs; - const updatableResponse = useQuestionnaireResponseStore.getState().updatableResponse; - const enableWhenIsActivated = useQuestionnaireStore.getState().enableWhenIsActivated; - const enableWhenItems = useQuestionnaireStore.getState().enableWhenItems; - const enableWhenExpressions = useQuestionnaireStore.getState().enableWhenExpressions; + const sourceQuestionnaire = questionnaireStore.getState().sourceQuestionnaire; + const tabs = questionnaireStore.getState().tabs; + const updatableResponse = questionnaireResponseStore.getState().updatableResponse; + const enableWhenIsActivated = questionnaireStore.getState().enableWhenIsActivated; + const enableWhenItems = questionnaireStore.getState().enableWhenItems; + const enableWhenExpressions = questionnaireStore.getState().enableWhenExpressions; return getItemsToRepopulate({ sourceQuestionnaire, @@ -109,8 +109,8 @@ export function generateItemsToRepopulate(populatedResponse: QuestionnaireRespon * @author Sean Fong */ export function repopulateResponse(checkedItemsToRepopulate: Record) { - const sourceQuestionnaire = useQuestionnaireStore.getState().sourceQuestionnaire; - const updatableResponse = useQuestionnaireResponseStore.getState().updatableResponse; + const sourceQuestionnaire = questionnaireStore.getState().sourceQuestionnaire; + const updatableResponse = questionnaireResponseStore.getState().updatableResponse; return repopulateItemsIntoResponse( sourceQuestionnaire, diff --git a/packages/smart-forms-renderer/src/stores/index.ts b/packages/smart-forms-renderer/src/stores/index.ts index 95db8a0f1..80eb0cf5a 100644 --- a/packages/smart-forms-renderer/src/stores/index.ts +++ b/packages/smart-forms-renderer/src/stores/index.ts @@ -1,3 +1,4 @@ -export { default as useQuestionnaireStore } from './useQuestionnaireStore'; -export { default as useQuestionnaireResponseStore } from './useQuestionnaireResponseStore'; -export { default as useSmartConfigStore } from './useSmartConfigStore'; +export { default as useQuestionnaireStore } from './questionnaireStore'; +export { default as useQuestionnaireResponseStore } from './questionnaireResponseStore'; +export { default as useSmartConfigStore } from './smartConfigStore'; +export { default as useTerminologyServerStore } from './terminologyServerStore'; diff --git a/packages/smart-forms-renderer/src/stores/useQuestionnaireResponseStore.ts b/packages/smart-forms-renderer/src/stores/questionnaireResponseStore.ts similarity index 70% rename from packages/smart-forms-renderer/src/stores/useQuestionnaireResponseStore.ts rename to packages/smart-forms-renderer/src/stores/questionnaireResponseStore.ts index c031cdffd..16266ec46 100644 --- a/packages/smart-forms-renderer/src/stores/useQuestionnaireResponseStore.ts +++ b/packages/smart-forms-renderer/src/stores/questionnaireResponseStore.ts @@ -1,11 +1,29 @@ -import { create } from 'zustand'; +/* + * Copyright 2023 Commonwealth Scientific and Industrial Research + * Organisation (CSIRO) ABN 41 687 119 230. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { createStore } from 'zustand/vanilla'; import type { QuestionnaireResponse } from 'fhir/r4'; import { emptyResponse } from '../utils/emptyResource'; import cloneDeep from 'lodash.clonedeep'; import type { Diff } from 'deep-diff'; import { diff } from 'deep-diff'; +import { createSelectors } from './selector'; -export interface UseQuestionnaireResponseStoreType { +export interface QuestionnaireResponseStoreType { sourceResponse: QuestionnaireResponse; updatableResponse: QuestionnaireResponse; formChangesHistory: (Diff[] | null)[]; @@ -17,7 +35,7 @@ export interface UseQuestionnaireResponseStoreType { destroySourceResponse: () => void; } -const useQuestionnaireResponseStore = create()((set, get) => ({ +const questionnaireResponseStore = createStore()((set, get) => ({ sourceResponse: cloneDeep(emptyResponse), updatableResponse: cloneDeep(emptyResponse), formChangesHistory: [], @@ -60,4 +78,6 @@ const useQuestionnaireResponseStore = create( })) })); +const useQuestionnaireResponseStore = createSelectors(questionnaireResponseStore); + export default useQuestionnaireResponseStore; diff --git a/packages/smart-forms-renderer/src/stores/useQuestionnaireStore.ts b/packages/smart-forms-renderer/src/stores/questionnaireStore.ts similarity index 95% rename from packages/smart-forms-renderer/src/stores/useQuestionnaireStore.ts rename to packages/smart-forms-renderer/src/stores/questionnaireStore.ts index 78d6e5a98..c26a18f1e 100644 --- a/packages/smart-forms-renderer/src/stores/useQuestionnaireStore.ts +++ b/packages/smart-forms-renderer/src/stores/questionnaireStore.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { create } from 'zustand'; +import { createStore } from 'zustand/vanilla'; import type { Coding, Questionnaire, @@ -38,9 +38,10 @@ import { createQuestionnaireModel } from '../utils/questionnaireStoreUtils/creat import { initialiseFormFromResponse } from '../utils/initialiseForm'; import { emptyQuestionnaire, emptyResponse } from '../utils/emptyResource'; import cloneDeep from 'lodash.clonedeep'; -import useTerminologyServerStore from './useTerminologyServerStore'; +import terminologyServerStore from './terminologyServerStore'; +import { createSelectors } from './selector'; -export interface UseQuestionnaireStoreType { +export interface QuestionnaireStoreType { sourceQuestionnaire: Questionnaire; itemTypes: Record; tabs: Tabs; @@ -76,7 +77,7 @@ export interface UseQuestionnaireStoreType { ) => QuestionnaireResponse; } -const useQuestionnaireStore = create()((set, get) => ({ +const questionnaireStore = createStore()((set, get) => ({ sourceQuestionnaire: cloneDeep(emptyQuestionnaire), itemTypes: {}, tabs: {}, @@ -97,7 +98,7 @@ const useQuestionnaireStore = create()((set, get) => questionnaire, questionnaireResponse = cloneDeep(emptyResponse), additionalVariables = {}, - terminologyServerUrl = useTerminologyServerStore.getState().url + terminologyServerUrl = terminologyServerStore.getState().url ) => { const questionnaireModel = await createQuestionnaireModel( questionnaire, @@ -266,4 +267,6 @@ const useQuestionnaireStore = create()((set, get) => } })); +const useQuestionnaireStore = createSelectors(questionnaireStore); + export default useQuestionnaireStore; diff --git a/packages/smart-forms-renderer/src/stores/selector.ts b/packages/smart-forms-renderer/src/stores/selector.ts new file mode 100644 index 000000000..481b8cf7b --- /dev/null +++ b/packages/smart-forms-renderer/src/stores/selector.ts @@ -0,0 +1,16 @@ +import { StoreApi, useStore } from 'zustand'; + +type WithSelectors = S extends { getState: () => infer T } + ? S & { use: { [K in keyof T]: () => T[K] } } + : never; + +export const createSelectors = >(_store: S) => { + const store = _store as WithSelectors; + store.use = {}; + for (const k of Object.keys(store.getState())) { + // eslint-disable-next-line react-hooks/rules-of-hooks + (store.use as any)[k] = () => useStore(_store, (s) => s[k as keyof typeof s]); + } + + return store; +}; diff --git a/packages/smart-forms-renderer/src/stores/smartConfigStore.ts b/packages/smart-forms-renderer/src/stores/smartConfigStore.ts new file mode 100644 index 000000000..c02f8cb76 --- /dev/null +++ b/packages/smart-forms-renderer/src/stores/smartConfigStore.ts @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Commonwealth Scientific and Industrial Research + * Organisation (CSIRO) ABN 41 687 119 230. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { createStore } from 'zustand/vanilla'; +import type { Encounter, Patient, Practitioner } from 'fhir/r4'; +import type Client from 'fhirclient/lib/Client'; +import { createSelectors } from './selector'; + +export interface SmartConfigStoreType { + client: Client | null; + patient: Patient | null; + user: Practitioner | null; + encounter: Encounter | null; + setClient: (client: Client) => void; + setPatient: (patient: Patient) => void; + setUser: (user: Practitioner) => void; + setEncounter: (encounter: Encounter) => void; +} + +const smartConfigStore = createStore()((set) => ({ + client: null, + patient: null, + user: null, + encounter: null, + setClient: (client: Client) => set(() => ({ client: client })), + setPatient: (patient: Patient) => set(() => ({ patient: patient })), + setUser: (user: Practitioner) => set(() => ({ user: user })), + setEncounter: (encounter: Encounter) => set(() => ({ encounter: encounter })) +})); + +const useSmartConfigStore = createSelectors(smartConfigStore); + +export default useSmartConfigStore; diff --git a/packages/smart-forms-renderer/src/stores/useTerminologyServerStore.ts b/packages/smart-forms-renderer/src/stores/terminologyServerStore.ts similarity index 76% rename from packages/smart-forms-renderer/src/stores/useTerminologyServerStore.ts rename to packages/smart-forms-renderer/src/stores/terminologyServerStore.ts index bed8052e2..683047e01 100644 --- a/packages/smart-forms-renderer/src/stores/useTerminologyServerStore.ts +++ b/packages/smart-forms-renderer/src/stores/terminologyServerStore.ts @@ -15,20 +15,23 @@ * limitations under the License. */ -import { create } from 'zustand'; +import { createStore } from 'zustand/vanilla'; +import { createSelectors } from './selector'; const ONTOSERVER_R4 = 'https://r4.ontoserver.csiro.au/fhir'; -export interface UseTerminologyServerStoreType { +export interface TerminologyServerStoreType { url: string; setUrl: (newUrl: string) => void; resetUrl: () => void; } -const useTerminologyServerStore = create()((set) => ({ +const terminologyServerStore = createStore()((set) => ({ url: ONTOSERVER_R4, setUrl: (newUrl: string) => set(() => ({ url: newUrl })), resetUrl: () => set(() => ({ url: ONTOSERVER_R4 })) })); +const useTerminologyServerStore = createSelectors(terminologyServerStore); + export default useTerminologyServerStore; diff --git a/packages/smart-forms-renderer/src/stores/useSmartConfigStore.ts b/packages/smart-forms-renderer/src/stores/useSmartConfigStore.ts deleted file mode 100644 index a7cf465a6..000000000 --- a/packages/smart-forms-renderer/src/stores/useSmartConfigStore.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { create } from 'zustand'; -import type { Encounter, Patient, Practitioner } from 'fhir/r4'; -import type Client from 'fhirclient/lib/Client'; - -export interface UseSmartConfigStoreType { - client: Client | null; - patient: Patient | null; - user: Practitioner | null; - encounter: Encounter | null; - setClient: (client: Client) => void; - setPatient: (patient: Patient) => void; - setUser: (user: Practitioner) => void; - setEncounter: (encounter: Encounter) => void; -} - -const useSmartConfigStore = create()((set) => ({ - client: null, - patient: null, - user: null, - encounter: null, - setClient: (client: Client) => set(() => ({ client: client })), - setPatient: (patient: Patient) => set(() => ({ patient: patient })), - setUser: (user: Practitioner) => set(() => ({ user: user })), - setEncounter: (encounter: Encounter) => set(() => ({ encounter: encounter })) -})); - -export default useSmartConfigStore; From c0edb6e61ad9e712ca5fb46d191733caae7542bd Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Sat, 25 Nov 2023 23:18:51 +1030 Subject: [PATCH 05/12] Fix store exports --- .../GroupItem/NextTabButtonWrapper.tsx | 2 +- .../FormComponents/SingleItem/SingleItem.tsx | 2 +- .../src/components/Renderer/BaseRenderer.tsx | 3 +- .../Renderer/FormBodyCollapsible.tsx | 2 +- .../components/Renderer/FormBodyTabbed.tsx | 2 +- .../src/components/Tabs/CompleteTabButton.tsx | 2 +- .../src/components/Tabs/FormBodySingleTab.tsx | 2 +- .../src/components/Tabs/FormBodyTabList.tsx | 2 +- .../hooks/useDecimalCalculatedExpression.ts | 2 +- .../src/hooks/useHidden.ts | 2 +- .../hooks/useIntegerCalculatedExpression.ts | 2 +- .../hooks/useStringCalculatedExpression.ts | 2 +- packages/smart-forms-renderer/src/index.ts | 3 +- .../smart-forms-renderer/src/stores/index.ts | 11 ++- .../src/stores/questionnaireResponseStore.ts | 92 +++++++++---------- .../src/stores/questionnaireStore.ts | 10 +- .../src/stores/smartConfigStore.ts | 6 +- .../src/stores/terminologyServerStore.ts | 8 +- 18 files changed, 75 insertions(+), 80 deletions(-) diff --git a/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButtonWrapper.tsx b/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButtonWrapper.tsx index e390b3cbc..14805d31d 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButtonWrapper.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButtonWrapper.tsx @@ -19,7 +19,7 @@ import React, { memo } from 'react'; import Box from '@mui/material/Box'; import { findNumOfVisibleTabs, getNextVisibleTabIndex } from '../../../utils/tabs'; import type { Tabs } from '../../../interfaces/tab.interface'; -import useQuestionnaireStore from '../../../stores/questionnaireStore'; +import { useQuestionnaireStore } from '../../../stores'; import NextTabButton from './NextTabButton'; interface NextTabButtonWrapperProps { diff --git a/packages/smart-forms-renderer/src/components/FormComponents/SingleItem/SingleItem.tsx b/packages/smart-forms-renderer/src/components/FormComponents/SingleItem/SingleItem.tsx index 2c55eb3bf..620341074 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/SingleItem/SingleItem.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/SingleItem/SingleItem.tsx @@ -24,7 +24,7 @@ import type { PropsWithQrItemChangeHandler, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface'; -import useQuestionnaireStore from '../../../stores/questionnaireStore'; +import { useQuestionnaireStore } from '../../../stores'; import SingleItemSwitcher from './SingleItemSwitcher'; import useHidden from '../../../hooks/useHidden'; import useReadOnly from '../../../hooks/useReadOnly'; diff --git a/packages/smart-forms-renderer/src/components/Renderer/BaseRenderer.tsx b/packages/smart-forms-renderer/src/components/Renderer/BaseRenderer.tsx index 854887fc4..30a422043 100644 --- a/packages/smart-forms-renderer/src/components/Renderer/BaseRenderer.tsx +++ b/packages/smart-forms-renderer/src/components/Renderer/BaseRenderer.tsx @@ -20,8 +20,7 @@ import Container from '@mui/material/Container'; import Fade from '@mui/material/Fade'; import FormTopLevelItem from './FormTopLevelItem'; import type { QuestionnaireResponse, QuestionnaireResponseItem } from 'fhir/r4'; -import useQuestionnaireStore from '../../stores/questionnaireStore'; -import useQuestionnaireResponseStore from '../../stores/questionnaireResponseStore'; +import { useQuestionnaireResponseStore, useQuestionnaireStore } from '../../stores'; import cloneDeep from 'lodash.clonedeep'; import { getQrItemsIndex, mapQItemsIndex } from '../../utils/mapItem'; import { updateQrItemsInGroup } from '../../utils/qrItem'; diff --git a/packages/smart-forms-renderer/src/components/Renderer/FormBodyCollapsible.tsx b/packages/smart-forms-renderer/src/components/Renderer/FormBodyCollapsible.tsx index 57633fe8b..32a33de99 100644 --- a/packages/smart-forms-renderer/src/components/Renderer/FormBodyCollapsible.tsx +++ b/packages/smart-forms-renderer/src/components/Renderer/FormBodyCollapsible.tsx @@ -21,7 +21,7 @@ import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { getQrItemsIndex, mapQItemsIndex } from '../../utils/mapItem'; import { createEmptyQrGroup, updateQrItemsInGroup } from '../../utils/qrItem'; import type { PropsWithQrItemChangeHandler } from '../../interfaces/renderProps.interface'; -import useQuestionnaireStore from '../../stores/questionnaireStore'; +import { useQuestionnaireStore } from '../../stores'; import FormBodySingleCollapsibleWrapper from './FormBodySingleCollapsibleWrapper'; interface FormBodyCollapsibleProps extends PropsWithQrItemChangeHandler { diff --git a/packages/smart-forms-renderer/src/components/Renderer/FormBodyTabbed.tsx b/packages/smart-forms-renderer/src/components/Renderer/FormBodyTabbed.tsx index 0cf83450d..b044a6561 100644 --- a/packages/smart-forms-renderer/src/components/Renderer/FormBodyTabbed.tsx +++ b/packages/smart-forms-renderer/src/components/Renderer/FormBodyTabbed.tsx @@ -25,7 +25,7 @@ import GroupItem from '../FormComponents/GroupItem/GroupItem'; import { createEmptyQrGroup, updateQrItemsInGroup } from '../../utils/qrItem'; import FormBodyTabListWrapper from '../Tabs/FormBodyTabListWrapper'; import type { PropsWithQrItemChangeHandler } from '../../interfaces/renderProps.interface'; -import useQuestionnaireStore from '../../stores/questionnaireStore'; +import { useQuestionnaireStore } from '../../stores'; interface FormBodyTabbedProps extends PropsWithQrItemChangeHandler { topLevelQItem: QuestionnaireItem; diff --git a/packages/smart-forms-renderer/src/components/Tabs/CompleteTabButton.tsx b/packages/smart-forms-renderer/src/components/Tabs/CompleteTabButton.tsx index a97656be8..432cdf049 100644 --- a/packages/smart-forms-renderer/src/components/Tabs/CompleteTabButton.tsx +++ b/packages/smart-forms-renderer/src/components/Tabs/CompleteTabButton.tsx @@ -19,7 +19,7 @@ import React, { memo } from 'react'; import IconButton from '@mui/material/IconButton'; import Tooltip from '@mui/material/Tooltip'; import CheckCircleIcon from '@mui/icons-material/CheckCircle'; -import useQuestionnaireStore from '../../stores/questionnaireStore'; +import { useQuestionnaireStore } from '../../stores'; interface CompleteTabButtonProps { tabLinkId: string; diff --git a/packages/smart-forms-renderer/src/components/Tabs/FormBodySingleTab.tsx b/packages/smart-forms-renderer/src/components/Tabs/FormBodySingleTab.tsx index 513a64b23..30992a673 100644 --- a/packages/smart-forms-renderer/src/components/Tabs/FormBodySingleTab.tsx +++ b/packages/smart-forms-renderer/src/components/Tabs/FormBodySingleTab.tsx @@ -20,7 +20,7 @@ import Box from '@mui/material/Box'; import ListItemButton from '@mui/material/ListItemButton'; import ListItemText from '@mui/material/ListItemText'; import Typography from '@mui/material/Typography'; -import useQuestionnaireStore from '../../stores/questionnaireStore'; +import { useQuestionnaireStore } from '../../stores'; import type { QuestionnaireItem } from 'fhir/r4'; import ContextDisplayItem from '../FormComponents/ItemParts/ContextDisplayItem'; diff --git a/packages/smart-forms-renderer/src/components/Tabs/FormBodyTabList.tsx b/packages/smart-forms-renderer/src/components/Tabs/FormBodyTabList.tsx index 71198fc2a..9ef864ac4 100644 --- a/packages/smart-forms-renderer/src/components/Tabs/FormBodyTabList.tsx +++ b/packages/smart-forms-renderer/src/components/Tabs/FormBodyTabList.tsx @@ -22,7 +22,7 @@ import { getShortText } from '../../utils/itemControl'; import type { QuestionnaireItem } from 'fhir/r4'; import FormBodySingleTab from './FormBodySingleTab'; import type { Tabs } from '../../interfaces/tab.interface'; -import useQuestionnaireStore from '../../stores/questionnaireStore'; +import { useQuestionnaireStore } from '../../stores'; import { isTabHidden } from '../../utils/tabs'; interface FormBodyTabListProps { diff --git a/packages/smart-forms-renderer/src/hooks/useDecimalCalculatedExpression.ts b/packages/smart-forms-renderer/src/hooks/useDecimalCalculatedExpression.ts index b01c87b48..29792ffc0 100644 --- a/packages/smart-forms-renderer/src/hooks/useDecimalCalculatedExpression.ts +++ b/packages/smart-forms-renderer/src/hooks/useDecimalCalculatedExpression.ts @@ -18,7 +18,7 @@ import { useEffect, useState } from 'react'; import { createEmptyQrItem } from '../utils/qrItem'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; -import useQuestionnaireStore from '../stores/questionnaireStore'; +import { useQuestionnaireStore } from '../stores'; interface UseDecimalCalculatedExpression { calcExpUpdated: boolean; diff --git a/packages/smart-forms-renderer/src/hooks/useHidden.ts b/packages/smart-forms-renderer/src/hooks/useHidden.ts index a409f35f2..1e4c8bf21 100644 --- a/packages/smart-forms-renderer/src/hooks/useHidden.ts +++ b/packages/smart-forms-renderer/src/hooks/useHidden.ts @@ -17,7 +17,7 @@ import type { QuestionnaireItem } from 'fhir/r4'; import { hasHiddenExtension } from '../utils/itemControl'; -import useQuestionnaireStore from '../stores/questionnaireStore'; +import { useQuestionnaireStore } from '../stores'; import { isHiddenByEnableWhens } from '../utils/qItem'; function useHidden(qItem: QuestionnaireItem): boolean { diff --git a/packages/smart-forms-renderer/src/hooks/useIntegerCalculatedExpression.ts b/packages/smart-forms-renderer/src/hooks/useIntegerCalculatedExpression.ts index 00e7a4c20..5f2981d2f 100644 --- a/packages/smart-forms-renderer/src/hooks/useIntegerCalculatedExpression.ts +++ b/packages/smart-forms-renderer/src/hooks/useIntegerCalculatedExpression.ts @@ -18,7 +18,7 @@ import { useEffect, useState } from 'react'; import { createEmptyQrItem } from '../utils/qrItem'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; -import useQuestionnaireStore from '../stores/questionnaireStore'; +import { useQuestionnaireStore } from '../stores/questionnaireStore'; interface UseIntegerCalculatedExpression { calcExpUpdated: boolean; diff --git a/packages/smart-forms-renderer/src/hooks/useStringCalculatedExpression.ts b/packages/smart-forms-renderer/src/hooks/useStringCalculatedExpression.ts index 65c93b95d..f76771773 100644 --- a/packages/smart-forms-renderer/src/hooks/useStringCalculatedExpression.ts +++ b/packages/smart-forms-renderer/src/hooks/useStringCalculatedExpression.ts @@ -18,7 +18,7 @@ import { useEffect, useState } from 'react'; import { createEmptyQrItem } from '../utils/qrItem'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; -import useQuestionnaireStore from '../stores/questionnaireStore'; +import { useQuestionnaireStore } from '../stores/questionnaireStore'; interface UseStringCalculatedExpression { calcExpUpdated: boolean; diff --git a/packages/smart-forms-renderer/src/index.ts b/packages/smart-forms-renderer/src/index.ts index bb22fc4af..11e1c3cc0 100644 --- a/packages/smart-forms-renderer/src/index.ts +++ b/packages/smart-forms-renderer/src/index.ts @@ -1,7 +1,6 @@ -import questionnaireStore from './stores/questionnaireStore'; +import { questionnaireResponseStore, questionnaireStore } from './stores'; import type { Questionnaire, QuestionnaireResponse } from 'fhir/r4'; import { createEmptyQuestionnaireResponse } from './utils/qrItem'; -import questionnaireResponseStore from './stores/questionnaireResponseStore'; import { removeHiddenAnswers } from './utils/removeHidden'; import type { ItemToRepopulate } from './utils/repopulateItems'; import { getItemsToRepopulate } from './utils/repopulateItems'; diff --git a/packages/smart-forms-renderer/src/stores/index.ts b/packages/smart-forms-renderer/src/stores/index.ts index 80eb0cf5a..cca1de05f 100644 --- a/packages/smart-forms-renderer/src/stores/index.ts +++ b/packages/smart-forms-renderer/src/stores/index.ts @@ -1,4 +1,7 @@ -export { default as useQuestionnaireStore } from './questionnaireStore'; -export { default as useQuestionnaireResponseStore } from './questionnaireResponseStore'; -export { default as useSmartConfigStore } from './smartConfigStore'; -export { default as useTerminologyServerStore } from './terminologyServerStore'; +export { questionnaireStore, useQuestionnaireStore } from './questionnaireStore'; +export { + questionnaireResponseStore, + useQuestionnaireResponseStore +} from './questionnaireResponseStore'; +export { smartConfigStore, useSmartConfigStore } from './smartConfigStore'; +export { terminologyServerStore, useTerminologyServerStore } from './terminologyServerStore'; diff --git a/packages/smart-forms-renderer/src/stores/questionnaireResponseStore.ts b/packages/smart-forms-renderer/src/stores/questionnaireResponseStore.ts index 16266ec46..d3d5d6866 100644 --- a/packages/smart-forms-renderer/src/stores/questionnaireResponseStore.ts +++ b/packages/smart-forms-renderer/src/stores/questionnaireResponseStore.ts @@ -23,7 +23,7 @@ import type { Diff } from 'deep-diff'; import { diff } from 'deep-diff'; import { createSelectors } from './selector'; -export interface QuestionnaireResponseStoreType { +interface QuestionnaireResponseStoreType { sourceResponse: QuestionnaireResponse; updatableResponse: QuestionnaireResponse; formChangesHistory: (Diff[] | null)[]; @@ -35,49 +35,49 @@ export interface QuestionnaireResponseStoreType { destroySourceResponse: () => void; } -const questionnaireResponseStore = createStore()((set, get) => ({ - sourceResponse: cloneDeep(emptyResponse), - updatableResponse: cloneDeep(emptyResponse), - formChangesHistory: [], - buildSourceResponse: (questionnaireResponse: QuestionnaireResponse) => { - set(() => ({ - sourceResponse: questionnaireResponse, - updatableResponse: questionnaireResponse - })); - }, - setUpdatableResponseAsPopulated: (populatedResponse: QuestionnaireResponse) => { - const formChanges = diff(get().updatableResponse, populatedResponse) ?? null; - set(() => ({ - updatableResponse: populatedResponse, - formChangesHistory: [...get().formChangesHistory, formChanges] - })); - }, - updateResponse: (updatedResponse: QuestionnaireResponse) => { - const formChanges = diff(get().updatableResponse, updatedResponse) ?? null; - set(() => ({ - updatableResponse: updatedResponse, - formChangesHistory: [...get().formChangesHistory, formChanges] - })); - }, - setUpdatableResponseAsSaved: (savedResponse: QuestionnaireResponse) => - set(() => ({ - sourceResponse: savedResponse, - updatableResponse: savedResponse, - formChangesHistory: [] - })), - setUpdatableResponseAsEmpty: (clearedResponse: QuestionnaireResponse) => - set(() => ({ - updatableResponse: clearedResponse, - formChangesHistory: [] - })), - destroySourceResponse: () => - set(() => ({ - sourceResponse: cloneDeep(emptyResponse), - updatableResponse: cloneDeep(emptyResponse), - formChangesHistory: [] - })) -})); +export const questionnaireResponseStore = createStore()( + (set, get) => ({ + sourceResponse: cloneDeep(emptyResponse), + updatableResponse: cloneDeep(emptyResponse), + formChangesHistory: [], + buildSourceResponse: (questionnaireResponse: QuestionnaireResponse) => { + set(() => ({ + sourceResponse: questionnaireResponse, + updatableResponse: questionnaireResponse + })); + }, + setUpdatableResponseAsPopulated: (populatedResponse: QuestionnaireResponse) => { + const formChanges = diff(get().updatableResponse, populatedResponse) ?? null; + set(() => ({ + updatableResponse: populatedResponse, + formChangesHistory: [...get().formChangesHistory, formChanges] + })); + }, + updateResponse: (updatedResponse: QuestionnaireResponse) => { + const formChanges = diff(get().updatableResponse, updatedResponse) ?? null; + set(() => ({ + updatableResponse: updatedResponse, + formChangesHistory: [...get().formChangesHistory, formChanges] + })); + }, + setUpdatableResponseAsSaved: (savedResponse: QuestionnaireResponse) => + set(() => ({ + sourceResponse: savedResponse, + updatableResponse: savedResponse, + formChangesHistory: [] + })), + setUpdatableResponseAsEmpty: (clearedResponse: QuestionnaireResponse) => + set(() => ({ + updatableResponse: clearedResponse, + formChangesHistory: [] + })), + destroySourceResponse: () => + set(() => ({ + sourceResponse: cloneDeep(emptyResponse), + updatableResponse: cloneDeep(emptyResponse), + formChangesHistory: [] + })) + }) +); -const useQuestionnaireResponseStore = createSelectors(questionnaireResponseStore); - -export default useQuestionnaireResponseStore; +export const useQuestionnaireResponseStore = createSelectors(questionnaireResponseStore); diff --git a/packages/smart-forms-renderer/src/stores/questionnaireStore.ts b/packages/smart-forms-renderer/src/stores/questionnaireStore.ts index c26a18f1e..9102f7241 100644 --- a/packages/smart-forms-renderer/src/stores/questionnaireStore.ts +++ b/packages/smart-forms-renderer/src/stores/questionnaireStore.ts @@ -38,10 +38,10 @@ import { createQuestionnaireModel } from '../utils/questionnaireStoreUtils/creat import { initialiseFormFromResponse } from '../utils/initialiseForm'; import { emptyQuestionnaire, emptyResponse } from '../utils/emptyResource'; import cloneDeep from 'lodash.clonedeep'; -import terminologyServerStore from './terminologyServerStore'; +import { terminologyServerStore } from './terminologyServerStore'; import { createSelectors } from './selector'; -export interface QuestionnaireStoreType { +interface QuestionnaireStoreType { sourceQuestionnaire: Questionnaire; itemTypes: Record; tabs: Tabs; @@ -77,7 +77,7 @@ export interface QuestionnaireStoreType { ) => QuestionnaireResponse; } -const questionnaireStore = createStore()((set, get) => ({ +export const questionnaireStore = createStore()((set, get) => ({ sourceQuestionnaire: cloneDeep(emptyQuestionnaire), itemTypes: {}, tabs: {}, @@ -267,6 +267,4 @@ const questionnaireStore = createStore()((set, get) => ( } })); -const useQuestionnaireStore = createSelectors(questionnaireStore); - -export default useQuestionnaireStore; +export const useQuestionnaireStore = createSelectors(questionnaireStore); diff --git a/packages/smart-forms-renderer/src/stores/smartConfigStore.ts b/packages/smart-forms-renderer/src/stores/smartConfigStore.ts index c02f8cb76..090d5cef7 100644 --- a/packages/smart-forms-renderer/src/stores/smartConfigStore.ts +++ b/packages/smart-forms-renderer/src/stores/smartConfigStore.ts @@ -31,7 +31,7 @@ export interface SmartConfigStoreType { setEncounter: (encounter: Encounter) => void; } -const smartConfigStore = createStore()((set) => ({ +export const smartConfigStore = createStore()((set) => ({ client: null, patient: null, user: null, @@ -42,6 +42,4 @@ const smartConfigStore = createStore()((set) => ({ setEncounter: (encounter: Encounter) => set(() => ({ encounter: encounter })) })); -const useSmartConfigStore = createSelectors(smartConfigStore); - -export default useSmartConfigStore; +export const useSmartConfigStore = createSelectors(smartConfigStore); diff --git a/packages/smart-forms-renderer/src/stores/terminologyServerStore.ts b/packages/smart-forms-renderer/src/stores/terminologyServerStore.ts index 683047e01..97fe2b7d1 100644 --- a/packages/smart-forms-renderer/src/stores/terminologyServerStore.ts +++ b/packages/smart-forms-renderer/src/stores/terminologyServerStore.ts @@ -20,18 +20,16 @@ import { createSelectors } from './selector'; const ONTOSERVER_R4 = 'https://r4.ontoserver.csiro.au/fhir'; -export interface TerminologyServerStoreType { +interface TerminologyServerStoreType { url: string; setUrl: (newUrl: string) => void; resetUrl: () => void; } -const terminologyServerStore = createStore()((set) => ({ +export const terminologyServerStore = createStore()((set) => ({ url: ONTOSERVER_R4, setUrl: (newUrl: string) => set(() => ({ url: newUrl })), resetUrl: () => set(() => ({ url: ONTOSERVER_R4 })) })); -const useTerminologyServerStore = createSelectors(terminologyServerStore); - -export default useTerminologyServerStore; +export const useTerminologyServerStore = createSelectors(terminologyServerStore); From d63baf2b2b9d70530f1305b08f31d9c10c54da7b Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Mon, 27 Nov 2023 09:23:49 +1030 Subject: [PATCH 06/12] Add reformat button in Playground --- .../playground/components/JsonEditor.tsx | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/apps/smart-forms-app/src/features/playground/components/JsonEditor.tsx b/apps/smart-forms-app/src/features/playground/components/JsonEditor.tsx index 53bb65438..7940f6008 100644 --- a/apps/smart-forms-app/src/features/playground/components/JsonEditor.tsx +++ b/apps/smart-forms-app/src/features/playground/components/JsonEditor.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import Editor from '@monaco-editor/react'; +import Editor, { useMonaco } from '@monaco-editor/react'; import { useState } from 'react'; import type { editor } from 'monaco-editor'; import { Box, Button, Divider, Stack } from '@mui/material'; @@ -46,6 +46,8 @@ function JsonEditor(props: Props) { } } + const monaco = useMonaco(); + return ( @@ -57,9 +59,24 @@ function JsonEditor(props: Props) { {buildingState !== 'idle' ? ( - + <> + + + + ) : null} From d5f2e0aebcbc826549bc3468606e113f2d3fe39a Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Mon, 27 Nov 2023 09:26:01 +1030 Subject: [PATCH 07/12] Make SMART auth failures more transparent --- .../components/AuthDebugErrorMessage.tsx | 43 ++++++++++++ .../components/AuthDebugFhirClient.tsx | 65 ++++++++++++++++++ .../components/AuthDebugLaunchContexts.tsx | 67 +++++++++++++++++++ .../components/RenderAuthStatus.tsx | 39 ++++++----- 4 files changed, 198 insertions(+), 16 deletions(-) create mode 100644 apps/smart-forms-app/src/features/smartAppLaunch/components/AuthDebugErrorMessage.tsx create mode 100644 apps/smart-forms-app/src/features/smartAppLaunch/components/AuthDebugFhirClient.tsx create mode 100644 apps/smart-forms-app/src/features/smartAppLaunch/components/AuthDebugLaunchContexts.tsx diff --git a/apps/smart-forms-app/src/features/smartAppLaunch/components/AuthDebugErrorMessage.tsx b/apps/smart-forms-app/src/features/smartAppLaunch/components/AuthDebugErrorMessage.tsx new file mode 100644 index 000000000..325c3fd82 --- /dev/null +++ b/apps/smart-forms-app/src/features/smartAppLaunch/components/AuthDebugErrorMessage.tsx @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Commonwealth Scientific and Industrial Research + * Organisation (CSIRO) ABN 41 687 119 230. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { useState } from 'react'; +import { Accordion, AccordionDetails, AccordionSummary, Typography } from '@mui/material'; +import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; + +interface AuthDebugErrorMessageProps { + errorMessage: string; +} + +function AuthDebugErrorMessage(props: AuthDebugErrorMessageProps) { + const { errorMessage } = props; + + const [isExpanded, setIsExpanded] = useState(false); + + return ( + setIsExpanded(expanded)}> + }> + Error provided from launcher: + + + {errorMessage} + + + ); +} + +export default AuthDebugErrorMessage; diff --git a/apps/smart-forms-app/src/features/smartAppLaunch/components/AuthDebugFhirClient.tsx b/apps/smart-forms-app/src/features/smartAppLaunch/components/AuthDebugFhirClient.tsx new file mode 100644 index 000000000..8ea8c7195 --- /dev/null +++ b/apps/smart-forms-app/src/features/smartAppLaunch/components/AuthDebugFhirClient.tsx @@ -0,0 +1,65 @@ +/* + * Copyright 2023 Commonwealth Scientific and Industrial Research + * Organisation (CSIRO) ABN 41 687 119 230. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { useState } from 'react'; +import { + Accordion, + AccordionDetails, + AccordionSummary, + Box, + IconButton, + Tooltip, + Typography +} from '@mui/material'; +import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; +import { grey } from '@mui/material/colors'; +import HistoryEduIcon from '@mui/icons-material/HistoryEdu'; +import type Client from 'fhirclient/lib/Client'; + +interface AuthDebugFhirClientProps { + smartClient: Client | null; +} + +function AuthDebugFhirClient(props: AuthDebugFhirClientProps) { + const { smartClient } = props; + + const [isExpanded, setIsExpanded] = useState(false); + + return ( + setIsExpanded(expanded)}> + }> + FHIRClient: + FHIRClient: + + + + FhirClient object + + console.log(smartClient)}> + + + + + +
{JSON.stringify(smartClient, null, 2)}
+
+
+
+ ); +} + +export default AuthDebugFhirClient; diff --git a/apps/smart-forms-app/src/features/smartAppLaunch/components/AuthDebugLaunchContexts.tsx b/apps/smart-forms-app/src/features/smartAppLaunch/components/AuthDebugLaunchContexts.tsx new file mode 100644 index 000000000..124877abd --- /dev/null +++ b/apps/smart-forms-app/src/features/smartAppLaunch/components/AuthDebugLaunchContexts.tsx @@ -0,0 +1,67 @@ +/* + * Copyright 2023 Commonwealth Scientific and Industrial Research + * Organisation (CSIRO) ABN 41 687 119 230. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Fragment, useState } from 'react'; +import { + Accordion, + AccordionDetails, + AccordionSummary, + Box, + IconButton, + Tooltip, + Typography +} from '@mui/material'; +import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; +import { grey } from '@mui/material/colors'; +import HistoryEduIcon from '@mui/icons-material/HistoryEdu'; + +interface AuthDebugLaunchContextsProps { + launchContexts: { contextName: string; contextResource: any }[]; +} + +function AuthDebugLaunchContexts(props: AuthDebugLaunchContextsProps) { + const { launchContexts } = props; + + const [isExpanded, setIsExpanded] = useState(false); + + return ( + setIsExpanded(expanded)}> + }> + Launch contexts: + + + {launchContexts.map(({ contextName, contextResource }) => ( + + + {contextName} + + console.log(contextResource)}> + + + + + +
{JSON.stringify(contextResource, null, 2)}
+
+
+ ))} +
+
+ ); +} + +export default AuthDebugLaunchContexts; diff --git a/apps/smart-forms-app/src/features/smartAppLaunch/components/RenderAuthStatus.tsx b/apps/smart-forms-app/src/features/smartAppLaunch/components/RenderAuthStatus.tsx index fe98bdc51..9d6eee23a 100644 --- a/apps/smart-forms-app/src/features/smartAppLaunch/components/RenderAuthStatus.tsx +++ b/apps/smart-forms-app/src/features/smartAppLaunch/components/RenderAuthStatus.tsx @@ -15,13 +15,15 @@ * limitations under the License. */ -import { useState } from 'react'; -import { Accordion, AccordionDetails, AccordionSummary, Stack, Typography } from '@mui/material'; -import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; +import { Stack, Typography } from '@mui/material'; import ProgressSpinner from '../../../components/Spinners/ProgressSpinner.tsx'; import type { AuthState } from '../types/authorisation.interface.ts'; import CenteredWrapper from '../../../components/Wrapper/CenteredWrapper.tsx'; import UnlaunchedButton from '../../../components/Button/UnlaunchedButton.tsx'; +import useSmartClient from '../../../hooks/useSmartClient.ts'; +import AuthDebugLaunchContexts from './AuthDebugLaunchContexts.tsx'; +import AuthDebugFhirClient from './AuthDebugFhirClient.tsx'; +import AuthDebugErrorMessage from './AuthDebugErrorMessage.tsx'; interface RenderAuthStatusProps { authState: AuthState; @@ -30,32 +32,37 @@ interface RenderAuthStatusProps { function RenderAuthStatus(props: RenderAuthStatusProps) { const { authState } = props; - const [isExpanded, setIsExpanded] = useState(false); + const { smartClient, patient, user, encounter, launchQuestionnaire } = useSmartClient(); const launchFailed = authState.hasClient === false || authState.hasUser === false || authState.hasPatient === false; + const launchContexts = [ + { contextName: 'Patient (required)', contextResource: patient }, + { contextName: 'User (required)', contextResource: user }, + { contextName: 'Encounter (optional)', contextResource: encounter }, + { contextName: 'Questionnaire (optional)', contextResource: launchQuestionnaire } + ]; + if (launchFailed) { return ( - + An error occurred while authorising the launch. {'Try relaunching the app or contact your administrator for assistance.'} - - {authState.errorMessage ? ( - setIsExpanded(expanded)}> - }> - Error details: - - - {authState.errorMessage} - - - ) : null} + + Debug section: + + + + {authState.errorMessage ? ( + + ) : null} + ); } From 181946c9ef84418ce37aa5ed068f89dd91079ec0 Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Mon, 27 Nov 2023 09:26:34 +1030 Subject: [PATCH 08/12] Add swc to (potentially) make compiling faster in dev --- package-lock.json | 1197 +++++++++++++++++++- packages/smart-forms-renderer/.swcrc | 11 + packages/smart-forms-renderer/package.json | 6 +- 3 files changed, 1207 insertions(+), 7 deletions(-) create mode 100644 packages/smart-forms-renderer/.swcrc diff --git a/package-lock.json b/package-lock.json index ba491cc72..20f447fc2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -139,6 +139,82 @@ "yui-lint": "^0.2.0" } }, + "apps/smart-forms-app/node_modules/@aehrc/smart-forms-renderer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/@aehrc/smart-forms-renderer/-/smart-forms-renderer-0.9.3.tgz", + "integrity": "sha512-if8tB/2RcE1ErvepKEhbqDOsSG+uUX8D7V5sv0EkxcnBufjfovaThsSqW09JoHoXHk28IA4/ms7YBexYDGd6cA==", + "dependencies": { + "@aehrc/sdc-assemble": "^1.0.2", + "@iconify/react": "^4.1.1", + "@types/fhir": "^0.0.38", + "dayjs": "^1.11.10", + "deep-diff": "^1.0.2", + "fhirclient": "^2.5.2", + "fhirpath": "^3.7.1", + "html-react-parser": "4.2.10", + "lodash.clonedeep": "^4.5.0", + "lodash.debounce": "^4.0.8", + "moment": "^2.29.4", + "nanoid": "^5.0.1", + "react-markdown": "^8.0.7", + "zustand": "^4.4.1" + }, + "peerDependencies": { + "@emotion/react": ">=11.11.0", + "@emotion/styled": ">=11.10.0", + "@mui/icons-material": ">=5.14.0", + "@mui/lab": ">=5.0.0-alpha.137", + "@mui/material": ">=5.14.0", + "@mui/x-date-pickers": ">=6.10.0", + "@tanstack/react-query": ">=4.29.0", + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "apps/smart-forms-app/node_modules/@aehrc/smart-forms-renderer/node_modules/html-react-parser": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/html-react-parser/-/html-react-parser-4.2.10.tgz", + "integrity": "sha512-JyKZVQ+kQ8PdycISwkuLbEEvV/k4hWhU6cb6TT7yGaYwdqA7cPt4VRYXkCZcix2vlQtgDBSMJUmPI2jpNjPGvg==", + "dependencies": { + "domhandler": "5.0.3", + "html-dom-parser": "5.0.3", + "react-property": "2.0.2", + "style-to-js": "1.1.8" + }, + "peerDependencies": { + "react": "0.14 || 15 || 16 || 17 || 18" + } + }, + "apps/smart-forms-app/node_modules/html-dom-parser": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/html-dom-parser/-/html-dom-parser-5.0.3.tgz", + "integrity": "sha512-slsc6ipw88OUZjAayRs5NTmfOQCwcUa3hNyk6AdsbQxY09H5Lr1Y3CZ4ZlconMKql3Ga6sWg3HMoUzo7KSItaQ==", + "dependencies": { + "domhandler": "5.0.3", + "htmlparser2": "9.0.0" + } + }, + "apps/smart-forms-app/node_modules/inline-style-parser": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.2.tgz", + "integrity": "sha512-EcKzdTHVe8wFVOGEYXiW9WmJXPjqi1T+234YpJr98RiFYKHV3cdy1+3mkTE+KHTHxFFLH51SfaGOoUdW+v7ViQ==" + }, + "apps/smart-forms-app/node_modules/style-to-js": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.8.tgz", + "integrity": "sha512-bPSspCXkkhETLXnEgDbaoWRWyv3lF2bj32YIc8IElok2IIMHUlZtQUrxYmAkKUNxpluhH0qnKWrmuoXUyTY12g==", + "dependencies": { + "style-to-object": "1.0.3" + } + }, + "apps/smart-forms-app/node_modules/style-to-object": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.3.tgz", + "integrity": "sha512-xOpx7S53E0V3DpVsvt7ySvoiumRpfXiC99PUXLqGB3wiAnN9ybEIpuzlZ8LAZg+h1sl9JkEUwtSQXxcCgFqbbg==", + "dependencies": { + "inline-style-parser": "0.2.2" + } + }, "deployment/assemble": { "version": "1.0.1", "extraneous": true, @@ -4872,6 +4948,25 @@ "react": ">=16" } }, + "node_modules/@mole-inc/bin-wrapper": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@mole-inc/bin-wrapper/-/bin-wrapper-8.0.1.tgz", + "integrity": "sha512-sTGoeZnjI8N4KS+sW2AN95gDBErhAguvkw/tWdCjeM8bvxpz5lqrnd0vOJABA1A+Ic3zED7PYoLP/RANLgVotA==", + "dev": true, + "dependencies": { + "bin-check": "^4.1.0", + "bin-version-check": "^5.0.0", + "content-disposition": "^0.5.4", + "ext-name": "^5.0.0", + "file-type": "^17.1.6", + "filenamify": "^5.0.2", + "got": "^11.8.5", + "os-filter-obj": "^2.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, "node_modules/@monaco-editor/loader": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.4.0.tgz", @@ -7500,6 +7595,18 @@ "devOptional": true, "license": "MIT" }, + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, "node_modules/@sinonjs/commons": { "version": "3.0.0", "devOptional": true, @@ -13304,6 +13411,302 @@ "url": "https://github.com/sponsors/gregberge" } }, + "node_modules/@swc/cli": { + "version": "0.1.63", + "resolved": "https://registry.npmjs.org/@swc/cli/-/cli-0.1.63.tgz", + "integrity": "sha512-EM9oxxHzmmsprYRbGqsS2M4M/Gr5Gkcl0ROYYIdlUyTkhOiX822EQiRCpPCwdutdnzH2GyaTN7wc6i0Y+CKd3A==", + "dev": true, + "dependencies": { + "@mole-inc/bin-wrapper": "^8.0.1", + "commander": "^7.1.0", + "fast-glob": "^3.2.5", + "semver": "^7.3.8", + "slash": "3.0.0", + "source-map": "^0.7.3" + }, + "bin": { + "spack": "bin/spack.js", + "swc": "bin/swc.js", + "swcx": "bin/swcx.js" + }, + "engines": { + "node": ">= 12.13" + }, + "peerDependencies": { + "@swc/core": "^1.2.66", + "chokidar": "^3.5.1" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@swc/cli/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@swc/cli/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/cli/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/cli/node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@swc/cli/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@swc/core": { + "version": "1.3.99", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.99.tgz", + "integrity": "sha512-8O996RfuPC4ieb4zbYMfbyCU9k4gSOpyCNnr7qBQ+o7IEmh8JCV6B8wwu+fT/Om/6Lp34KJe1IpJ/24axKS6TQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@swc/counter": "^0.1.1", + "@swc/types": "^0.1.5" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.3.99", + "@swc/core-darwin-x64": "1.3.99", + "@swc/core-linux-arm64-gnu": "1.3.99", + "@swc/core-linux-arm64-musl": "1.3.99", + "@swc/core-linux-x64-gnu": "1.3.99", + "@swc/core-linux-x64-musl": "1.3.99", + "@swc/core-win32-arm64-msvc": "1.3.99", + "@swc/core-win32-ia32-msvc": "1.3.99", + "@swc/core-win32-x64-msvc": "1.3.99" + }, + "peerDependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.3.99", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.99.tgz", + "integrity": "sha512-Qj7Jct68q3ZKeuJrjPx7k8SxzWN6PqLh+VFxzA+KwLDpQDPzOlKRZwkIMzuFjLhITO4RHgSnXoDk/Syz0ZeN+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.3.99", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.99.tgz", + "integrity": "sha512-wR7m9QVJjgiBu1PSOHy7s66uJPa45Kf9bZExXUL+JAa9OQxt5y+XVzr+n+F045VXQOwdGWplgPnWjgbUUHEVyw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.3.99", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.99.tgz", + "integrity": "sha512-gcGv1l5t0DScEONmw5OhdVmEI/o49HCe9Ik38zzH0NtDkc+PDYaCcXU5rvfZP2qJFaAAr8cua8iJcOunOSLmnA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.3.99", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.99.tgz", + "integrity": "sha512-XL1/eUsTO8BiKsWq9i3iWh7H99iPO61+9HYiWVKhSavknfj4Plbn+XyajDpxsauln5o8t+BRGitymtnAWJM4UQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.3.99", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.99.tgz", + "integrity": "sha512-fGrXYE6DbTfGNIGQmBefYxSk3rp/1lgbD0nVg4rl4mfFRQPi7CgGhrrqSuqZ/ezXInUIgoCyvYGWFSwjLXt/Qg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.3.99", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.99.tgz", + "integrity": "sha512-kvgZp/mqf3IJ806gUOL6gN6VU15+DfzM1Zv4Udn8GqgXiUAvbQehrtruid4Snn5pZTLj4PEpSCBbxgxK1jbssA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.3.99", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.99.tgz", + "integrity": "sha512-yt8RtZ4W/QgFF+JUemOUQAkVW58cCST7mbfKFZ1v16w3pl3NcWd9OrtppFIXpbjU1rrUX2zp2R7HZZzZ2Zk/aQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.3.99", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.99.tgz", + "integrity": "sha512-62p5fWnOJR/rlbmbUIpQEVRconICy5KDScWVuJg1v3GPLBrmacjphyHiJC1mp6dYvvoEWCk/77c/jcQwlXrDXw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.3.99", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.99.tgz", + "integrity": "sha512-PdppWhkoS45VGdMBxvClVgF1hVjqamtvYd82Gab1i4IV45OSym2KinoDCKE1b6j3LwBLOn2J9fvChGSgGfDCHQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.2.tgz", + "integrity": "sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==", + "dev": true + }, + "node_modules/@swc/types": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.5.tgz", + "integrity": "sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==", + "dev": true + }, + "node_modules/@szmarczak/http-timer": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "dev": true, + "dependencies": { + "defer-to-connect": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@tanstack/match-sorter-utils": { "version": "8.8.4", "dev": true, @@ -13532,6 +13935,12 @@ "@testing-library/dom": ">=7.21.4" } }, + "node_modules/@tokenizer/token": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", + "dev": true + }, "node_modules/@tootallnate/once": { "version": "2.0.0", "dev": true, @@ -13621,6 +14030,18 @@ "license": "MIT", "peer": true }, + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "dev": true, + "dependencies": { + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" + } + }, "node_modules/@types/catbox": { "version": "10.0.7", "license": "MIT", @@ -13810,6 +14231,12 @@ "hoist-non-react-statics": "^3.3.0" } }, + "node_modules/@types/http-cache-semantics": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "dev": true + }, "node_modules/@types/http-errors": { "version": "2.0.1", "dev": true, @@ -13893,6 +14320,15 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/lodash": { "version": "4.14.197", "license": "MIT" @@ -14101,6 +14537,15 @@ "@types/react": "*" } }, + "node_modules/@types/responselike": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", + "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/scheduler": { "version": "0.16.3", "license": "MIT" @@ -16492,6 +16937,246 @@ "node": "*" } }, + "node_modules/bin-check": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", + "integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==", + "dev": true, + "dependencies": { + "execa": "^0.7.0", + "executable": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-check/node_modules/cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", + "dev": true, + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "node_modules/bin-check/node_modules/execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw==", + "dev": true, + "dependencies": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-check/node_modules/get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-check/node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bin-check/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/bin-check/node_modules/npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", + "dev": true, + "dependencies": { + "path-key": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-check/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-check/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bin-check/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bin-check/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/bin-check/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true + }, + "node_modules/bin-version": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-6.0.0.tgz", + "integrity": "sha512-nk5wEsP4RiKjG+vF+uG8lFsEn4d7Y6FVDamzzftSunXOoOcOOkzcWdKVlGgFFwlUQCj63SgnUkLLGF8v7lufhw==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "find-versions": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bin-version-check": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-5.1.0.tgz", + "integrity": "sha512-bYsvMqJ8yNGILLz1KP9zKLzQ6YpljV3ln1gqhuLkUtyfGi3qXKGuK2p+U4NAvjVFzDFiBBtOpCOSFNuYYEGZ5g==", + "dev": true, + "dependencies": { + "bin-version": "^6.0.0", + "semver": "^7.5.3", + "semver-truncate": "^3.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bin-version-check/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/bin-version-check/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/bin-version-check/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/bin-version/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/bin-version/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bin-version/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "dev": true, @@ -16928,6 +17613,33 @@ "optional": true, "peer": true }, + "node_modules/cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "dev": true, + "engines": { + "node": ">=10.6.0" + } + }, + "node_modules/cacheable-request": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "dev": true, + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/cachedir": { "version": "2.4.0", "dev": true, @@ -17074,6 +17786,8 @@ }, "node_modules/chokidar": { "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "funding": [ { @@ -17081,7 +17795,6 @@ "url": "https://paulmillr.com/funding/" } ], - "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -17255,6 +17968,18 @@ "node": ">=0.10.0" } }, + "node_modules/clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/clsx": { "version": "2.0.0", "license": "MIT", @@ -18097,6 +18822,33 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/dedent": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", @@ -18472,6 +19224,15 @@ "node": ">=0.8" } }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "devOptional": true, @@ -20105,6 +20866,31 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/ext-list": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", + "dev": true, + "dependencies": { + "mime-db": "^1.28.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ext-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", + "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", + "dev": true, + "dependencies": { + "ext-list": "^2.0.0", + "sort-keys-length": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/extend": { "version": "3.0.2", "license": "MIT" @@ -20350,6 +21136,23 @@ "ramda": "0.29.0" } }, + "node_modules/file-type": { + "version": "17.1.6", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.6.tgz", + "integrity": "sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==", + "dev": true, + "dependencies": { + "readable-web-to-node-stream": "^3.0.2", + "strtok3": "^7.0.0-alpha.9", + "token-types": "^5.0.0-alpha.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/file-type?sponsor=1" + } + }, "node_modules/filelist": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", @@ -20380,6 +21183,35 @@ "node": ">=10" } }, + "node_modules/filename-reserved-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-3.0.0.tgz", + "integrity": "sha512-hn4cQfU6GOT/7cFHXBqeBg2TbrMBgdD0kcjLhvSQYYwm3s4B6cjvBfb7nBALJLAXqmU5xajSa7X2NnUud/VCdw==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/filenamify": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-5.1.1.tgz", + "integrity": "sha512-M45CbrJLGACfrPOkrTp3j2EcO9OBkKUYME0eiqOCa7i2poaklU0jhlIaMlr8ijLorT0uLAzrn3qXOp5684CkfA==", + "dev": true, + "dependencies": { + "filename-reserved-regex": "^3.0.0", + "strip-outer": "^2.0.0", + "trim-repeated": "^2.0.0" + }, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/fill-range": { "version": "7.0.1", "devOptional": true, @@ -20525,6 +21357,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/find-versions": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-5.1.0.tgz", + "integrity": "sha512-+iwzCJ7C5v5KgcBuueqVoNiHVoQpwiUK5XFLjf0affFTep+Wcw93tPvmb8tqujDNmzhBDPddnWV/qgWSXgq+Hg==", + "dev": true, + "dependencies": { + "semver-regex": "^4.0.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/find-yarn-workspace-root": { "version": "2.0.0", "license": "Apache-2.0", @@ -21054,6 +21901,31 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/got": { + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", + "dev": true, + "dependencies": { + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=10.19.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "devOptional": true, @@ -21365,6 +22237,12 @@ "entities": "^4.5.0" } }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true + }, "node_modules/http-errors": { "version": "2.0.0", "license": "MIT", @@ -21405,6 +22283,19 @@ "node": ">=0.10" } }, + "node_modules/http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "dev": true, + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, "node_modules/https-proxy-agent": { "version": "5.0.1", "devOptional": true, @@ -24480,6 +25371,15 @@ "loose-envify": "cli.js" } }, + "node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "devOptional": true, @@ -26132,6 +27032,15 @@ "node": ">=6" } }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/min-indent": { "version": "1.0.1", "dev": true, @@ -26592,6 +27501,18 @@ "node": ">=0.10.0" } }, + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/notistack": { "version": "3.0.1", "license": "MIT", @@ -27021,6 +27942,18 @@ "node": ">=4" } }, + "node_modules/os-filter-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", + "integrity": "sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==", + "dev": true, + "dependencies": { + "arch": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/os-homedir": { "version": "1.0.2", "license": "MIT", @@ -27054,11 +27987,19 @@ "dev": true, "license": "MIT" }, + "node_modules/p-cancelable": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/p-finally": { "version": "1.0.0", + "devOptional": true, "license": "MIT", - "optional": true, - "peer": true, "engines": { "node": ">=4" } @@ -27268,6 +28209,19 @@ "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==", "dev": true }, + "node_modules/peek-readable": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", + "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, "node_modules/peek-stream": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/peek-stream/-/peek-stream-1.1.3.tgz", @@ -27833,6 +28787,12 @@ "optional": true, "peer": true }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true + }, "node_modules/psl": { "version": "1.9.0", "dev": true, @@ -28087,6 +29047,18 @@ ], "license": "MIT" }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/raf-schd": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/raf-schd/-/raf-schd-4.0.3.tgz", @@ -28969,6 +29941,36 @@ "version": "5.1.2", "license": "MIT" }, + "node_modules/readable-web-to-node-stream": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", + "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", + "dev": true, + "dependencies": { + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/readable-web-to-node-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/readdirp": { "version": "3.6.0", "dev": true, @@ -29386,6 +30388,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "dev": true + }, "node_modules/resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", @@ -29438,6 +30446,18 @@ "node": ">=10" } }, + "node_modules/responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "dev": true, + "dependencies": { + "lowercase-keys": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/restore-cursor": { "version": "3.1.0", "devOptional": true, @@ -29750,6 +30770,66 @@ "semver": "bin/semver.js" } }, + "node_modules/semver-regex": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-4.0.5.tgz", + "integrity": "sha512-hunMQrEy1T6Jr2uEVjrAIqjwWcQTgOAcIM52C8MY1EZSD3DDNft04XzvYKPqjED65bNVVko0YI38nYeEHCX3yw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/semver-truncate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-3.0.0.tgz", + "integrity": "sha512-LJWA9kSvMolR51oDE6PN3kALBNaUdkxzAGcexw8gjMA8xr5zUqK0JiR3CgARSqanYF3Z1YHvsErb1KDgh+v7Rg==", + "dev": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/semver-truncate/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver-truncate/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver-truncate/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/send": { "version": "0.18.0", "license": "MIT", @@ -30076,6 +31156,39 @@ "node": ">=8.0.0" } }, + "node_modules/sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha512-vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg==", + "dev": true, + "dependencies": { + "is-plain-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sort-keys-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", + "integrity": "sha512-GRbEOUqCxemTAk/b32F2xa8wDTs+Z1QHOkbhJDQTvv/6G3ZkbJ+frYWsTcc7cBB3Fu4wy4XlLCuNtJuMn7Gsvw==", + "dev": true, + "dependencies": { + "sort-keys": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sort-keys/node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map": { "version": "0.5.7", "license": "BSD-3-Clause", @@ -30490,9 +31603,8 @@ }, "node_modules/strip-eof": { "version": "1.0.0", + "devOptional": true, "license": "MIT", - "optional": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -30527,12 +31639,41 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strip-outer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-2.0.0.tgz", + "integrity": "sha512-A21Xsm1XzUkK0qK1ZrytDUvqsQWict2Cykhvi0fBQntGG5JSprESasEyV1EZ/4CiR5WB5KjzLTrP/bO37B0wPg==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/strnum": { "version": "1.0.5", "license": "MIT", "optional": true, "peer": true }, + "node_modules/strtok3": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", + "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", + "dev": true, + "dependencies": { + "@tokenizer/token": "^0.3.0", + "peek-readable": "^5.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, "node_modules/structured-headers": { "version": "0.4.1", "license": "MIT", @@ -31233,6 +32374,23 @@ "node": ">=0.6" } }, + "node_modules/token-types": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", + "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", + "dev": true, + "dependencies": { + "@tokenizer/token": "^0.3.0", + "ieee754": "^1.2.1" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, "node_modules/tough-cookie": { "version": "4.1.3", "dev": true, @@ -31276,6 +32434,30 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/trim-repeated": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-2.0.0.tgz", + "integrity": "sha512-QUHBFTJGdOwmp0tbOG505xAgOp/YliZP/6UgafFXYZ26WT1bvQmSMJUvkeVSASuJJHbqsFbynTvkd5W8RBTipg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^5.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/trim-repeated/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/trough": { "version": "2.1.0", "license": "MIT", @@ -32918,7 +34100,7 @@ }, "packages/smart-forms-renderer": { "name": "@aehrc/smart-forms-renderer", - "version": "0.9.3", + "version": "0.10.0", "license": "Apache-2.0", "dependencies": { "@aehrc/sdc-assemble": "^1.0.2", @@ -32947,6 +34129,8 @@ "@storybook/react": "^7.4.3", "@storybook/react-vite": "^7.4.5", "@storybook/testing-library": "^0.2.1", + "@swc/cli": "^0.1.63", + "@swc/core": "^1.3.99", "@testing-library/jest-dom": "^6.1.2", "@testing-library/react": "^14.0.0", "@testing-library/react-hooks": "^7.0.2", @@ -32957,6 +34141,7 @@ "@types/react": "^18.2.37", "@types/react-beautiful-dnd": "^13.1.7", "@types/react-dom": "^18.2.9", + "chokidar": "^3.5.3", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "react": "^18.2.0", diff --git a/packages/smart-forms-renderer/.swcrc b/packages/smart-forms-renderer/.swcrc new file mode 100644 index 000000000..6c282b819 --- /dev/null +++ b/packages/smart-forms-renderer/.swcrc @@ -0,0 +1,11 @@ +{ + "jsc": { + "parser": { + "syntax": "typescript", + "tsx": true, + "decorators": true, + "dynamicImport": true + }, + "target": "es2015", + }, +} diff --git a/packages/smart-forms-renderer/package.json b/packages/smart-forms-renderer/package.json index 10ab19396..ee8832f8e 100644 --- a/packages/smart-forms-renderer/package.json +++ b/packages/smart-forms-renderer/package.json @@ -1,11 +1,12 @@ { "name": "@aehrc/smart-forms-renderer", - "version": "0.9.3", + "version": "0.10.0", "description": "FHIR Structured Data Captured (SDC) rendering engine for Smart Forms", "main": "lib/index.js", "scripts": { "compile": "tsc", "compile:watch": "tsc -w", + "compile:swc:watch": "npx swc src --out-dir lib -w", "prepare": "npm run compile", "test": "jest", "test:watch": "jest --watch", @@ -60,6 +61,8 @@ "@storybook/react": "^7.4.3", "@storybook/react-vite": "^7.4.5", "@storybook/testing-library": "^0.2.1", + "@swc/cli": "^0.1.63", + "@swc/core": "^1.3.99", "@testing-library/jest-dom": "^6.1.2", "@testing-library/react": "^14.0.0", "@testing-library/react-hooks": "^7.0.2", @@ -70,6 +73,7 @@ "@types/react": "^18.2.37", "@types/react-beautiful-dnd": "^13.1.7", "@types/react-dom": "^18.2.9", + "chokidar": "^3.5.3", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "react": "^18.2.0", From f0c9ca7dd3f4d1aa87da1e65251406b8b9780337 Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Mon, 27 Nov 2023 10:51:55 +1030 Subject: [PATCH 09/12] Use flushsync to prevent view stuttering on table row reorder --- .../components/RendererLayout.styles.ts | 1 - .../components/RepopulateSelectDialog.tsx | 1 + .../FormComponents/Tables/GroupTable.tsx | 21 +++++------- .../src/hooks/useGroupTableRows.ts | 33 +++++++++++++++++++ 4 files changed, 43 insertions(+), 13 deletions(-) create mode 100644 packages/smart-forms-renderer/src/hooks/useGroupTableRows.ts diff --git a/apps/smart-forms-app/src/features/renderer/components/RendererLayout.styles.ts b/apps/smart-forms-app/src/features/renderer/components/RendererLayout.styles.ts index a7d3c602d..72512af88 100644 --- a/apps/smart-forms-app/src/features/renderer/components/RendererLayout.styles.ts +++ b/apps/smart-forms-app/src/features/renderer/components/RendererLayout.styles.ts @@ -23,7 +23,6 @@ import { export const Main = styled(Box)(({ theme }) => ({ flexGrow: 1, - overflow: 'auto', minHeight: '100%', paddingTop: HEADER_MOBILE_HEIGHT + 16, paddingBottom: theme.spacing(4), diff --git a/apps/smart-forms-app/src/features/repopulate/components/RepopulateSelectDialog.tsx b/apps/smart-forms-app/src/features/repopulate/components/RepopulateSelectDialog.tsx index 867e7e3a7..6bb9cf963 100644 --- a/apps/smart-forms-app/src/features/repopulate/components/RepopulateSelectDialog.tsx +++ b/apps/smart-forms-app/src/features/repopulate/components/RepopulateSelectDialog.tsx @@ -83,6 +83,7 @@ function RepopulateSelectDialog(props: RepopulateSelectDialogProps) { checkedLinkIds ); + // Prevent state batching for this spinner https://react.dev/reference/react-dom/flushSync flushSync(() => { onSpinnerChange({ isSpinning: true, diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTable.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTable.tsx index ce0afb0d7..1cb2183aa 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTable.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTable.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import React, { useMemo, useState } from 'react'; +import React, { useMemo } from 'react'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { mapQItemsIndex } from '../../../utils/mapItem'; @@ -24,12 +24,13 @@ import type { PropsWithQrRepeatGroupChangeHandler, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface'; -import useInitialiseGroupTable from '../../../hooks/useInitialiseGroupTable'; import { nanoid } from 'nanoid'; import useReadOnly from '../../../hooks/useReadOnly'; import GroupTableView from './GroupTableView'; import { GroupTableRowModel } from '../../../interfaces/groupTable.interface'; import { getGroupTableItemsToUpdate } from '../../../utils/groupTable'; +import useGroupTableRows from '../../../hooks/useGroupTableRows'; +import { flushSync } from 'react-dom'; interface GroupTableProps extends PropsWithQrRepeatGroupChangeHandler, @@ -50,16 +51,9 @@ function GroupTable(props: GroupTableProps) { onQrRepeatGroupChange } = props; - // TODO come back to fix stuttering on dnd update - const readOnly = useReadOnly(qItem, parentIsReadOnly); - const initialisedGroupTables = useInitialiseGroupTable(qrItems); - - const [tableRows, setTableRows] = useState(initialisedGroupTables); - const [selectedIds, setSelectedIds] = useState( - initialisedGroupTables.map((row) => row.nanoId) - ); + const { tableRows, selectedIds, setTableRows, setSelectedIds } = useGroupTableRows(qrItems); // Generate item labels as table headers const qItems = qItem.item; @@ -146,8 +140,11 @@ function GroupTable(props: GroupTableProps) { }); } - function handleReorderRows(newTableRows: GroupTableRowModel[]) { - setTableRows(newTableRows); + async function handleReorderRows(newTableRows: GroupTableRowModel[]) { + // Prevent state batching when reordering to prevent view stuttering https://react.dev/reference/react-dom/flushSync + flushSync(() => { + setTableRows(newTableRows); + }); onQrRepeatGroupChange({ linkId: qItem.linkId, qrItems: getGroupTableItemsToUpdate(newTableRows, selectedIds) diff --git a/packages/smart-forms-renderer/src/hooks/useGroupTableRows.ts b/packages/smart-forms-renderer/src/hooks/useGroupTableRows.ts new file mode 100644 index 000000000..a8857d16e --- /dev/null +++ b/packages/smart-forms-renderer/src/hooks/useGroupTableRows.ts @@ -0,0 +1,33 @@ +/* + * Copyright 2023 Commonwealth Scientific and Industrial Research + * Organisation (CSIRO) ABN 41 687 119 230. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { useState } from 'react'; +import useInitialiseGroupTable from './useInitialiseGroupTable'; +import type { QuestionnaireResponseItem } from 'fhir/r4'; + +function useGroupTableRows(qrItems: QuestionnaireResponseItem[]) { + const initialisedGroupTableRows = useInitialiseGroupTable(qrItems); + + const [tableRows, setTableRows] = useState(initialisedGroupTableRows); + const [selectedIds, setSelectedIds] = useState( + initialisedGroupTableRows.map((row) => row.nanoId) + ); + + return { tableRows, selectedIds, setTableRows, setSelectedIds }; +} + +export default useGroupTableRows; From 8b90ddc9f99dc3cc0aaa3d40df3f1d1e050d67fc Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Mon, 27 Nov 2023 10:55:42 +1030 Subject: [PATCH 10/12] Run linter --- apps/demo-renderer-app/src/HomePage.tsx | 2 +- apps/demo-renderer-app/src/fetchQuestionnaire.ts | 2 +- apps/demo-renderer-app/src/main.tsx | 3 ++- .../src/components/FormComponents/Tables/GroupTable.tsx | 2 +- .../components/FormComponents/Tables/GroupTableBody.tsx | 9 +++++---- .../components/FormComponents/Tables/GroupTableRow.tsx | 4 ++-- .../FormComponents/Tables/GroupTableRowCells.tsx | 7 ++----- .../components/FormComponents/Tables/GroupTableView.tsx | 6 +++--- .../src/hooks/useInitialiseRenderer.ts | 3 ++- packages/smart-forms-renderer/src/stores/selector.ts | 3 ++- .../src/stories/MedicalHistoryTable.stories.tsx | 2 +- packages/smart-forms-renderer/src/utils/groupTable.ts | 2 +- 12 files changed, 23 insertions(+), 22 deletions(-) diff --git a/apps/demo-renderer-app/src/HomePage.tsx b/apps/demo-renderer-app/src/HomePage.tsx index 85826a5e5..17f5c6f7c 100644 --- a/apps/demo-renderer-app/src/HomePage.tsx +++ b/apps/demo-renderer-app/src/HomePage.tsx @@ -16,7 +16,7 @@ */ import { useQuery } from '@tanstack/react-query'; -import { Questionnaire } from 'fhir/r4'; +import type { Questionnaire } from 'fhir/r4'; import { fetchQuestionnaire, questionnaireIsValid } from './fetchQuestionnaire.ts'; import RendererPage from './RendererPage.tsx'; diff --git a/apps/demo-renderer-app/src/fetchQuestionnaire.ts b/apps/demo-renderer-app/src/fetchQuestionnaire.ts index cf723cfef..bdf723069 100644 --- a/apps/demo-renderer-app/src/fetchQuestionnaire.ts +++ b/apps/demo-renderer-app/src/fetchQuestionnaire.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { Questionnaire } from 'fhir/r4'; +import type { Questionnaire } from 'fhir/r4'; export async function fetchQuestionnaire(questionnaireUrl: string) { const response = await fetch(questionnaireUrl); // Replace with your API endpoint diff --git a/apps/demo-renderer-app/src/main.tsx b/apps/demo-renderer-app/src/main.tsx index 20d19db74..ce0f31193 100644 --- a/apps/demo-renderer-app/src/main.tsx +++ b/apps/demo-renderer-app/src/main.tsx @@ -1,7 +1,8 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App.tsx'; -import { DefaultOptions, QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import type { DefaultOptions } from '@tanstack/react-query'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; const DEFAULT_QUERY_OPTIONS: DefaultOptions = { queries: { diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTable.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTable.tsx index 1cb2183aa..1562e3dd4 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTable.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTable.tsx @@ -27,7 +27,7 @@ import type { import { nanoid } from 'nanoid'; import useReadOnly from '../../../hooks/useReadOnly'; import GroupTableView from './GroupTableView'; -import { GroupTableRowModel } from '../../../interfaces/groupTable.interface'; +import type { GroupTableRowModel } from '../../../interfaces/groupTable.interface'; import { getGroupTableItemsToUpdate } from '../../../utils/groupTable'; import useGroupTableRows from '../../../hooks/useGroupTableRows'; import { flushSync } from 'react-dom'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableBody.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableBody.tsx index 20df2e66b..17a8427b4 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableBody.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableBody.tsx @@ -17,14 +17,15 @@ import React from 'react'; import { createEmptyQrItem } from '../../../utils/qrItem'; -import { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; -import { GroupTableRowModel } from '../../../interfaces/groupTable.interface'; -import { +import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; +import type { GroupTableRowModel } from '../../../interfaces/groupTable.interface'; +import type { PropsWithParentIsReadOnlyAttribute, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface'; import GroupTableRow from './GroupTableRow'; -import { DragDropContext, Droppable, DropResult } from 'react-beautiful-dnd'; +import type { DropResult } from 'react-beautiful-dnd'; +import { DragDropContext, Droppable } from 'react-beautiful-dnd'; import { reorderRows } from '../../../utils/groupTable'; import TableBody from '@mui/material/TableBody'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRow.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRow.tsx index 16323dd4e..1568422a5 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRow.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRow.tsx @@ -21,11 +21,11 @@ import type { PropsWithParentIsReadOnlyAttribute, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface'; -import { TableRowProps } from '@mui/material/TableRow'; +import type { TableRowProps } from '@mui/material/TableRow'; import SelectRowButton from './SelectRowButton'; import GroupTableRowCells from './GroupTableRowCells'; import RemoveRowButton from './RemoveRowButton'; -import { GroupTableRowModel } from '../../../interfaces/groupTable.interface'; +import type { GroupTableRowModel } from '../../../interfaces/groupTable.interface'; import DragIndicator from '@mui/icons-material/DragIndicator'; import TableCell from '@mui/material/TableCell'; import Box from '@mui/material/Box'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRowCells.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRowCells.tsx index 413a316bd..d523e5f5c 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRowCells.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableRowCells.tsx @@ -25,20 +25,17 @@ import type { PropsWithParentIsReadOnlyAttribute, PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface'; -import { TableRowProps } from '@mui/material/TableRow'; interface GroupTableRowCellsProps extends PropsWithQrItemChangeHandler, - PropsWithParentIsReadOnlyAttribute, - TableRowProps { + PropsWithParentIsReadOnlyAttribute { qItem: QuestionnaireItem; qrItem: QuestionnaireResponseItem | null; qItemsIndexMap: Record; } function GroupTableRowCells(props: GroupTableRowCellsProps) { - const { qItem, qrItem, qItemsIndexMap, parentIsReadOnly, onQrItemChange, ...tableRowProps } = - props; + const { qItem, qrItem, qItemsIndexMap, parentIsReadOnly, onQrItemChange } = props; const rowItems = qItem.item; const row = qrItem && qrItem.item ? qrItem : createEmptyQrGroup(qItem); diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableView.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableView.tsx index acad10cee..3cd9a50dc 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableView.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/GroupTableView.tsx @@ -29,12 +29,12 @@ import Typography from '@mui/material/Typography'; import LabelWrapper from '../ItemParts/ItemLabelWrapper'; import Divider from '@mui/material/Divider'; import AddRowButton from './AddRowButton'; -import { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; -import { +import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; +import type { PropsWithParentIsReadOnlyAttribute, PropsWithShowMinimalViewAttribute } from '../../../interfaces/renderProps.interface'; -import { GroupTableRowModel } from '../../../interfaces/groupTable.interface'; +import type { GroupTableRowModel } from '../../../interfaces/groupTable.interface'; import GroupTableBody from './GroupTableBody'; import Checkbox from '@mui/material/Checkbox'; diff --git a/packages/smart-forms-renderer/src/hooks/useInitialiseRenderer.ts b/packages/smart-forms-renderer/src/hooks/useInitialiseRenderer.ts index 143a70f49..a5f356e1e 100644 --- a/packages/smart-forms-renderer/src/hooks/useInitialiseRenderer.ts +++ b/packages/smart-forms-renderer/src/hooks/useInitialiseRenderer.ts @@ -101,7 +101,8 @@ function useInitialiseRenderer( setUser, setEncounter, terminologyServerUrl, - setTerminologyServerUrl + setTerminologyServerUrl, + resetTerminologyServerUrl ]); return loading; diff --git a/packages/smart-forms-renderer/src/stores/selector.ts b/packages/smart-forms-renderer/src/stores/selector.ts index 481b8cf7b..556ab4e6f 100644 --- a/packages/smart-forms-renderer/src/stores/selector.ts +++ b/packages/smart-forms-renderer/src/stores/selector.ts @@ -1,4 +1,5 @@ -import { StoreApi, useStore } from 'zustand'; +import type { StoreApi } from 'zustand'; +import { useStore } from 'zustand'; type WithSelectors = S extends { getState: () => infer T } ? S & { use: { [K in keyof T]: () => T[K] } } diff --git a/packages/smart-forms-renderer/src/stories/MedicalHistoryTable.stories.tsx b/packages/smart-forms-renderer/src/stories/MedicalHistoryTable.stories.tsx index ded4068d5..07b04bd38 100644 --- a/packages/smart-forms-renderer/src/stories/MedicalHistoryTable.stories.tsx +++ b/packages/smart-forms-renderer/src/stories/MedicalHistoryTable.stories.tsx @@ -20,7 +20,7 @@ import type { Meta, StoryObj } from '@storybook/react'; import { GroupTable } from '../components'; import GTableMedicalHistoryItemJson from './assets/QItems-and-QRItems/Q_GTableMedicalHistory.json'; import GTableMedicalHistoryAnswersJson from './assets/QItems-and-QRItems/QR_GTableMedicalHistory.json'; -import { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; +import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { HTML5Backend } from 'react-dnd-html5-backend'; import { DndProvider } from 'react-dnd'; diff --git a/packages/smart-forms-renderer/src/utils/groupTable.ts b/packages/smart-forms-renderer/src/utils/groupTable.ts index 1886696a6..adb87c5c6 100644 --- a/packages/smart-forms-renderer/src/utils/groupTable.ts +++ b/packages/smart-forms-renderer/src/utils/groupTable.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { GroupTableRowModel } from '../interfaces/groupTable.interface'; +import type { GroupTableRowModel } from '../interfaces/groupTable.interface'; import cloneDeep from 'lodash.clonedeep'; export function reorderRows( From 3015e870c90260c5c59e8ae4fe2a66ec6ed0e378 Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Mon, 27 Nov 2023 11:22:07 +1030 Subject: [PATCH 11/12] Update renderer version --- apps/smart-forms-app/package.json | 2 +- package-lock.json | 34 +------------------------------ 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/apps/smart-forms-app/package.json b/apps/smart-forms-app/package.json index 28edb21cc..d815dccc9 100644 --- a/apps/smart-forms-app/package.json +++ b/apps/smart-forms-app/package.json @@ -27,7 +27,7 @@ "dependencies": { "@aehrc/sdc-assemble": "^1.0.2", "@aehrc/sdc-populate": "^1.0.6", - "@aehrc/smart-forms-renderer": "^0.9.0", + "@aehrc/smart-forms-renderer": "^0.10.0", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.10.8", "@fontsource/material-icons": "^5.0.7", diff --git a/package-lock.json b/package-lock.json index 20f447fc2..b78cfad3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "dependencies": { "@aehrc/sdc-assemble": "^1.0.2", "@aehrc/sdc-populate": "^1.0.6", - "@aehrc/smart-forms-renderer": "^0.9.0", + "@aehrc/smart-forms-renderer": "^0.10.0", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.10.8", "@fontsource/material-icons": "^5.0.7", @@ -139,38 +139,6 @@ "yui-lint": "^0.2.0" } }, - "apps/smart-forms-app/node_modules/@aehrc/smart-forms-renderer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@aehrc/smart-forms-renderer/-/smart-forms-renderer-0.9.3.tgz", - "integrity": "sha512-if8tB/2RcE1ErvepKEhbqDOsSG+uUX8D7V5sv0EkxcnBufjfovaThsSqW09JoHoXHk28IA4/ms7YBexYDGd6cA==", - "dependencies": { - "@aehrc/sdc-assemble": "^1.0.2", - "@iconify/react": "^4.1.1", - "@types/fhir": "^0.0.38", - "dayjs": "^1.11.10", - "deep-diff": "^1.0.2", - "fhirclient": "^2.5.2", - "fhirpath": "^3.7.1", - "html-react-parser": "4.2.10", - "lodash.clonedeep": "^4.5.0", - "lodash.debounce": "^4.0.8", - "moment": "^2.29.4", - "nanoid": "^5.0.1", - "react-markdown": "^8.0.7", - "zustand": "^4.4.1" - }, - "peerDependencies": { - "@emotion/react": ">=11.11.0", - "@emotion/styled": ">=11.10.0", - "@mui/icons-material": ">=5.14.0", - "@mui/lab": ">=5.0.0-alpha.137", - "@mui/material": ">=5.14.0", - "@mui/x-date-pickers": ">=6.10.0", - "@tanstack/react-query": ">=4.29.0", - "react": ">=18.0.0", - "react-dom": ">=18.0.0" - } - }, "apps/smart-forms-app/node_modules/@aehrc/smart-forms-renderer/node_modules/html-react-parser": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/html-react-parser/-/html-react-parser-4.2.10.tgz", From 06377d5dd9de1f8dcf2cedcc29a84241885550d0 Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Mon, 27 Nov 2023 11:31:12 +1030 Subject: [PATCH 12/12] Update operation buttons data-test attribute --- apps/smart-forms-app/cypress/e2e/saving.cy.ts | 2 +- apps/smart-forms-app/cypress/e2e/viewer.cy.ts | 2 +- .../cypress/support/commands.ts | 12 +++---- .../DashboardNav/DashboardNavItem.tsx | 2 +- .../viewer/ViewerNav/ViewerOperationItem.tsx | 2 +- package-lock.json | 31 +------------------ 6 files changed, 11 insertions(+), 40 deletions(-) diff --git a/apps/smart-forms-app/cypress/e2e/saving.cy.ts b/apps/smart-forms-app/cypress/e2e/saving.cy.ts index f26eb06b2..f1b2b828f 100644 --- a/apps/smart-forms-app/cypress/e2e/saving.cy.ts +++ b/apps/smart-forms-app/cypress/e2e/saving.cy.ts @@ -71,7 +71,7 @@ describe('save response', () => { cy.getByData('q-item-integer-box').eq(0).find('input').clear().wait(50); cy.initAgeValue(60); - cy.getByData('list-button-renderer-operation'); + cy.getByData('renderer-operation-item'); cy.contains('Save as Final').click(); cy.get('.MuiButtonBase-root').contains('Save as final').click(); diff --git a/apps/smart-forms-app/cypress/e2e/viewer.cy.ts b/apps/smart-forms-app/cypress/e2e/viewer.cy.ts index c4b6c671b..3b7d8d1f6 100644 --- a/apps/smart-forms-app/cypress/e2e/viewer.cy.ts +++ b/apps/smart-forms-app/cypress/e2e/viewer.cy.ts @@ -93,7 +93,7 @@ describe('response viewer', () => { }); it('print preview', () => { - cy.getByData('list-button-viewer-operation'); + cy.getByData('renderer-operation-item'); cy.contains('Print Preview').should('be.visible'); }); }); diff --git a/apps/smart-forms-app/cypress/support/commands.ts b/apps/smart-forms-app/cypress/support/commands.ts index 075f389f7..58e040377 100644 --- a/apps/smart-forms-app/cypress/support/commands.ts +++ b/apps/smart-forms-app/cypress/support/commands.ts @@ -32,28 +32,28 @@ Cypress.Commands.add('getByData', (selector, ...args) => { }); Cypress.Commands.add('previewForm', () => { - cy.getByData('list-button-renderer-operation'); + cy.getByData('renderer-operation-item'); cy.contains('Preview').click(); cy.location('pathname').should('eq', '/renderer/preview'); }); Cypress.Commands.add('clickOnNavPage', (operationName: string) => { - cy.getByData('list-button-renderer-nav-page'); + cy.getByData('renderer-operation-item'); cy.contains(operationName).click(); }); Cypress.Commands.add('clickOnRendererOperation', (operationName: string) => { - cy.getByData('list-button-renderer-operation'); + cy.getByData('renderer-operation-item'); cy.contains(operationName).click(); }); Cypress.Commands.add('clickOnViewerOperation', (operationName: string) => { - cy.getByData('list-button-viewer-operation'); + cy.getByData('renderer-operation-item'); cy.contains(operationName).click(); }); Cypress.Commands.add('editForm', () => { - cy.getByData('list-button-renderer-operation'); + cy.getByData('renderer-operation-item'); cy.contains('Editor').click(); cy.location('pathname').should('eq', '/renderer'); }); @@ -102,7 +102,7 @@ Cypress.Commands.add('launchFromSMARTHealthIT', () => { }); Cypress.Commands.add('goToResponsesPage', () => { - cy.getByData('list-button-dashboard-nav-page'); + cy.getByData('renderer-operation-item'); cy.contains('Responses').click(); }); diff --git a/apps/smart-forms-app/src/features/dashboard/components/DashboardNav/DashboardNavItem.tsx b/apps/smart-forms-app/src/features/dashboard/components/DashboardNav/DashboardNavItem.tsx index a13e8bcaf..07d58de94 100644 --- a/apps/smart-forms-app/src/features/dashboard/components/DashboardNav/DashboardNavItem.tsx +++ b/apps/smart-forms-app/src/features/dashboard/components/DashboardNav/DashboardNavItem.tsx @@ -41,7 +41,7 @@ function DashboardNavItem(props: DashboardNavItemProps) { to={path} disableGutters disabled={disabled} - data-test="list-button-dashboard-nav-page" + data-test="renderer-operation-item" onClick={() => { setSelectedQuestionnaire(null); onCloseNav(); diff --git a/apps/smart-forms-app/src/features/viewer/ViewerNav/ViewerOperationItem.tsx b/apps/smart-forms-app/src/features/viewer/ViewerNav/ViewerOperationItem.tsx index 4d5599067..6439f8274 100644 --- a/apps/smart-forms-app/src/features/viewer/ViewerNav/ViewerOperationItem.tsx +++ b/apps/smart-forms-app/src/features/viewer/ViewerNav/ViewerOperationItem.tsx @@ -10,7 +10,7 @@ function ViewerOperationItem(props: OperationItem) { disableGutters onClick={onClick} disabled={disabled} - data-test="list-button-viewer-operation"> + data-test="renderer-operation-item"> {icon} diff --git a/package-lock.json b/package-lock.json index b78cfad3a..cfad4538d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -143,6 +143,7 @@ "version": "4.2.10", "resolved": "https://registry.npmjs.org/html-react-parser/-/html-react-parser-4.2.10.tgz", "integrity": "sha512-JyKZVQ+kQ8PdycISwkuLbEEvV/k4hWhU6cb6TT7yGaYwdqA7cPt4VRYXkCZcix2vlQtgDBSMJUmPI2jpNjPGvg==", + "extraneous": true, "dependencies": { "domhandler": "5.0.3", "html-dom-parser": "5.0.3", @@ -153,36 +154,6 @@ "react": "0.14 || 15 || 16 || 17 || 18" } }, - "apps/smart-forms-app/node_modules/html-dom-parser": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/html-dom-parser/-/html-dom-parser-5.0.3.tgz", - "integrity": "sha512-slsc6ipw88OUZjAayRs5NTmfOQCwcUa3hNyk6AdsbQxY09H5Lr1Y3CZ4ZlconMKql3Ga6sWg3HMoUzo7KSItaQ==", - "dependencies": { - "domhandler": "5.0.3", - "htmlparser2": "9.0.0" - } - }, - "apps/smart-forms-app/node_modules/inline-style-parser": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.2.tgz", - "integrity": "sha512-EcKzdTHVe8wFVOGEYXiW9WmJXPjqi1T+234YpJr98RiFYKHV3cdy1+3mkTE+KHTHxFFLH51SfaGOoUdW+v7ViQ==" - }, - "apps/smart-forms-app/node_modules/style-to-js": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.8.tgz", - "integrity": "sha512-bPSspCXkkhETLXnEgDbaoWRWyv3lF2bj32YIc8IElok2IIMHUlZtQUrxYmAkKUNxpluhH0qnKWrmuoXUyTY12g==", - "dependencies": { - "style-to-object": "1.0.3" - } - }, - "apps/smart-forms-app/node_modules/style-to-object": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.3.tgz", - "integrity": "sha512-xOpx7S53E0V3DpVsvt7ySvoiumRpfXiC99PUXLqGB3wiAnN9ybEIpuzlZ8LAZg+h1sl9JkEUwtSQXxcCgFqbbg==", - "dependencies": { - "inline-style-parser": "0.2.2" - } - }, "deployment/assemble": { "version": "1.0.1", "extraneous": true,