@aehrc/smart-forms-renderer 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/FormComponents/GroupItem/GroupAccordion.d.ts +10 -0
- package/lib/components/FormComponents/GroupItem/GroupAccordion.js +71 -0
- package/lib/components/FormComponents/GroupItem/GroupAccordion.js.map +1 -0
- package/lib/components/FormComponents/GroupItem/GroupAccordion.styles.d.ts +1 -1
- package/lib/components/FormComponents/GroupItem/GroupAccordion.styles.js +1 -1
- package/lib/components/FormComponents/GroupItem/GroupAccordion.styles.js.map +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItemView.js +1 -1
- package/lib/components/FormComponents/GroupItem/GroupItemView.js.map +1 -1
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupView.js +1 -1
- package/lib/components/FormComponents/RepeatGroup/RepeatGroupView.js.map +1 -1
- package/lib/components/FormComponents/Tables/GroupTableView.js +1 -1
- package/lib/components/FormComponents/Tables/GroupTableView.js.map +1 -1
- package/lib/components/Renderer/FormBodySingleCollapsible.js +1 -1
- package/lib/components/Renderer/FormBodySingleCollapsible.js.map +1 -1
- package/lib/components/Renderer/FormBodyTabbed.js +38 -6
- package/lib/components/Renderer/FormBodyTabbed.js.map +1 -1
- package/lib/components/Tabs/FormBodyTabListWrapper.d.ts +1 -0
- package/lib/components/Tabs/FormBodyTabListWrapper.js +2 -2
- package/lib/components/Tabs/FormBodyTabListWrapper.js.map +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/FormComponents/GroupItem/GroupAccordion.styles.ts +1 -1
- package/src/components/FormComponents/GroupItem/GroupAccordion.tsx +93 -0
- package/src/components/FormComponents/GroupItem/GroupItemView.tsx +1 -1
- package/src/components/FormComponents/RepeatGroup/RepeatGroupView.tsx +1 -1
- package/src/components/FormComponents/Tables/GroupTableView.tsx +1 -1
- package/src/components/Renderer/FormBodySingleCollapsible.tsx +1 -1
- package/src/components/Renderer/FormBodyTabbed.tsx +48 -7
- package/src/components/Tabs/FormBodyTabListWrapper.tsx +3 -2
- package/src/hooks/index.ts +3 -0
- package/lib/components/FormComponents/ItemParts/FadingCheckIcon.d.ts +0 -7
- package/lib/components/FormComponents/ItemParts/FadingCheckIcon.js +0 -26
- package/lib/components/FormComponents/ItemParts/FadingCheckIcon.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/ItemLabelText.d.ts +0 -8
- package/lib/components/FormComponents/ItemParts/ItemLabelText.js +0 -63
- package/lib/components/FormComponents/ItemParts/ItemLabelText.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.d.ts +0 -8
- package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js +0 -53
- package/lib/components/FormComponents/ItemParts/ItemLabelWrapper.js.map +0 -1
- package/lib/components/FormComponents/ItemParts/ItemTextSwitcher copy.d.ts +0 -7
- package/lib/components/FormComponents/ItemParts/ItemTextSwitcher copy.js +0 -39
- package/lib/components/FormComponents/ItemParts/ItemTextSwitcher copy.js.map +0 -1
- package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.d.ts +0 -10
- package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.js +0 -30
- package/lib/components/FormComponents/RepeatGroup/DeleteItemButton.js.map +0 -1
- package/lib/components/Iconify/Iconify.d.ts +0 -10
- package/lib/components/Iconify/Iconify.js +0 -26
- package/lib/components/Iconify/Iconify.js.map +0 -1
- package/lib/components/Renderer/FormBodyPage.d.ts +0 -9
- package/lib/components/Renderer/FormBodyPage.js +0 -43
- package/lib/components/Renderer/FormBodyPage.js.map +0 -1
- package/lib/components/Renderer/FormTitle.d.ts +0 -7
- package/lib/components/Renderer/FormTitle.js +0 -30
- package/lib/components/Renderer/FormTitle.js.map +0 -1
- package/lib/components/Renderer/FormTopLevelPage.d.ts +0 -9
- package/lib/components/Renderer/FormTopLevelPage.js +0 -29
- package/lib/components/Renderer/FormTopLevelPage.js.map +0 -1
- package/lib/hooks/useBooleanCalculatedExpression.d.ts +0 -12
- package/lib/hooks/useBooleanCalculatedExpression.js +0 -52
- package/lib/hooks/useBooleanCalculatedExpression.js.map +0 -1
- package/lib/hooks/useCalculatedExpressionAnimating.d.ts +0 -1
- package/lib/hooks/useCalculatedExpressionAnimating.js +0 -18
- package/lib/hooks/useCalculatedExpressionAnimating.js.map +0 -1
- package/lib/hooks/useDecimalCalculatedExpression.d.ts +0 -13
- package/lib/hooks/useDecimalCalculatedExpression.js +0 -58
- package/lib/hooks/useDecimalCalculatedExpression.js.map +0 -1
- package/lib/hooks/useInitialiseGroupTable.d.ts +0 -4
- package/lib/hooks/useInitialiseGroupTable.js +0 -36
- package/lib/hooks/useInitialiseGroupTable.js.map +0 -1
- package/lib/hooks/useIntegerCalculatedExpression.d.ts +0 -12
- package/lib/hooks/useIntegerCalculatedExpression.js +0 -55
- package/lib/hooks/useIntegerCalculatedExpression.js.map +0 -1
- package/lib/hooks/useNumberInput.d.ts +0 -3
- package/lib/hooks/useNumberInput.js +0 -31
- package/lib/hooks/useNumberInput.js.map +0 -1
- package/lib/hooks/useRepeatAnswers.d.ts +0 -4
- package/lib/hooks/useRepeatAnswers.js +0 -34
- package/lib/hooks/useRepeatAnswers.js.map +0 -1
- package/lib/hooks/useRepeatGroups.d.ts +0 -4
- package/lib/hooks/useRepeatGroups.js +0 -34
- package/lib/hooks/useRepeatGroups.js.map +0 -1
- package/lib/hooks/useShowFeedback.d.ts +0 -11
- package/lib/hooks/useShowFeedback.js +0 -33
- package/lib/hooks/useShowFeedback.js.map +0 -1
- package/lib/hooks/useStringCalculatedExpression.d.ts +0 -14
- package/lib/hooks/useStringCalculatedExpression.js +0 -69
- package/lib/hooks/useStringCalculatedExpression.js.map +0 -1
- package/lib/hooks/useStringInput.d.ts +0 -3
- package/lib/hooks/useStringInput.js +0 -31
- package/lib/hooks/useStringInput.js.map +0 -1
- package/lib/interfaces/itemPath.interface.d.ts +0 -31
- package/lib/interfaces/itemPath.interface.js +0 -2
- package/lib/interfaces/itemPath.interface.js.map +0 -1
- package/lib/interfaces/repeatItem.interface.d.ts +0 -5
- package/lib/interfaces/repeatItem.interface.js +0 -2
- package/lib/interfaces/repeatItem.interface.js.map +0 -1
- package/lib/stores/rendererStylingStore.d.ts +0 -144
- package/lib/stores/rendererStylingStore.js +0 -68
- package/lib/stores/rendererStylingStore.js.map +0 -1
- package/lib/stories/storybookWrappers/InitialiseFormWrapperForStorybook.d.ts +0 -30
- package/lib/stories/storybookWrappers/InitialiseFormWrapperForStorybook.js +0 -46
- package/lib/stories/storybookWrappers/InitialiseFormWrapperForStorybook.js.map +0 -1
- package/lib/stories/storybookWrappers/index.d.ts +0 -2
- package/lib/stories/storybookWrappers/index.js +0 -18
- package/lib/stories/storybookWrappers/index.js.map +0 -1
- package/lib/stories/testUtils.d.ts +0 -23
- package/lib/stories/testUtils.js +0 -249
- package/lib/stories/testUtils.js.map +0 -1
- package/lib/theme/Theme.d.ts +0 -44
- package/lib/theme/Theme.js +0 -45
- package/lib/theme/Theme.js.map +0 -1
- package/lib/theme/customGlobalStyles.d.ts +0 -2
- package/lib/theme/customGlobalStyles.js +0 -61
- package/lib/theme/customGlobalStyles.js.map +0 -1
- package/lib/theme/overrides/Accordion.d.ts +0 -14
- package/lib/theme/overrides/Accordion.js +0 -32
- package/lib/theme/overrides/Accordion.js.map +0 -1
- package/lib/theme/overrides/Autocomplete.d.ts +0 -10
- package/lib/theme/overrides/Autocomplete.js +0 -28
- package/lib/theme/overrides/Autocomplete.js.map +0 -1
- package/lib/theme/overrides/Button.d.ts +0 -33
- package/lib/theme/overrides/Button.js +0 -52
- package/lib/theme/overrides/Button.js.map +0 -1
- package/lib/theme/overrides/Card.d.ts +0 -35
- package/lib/theme/overrides/Card.js +0 -49
- package/lib/theme/overrides/Card.js.map +0 -1
- package/lib/theme/overrides/Input.d.ts +0 -64
- package/lib/theme/overrides/Input.js +0 -81
- package/lib/theme/overrides/Input.js.map +0 -1
- package/lib/theme/overrides/Overrides.d.ts +0 -3
- package/lib/theme/overrides/Overrides.js +0 -29
- package/lib/theme/overrides/Overrides.js.map +0 -1
- package/lib/theme/overrides/Paper.d.ts +0 -12
- package/lib/theme/overrides/Paper.js +0 -31
- package/lib/theme/overrides/Paper.js.map +0 -1
- package/lib/theme/overrides/SpeedDial.d.ts +0 -16
- package/lib/theme/overrides/SpeedDial.js +0 -34
- package/lib/theme/overrides/SpeedDial.js.map +0 -1
- package/lib/theme/overrides/Table.d.ts +0 -12
- package/lib/theme/overrides/Table.js +0 -30
- package/lib/theme/overrides/Table.js.map +0 -1
- package/lib/theme/palette.d.ts +0 -27
- package/lib/theme/palette.js +0 -67
- package/lib/theme/palette.js.map +0 -1
- package/lib/theme/shadows.d.ts +0 -2
- package/lib/theme/shadows.js +0 -52
- package/lib/theme/shadows.js.map +0 -1
- package/lib/utils/answerExpression.d.ts +0 -18
- package/lib/utils/answerExpression.js +0 -133
- package/lib/utils/answerExpression.js.map +0 -1
- package/lib/utils/dayjsExtend.d.ts +0 -1
- package/lib/utils/dayjsExtend.js +0 -22
- package/lib/utils/dayjsExtend.js.map +0 -1
- package/lib/utils/dynamicValueSet.d.ts +0 -5
- package/lib/utils/dynamicValueSet.js +0 -96
- package/lib/utils/dynamicValueSet.js.map +0 -1
- package/lib/utils/fhirpathAsyncUtils/fhirpath-async.d.ts +0 -14
- package/lib/utils/fhirpathAsyncUtils/fhirpath-async.js +0 -639
- package/lib/utils/fhirpathAsyncUtils/fhirpath-async.js.map +0 -1
- package/lib/utils/fhirpathAsyncUtils/outcome-utils.d.ts +0 -3
- package/lib/utils/fhirpathAsyncUtils/outcome-utils.js +0 -41
- package/lib/utils/fhirpathAsyncUtils/outcome-utils.js.map +0 -1
- package/lib/utils/itemControl.d.ts +0 -97
- package/lib/utils/itemControl.js +0 -336
- package/lib/utils/itemControl.js.map +0 -1
- package/lib/utils/itemPath.d.ts +0 -57
- package/lib/utils/itemPath.js +0 -75
- package/lib/utils/itemPath.js.map +0 -1
- package/lib/utils/questionnaireStoreUtils/addAdditionalVariables.d.ts +0 -2
- package/lib/utils/questionnaireStoreUtils/addAdditionalVariables.js +0 -43
- package/lib/utils/questionnaireStoreUtils/addAdditionalVariables.js.map +0 -1
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.d.ts +0 -3
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js +0 -101
- package/lib/utils/questionnaireStoreUtils/createQuestionaireModel.js.map +0 -1
- package/lib/utils/validateQuestionnaire.d.ts +0 -66
- package/lib/utils/validateQuestionnaire.js +0 -559
- package/lib/utils/validateQuestionnaire.js.map +0 -1
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Commonwealth Scientific and Industrial Research
|
|
3
|
-
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
export function addAdditionalVariables(existingVariables, additionalVariables) {
|
|
18
|
-
for (const key in additionalVariables) {
|
|
19
|
-
const variable = additionalVariables[key];
|
|
20
|
-
if (variable && isVariable(variable)) {
|
|
21
|
-
const expression = variable.valueExpression;
|
|
22
|
-
if (expression && expression.language && expression.name) {
|
|
23
|
-
if (expression.language === 'text/fhirpath') {
|
|
24
|
-
existingVariables.fhirPathVariables['QuestionnaireLevel'].push(expression);
|
|
25
|
-
}
|
|
26
|
-
else if (expression.language === 'application/x-fhir-query') {
|
|
27
|
-
existingVariables.xFhirQueryVariables[expression.name] = {
|
|
28
|
-
valueExpression: expression
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return existingVariables;
|
|
35
|
-
}
|
|
36
|
-
function isVariable(variable) {
|
|
37
|
-
var _a, _b;
|
|
38
|
-
const v = variable;
|
|
39
|
-
return ((v.url === 'http://hl7.org/fhir/StructureDefinition/variable' &&
|
|
40
|
-
((_a = v.valueExpression) === null || _a === void 0 ? void 0 : _a.language) === 'text/fhirpath') ||
|
|
41
|
-
((_b = v.valueExpression) === null || _b === void 0 ? void 0 : _b.language) === 'application/x-fhir-query');
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=addAdditionalVariables.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addAdditionalVariables.js","sourceRoot":"","sources":["../../../src/utils/questionnaireStoreUtils/addAdditionalVariables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,MAAM,UAAU,sBAAsB,CACpC,iBAA4B,EAC5B,mBAA2C;IAE3C,KAAK,MAAM,GAAG,IAAI,mBAAmB,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;QAE1C,IAAI,QAAQ,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YACrC,MAAM,UAAU,GAAG,QAAQ,CAAC,eAAe,CAAC;YAC5C,IAAI,UAAU,IAAI,UAAU,CAAC,QAAQ,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC;gBACzD,IAAI,UAAU,CAAC,QAAQ,KAAK,eAAe,EAAE,CAAC;oBAC5C,iBAAiB,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC7E,CAAC;qBAAM,IAAI,UAAU,CAAC,QAAQ,KAAK,0BAA0B,EAAE,CAAC;oBAC9D,iBAAiB,CAAC,mBAAmB,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG;wBACvD,eAAe,EAAE,UAAU;qBAC5B,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,SAAS,UAAU,CAAC,QAAgB;;IAClC,MAAM,CAAC,GAAG,QAAqB,CAAC;IAChC,OAAO,CACL,CAAC,CAAC,CAAC,GAAG,KAAK,kDAAkD;QAC3D,CAAA,MAAA,CAAC,CAAC,eAAe,0CAAE,QAAQ,MAAK,eAAe,CAAC;QAClD,CAAA,MAAA,CAAC,CAAC,eAAe,0CAAE,QAAQ,MAAK,0BAA0B,CAC3D,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { Questionnaire } from 'fhir/r4';
|
|
2
|
-
import type { QuestionnaireModel } from '../../interfaces/questionnaireStore.interface';
|
|
3
|
-
export declare function createQuestionnaireModel(questionnaire: Questionnaire, additionalVariables: Record<string, object>, terminologyServerUrl: string): Promise<QuestionnaireModel>;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2024 Commonwealth Scientific and Industrial Research
|
|
3
|
-
* Organisation (CSIRO) ABN 41 687 119 230.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
import { extractLaunchContexts } from './extractLaunchContext';
|
|
27
|
-
import { extractQuestionnaireLevelVariables } from './extractVariables';
|
|
28
|
-
import { extractTabs } from './extractTabs';
|
|
29
|
-
import { extractPages } from './extractPages';
|
|
30
|
-
import { extractContainedValueSets } from './extractContainedValueSets';
|
|
31
|
-
import { extractOtherExtensions } from './extractOtherExtensions';
|
|
32
|
-
import { resolveValueSets } from './resolveValueSets';
|
|
33
|
-
import { addAdditionalVariables } from './addAdditionalVariables';
|
|
34
|
-
import { getLinkIdTypeTuples } from '../qItem';
|
|
35
|
-
import { addDisplayToAnswerOptions, addDisplayToProcessedCodings } from './addDisplayToCodings';
|
|
36
|
-
export function createQuestionnaireModel(questionnaire, additionalVariables, terminologyServerUrl) {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
if (!questionnaire.item) {
|
|
39
|
-
return createEmptyModel();
|
|
40
|
-
}
|
|
41
|
-
const itemTypes = Object.fromEntries(getLinkIdTypeTuples(questionnaire));
|
|
42
|
-
const tabs = extractTabs(questionnaire);
|
|
43
|
-
const pages = extractPages(questionnaire);
|
|
44
|
-
const launchContexts = extractLaunchContexts(questionnaire);
|
|
45
|
-
let variables = extractQuestionnaireLevelVariables(questionnaire);
|
|
46
|
-
variables = addAdditionalVariables(variables, additionalVariables);
|
|
47
|
-
const extractContainedValueSetsResult = extractContainedValueSets(questionnaire, terminologyServerUrl);
|
|
48
|
-
let valueSetPromises = extractContainedValueSetsResult.valueSetPromises;
|
|
49
|
-
let processedValueSetCodings = extractContainedValueSetsResult.processedValueSetCodings;
|
|
50
|
-
const processedValueSets = extractContainedValueSetsResult.processedValueSets;
|
|
51
|
-
const dynamicValueSets = extractContainedValueSetsResult.dynamicValueSets;
|
|
52
|
-
const extractOtherExtensionsResult = extractOtherExtensions(questionnaire, variables, valueSetPromises, terminologyServerUrl);
|
|
53
|
-
const { enableWhenItems, enableWhenExpressions, calculatedExpressions, initialExpressions, answerExpressions, answerOptions } = extractOtherExtensionsResult;
|
|
54
|
-
variables = extractOtherExtensionsResult.variables;
|
|
55
|
-
valueSetPromises = extractOtherExtensionsResult.valueSetPromises;
|
|
56
|
-
const resolveValueSetsResult = yield resolveValueSets(variables, valueSetPromises, processedValueSetCodings, terminologyServerUrl);
|
|
57
|
-
variables = resolveValueSetsResult.variables;
|
|
58
|
-
processedValueSetCodings = resolveValueSetsResult.processedValueSetCodings;
|
|
59
|
-
// In processedCodings, add display values to codings lacking them
|
|
60
|
-
processedValueSetCodings = yield addDisplayToProcessedCodings(processedValueSetCodings, terminologyServerUrl);
|
|
61
|
-
// In answerOptions, add display values to codings lacking them
|
|
62
|
-
const completeAnswerOptions = yield addDisplayToAnswerOptions(answerOptions, terminologyServerUrl);
|
|
63
|
-
return {
|
|
64
|
-
itemTypes,
|
|
65
|
-
tabs,
|
|
66
|
-
pages,
|
|
67
|
-
variables,
|
|
68
|
-
launchContexts,
|
|
69
|
-
enableWhenItems,
|
|
70
|
-
enableWhenExpressions,
|
|
71
|
-
calculatedExpressions,
|
|
72
|
-
initialExpressions,
|
|
73
|
-
answerExpressions,
|
|
74
|
-
answerOptions: completeAnswerOptions,
|
|
75
|
-
processedValueSetCodings,
|
|
76
|
-
processedValueSets,
|
|
77
|
-
dynamicValueSets,
|
|
78
|
-
fhirPathContext: {}
|
|
79
|
-
};
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
function createEmptyModel() {
|
|
83
|
-
return {
|
|
84
|
-
itemTypes: {},
|
|
85
|
-
tabs: {},
|
|
86
|
-
pages: {},
|
|
87
|
-
variables: { fhirPathVariables: {}, xFhirQueryVariables: {} },
|
|
88
|
-
launchContexts: {},
|
|
89
|
-
calculatedExpressions: {},
|
|
90
|
-
initialExpressions: {},
|
|
91
|
-
enableWhenExpressions: { singleExpressions: {}, repeatExpressions: {} },
|
|
92
|
-
answerExpressions: {},
|
|
93
|
-
answerOptions: {},
|
|
94
|
-
enableWhenItems: { singleItems: {}, repeatItems: {} },
|
|
95
|
-
processedValueSetCodings: {},
|
|
96
|
-
processedValueSets: {},
|
|
97
|
-
dynamicValueSets: {},
|
|
98
|
-
fhirPathContext: {}
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
//# sourceMappingURL=createQuestionaireModel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createQuestionaireModel.js","sourceRoot":"","sources":["../../../src/utils/questionnaireStoreUtils/createQuestionaireModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;AAOH,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,kCAAkC,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EA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B,CAAC;AACJ,CAAC"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { OperationOutcome, Questionnaire, QuestionnaireItem, QuestionnaireResponse } from 'fhir/r4';
|
|
2
|
-
import type { RegexValidation } from '../interfaces/regex.interface';
|
|
3
|
-
export declare enum ValidationResult {
|
|
4
|
-
unknown = "unknown",
|
|
5
|
-
questionnaireNotFound = "questionnaireNotFound",
|
|
6
|
-
questionnaireInactive = "questionnaireInactive",
|
|
7
|
-
questionnaireDraft = "questionnaireDraft",
|
|
8
|
-
questionnaireRetired = "questionnaireRetired",
|
|
9
|
-
invalidLinkId = "invalidLinkId",
|
|
10
|
-
invalidType = "invalidType",
|
|
11
|
-
invalidAnswerType = "invalidAnswerType",
|
|
12
|
-
invalidAnswerOption = "invalidAnswerOption",
|
|
13
|
-
exclusiveAnswerOption = "exclusiveAnswerOption",
|
|
14
|
-
invalidUrlValue = "invalidUrlValue",
|
|
15
|
-
groupShouldNotHaveAnswers = "groupShouldNotHaveAnswers",
|
|
16
|
-
required = "required",
|
|
17
|
-
invariant = "invariant",
|
|
18
|
-
invariantExecution = "invariantExecution",
|
|
19
|
-
repeats = "repeats",
|
|
20
|
-
minCount = "minCount",
|
|
21
|
-
maxCount = "maxCount",
|
|
22
|
-
minValue = "minValue",
|
|
23
|
-
maxValue = "maxValue",
|
|
24
|
-
maxDecimalPlaces = "maxDecimalPlaces",
|
|
25
|
-
minLength = "minLength",
|
|
26
|
-
maxLength = "maxLength",
|
|
27
|
-
invalidNewLine = "invalidNewLine",
|
|
28
|
-
invalidCoding = "invalidCoding",
|
|
29
|
-
tsError = "tsError",
|
|
30
|
-
maxAttachmentSize = "maxAttachmentSize",
|
|
31
|
-
attachmentSizeInconsistent = "attachmentSizeInconsistent",
|
|
32
|
-
invalidAttachmentType = "invalidAttachmentType",
|
|
33
|
-
displayAnswer = "displayAnswer",
|
|
34
|
-
regex = "regex",
|
|
35
|
-
regexTimeout = "regexTimeout",
|
|
36
|
-
invalidRefValue = "invalidRefValue",
|
|
37
|
-
invalidRefResourceType = "invalidRefResourceType",
|
|
38
|
-
invalidRefResourceTypeRestriction = "invalidRefResourceTypeRestriction",
|
|
39
|
-
minValueIncompatUnits = "minValueIncompatUnits",
|
|
40
|
-
maxValueIncompatUnits = "maxValueIncompatUnits",
|
|
41
|
-
invalidUnit = "invalidUnit",
|
|
42
|
-
invalidUnitValueSet = "invalidUnitValueSet"
|
|
43
|
-
}
|
|
44
|
-
interface ValidateQuestionnaireParams {
|
|
45
|
-
questionnaire: Questionnaire;
|
|
46
|
-
questionnaireResponse: QuestionnaireResponse;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Recursively go through the questionnaireResponse and check for un-filled required qItems
|
|
50
|
-
* At the moment item.required for group items are not checked
|
|
51
|
-
*
|
|
52
|
-
* @author Sean Fong
|
|
53
|
-
*/
|
|
54
|
-
export declare function validateQuestionnaire(params: ValidateQuestionnaireParams): Record<string, OperationOutcome>;
|
|
55
|
-
interface GetInputInvalidTypeParams {
|
|
56
|
-
qItem: QuestionnaireItem;
|
|
57
|
-
input: string;
|
|
58
|
-
regexValidation?: RegexValidation;
|
|
59
|
-
minLength?: number;
|
|
60
|
-
maxLength?: number;
|
|
61
|
-
maxDecimalPlaces?: number;
|
|
62
|
-
minValue?: string | number;
|
|
63
|
-
maxValue?: string | number;
|
|
64
|
-
}
|
|
65
|
-
export declare function getInputInvalidType(getInputInvalidTypeParams: GetInputInvalidTypeParams): ValidationResult | null;
|
|
66
|
-
export {};
|